aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-10 12:41:38 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-10 12:41:38 -0400
commit30a8fecc2d34f086df34fe2f2b926f080e002600 (patch)
treea6959a40a6a3065b61ddcf4954861dfd8892a843 /include/trace
parent2314c4ae1461c9e8b26cf8b9a851f280bc5769e1 (diff)
tracing: flip the TP_printk and TP_fast_assign in the TRACE_EVENT macro
Impact: clean up In trying to stay consistant with the C style format in the TRACE_EVENT macro, it makes more sense to do the printk after the assigning of the variables. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/irq_event_types.h8
-rw-r--r--include/trace/sched_event_types.h102
2 files changed, 55 insertions, 55 deletions
diff --git a/include/trace/irq_event_types.h b/include/trace/irq_event_types.h
index 43bcb74dd49f..214bb928fe9e 100644
--- a/include/trace/irq_event_types.h
+++ b/include/trace/irq_event_types.h
@@ -31,13 +31,13 @@ TRACE_EVENT(irq_handler_exit,
31 __field( int, ret ) 31 __field( int, ret )
32 ), 32 ),
33 33
34 TP_printk("irq=%d return=%s",
35 __entry->irq, __entry->ret ? "handled" : "unhandled"),
36
37 TP_fast_assign( 34 TP_fast_assign(
38 __entry->irq = irq; 35 __entry->irq = irq;
39 __entry->ret = ret; 36 __entry->ret = ret;
40 ) 37 ),
38
39 TP_printk("irq=%d return=%s",
40 __entry->irq, __entry->ret ? "handled" : "unhandled")
41); 41);
42 42
43#undef TRACE_SYSTEM 43#undef TRACE_SYSTEM
diff --git a/include/trace/sched_event_types.h b/include/trace/sched_event_types.h
index fb37af672c88..63547dc1125f 100644
--- a/include/trace/sched_event_types.h
+++ b/include/trace/sched_event_types.h
@@ -22,12 +22,12 @@ TRACE_EVENT(sched_kthread_stop,
22 __field( pid_t, pid ) 22 __field( pid_t, pid )
23 ), 23 ),
24 24
25 TP_printk("task %s:%d", __entry->comm, __entry->pid),
26
27 TP_fast_assign( 25 TP_fast_assign(
28 memcpy(__entry->comm, t->comm, TASK_COMM_LEN); 26 memcpy(__entry->comm, t->comm, TASK_COMM_LEN);
29 __entry->pid = t->pid; 27 __entry->pid = t->pid;
30 ) 28 ),
29
30 TP_printk("task %s:%d", __entry->comm, __entry->pid)
31); 31);
32 32
33/* 33/*
@@ -43,11 +43,11 @@ TRACE_EVENT(sched_kthread_stop_ret,
43 __field( int, ret ) 43 __field( int, ret )
44 ), 44 ),
45 45
46 TP_printk("ret %d", __entry->ret),
47
48 TP_fast_assign( 46 TP_fast_assign(
49 __entry->ret = ret; 47 __entry->ret = ret;
50 ) 48 ),
49
50 TP_printk("ret %d", __entry->ret)
51); 51);
52 52
53/* 53/*
@@ -68,14 +68,14 @@ TRACE_EVENT(sched_wait_task,
68 __field( int, prio ) 68 __field( int, prio )
69 ), 69 ),
70 70
71 TP_printk("task %s:%d [%d]",
72 __entry->comm, __entry->pid, __entry->prio),
73
74 TP_fast_assign( 71 TP_fast_assign(
75 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 72 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
76 __entry->pid = p->pid; 73 __entry->pid = p->pid;
77 __entry->prio = p->prio; 74 __entry->prio = p->prio;
78 ) 75 ),
76
77 TP_printk("task %s:%d [%d]",
78 __entry->comm, __entry->pid, __entry->prio)
79); 79);
80 80
81/* 81/*
@@ -97,16 +97,16 @@ TRACE_EVENT(sched_wakeup,
97 __field( int, success ) 97 __field( int, success )
98 ), 98 ),
99 99
100 TP_printk("task %s:%d [%d] success=%d",
101 __entry->comm, __entry->pid, __entry->prio,
102 __entry->success),
103
104 TP_fast_assign( 100 TP_fast_assign(
105 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 101 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
106 __entry->pid = p->pid; 102 __entry->pid = p->pid;
107 __entry->prio = p->prio; 103 __entry->prio = p->prio;
108 __entry->success = success; 104 __entry->success = success;
109 ) 105 ),
106
107 TP_printk("task %s:%d [%d] success=%d",
108 __entry->comm, __entry->pid, __entry->prio,
109 __entry->success)
110); 110);
111 111
112/* 112/*
@@ -128,16 +128,16 @@ TRACE_EVENT(sched_wakeup_new,
128 __field( int, success ) 128 __field( int, success )
129 ), 129 ),
130 130
131 TP_printk("task %s:%d [%d] success=%d",
132 __entry->comm, __entry->pid, __entry->prio,
133 __entry->success),
134
135 TP_fast_assign( 131 TP_fast_assign(
136 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 132 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
137 __entry->pid = p->pid; 133 __entry->pid = p->pid;
138 __entry->prio = p->prio; 134 __entry->prio = p->prio;
139 __entry->success = success; 135 __entry->success = success;
140 ) 136 ),
137
138 TP_printk("task %s:%d [%d] success=%d",
139 __entry->comm, __entry->pid, __entry->prio,
140 __entry->success)
141); 141);
142 142
143/* 143/*
@@ -162,10 +162,6 @@ TRACE_EVENT(sched_switch,
162 __field( int, next_prio ) 162 __field( int, next_prio )
163 ), 163 ),
164 164
165 TP_printk("task %s:%d [%d] ==> %s:%d [%d]",
166 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
167 __entry->next_comm, __entry->next_pid, __entry->next_prio),
168
169 TP_fast_assign( 165 TP_fast_assign(
170 memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); 166 memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
171 __entry->prev_pid = prev->pid; 167 __entry->prev_pid = prev->pid;
@@ -173,7 +169,11 @@ TRACE_EVENT(sched_switch,
173 memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); 169 memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
174 __entry->next_pid = next->pid; 170 __entry->next_pid = next->pid;
175 __entry->next_prio = next->prio; 171 __entry->next_prio = next->prio;
176 ) 172 ),
173
174 TP_printk("task %s:%d [%d] ==> %s:%d [%d]",
175 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
176 __entry->next_comm, __entry->next_pid, __entry->next_prio)
177); 177);
178 178
179/* 179/*
@@ -193,17 +193,17 @@ TRACE_EVENT(sched_migrate_task,
193 __field( int, dest_cpu ) 193 __field( int, dest_cpu )
194 ), 194 ),
195 195
196 TP_printk("task %s:%d [%d] from: %d to: %d",
197 __entry->comm, __entry->pid, __entry->prio,
198 __entry->orig_cpu, __entry->dest_cpu),
199
200 TP_fast_assign( 196 TP_fast_assign(
201 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 197 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
202 __entry->pid = p->pid; 198 __entry->pid = p->pid;
203 __entry->prio = p->prio; 199 __entry->prio = p->prio;
204 __entry->orig_cpu = orig_cpu; 200 __entry->orig_cpu = orig_cpu;
205 __entry->dest_cpu = dest_cpu; 201 __entry->dest_cpu = dest_cpu;
206 ) 202 ),
203
204 TP_printk("task %s:%d [%d] from: %d to: %d",
205 __entry->comm, __entry->pid, __entry->prio,
206 __entry->orig_cpu, __entry->dest_cpu)
207); 207);
208 208
209/* 209/*
@@ -221,14 +221,14 @@ TRACE_EVENT(sched_process_free,
221 __field( int, prio ) 221 __field( int, prio )
222 ), 222 ),
223 223
224 TP_printk("task %s:%d [%d]",
225 __entry->comm, __entry->pid, __entry->prio),
226
227 TP_fast_assign( 224 TP_fast_assign(
228 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 225 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
229 __entry->pid = p->pid; 226 __entry->pid = p->pid;
230 __entry->prio = p->prio; 227 __entry->prio = p->prio;
231 ) 228 ),
229
230 TP_printk("task %s:%d [%d]",
231 __entry->comm, __entry->pid, __entry->prio)
232); 232);
233 233
234/* 234/*
@@ -246,14 +246,14 @@ TRACE_EVENT(sched_process_exit,
246 __field( int, prio ) 246 __field( int, prio )
247 ), 247 ),
248 248
249 TP_printk("task %s:%d [%d]",
250 __entry->comm, __entry->pid, __entry->prio),
251
252 TP_fast_assign( 249 TP_fast_assign(
253 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 250 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
254 __entry->pid = p->pid; 251 __entry->pid = p->pid;
255 __entry->prio = p->prio; 252 __entry->prio = p->prio;
256 ) 253 ),
254
255 TP_printk("task %s:%d [%d]",
256 __entry->comm, __entry->pid, __entry->prio)
257); 257);
258 258
259/* 259/*
@@ -271,14 +271,14 @@ TRACE_EVENT(sched_process_wait,
271 __field( int, prio ) 271 __field( int, prio )
272 ), 272 ),
273 273
274 TP_printk("task %s:%d [%d]",
275 __entry->comm, __entry->pid, __entry->prio),
276
277 TP_fast_assign( 274 TP_fast_assign(
278 memcpy(__entry->comm, current->comm, TASK_COMM_LEN); 275 memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
279 __entry->pid = pid_nr(pid); 276 __entry->pid = pid_nr(pid);
280 __entry->prio = current->prio; 277 __entry->prio = current->prio;
281 ) 278 ),
279
280 TP_printk("task %s:%d [%d]",
281 __entry->comm, __entry->pid, __entry->prio)
282); 282);
283 283
284/* 284/*
@@ -297,16 +297,16 @@ TRACE_EVENT(sched_process_fork,
297 __field( pid_t, child_pid ) 297 __field( pid_t, child_pid )
298 ), 298 ),
299 299
300 TP_printk("parent %s:%d child %s:%d",
301 __entry->parent_comm, __entry->parent_pid,
302 __entry->child_comm, __entry->child_pid),
303
304 TP_fast_assign( 300 TP_fast_assign(
305 memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN); 301 memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN);
306 __entry->parent_pid = parent->pid; 302 __entry->parent_pid = parent->pid;
307 memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN); 303 memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN);
308 __entry->child_pid = child->pid; 304 __entry->child_pid = child->pid;
309 ) 305 ),
306
307 TP_printk("parent %s:%d child %s:%d",
308 __entry->parent_comm, __entry->parent_pid,
309 __entry->child_comm, __entry->child_pid)
310); 310);
311 311
312/* 312/*
@@ -324,14 +324,14 @@ TRACE_EVENT(sched_signal_send,
324 __field( pid_t, pid ) 324 __field( pid_t, pid )
325 ), 325 ),
326 326
327 TP_printk("sig: %d task %s:%d",
328 __entry->sig, __entry->comm, __entry->pid),
329
330 TP_fast_assign( 327 TP_fast_assign(
331 memcpy(__entry->comm, p->comm, TASK_COMM_LEN); 328 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
332 __entry->pid = p->pid; 329 __entry->pid = p->pid;
333 __entry->sig = sig; 330 __entry->sig = sig;
334 ) 331 ),
332
333 TP_printk("sig: %d task %s:%d",
334 __entry->sig, __entry->comm, __entry->pid)
335); 335);
336 336
337#undef TRACE_SYSTEM 337#undef TRACE_SYSTEM