These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / include / trace / events / hist.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM hist
3
4 #if !defined(_TRACE_HIST_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_HIST_H
6
7 #include "latency_hist.h"
8 #include <linux/tracepoint.h>
9
10 #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
11 #define trace_preemptirqsoff_hist(a, b)
12 #define trace_preemptirqsoff_hist_rcuidle(a, b)
13 #else
14 TRACE_EVENT(preemptirqsoff_hist,
15
16         TP_PROTO(int reason, int starthist),
17
18         TP_ARGS(reason, starthist),
19
20         TP_STRUCT__entry(
21                 __field(int,    reason)
22                 __field(int,    starthist)
23         ),
24
25         TP_fast_assign(
26                 __entry->reason         = reason;
27                 __entry->starthist      = starthist;
28         ),
29
30         TP_printk("reason=%s starthist=%s", getaction(__entry->reason),
31                   __entry->starthist ? "start" : "stop")
32 );
33 #endif
34
35 #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
36 #define trace_hrtimer_interrupt(a, b, c, d)
37 #else
38 TRACE_EVENT(hrtimer_interrupt,
39
40         TP_PROTO(int cpu, long long offset, struct task_struct *curr,
41                 struct task_struct *task),
42
43         TP_ARGS(cpu, offset, curr, task),
44
45         TP_STRUCT__entry(
46                 __field(int,            cpu)
47                 __field(long long,      offset)
48                 __array(char,           ccomm,  TASK_COMM_LEN)
49                 __field(int,            cprio)
50                 __array(char,           tcomm,  TASK_COMM_LEN)
51                 __field(int,            tprio)
52         ),
53
54         TP_fast_assign(
55                 __entry->cpu    = cpu;
56                 __entry->offset = offset;
57                 memcpy(__entry->ccomm, curr->comm, TASK_COMM_LEN);
58                 __entry->cprio  = curr->prio;
59                 memcpy(__entry->tcomm, task != NULL ? task->comm : "<none>",
60                         task != NULL ? TASK_COMM_LEN : 7);
61                 __entry->tprio  = task != NULL ? task->prio : -1;
62         ),
63
64         TP_printk("cpu=%d offset=%lld curr=%s[%d] thread=%s[%d]",
65                 __entry->cpu, __entry->offset, __entry->ccomm,
66                 __entry->cprio, __entry->tcomm, __entry->tprio)
67 );
68 #endif
69
70 #endif /* _TRACE_HIST_H */
71
72 /* This part must be outside protection */
73 #include <trace/define_trace.h>