aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-24 10:22:57 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-24 21:54:07 -0500
commitf3fe8e4a38fd19dbb3f8ffb1826aa840ae304a65 (patch)
tree9df43f7711f836173adebcefe2f4776bd3e30340 /include/trace
parentb77e38aa240c3bd9c55c98b9f7c81541e042eae5 (diff)
tracing: add schedule events to event trace
This patch changes the trace/sched.h to use the DECLARE_TRACE_FMT such that they are automatically registered with the event tracer. And it also adds the tracing sched headers to kernel/trace/events.c Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/sched.h49
-rw-r--r--include/trace/sched_event_types.h72
2 files changed, 73 insertions, 48 deletions
diff --git a/include/trace/sched.h b/include/trace/sched.h
index 0d81098ee9fc..4e372a1a29bf 100644
--- a/include/trace/sched.h
+++ b/include/trace/sched.h
@@ -4,53 +4,6 @@
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/tracepoint.h> 5#include <linux/tracepoint.h>
6 6
7DECLARE_TRACE(sched_kthread_stop, 7#include <trace/sched_event_types.h>
8 TPPROTO(struct task_struct *t),
9 TPARGS(t));
10
11DECLARE_TRACE(sched_kthread_stop_ret,
12 TPPROTO(int ret),
13 TPARGS(ret));
14
15DECLARE_TRACE(sched_wait_task,
16 TPPROTO(struct rq *rq, struct task_struct *p),
17 TPARGS(rq, p));
18
19DECLARE_TRACE(sched_wakeup,
20 TPPROTO(struct rq *rq, struct task_struct *p, int success),
21 TPARGS(rq, p, success));
22
23DECLARE_TRACE(sched_wakeup_new,
24 TPPROTO(struct rq *rq, struct task_struct *p, int success),
25 TPARGS(rq, p, success));
26
27DECLARE_TRACE(sched_switch,
28 TPPROTO(struct rq *rq, struct task_struct *prev,
29 struct task_struct *next),
30 TPARGS(rq, prev, next));
31
32DECLARE_TRACE(sched_migrate_task,
33 TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
34 TPARGS(p, orig_cpu, dest_cpu));
35
36DECLARE_TRACE(sched_process_free,
37 TPPROTO(struct task_struct *p),
38 TPARGS(p));
39
40DECLARE_TRACE(sched_process_exit,
41 TPPROTO(struct task_struct *p),
42 TPARGS(p));
43
44DECLARE_TRACE(sched_process_wait,
45 TPPROTO(struct pid *pid),
46 TPARGS(pid));
47
48DECLARE_TRACE(sched_process_fork,
49 TPPROTO(struct task_struct *parent, struct task_struct *child),
50 TPARGS(parent, child));
51
52DECLARE_TRACE(sched_signal_send,
53 TPPROTO(int sig, struct task_struct *p),
54 TPARGS(sig, p));
55 8
56#endif 9#endif
diff --git a/include/trace/sched_event_types.h b/include/trace/sched_event_types.h
new file mode 100644
index 000000000000..a4f662940f4e
--- /dev/null
+++ b/include/trace/sched_event_types.h
@@ -0,0 +1,72 @@
1
2/* use <trace/sched.h> instead */
3#ifndef DEFINE_TRACE_FMT
4# error Do not include this file directly.
5# error Unless you know what you are doing.
6#endif
7
8DEFINE_TRACE_FMT(sched_kthread_stop,
9 TPPROTO(struct task_struct *t),
10 TPARGS(t),
11 TPFMT("task %s:%d", t->comm, t->pid));
12
13DEFINE_TRACE_FMT(sched_kthread_stop_ret,
14 TPPROTO(int ret),
15 TPARGS(ret),
16 TPFMT("ret=%d", ret));
17
18DEFINE_TRACE_FMT(sched_wait_task,
19 TPPROTO(struct rq *rq, struct task_struct *p),
20 TPARGS(rq, p),
21 TPFMT("task %s:%d", p->comm, p->pid));
22
23DEFINE_TRACE_FMT(sched_wakeup,
24 TPPROTO(struct rq *rq, struct task_struct *p, int success),
25 TPARGS(rq, p, success),
26 TPFMT("task %s:%d %s",
27 p->comm, p->pid, success?"succeeded":"failed"));
28
29DEFINE_TRACE_FMT(sched_wakeup_new,
30 TPPROTO(struct rq *rq, struct task_struct *p, int success),
31 TPARGS(rq, p, success),
32 TPFMT("task %s:%d",
33 p->comm, p->pid, success?"succeeded":"failed"));
34
35DEFINE_TRACE_FMT(sched_switch,
36 TPPROTO(struct rq *rq, struct task_struct *prev,
37 struct task_struct *next),
38 TPARGS(rq, prev, next),
39 TPFMT("task %s:%d ==> %s:%d",
40 prev->comm, prev->pid, next->comm, next->pid));
41
42DEFINE_TRACE_FMT(sched_migrate_task,
43 TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
44 TPARGS(p, orig_cpu, dest_cpu),
45 TPFMT("task %s:%d from: %d to: %d",
46 p->comm, p->pid, orig_cpu, dest_cpu));
47
48DEFINE_TRACE_FMT(sched_process_free,
49 TPPROTO(struct task_struct *p),
50 TPARGS(p),
51 TPFMT("task %s:%d", p->comm, p->pid));
52
53DEFINE_TRACE_FMT(sched_process_exit,
54 TPPROTO(struct task_struct *p),
55 TPARGS(p),
56 TPFMT("task %s:%d", p->comm, p->pid));
57
58DEFINE_TRACE_FMT(sched_process_wait,
59 TPPROTO(struct pid *pid),
60 TPARGS(pid),
61 TPFMT("pid %d", pid));
62
63DEFINE_TRACE_FMT(sched_process_fork,
64 TPPROTO(struct task_struct *parent, struct task_struct *child),
65 TPARGS(parent, child),
66 TPFMT("parent %s:%d child %s:%d",
67 parent->comm, parent->pid, child->comm, child->pid));
68
69DEFINE_TRACE_FMT(sched_signal_send,
70 TPPROTO(int sig, struct task_struct *p),
71 TPARGS(sig, p),
72 TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid));