diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-28 04:15:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-28 04:15:58 -0500 |
commit | acdb2c287916ce247c09d460266370af45da55c5 (patch) | |
tree | e09d6f8fa8f2b28d363374d027f9b4af1d3888cb /include | |
parent | e9abf4c59d75cd71f118764376d037a677f573d0 (diff) | |
parent | f2034f1e1adaac6713a6d48b5a2d4f3aa3e63ccb (diff) |
Merge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tracepoint.h | 3 | ||||
-rw-r--r-- | include/trace/irq_event_types.h | 24 | ||||
-rw-r--r-- | include/trace/sched_event_types.h | 124 | ||||
-rw-r--r-- | include/trace/trace_event_types.h | 4 | ||||
-rw-r--r-- | include/trace/trace_events.h | 4 |
5 files changed, 130 insertions, 29 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 62d13391a240..152b2f03fb86 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -157,4 +157,7 @@ static inline void tracepoint_synchronize_unregister(void) | |||
157 | #define TRACE_FORMAT(name, proto, args, fmt) \ | 157 | #define TRACE_FORMAT(name, proto, args, fmt) \ |
158 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 158 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
159 | 159 | ||
160 | #define TRACE_EVENT_FORMAT(name, proto, args, fmt, struct, tpfmt) \ | ||
161 | TRACE_FORMAT(name, PARAMS(proto), PARAMS(args), PARAMS(fmt)) | ||
162 | |||
160 | #endif | 163 | #endif |
diff --git a/include/trace/irq_event_types.h b/include/trace/irq_event_types.h index 5d0919fdd2d4..65850bc5ea06 100644 --- a/include/trace/irq_event_types.h +++ b/include/trace/irq_event_types.h | |||
@@ -5,13 +5,29 @@ | |||
5 | # error Unless you know what you are doing. | 5 | # error Unless you know what you are doing. |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | TRACE_FORMAT(irq_handler_entry, | 8 | #undef TRACE_SYSTEM |
9 | #define TRACE_SYSTEM irq | ||
10 | |||
11 | TRACE_EVENT_FORMAT(irq_handler_entry, | ||
9 | TPPROTO(int irq, struct irqaction *action), | 12 | TPPROTO(int irq, struct irqaction *action), |
10 | TPARGS(irq, action), | 13 | TPARGS(irq, action), |
11 | TPFMT("irq=%d handler=%s", irq, action->name)); | 14 | TPFMT("irq=%d handler=%s", irq, action->name), |
15 | TRACE_STRUCT( | ||
16 | TRACE_FIELD(int, irq, irq) | ||
17 | ), | ||
18 | TPRAWFMT("irq %d") | ||
19 | ); | ||
12 | 20 | ||
13 | TRACE_FORMAT(irq_handler_exit, | 21 | TRACE_EVENT_FORMAT(irq_handler_exit, |
14 | TPPROTO(int irq, struct irqaction *action, int ret), | 22 | TPPROTO(int irq, struct irqaction *action, int ret), |
15 | TPARGS(irq, action, ret), | 23 | TPARGS(irq, action, ret), |
16 | TPFMT("irq=%d handler=%s return=%s", | 24 | TPFMT("irq=%d handler=%s return=%s", |
17 | irq, action->name, ret ? "handled" : "unhandled")); | 25 | irq, action->name, ret ? "handled" : "unhandled"), |
26 | TRACE_STRUCT( | ||
27 | TRACE_FIELD(int, irq, irq) | ||
28 | TRACE_FIELD(int, ret, ret) | ||
29 | ), | ||
30 | TPRAWFMT("irq %d ret %d") | ||
31 | ); | ||
32 | |||
33 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/sched_event_types.h b/include/trace/sched_event_types.h index a3d3d66a51c8..ba059c10b58a 100644 --- a/include/trace/sched_event_types.h +++ b/include/trace/sched_event_types.h | |||
@@ -1,72 +1,146 @@ | |||
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 |
7 | 7 | ||
8 | TRACE_FORMAT(sched_kthread_stop, | 8 | #undef TRACE_SYSTEM |
9 | #define TRACE_SYSTEM sched | ||
10 | |||
11 | TRACE_EVENT_FORMAT(sched_kthread_stop, | ||
9 | TPPROTO(struct task_struct *t), | 12 | TPPROTO(struct task_struct *t), |
10 | TPARGS(t), | 13 | TPARGS(t), |
11 | 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 | ); | ||
12 | 20 | ||
13 | TRACE_FORMAT(sched_kthread_stop_ret, | 21 | TRACE_EVENT_FORMAT(sched_kthread_stop_ret, |
14 | TPPROTO(int ret), | 22 | TPPROTO(int ret), |
15 | TPARGS(ret), | 23 | TPARGS(ret), |
16 | TPFMT("ret=%d", ret)); | 24 | TPFMT("ret=%d", ret), |
25 | TRACE_STRUCT( | ||
26 | TRACE_FIELD(int, ret, ret) | ||
27 | ), | ||
28 | TPRAWFMT("ret=%d") | ||
29 | ); | ||
17 | 30 | ||
18 | TRACE_FORMAT(sched_wait_task, | 31 | TRACE_EVENT_FORMAT(sched_wait_task, |
19 | TPPROTO(struct rq *rq, struct task_struct *p), | 32 | TPPROTO(struct rq *rq, struct task_struct *p), |
20 | TPARGS(rq, p), | 33 | TPARGS(rq, p), |
21 | 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 | ); | ||
22 | 40 | ||
23 | TRACE_FORMAT(sched_wakeup, | 41 | TRACE_EVENT_FORMAT(sched_wakeup, |
24 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | 42 | TPPROTO(struct rq *rq, struct task_struct *p, int success), |
25 | TPARGS(rq, p, success), | 43 | TPARGS(rq, p, success), |
26 | TPFMT("task %s:%d %s", | 44 | TPFMT("task %s:%d %s", |
27 | 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 | ); | ||
28 | 52 | ||
29 | TRACE_FORMAT(sched_wakeup_new, | 53 | TRACE_EVENT_FORMAT(sched_wakeup_new, |
30 | TPPROTO(struct rq *rq, struct task_struct *p, int success), | 54 | TPPROTO(struct rq *rq, struct task_struct *p, int success), |
31 | TPARGS(rq, p, success), | 55 | TPARGS(rq, p, success), |
32 | TPFMT("task %s:%d", | 56 | TPFMT("task %s:%d", |
33 | 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 | ); | ||
34 | 64 | ||
35 | TRACE_FORMAT(sched_switch, | 65 | TRACE_EVENT_FORMAT(sched_switch, |
36 | TPPROTO(struct rq *rq, struct task_struct *prev, | 66 | TPPROTO(struct rq *rq, struct task_struct *prev, |
37 | struct task_struct *next), | 67 | struct task_struct *next), |
38 | TPARGS(rq, prev, next), | 68 | TPARGS(rq, prev, next), |
39 | TPFMT("task %s:%d ==> %s:%d", | 69 | TPFMT("task %s:%d ==> %s:%d", |
40 | 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 | ); | ||
41 | 79 | ||
42 | TRACE_FORMAT(sched_migrate_task, | 80 | TRACE_EVENT_FORMAT(sched_migrate_task, |
43 | TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), | 81 | TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu), |
44 | TPARGS(p, orig_cpu, dest_cpu), | 82 | TPARGS(p, orig_cpu, dest_cpu), |
45 | TPFMT("task %s:%d from: %d to: %d", | 83 | TPFMT("task %s:%d from: %d to: %d", |
46 | 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 | ); | ||
47 | 92 | ||
48 | TRACE_FORMAT(sched_process_free, | 93 | TRACE_EVENT_FORMAT(sched_process_free, |
49 | TPPROTO(struct task_struct *p), | 94 | TPPROTO(struct task_struct *p), |
50 | TPARGS(p), | 95 | TPARGS(p), |
51 | 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 | ); | ||
52 | 102 | ||
53 | TRACE_FORMAT(sched_process_exit, | 103 | TRACE_EVENT_FORMAT(sched_process_exit, |
54 | TPPROTO(struct task_struct *p), | 104 | TPPROTO(struct task_struct *p), |
55 | TPARGS(p), | 105 | TPARGS(p), |
56 | 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 | ); | ||
57 | 112 | ||
58 | TRACE_FORMAT(sched_process_wait, | 113 | TRACE_EVENT_FORMAT(sched_process_wait, |
59 | TPPROTO(struct pid *pid), | 114 | TPPROTO(struct pid *pid), |
60 | TPARGS(pid), | 115 | TPARGS(pid), |
61 | 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 | ); | ||
62 | 122 | ||
63 | TRACE_FORMAT(sched_process_fork, | 123 | TRACE_EVENT_FORMAT(sched_process_fork, |
64 | TPPROTO(struct task_struct *parent, struct task_struct *child), | 124 | TPPROTO(struct task_struct *parent, struct task_struct *child), |
65 | TPARGS(parent, child), | 125 | TPARGS(parent, child), |
66 | TPFMT("parent %s:%d child %s:%d", | 126 | TPFMT("parent %s:%d child %s:%d", |
67 | 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 | ); | ||
68 | 134 | ||
69 | TRACE_FORMAT(sched_signal_send, | 135 | TRACE_EVENT_FORMAT(sched_signal_send, |
70 | TPPROTO(int sig, struct task_struct *p), | 136 | TPPROTO(int sig, struct task_struct *p), |
71 | TPARGS(sig, p), | 137 | TPARGS(sig, p), |
72 | 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 | ); | ||
145 | |||
146 | #undef TRACE_SYSTEM | ||
diff --git a/include/trace/trace_event_types.h b/include/trace/trace_event_types.h new file mode 100644 index 000000000000..33c8ed5ccb6c --- /dev/null +++ b/include/trace/trace_event_types.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* trace/<type>_event_types.h here */ | ||
2 | |||
3 | #include <trace/sched_event_types.h> | ||
4 | #include <trace/irq_event_types.h> | ||
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h new file mode 100644 index 000000000000..ea2ef2051762 --- /dev/null +++ b/include/trace/trace_events.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* trace/<type>.h here */ | ||
2 | |||
3 | #include <trace/sched.h> | ||
4 | #include <trace/irq.h> | ||