diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/boot.h | 60 | ||||
-rw-r--r-- | include/trace/events/power.h | 27 | ||||
-rw-r--r-- | include/trace/events/sched.h | 32 | ||||
-rw-r--r-- | include/trace/events/timer.h | 80 | ||||
-rw-r--r-- | include/trace/events/workqueue.h | 92 | ||||
-rw-r--r-- | include/trace/ftrace.h | 23 | ||||
-rw-r--r-- | include/trace/syscall.h | 1 |
7 files changed, 62 insertions, 253 deletions
diff --git a/include/trace/boot.h b/include/trace/boot.h deleted file mode 100644 index 088ea089e31..00000000000 --- a/include/trace/boot.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | #ifndef _LINUX_TRACE_BOOT_H | ||
2 | #define _LINUX_TRACE_BOOT_H | ||
3 | |||
4 | #include <linux/module.h> | ||
5 | #include <linux/kallsyms.h> | ||
6 | #include <linux/init.h> | ||
7 | |||
8 | /* | ||
9 | * Structure which defines the trace of an initcall | ||
10 | * while it is called. | ||
11 | * You don't have to fill the func field since it is | ||
12 | * only used internally by the tracer. | ||
13 | */ | ||
14 | struct boot_trace_call { | ||
15 | pid_t caller; | ||
16 | char func[KSYM_SYMBOL_LEN]; | ||
17 | }; | ||
18 | |||
19 | /* | ||
20 | * Structure which defines the trace of an initcall | ||
21 | * while it returns. | ||
22 | */ | ||
23 | struct boot_trace_ret { | ||
24 | char func[KSYM_SYMBOL_LEN]; | ||
25 | int result; | ||
26 | unsigned long long duration; /* nsecs */ | ||
27 | }; | ||
28 | |||
29 | #ifdef CONFIG_BOOT_TRACER | ||
30 | /* Append the traces on the ring-buffer */ | ||
31 | extern void trace_boot_call(struct boot_trace_call *bt, initcall_t fn); | ||
32 | extern void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn); | ||
33 | |||
34 | /* Tells the tracer that smp_pre_initcall is finished. | ||
35 | * So we can start the tracing | ||
36 | */ | ||
37 | extern void start_boot_trace(void); | ||
38 | |||
39 | /* Resume the tracing of other necessary events | ||
40 | * such as sched switches | ||
41 | */ | ||
42 | extern void enable_boot_trace(void); | ||
43 | |||
44 | /* Suspend this tracing. Actually, only sched_switches tracing have | ||
45 | * to be suspended. Initcalls doesn't need it.) | ||
46 | */ | ||
47 | extern void disable_boot_trace(void); | ||
48 | #else | ||
49 | static inline | ||
50 | void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { } | ||
51 | |||
52 | static inline | ||
53 | void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { } | ||
54 | |||
55 | static inline void start_boot_trace(void) { } | ||
56 | static inline void enable_boot_trace(void) { } | ||
57 | static inline void disable_boot_trace(void) { } | ||
58 | #endif /* CONFIG_BOOT_TRACER */ | ||
59 | |||
60 | #endif /* __LINUX_TRACE_BOOT_H */ | ||
diff --git a/include/trace/events/power.h b/include/trace/events/power.h index c4efe9b8280..35a2a6e7bf1 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h | |||
@@ -18,52 +18,55 @@ enum { | |||
18 | 18 | ||
19 | DECLARE_EVENT_CLASS(power, | 19 | DECLARE_EVENT_CLASS(power, |
20 | 20 | ||
21 | TP_PROTO(unsigned int type, unsigned int state), | 21 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
22 | 22 | ||
23 | TP_ARGS(type, state), | 23 | TP_ARGS(type, state, cpu_id), |
24 | 24 | ||
25 | TP_STRUCT__entry( | 25 | TP_STRUCT__entry( |
26 | __field( u64, type ) | 26 | __field( u64, type ) |
27 | __field( u64, state ) | 27 | __field( u64, state ) |
28 | __field( u64, cpu_id ) | ||
28 | ), | 29 | ), |
29 | 30 | ||
30 | TP_fast_assign( | 31 | TP_fast_assign( |
31 | __entry->type = type; | 32 | __entry->type = type; |
32 | __entry->state = state; | 33 | __entry->state = state; |
34 | __entry->cpu_id = cpu_id; | ||
33 | ), | 35 | ), |
34 | 36 | ||
35 | TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) | 37 | TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type, |
38 | (unsigned long)__entry->state, (unsigned long)__entry->cpu_id) | ||
36 | ); | 39 | ); |
37 | 40 | ||
38 | DEFINE_EVENT(power, power_start, | 41 | DEFINE_EVENT(power, power_start, |
39 | 42 | ||
40 | TP_PROTO(unsigned int type, unsigned int state), | 43 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
41 | 44 | ||
42 | TP_ARGS(type, state) | 45 | TP_ARGS(type, state, cpu_id) |
43 | ); | 46 | ); |
44 | 47 | ||
45 | DEFINE_EVENT(power, power_frequency, | 48 | DEFINE_EVENT(power, power_frequency, |
46 | 49 | ||
47 | TP_PROTO(unsigned int type, unsigned int state), | 50 | TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), |
48 | 51 | ||
49 | TP_ARGS(type, state) | 52 | TP_ARGS(type, state, cpu_id) |
50 | ); | 53 | ); |
51 | 54 | ||
52 | TRACE_EVENT(power_end, | 55 | TRACE_EVENT(power_end, |
53 | 56 | ||
54 | TP_PROTO(int dummy), | 57 | TP_PROTO(unsigned int cpu_id), |
55 | 58 | ||
56 | TP_ARGS(dummy), | 59 | TP_ARGS(cpu_id), |
57 | 60 | ||
58 | TP_STRUCT__entry( | 61 | TP_STRUCT__entry( |
59 | __field( u64, dummy ) | 62 | __field( u64, cpu_id ) |
60 | ), | 63 | ), |
61 | 64 | ||
62 | TP_fast_assign( | 65 | TP_fast_assign( |
63 | __entry->dummy = 0xffff; | 66 | __entry->cpu_id = cpu_id; |
64 | ), | 67 | ), |
65 | 68 | ||
66 | TP_printk("dummy=%lu", (unsigned long)__entry->dummy) | 69 | TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id) |
67 | 70 | ||
68 | ); | 71 | ); |
69 | 72 | ||
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index b9e1dd6c620..9208c92aeab 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -50,31 +50,6 @@ TRACE_EVENT(sched_kthread_stop_ret, | |||
50 | ); | 50 | ); |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Tracepoint for waiting on task to unschedule: | ||
54 | */ | ||
55 | TRACE_EVENT(sched_wait_task, | ||
56 | |||
57 | TP_PROTO(struct task_struct *p), | ||
58 | |||
59 | TP_ARGS(p), | ||
60 | |||
61 | TP_STRUCT__entry( | ||
62 | __array( char, comm, TASK_COMM_LEN ) | ||
63 | __field( pid_t, pid ) | ||
64 | __field( int, prio ) | ||
65 | ), | ||
66 | |||
67 | TP_fast_assign( | ||
68 | memcpy(__entry->comm, p->comm, TASK_COMM_LEN); | ||
69 | __entry->pid = p->pid; | ||
70 | __entry->prio = p->prio; | ||
71 | ), | ||
72 | |||
73 | TP_printk("comm=%s pid=%d prio=%d", | ||
74 | __entry->comm, __entry->pid, __entry->prio) | ||
75 | ); | ||
76 | |||
77 | /* | ||
78 | * Tracepoint for waking up a task: | 53 | * Tracepoint for waking up a task: |
79 | */ | 54 | */ |
80 | DECLARE_EVENT_CLASS(sched_wakeup_template, | 55 | DECLARE_EVENT_CLASS(sched_wakeup_template, |
@@ -240,6 +215,13 @@ DEFINE_EVENT(sched_process_template, sched_process_exit, | |||
240 | TP_ARGS(p)); | 215 | TP_ARGS(p)); |
241 | 216 | ||
242 | /* | 217 | /* |
218 | * Tracepoint for waiting on task to unschedule: | ||
219 | */ | ||
220 | DEFINE_EVENT(sched_process_template, sched_wait_task, | ||
221 | TP_PROTO(struct task_struct *p), | ||
222 | TP_ARGS(p)); | ||
223 | |||
224 | /* | ||
243 | * Tracepoint for a waiting task: | 225 | * Tracepoint for a waiting task: |
244 | */ | 226 | */ |
245 | TRACE_EVENT(sched_process_wait, | 227 | TRACE_EVENT(sched_process_wait, |
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 9496b965d62..c624126a9c8 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h | |||
@@ -8,11 +8,7 @@ | |||
8 | #include <linux/hrtimer.h> | 8 | #include <linux/hrtimer.h> |
9 | #include <linux/timer.h> | 9 | #include <linux/timer.h> |
10 | 10 | ||
11 | /** | 11 | DECLARE_EVENT_CLASS(timer_class, |
12 | * timer_init - called when the timer is initialized | ||
13 | * @timer: pointer to struct timer_list | ||
14 | */ | ||
15 | TRACE_EVENT(timer_init, | ||
16 | 12 | ||
17 | TP_PROTO(struct timer_list *timer), | 13 | TP_PROTO(struct timer_list *timer), |
18 | 14 | ||
@@ -30,6 +26,17 @@ TRACE_EVENT(timer_init, | |||
30 | ); | 26 | ); |
31 | 27 | ||
32 | /** | 28 | /** |
29 | * timer_init - called when the timer is initialized | ||
30 | * @timer: pointer to struct timer_list | ||
31 | */ | ||
32 | DEFINE_EVENT(timer_class, timer_init, | ||
33 | |||
34 | TP_PROTO(struct timer_list *timer), | ||
35 | |||
36 | TP_ARGS(timer) | ||
37 | ); | ||
38 | |||
39 | /** | ||
33 | * timer_start - called when the timer is started | 40 | * timer_start - called when the timer is started |
34 | * @timer: pointer to struct timer_list | 41 | * @timer: pointer to struct timer_list |
35 | * @expires: the timers expiry time | 42 | * @expires: the timers expiry time |
@@ -94,42 +101,22 @@ TRACE_EVENT(timer_expire_entry, | |||
94 | * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might | 101 | * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might |
95 | * be invalid. We solely track the pointer. | 102 | * be invalid. We solely track the pointer. |
96 | */ | 103 | */ |
97 | TRACE_EVENT(timer_expire_exit, | 104 | DEFINE_EVENT(timer_class, timer_expire_exit, |
98 | 105 | ||
99 | TP_PROTO(struct timer_list *timer), | 106 | TP_PROTO(struct timer_list *timer), |
100 | 107 | ||
101 | TP_ARGS(timer), | 108 | TP_ARGS(timer) |
102 | |||
103 | TP_STRUCT__entry( | ||
104 | __field(void *, timer ) | ||
105 | ), | ||
106 | |||
107 | TP_fast_assign( | ||
108 | __entry->timer = timer; | ||
109 | ), | ||
110 | |||
111 | TP_printk("timer=%p", __entry->timer) | ||
112 | ); | 109 | ); |
113 | 110 | ||
114 | /** | 111 | /** |
115 | * timer_cancel - called when the timer is canceled | 112 | * timer_cancel - called when the timer is canceled |
116 | * @timer: pointer to struct timer_list | 113 | * @timer: pointer to struct timer_list |
117 | */ | 114 | */ |
118 | TRACE_EVENT(timer_cancel, | 115 | DEFINE_EVENT(timer_class, timer_cancel, |
119 | 116 | ||
120 | TP_PROTO(struct timer_list *timer), | 117 | TP_PROTO(struct timer_list *timer), |
121 | 118 | ||
122 | TP_ARGS(timer), | 119 | TP_ARGS(timer) |
123 | |||
124 | TP_STRUCT__entry( | ||
125 | __field( void *, timer ) | ||
126 | ), | ||
127 | |||
128 | TP_fast_assign( | ||
129 | __entry->timer = timer; | ||
130 | ), | ||
131 | |||
132 | TP_printk("timer=%p", __entry->timer) | ||
133 | ); | 120 | ); |
134 | 121 | ||
135 | /** | 122 | /** |
@@ -224,14 +211,7 @@ TRACE_EVENT(hrtimer_expire_entry, | |||
224 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) | 211 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) |
225 | ); | 212 | ); |
226 | 213 | ||
227 | /** | 214 | DECLARE_EVENT_CLASS(hrtimer_class, |
228 | * hrtimer_expire_exit - called immediately after the hrtimer callback returns | ||
229 | * @timer: pointer to struct hrtimer | ||
230 | * | ||
231 | * When used in combination with the hrtimer_expire_entry tracepoint we can | ||
232 | * determine the runtime of the callback function. | ||
233 | */ | ||
234 | TRACE_EVENT(hrtimer_expire_exit, | ||
235 | 215 | ||
236 | TP_PROTO(struct hrtimer *hrtimer), | 216 | TP_PROTO(struct hrtimer *hrtimer), |
237 | 217 | ||
@@ -249,24 +229,28 @@ TRACE_EVENT(hrtimer_expire_exit, | |||
249 | ); | 229 | ); |
250 | 230 | ||
251 | /** | 231 | /** |
252 | * hrtimer_cancel - called when the hrtimer is canceled | 232 | * hrtimer_expire_exit - called immediately after the hrtimer callback returns |
253 | * @hrtimer: pointer to struct hrtimer | 233 | * @timer: pointer to struct hrtimer |
234 | * | ||
235 | * When used in combination with the hrtimer_expire_entry tracepoint we can | ||
236 | * determine the runtime of the callback function. | ||
254 | */ | 237 | */ |
255 | TRACE_EVENT(hrtimer_cancel, | 238 | DEFINE_EVENT(hrtimer_class, hrtimer_expire_exit, |
256 | 239 | ||
257 | TP_PROTO(struct hrtimer *hrtimer), | 240 | TP_PROTO(struct hrtimer *hrtimer), |
258 | 241 | ||
259 | TP_ARGS(hrtimer), | 242 | TP_ARGS(hrtimer) |
243 | ); | ||
260 | 244 | ||
261 | TP_STRUCT__entry( | 245 | /** |
262 | __field( void *, hrtimer ) | 246 | * hrtimer_cancel - called when the hrtimer is canceled |
263 | ), | 247 | * @hrtimer: pointer to struct hrtimer |
248 | */ | ||
249 | DEFINE_EVENT(hrtimer_class, hrtimer_cancel, | ||
264 | 250 | ||
265 | TP_fast_assign( | 251 | TP_PROTO(struct hrtimer *hrtimer), |
266 | __entry->hrtimer = hrtimer; | ||
267 | ), | ||
268 | 252 | ||
269 | TP_printk("hrtimer=%p", __entry->hrtimer) | 253 | TP_ARGS(hrtimer) |
270 | ); | 254 | ); |
271 | 255 | ||
272 | /** | 256 | /** |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h deleted file mode 100644 index d6c974474e7..00000000000 --- a/include/trace/events/workqueue.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM workqueue | ||
3 | |||
4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_WORKQUEUE_H | ||
6 | |||
7 | #include <linux/workqueue.h> | ||
8 | #include <linux/sched.h> | ||
9 | #include <linux/tracepoint.h> | ||
10 | |||
11 | DECLARE_EVENT_CLASS(workqueue, | ||
12 | |||
13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | ||
14 | |||
15 | TP_ARGS(wq_thread, work), | ||
16 | |||
17 | TP_STRUCT__entry( | ||
18 | __array(char, thread_comm, TASK_COMM_LEN) | ||
19 | __field(pid_t, thread_pid) | ||
20 | __field(work_func_t, func) | ||
21 | ), | ||
22 | |||
23 | TP_fast_assign( | ||
24 | memcpy(__entry->thread_comm, wq_thread->comm, TASK_COMM_LEN); | ||
25 | __entry->thread_pid = wq_thread->pid; | ||
26 | __entry->func = work->func; | ||
27 | ), | ||
28 | |||
29 | TP_printk("thread=%s:%d func=%pf", __entry->thread_comm, | ||
30 | __entry->thread_pid, __entry->func) | ||
31 | ); | ||
32 | |||
33 | DEFINE_EVENT(workqueue, workqueue_insertion, | ||
34 | |||
35 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | ||
36 | |||
37 | TP_ARGS(wq_thread, work) | ||
38 | ); | ||
39 | |||
40 | DEFINE_EVENT(workqueue, workqueue_execution, | ||
41 | |||
42 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | ||
43 | |||
44 | TP_ARGS(wq_thread, work) | ||
45 | ); | ||
46 | |||
47 | /* Trace the creation of one workqueue thread on a cpu */ | ||
48 | TRACE_EVENT(workqueue_creation, | ||
49 | |||
50 | TP_PROTO(struct task_struct *wq_thread, int cpu), | ||
51 | |||
52 | TP_ARGS(wq_thread, cpu), | ||
53 | |||
54 | TP_STRUCT__entry( | ||
55 | __array(char, thread_comm, TASK_COMM_LEN) | ||
56 | __field(pid_t, thread_pid) | ||
57 | __field(int, cpu) | ||
58 | ), | ||
59 | |||
60 | TP_fast_assign( | ||
61 | memcpy(__entry->thread_comm, wq_thread->comm, TASK_COMM_LEN); | ||
62 | __entry->thread_pid = wq_thread->pid; | ||
63 | __entry->cpu = cpu; | ||
64 | ), | ||
65 | |||
66 | TP_printk("thread=%s:%d cpu=%d", __entry->thread_comm, | ||
67 | __entry->thread_pid, __entry->cpu) | ||
68 | ); | ||
69 | |||
70 | TRACE_EVENT(workqueue_destruction, | ||
71 | |||
72 | TP_PROTO(struct task_struct *wq_thread), | ||
73 | |||
74 | TP_ARGS(wq_thread), | ||
75 | |||
76 | TP_STRUCT__entry( | ||
77 | __array(char, thread_comm, TASK_COMM_LEN) | ||
78 | __field(pid_t, thread_pid) | ||
79 | ), | ||
80 | |||
81 | TP_fast_assign( | ||
82 | memcpy(__entry->thread_comm, wq_thread->comm, TASK_COMM_LEN); | ||
83 | __entry->thread_pid = wq_thread->pid; | ||
84 | ), | ||
85 | |||
86 | TP_printk("thread=%s:%d", __entry->thread_comm, __entry->thread_pid) | ||
87 | ); | ||
88 | |||
89 | #endif /* _TRACE_WORKQUEUE_H */ | ||
90 | |||
91 | /* This part must be outside protection */ | ||
92 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 5a64905d727..a9377c0083a 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -75,15 +75,12 @@ | |||
75 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ | 75 | #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ |
76 | DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) | 76 | DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) |
77 | 77 | ||
78 | #undef __cpparg | ||
79 | #define __cpparg(arg...) arg | ||
80 | |||
81 | /* Callbacks are meaningless to ftrace. */ | 78 | /* Callbacks are meaningless to ftrace. */ |
82 | #undef TRACE_EVENT_FN | 79 | #undef TRACE_EVENT_FN |
83 | #define TRACE_EVENT_FN(name, proto, args, tstruct, \ | 80 | #define TRACE_EVENT_FN(name, proto, args, tstruct, \ |
84 | assign, print, reg, unreg) \ | 81 | assign, print, reg, unreg) \ |
85 | TRACE_EVENT(name, __cpparg(proto), __cpparg(args), \ | 82 | TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \ |
86 | __cpparg(tstruct), __cpparg(assign), __cpparg(print)) \ | 83 | PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \ |
87 | 84 | ||
88 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 85 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
89 | 86 | ||
@@ -145,7 +142,7 @@ | |||
145 | * struct trace_seq *s = &iter->seq; | 142 | * struct trace_seq *s = &iter->seq; |
146 | * struct ftrace_raw_<call> *field; <-- defined in stage 1 | 143 | * struct ftrace_raw_<call> *field; <-- defined in stage 1 |
147 | * struct trace_entry *entry; | 144 | * struct trace_entry *entry; |
148 | * struct trace_seq *p; | 145 | * struct trace_seq *p = &iter->tmp_seq; |
149 | * int ret; | 146 | * int ret; |
150 | * | 147 | * |
151 | * entry = iter->ent; | 148 | * entry = iter->ent; |
@@ -157,12 +154,10 @@ | |||
157 | * | 154 | * |
158 | * field = (typeof(field))entry; | 155 | * field = (typeof(field))entry; |
159 | * | 156 | * |
160 | * p = &get_cpu_var(ftrace_event_seq); | ||
161 | * trace_seq_init(p); | 157 | * trace_seq_init(p); |
162 | * ret = trace_seq_printf(s, "%s: ", <call>); | 158 | * ret = trace_seq_printf(s, "%s: ", <call>); |
163 | * if (ret) | 159 | * if (ret) |
164 | * ret = trace_seq_printf(s, <TP_printk> "\n"); | 160 | * ret = trace_seq_printf(s, <TP_printk> "\n"); |
165 | * put_cpu(); | ||
166 | * if (!ret) | 161 | * if (!ret) |
167 | * return TRACE_TYPE_PARTIAL_LINE; | 162 | * return TRACE_TYPE_PARTIAL_LINE; |
168 | * | 163 | * |
@@ -216,7 +211,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | |||
216 | struct trace_seq *s = &iter->seq; \ | 211 | struct trace_seq *s = &iter->seq; \ |
217 | struct ftrace_raw_##call *field; \ | 212 | struct ftrace_raw_##call *field; \ |
218 | struct trace_entry *entry; \ | 213 | struct trace_entry *entry; \ |
219 | struct trace_seq *p; \ | 214 | struct trace_seq *p = &iter->tmp_seq; \ |
220 | int ret; \ | 215 | int ret; \ |
221 | \ | 216 | \ |
222 | event = container_of(trace_event, struct ftrace_event_call, \ | 217 | event = container_of(trace_event, struct ftrace_event_call, \ |
@@ -231,12 +226,10 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | |||
231 | \ | 226 | \ |
232 | field = (typeof(field))entry; \ | 227 | field = (typeof(field))entry; \ |
233 | \ | 228 | \ |
234 | p = &get_cpu_var(ftrace_event_seq); \ | ||
235 | trace_seq_init(p); \ | 229 | trace_seq_init(p); \ |
236 | ret = trace_seq_printf(s, "%s: ", event->name); \ | 230 | ret = trace_seq_printf(s, "%s: ", event->name); \ |
237 | if (ret) \ | 231 | if (ret) \ |
238 | ret = trace_seq_printf(s, print); \ | 232 | ret = trace_seq_printf(s, print); \ |
239 | put_cpu(); \ | ||
240 | if (!ret) \ | 233 | if (!ret) \ |
241 | return TRACE_TYPE_PARTIAL_LINE; \ | 234 | return TRACE_TYPE_PARTIAL_LINE; \ |
242 | \ | 235 | \ |
@@ -255,7 +248,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | |||
255 | struct trace_seq *s = &iter->seq; \ | 248 | struct trace_seq *s = &iter->seq; \ |
256 | struct ftrace_raw_##template *field; \ | 249 | struct ftrace_raw_##template *field; \ |
257 | struct trace_entry *entry; \ | 250 | struct trace_entry *entry; \ |
258 | struct trace_seq *p; \ | 251 | struct trace_seq *p = &iter->tmp_seq; \ |
259 | int ret; \ | 252 | int ret; \ |
260 | \ | 253 | \ |
261 | entry = iter->ent; \ | 254 | entry = iter->ent; \ |
@@ -267,12 +260,10 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | |||
267 | \ | 260 | \ |
268 | field = (typeof(field))entry; \ | 261 | field = (typeof(field))entry; \ |
269 | \ | 262 | \ |
270 | p = &get_cpu_var(ftrace_event_seq); \ | ||
271 | trace_seq_init(p); \ | 263 | trace_seq_init(p); \ |
272 | ret = trace_seq_printf(s, "%s: ", #call); \ | 264 | ret = trace_seq_printf(s, "%s: ", #call); \ |
273 | if (ret) \ | 265 | if (ret) \ |
274 | ret = trace_seq_printf(s, print); \ | 266 | ret = trace_seq_printf(s, print); \ |
275 | put_cpu(); \ | ||
276 | if (!ret) \ | 267 | if (!ret) \ |
277 | return TRACE_TYPE_PARTIAL_LINE; \ | 268 | return TRACE_TYPE_PARTIAL_LINE; \ |
278 | \ | 269 | \ |
@@ -439,6 +430,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
439 | * .fields = LIST_HEAD_INIT(event_class_##call.fields), | 430 | * .fields = LIST_HEAD_INIT(event_class_##call.fields), |
440 | * .raw_init = trace_event_raw_init, | 431 | * .raw_init = trace_event_raw_init, |
441 | * .probe = ftrace_raw_event_##call, | 432 | * .probe = ftrace_raw_event_##call, |
433 | * .reg = ftrace_event_reg, | ||
442 | * }; | 434 | * }; |
443 | * | 435 | * |
444 | * static struct ftrace_event_call __used | 436 | * static struct ftrace_event_call __used |
@@ -567,6 +559,7 @@ static struct ftrace_event_class __used event_class_##call = { \ | |||
567 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ | 559 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ |
568 | .raw_init = trace_event_raw_init, \ | 560 | .raw_init = trace_event_raw_init, \ |
569 | .probe = ftrace_raw_event_##call, \ | 561 | .probe = ftrace_raw_event_##call, \ |
562 | .reg = ftrace_event_reg, \ | ||
570 | _TRACE_PERF_INIT(call) \ | 563 | _TRACE_PERF_INIT(call) \ |
571 | }; | 564 | }; |
572 | 565 | ||
@@ -705,7 +698,7 @@ perf_trace_##call(void *__data, proto) \ | |||
705 | int __data_size; \ | 698 | int __data_size; \ |
706 | int rctx; \ | 699 | int rctx; \ |
707 | \ | 700 | \ |
708 | perf_fetch_caller_regs(&__regs, 1); \ | 701 | perf_fetch_caller_regs(&__regs); \ |
709 | \ | 702 | \ |
710 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | 703 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ |
711 | __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ | 704 | __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 257e08960d7..31966a4fb8c 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -26,7 +26,6 @@ struct syscall_metadata { | |||
26 | const char **types; | 26 | const char **types; |
27 | const char **args; | 27 | const char **args; |
28 | struct list_head enter_fields; | 28 | struct list_head enter_fields; |
29 | struct list_head exit_fields; | ||
30 | 29 | ||
31 | struct ftrace_event_call *enter_event; | 30 | struct ftrace_event_call *enter_event; |
32 | struct ftrace_event_call *exit_event; | 31 | struct ftrace_event_call *exit_event; |