Add the rt linux 4.1.3-rt3 as base
[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 #else
13 TRACE_EVENT(preemptirqsoff_hist,
14
15         TP_PROTO(int reason, int starthist),
16
17         TP_ARGS(reason, starthist),
18
19         TP_STRUCT__entry(
20                 __field(int,    reason)
21                 __field(int,    starthist)
22         ),
23
24         TP_fast_assign(
25                 __entry->reason         = reason;
26                 __entry->starthist      = starthist;
27         ),
28
29         TP_printk("reason=%s starthist=%s", getaction(__entry->reason),
30                   __entry->starthist ? "start" : "stop")
31 );
32 #endif
33
34 #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
35 #define trace_hrtimer_interrupt(a, b, c, d)
36 #else
37 TRACE_EVENT(hrtimer_interrupt,
38
39         TP_PROTO(int cpu, long long offset, struct task_struct *curr,
40                 struct task_struct *task),
41
42         TP_ARGS(cpu, offset, curr, task),
43
44         TP_STRUCT__entry(
45                 __field(int,            cpu)
46                 __field(long long,      offset)
47                 __array(char,           ccomm,  TASK_COMM_LEN)
48                 __field(int,            cprio)
49                 __array(char,           tcomm,  TASK_COMM_LEN)
50                 __field(int,            tprio)
51         ),
52
53         TP_fast_assign(
54                 __entry->cpu    = cpu;
55                 __entry->offset = offset;
56                 memcpy(__entry->ccomm, curr->comm, TASK_COMM_LEN);
57                 __entry->cprio  = curr->prio;
58                 memcpy(__entry->tcomm, task != NULL ? task->comm : "<none>",
59                         task != NULL ? TASK_COMM_LEN : 7);
60                 __entry->tprio  = task != NULL ? task->prio : -1;
61         ),
62
63         TP_printk("cpu=%d offset=%lld curr=%s[%d] thread=%s[%d]",
64                 __entry->cpu, __entry->offset, __entry->ccomm,
65                 __entry->cprio, __entry->tcomm, __entry->tprio)
66 );
67 #endif
68
69 #endif /* _TRACE_HIST_H */
70
71 /* This part must be outside protection */
72 #include <trace/define_trace.h>