1 /* SPDX-License-Identifier: GPL-2.0 */
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
),
16 __array( char, comm
, TASK_COMM_LEN
)
18 __field( u64
, duration
)
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",
32 __print_ns_to_secs(__entry
->start
),
33 __print_ns_without_secs(__entry
->start
),
37 TRACE_EVENT(softirq_noise
,
39 TP_PROTO(int vector
, u64 start
, u64 duration
),
41 TP_ARGS(vector
, start
, duration
),
45 __field( u64
, duration
)
46 __field( int, vector
)
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
),
58 __print_ns_to_secs(__entry
->start
),
59 __print_ns_without_secs(__entry
->start
),
63 TRACE_EVENT(irq_noise
,
65 TP_PROTO(int vector
, const char *desc
, u64 start
, u64 duration
),
67 TP_ARGS(vector
, desc
, start
, duration
),
71 __field( u64
, duration
)
72 __string( desc
, desc
)
73 __field( int, vector
)
79 __entry
->vector
= vector
;
80 __entry
->start
= start
;
81 __entry
->duration
= duration
;
84 TP_printk("%s:%d start %llu.%09u duration %llu ns",
87 __print_ns_to_secs(__entry
->start
),
88 __print_ns_without_secs(__entry
->start
),
92 TRACE_EVENT(nmi_noise
,
94 TP_PROTO(u64 start
, u64 duration
),
96 TP_ARGS(start
, duration
),
100 __field( u64
, duration
)
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
),
114 TRACE_EVENT(sample_threshold
,
116 TP_PROTO(u64 start
, u64 duration
, u64 interference
),
118 TP_ARGS(start
, duration
, interference
),
121 __field( u64
, start
)
122 __field( u64
, duration
)
123 __field( u64
, interference
)
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
),
136 __entry
->interference
)
139 #endif /* _TRACE_OSNOISE_H */
141 /* This part must be outside protection */
142 #include <trace/define_trace.h>