Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / osnoise.h
bloba2379a4f06849dc2a1a6c49981ab211c0973b07c
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM osnoise
5 #if !defined(_OSNOISE_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _OSNOISE_TRACE_H
8 #include <linux/tracepoint.h>
9 TRACE_EVENT(thread_noise,
11 TP_PROTO(struct task_struct *t, u64 start, u64 duration),
13 TP_ARGS(t, start, duration),
15 TP_STRUCT__entry(
16 __array( char, comm, TASK_COMM_LEN)
17 __field( u64, start )
18 __field( u64, duration)
19 __field( pid_t, pid )
22 TP_fast_assign(
23 memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
24 __entry->pid = t->pid;
25 __entry->start = start;
26 __entry->duration = duration;
29 TP_printk("%8s:%d start %llu.%09u duration %llu ns",
30 __entry->comm,
31 __entry->pid,
32 __print_ns_to_secs(__entry->start),
33 __print_ns_without_secs(__entry->start),
34 __entry->duration)
37 TRACE_EVENT(softirq_noise,
39 TP_PROTO(int vector, u64 start, u64 duration),
41 TP_ARGS(vector, start, duration),
43 TP_STRUCT__entry(
44 __field( u64, start )
45 __field( u64, duration)
46 __field( int, vector )
49 TP_fast_assign(
50 __entry->vector = vector;
51 __entry->start = start;
52 __entry->duration = duration;
55 TP_printk("%8s:%d start %llu.%09u duration %llu ns",
56 show_softirq_name(__entry->vector),
57 __entry->vector,
58 __print_ns_to_secs(__entry->start),
59 __print_ns_without_secs(__entry->start),
60 __entry->duration)
63 TRACE_EVENT(irq_noise,
65 TP_PROTO(int vector, const char *desc, u64 start, u64 duration),
67 TP_ARGS(vector, desc, start, duration),
69 TP_STRUCT__entry(
70 __field( u64, start )
71 __field( u64, duration)
72 __string( desc, desc )
73 __field( int, vector )
77 TP_fast_assign(
78 __assign_str(desc);
79 __entry->vector = vector;
80 __entry->start = start;
81 __entry->duration = duration;
84 TP_printk("%s:%d start %llu.%09u duration %llu ns",
85 __get_str(desc),
86 __entry->vector,
87 __print_ns_to_secs(__entry->start),
88 __print_ns_without_secs(__entry->start),
89 __entry->duration)
92 TRACE_EVENT(nmi_noise,
94 TP_PROTO(u64 start, u64 duration),
96 TP_ARGS(start, duration),
98 TP_STRUCT__entry(
99 __field( u64, start )
100 __field( u64, duration)
103 TP_fast_assign(
104 __entry->start = start;
105 __entry->duration = duration;
108 TP_printk("start %llu.%09u duration %llu ns",
109 __print_ns_to_secs(__entry->start),
110 __print_ns_without_secs(__entry->start),
111 __entry->duration)
114 TRACE_EVENT(sample_threshold,
116 TP_PROTO(u64 start, u64 duration, u64 interference),
118 TP_ARGS(start, duration, interference),
120 TP_STRUCT__entry(
121 __field( u64, start )
122 __field( u64, duration)
123 __field( u64, interference)
126 TP_fast_assign(
127 __entry->start = start;
128 __entry->duration = duration;
129 __entry->interference = interference;
132 TP_printk("start %llu.%09u duration %llu ns interference %llu",
133 __print_ns_to_secs(__entry->start),
134 __print_ns_without_secs(__entry->start),
135 __entry->duration,
136 __entry->interference)
139 #endif /* _TRACE_OSNOISE_H */
141 /* This part must be outside protection */
142 #include <trace/define_trace.h>