aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-28 02:47:59 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-28 04:04:13 -0500
commit629928041c53771f9902753d50fef6b35f36d33d (patch)
treee960bf1f0311a2d00eadebfc1304662a149e32fe /include/trace
parentfd99498989f3b3feeab89dcadf537138ba136d24 (diff)
tracing: create the C style tracing for the sched subsystem
This patch utilizes the TRACE_EVENT_FORMAT macro to enable the C style faster tracing for the sched subsystem trace points. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/sched_event_types.h119
1 files changed, 94 insertions, 25 deletions
diff --git a/include/trace/sched_event_types.h b/include/trace/sched_event_types.h
index 2ada206565a3..ba059c10b58a 100644
--- a/include/trace/sched_event_types.h
+++ b/include/trace/sched_event_types.h
@@ -1,6 +1,6 @@
1 1
2/* use <trace/sched.h> instead */ 2/* use <trace/sched.h> instead */
3#ifndef TRACE_FORMAT 3#ifndef TRACE_EVENT_FORMAT
4# error Do not include this file directly. 4# error Do not include this file directly.
5# error Unless you know what you are doing. 5# error Unless you know what you are doing.
6#endif 6#endif
@@ -8,70 +8,139 @@
8#undef TRACE_SYSTEM 8#undef TRACE_SYSTEM
9#define TRACE_SYSTEM sched 9#define TRACE_SYSTEM sched
10 10
11TRACE_FORMAT(sched_kthread_stop, 11TRACE_EVENT_FORMAT(sched_kthread_stop,
12 TPPROTO(struct task_struct *t), 12 TPPROTO(struct task_struct *t),
13 TPARGS(t), 13 TPARGS(t),
14 TPFMT("task %s:%d", t->comm, t->pid)); 14 TPFMT("task %s:%d", t->comm, t->pid),
15 TRACE_STRUCT(
16 TRACE_FIELD(pid_t, pid, t->pid)
17 ),
18 TPRAWFMT("task %d")
19 );
15 20
16TRACE_FORMAT(sched_kthread_stop_ret, 21TRACE_EVENT_FORMAT(sched_kthread_stop_ret,
17 TPPROTO(int ret), 22 TPPROTO(int ret),
18 TPARGS(ret), 23 TPARGS(ret),
19 TPFMT("ret=%d", ret)); 24 TPFMT("ret=%d", ret),
25 TRACE_STRUCT(
26 TRACE_FIELD(int, ret, ret)
27 ),
28 TPRAWFMT("ret=%d")
29 );
20 30
21TRACE_FORMAT(sched_wait_task, 31TRACE_EVENT_FORMAT(sched_wait_task,
22 TPPROTO(struct rq *rq, struct task_struct *p), 32 TPPROTO(struct rq *rq, struct task_struct *p),
23 TPARGS(rq, p), 33 TPARGS(rq, p),
24 TPFMT("task %s:%d", p->comm, p->pid)); 34 TPFMT("task %s:%d", p->comm, p->pid),
35 TRACE_STRUCT(
36 TRACE_FIELD(pid_t, pid, p->pid)
37 ),
38 TPRAWFMT("task %d")
39 );
25 40
26TRACE_FORMAT(sched_wakeup, 41TRACE_EVENT_FORMAT(sched_wakeup,
27 TPPROTO(struct rq *rq, struct task_struct *p, int success), 42 TPPROTO(struct rq *rq, struct task_struct *p, int success),
28 TPARGS(rq, p, success), 43 TPARGS(rq, p, success),
29 TPFMT("task %s:%d %s", 44 TPFMT("task %s:%d %s",
30 p->comm, p->pid, success?"succeeded":"failed")); 45 p->comm, p->pid, success ? "succeeded" : "failed"),
46 TRACE_STRUCT(
47 TRACE_FIELD(pid_t, pid, p->pid)
48 TRACE_FIELD(int, success, success)
49 ),
50 TPRAWFMT("task %d success=%d")
51 );
31 52
32TRACE_FORMAT(sched_wakeup_new, 53TRACE_EVENT_FORMAT(sched_wakeup_new,
33 TPPROTO(struct rq *rq, struct task_struct *p, int success), 54 TPPROTO(struct rq *rq, struct task_struct *p, int success),
34 TPARGS(rq, p, success), 55 TPARGS(rq, p, success),
35 TPFMT("task %s:%d", 56 TPFMT("task %s:%d",
36 p->comm, p->pid, success?"succeeded":"failed")); 57 p->comm, p->pid, success ? "succeeded" : "failed"),
58 TRACE_STRUCT(
59 TRACE_FIELD(pid_t, pid, p->pid)
60 TRACE_FIELD(int, success, success)
61 ),
62 TPRAWFMT("task %d success=%d")
63 );
37 64
38TRACE_FORMAT(sched_switch, 65TRACE_EVENT_FORMAT(sched_switch,
39 TPPROTO(struct rq *rq, struct task_struct *prev, 66 TPPROTO(struct rq *rq, struct task_struct *prev,
40 struct task_struct *next), 67 struct task_struct *next),
41 TPARGS(rq, prev, next), 68 TPARGS(rq, prev, next),
42 TPFMT("task %s:%d ==> %s:%d", 69 TPFMT("task %s:%d ==> %s:%d",
43 prev->comm, prev->pid, next->comm, next->pid)); 70 prev->comm, prev->pid, next->comm, next->pid),
71 TRACE_STRUCT(
72 TRACE_FIELD(pid_t, prev_pid, prev->pid)
73 TRACE_FIELD(int, prev_prio, prev->prio)
74 TRACE_FIELD(pid_t, next_pid, next->pid)
75 TRACE_FIELD(int, next_prio, next->prio)
76 ),
77 TPRAWFMT("prev %d:%d ==> next %d:%d")
78 );
44 79
45TRACE_FORMAT(sched_migrate_task, 80TRACE_EVENT_FORMAT(sched_migrate_task,
46 TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), 81 TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
47 TPARGS(p, orig_cpu, dest_cpu), 82 TPARGS(p, orig_cpu, dest_cpu),
48 TPFMT("task %s:%d from: %d to: %d", 83 TPFMT("task %s:%d from: %d to: %d",
49 p->comm, p->pid, orig_cpu, dest_cpu)); 84 p->comm, p->pid, orig_cpu, dest_cpu),
85 TRACE_STRUCT(
86 TRACE_FIELD(pid_t, pid, p->pid)
87 TRACE_FIELD(int, orig_cpu, orig_cpu)
88 TRACE_FIELD(int, dest_cpu, dest_cpu)
89 ),
90 TPRAWFMT("task %d from: %d to: %d")
91 );
50 92
51TRACE_FORMAT(sched_process_free, 93TRACE_EVENT_FORMAT(sched_process_free,
52 TPPROTO(struct task_struct *p), 94 TPPROTO(struct task_struct *p),
53 TPARGS(p), 95 TPARGS(p),
54 TPFMT("task %s:%d", p->comm, p->pid)); 96 TPFMT("task %s:%d", p->comm, p->pid),
97 TRACE_STRUCT(
98 TRACE_FIELD(pid_t, pid, p->pid)
99 ),
100 TPRAWFMT("task %d")
101 );
55 102
56TRACE_FORMAT(sched_process_exit, 103TRACE_EVENT_FORMAT(sched_process_exit,
57 TPPROTO(struct task_struct *p), 104 TPPROTO(struct task_struct *p),
58 TPARGS(p), 105 TPARGS(p),
59 TPFMT("task %s:%d", p->comm, p->pid)); 106 TPFMT("task %s:%d", p->comm, p->pid),
107 TRACE_STRUCT(
108 TRACE_FIELD(pid_t, pid, p->pid)
109 ),
110 TPRAWFMT("task %d")
111 );
60 112
61TRACE_FORMAT(sched_process_wait, 113TRACE_EVENT_FORMAT(sched_process_wait,
62 TPPROTO(struct pid *pid), 114 TPPROTO(struct pid *pid),
63 TPARGS(pid), 115 TPARGS(pid),
64 TPFMT("pid %d", pid)); 116 TPFMT("pid %d", pid_nr(pid)),
117 TRACE_STRUCT(
118 TRACE_FIELD(pid_t, pid, pid_nr(pid))
119 ),
120 TPRAWFMT("task %d")
121 );
65 122
66TRACE_FORMAT(sched_process_fork, 123TRACE_EVENT_FORMAT(sched_process_fork,
67 TPPROTO(struct task_struct *parent, struct task_struct *child), 124 TPPROTO(struct task_struct *parent, struct task_struct *child),
68 TPARGS(parent, child), 125 TPARGS(parent, child),
69 TPFMT("parent %s:%d child %s:%d", 126 TPFMT("parent %s:%d child %s:%d",
70 parent->comm, parent->pid, child->comm, child->pid)); 127 parent->comm, parent->pid, child->comm, child->pid),
128 TRACE_STRUCT(
129 TRACE_FIELD(pid_t, parent, parent->pid)
130 TRACE_FIELD(pid_t, child, child->pid)
131 ),
132 TPRAWFMT("parent %d child %d")
133 );
71 134
72TRACE_FORMAT(sched_signal_send, 135TRACE_EVENT_FORMAT(sched_signal_send,
73 TPPROTO(int sig, struct task_struct *p), 136 TPPROTO(int sig, struct task_struct *p),
74 TPARGS(sig, p), 137 TPARGS(sig, p),
75 TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid)); 138 TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid),
139 TRACE_STRUCT(
140 TRACE_FIELD(int, sig, sig)
141 TRACE_FIELD(pid_t, pid, p->pid)
142 ),
143 TPRAWFMT("sig: %d task %d")
144 );
76 145
77#undef TRACE_SYSTEM 146#undef TRACE_SYSTEM