summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-28 10:15:58 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-28 10:15:58 +0100
commitacdb2c287916ce247c09d460266370af45da55c5 (patch)
treee09d6f8fa8f2b28d363374d027f9b4af1d3888cb /include
parente9abf4c59d75cd71f118764376d037a677f573d0 (diff)
parentf2034f1e1adaac6713a6d48b5a2d4f3aa3e63ccb (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.h3
-rw-r--r--include/trace/irq_event_types.h24
-rw-r--r--include/trace/sched_event_types.h124
-rw-r--r--include/trace/trace_event_types.h4
-rw-r--r--include/trace/trace_events.h4
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)
#define TRACE_FORMAT(name, proto, args, fmt) \
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+#define TRACE_EVENT_FORMAT(name, proto, args, fmt, struct, tpfmt) \
+ TRACE_FORMAT(name, PARAMS(proto), PARAMS(args), PARAMS(fmt))
+
#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 @@
# error Unless you know what you are doing.
#endif
-TRACE_FORMAT(irq_handler_entry,
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM irq
+
+TRACE_EVENT_FORMAT(irq_handler_entry,
TPPROTO(int irq, struct irqaction *action),
TPARGS(irq, action),
- TPFMT("irq=%d handler=%s", irq, action->name));
+ TPFMT("irq=%d handler=%s", irq, action->name),
+ TRACE_STRUCT(
+ TRACE_FIELD(int, irq, irq)
+ ),
+ TPRAWFMT("irq %d")
+ );
-TRACE_FORMAT(irq_handler_exit,
+TRACE_EVENT_FORMAT(irq_handler_exit,
TPPROTO(int irq, struct irqaction *action, int ret),
TPARGS(irq, action, ret),
TPFMT("irq=%d handler=%s return=%s",
- irq, action->name, ret ? "handled" : "unhandled"));
+ irq, action->name, ret ? "handled" : "unhandled"),
+ TRACE_STRUCT(
+ TRACE_FIELD(int, irq, irq)
+ TRACE_FIELD(int, ret, ret)
+ ),
+ TPRAWFMT("irq %d ret %d")
+ );
+
+#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 @@
/* use <trace/sched.h> instead */
-#ifndef TRACE_FORMAT
+#ifndef TRACE_EVENT_FORMAT
# error Do not include this file directly.
# error Unless you know what you are doing.
#endif
-TRACE_FORMAT(sched_kthread_stop,
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM sched
+
+TRACE_EVENT_FORMAT(sched_kthread_stop,
TPPROTO(struct task_struct *t),
TPARGS(t),
- TPFMT("task %s:%d", t->comm, t->pid));
+ TPFMT("task %s:%d", t->comm, t->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, t->pid)
+ ),
+ TPRAWFMT("task %d")
+ );
-TRACE_FORMAT(sched_kthread_stop_ret,
+TRACE_EVENT_FORMAT(sched_kthread_stop_ret,
TPPROTO(int ret),
TPARGS(ret),
- TPFMT("ret=%d", ret));
+ TPFMT("ret=%d", ret),
+ TRACE_STRUCT(
+ TRACE_FIELD(int, ret, ret)
+ ),
+ TPRAWFMT("ret=%d")
+ );
-TRACE_FORMAT(sched_wait_task,
+TRACE_EVENT_FORMAT(sched_wait_task,
TPPROTO(struct rq *rq, struct task_struct *p),
TPARGS(rq, p),
- TPFMT("task %s:%d", p->comm, p->pid));
+ TPFMT("task %s:%d", p->comm, p->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ ),
+ TPRAWFMT("task %d")
+ );
-TRACE_FORMAT(sched_wakeup,
+TRACE_EVENT_FORMAT(sched_wakeup,
TPPROTO(struct rq *rq, struct task_struct *p, int success),
TPARGS(rq, p, success),
TPFMT("task %s:%d %s",
- p->comm, p->pid, success?"succeeded":"failed"));
+ p->comm, p->pid, success ? "succeeded" : "failed"),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ TRACE_FIELD(int, success, success)
+ ),
+ TPRAWFMT("task %d success=%d")
+ );
-TRACE_FORMAT(sched_wakeup_new,
+TRACE_EVENT_FORMAT(sched_wakeup_new,
TPPROTO(struct rq *rq, struct task_struct *p, int success),
TPARGS(rq, p, success),
TPFMT("task %s:%d",
- p->comm, p->pid, success?"succeeded":"failed"));
+ p->comm, p->pid, success ? "succeeded" : "failed"),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ TRACE_FIELD(int, success, success)
+ ),
+ TPRAWFMT("task %d success=%d")
+ );
-TRACE_FORMAT(sched_switch,
+TRACE_EVENT_FORMAT(sched_switch,
TPPROTO(struct rq *rq, struct task_struct *prev,
struct task_struct *next),
TPARGS(rq, prev, next),
TPFMT("task %s:%d ==> %s:%d",
- prev->comm, prev->pid, next->comm, next->pid));
+ prev->comm, prev->pid, next->comm, next->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, prev_pid, prev->pid)
+ TRACE_FIELD(int, prev_prio, prev->prio)
+ TRACE_FIELD(pid_t, next_pid, next->pid)
+ TRACE_FIELD(int, next_prio, next->prio)
+ ),
+ TPRAWFMT("prev %d:%d ==> next %d:%d")
+ );
-TRACE_FORMAT(sched_migrate_task,
+TRACE_EVENT_FORMAT(sched_migrate_task,
TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
TPARGS(p, orig_cpu, dest_cpu),
TPFMT("task %s:%d from: %d to: %d",
- p->comm, p->pid, orig_cpu, dest_cpu));
+ p->comm, p->pid, orig_cpu, dest_cpu),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ TRACE_FIELD(int, orig_cpu, orig_cpu)
+ TRACE_FIELD(int, dest_cpu, dest_cpu)
+ ),
+ TPRAWFMT("task %d from: %d to: %d")
+ );
-TRACE_FORMAT(sched_process_free,
+TRACE_EVENT_FORMAT(sched_process_free,
TPPROTO(struct task_struct *p),
TPARGS(p),
- TPFMT("task %s:%d", p->comm, p->pid));
+ TPFMT("task %s:%d", p->comm, p->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ ),
+ TPRAWFMT("task %d")
+ );
-TRACE_FORMAT(sched_process_exit,
+TRACE_EVENT_FORMAT(sched_process_exit,
TPPROTO(struct task_struct *p),
TPARGS(p),
- TPFMT("task %s:%d", p->comm, p->pid));
+ TPFMT("task %s:%d", p->comm, p->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, p->pid)
+ ),
+ TPRAWFMT("task %d")
+ );
-TRACE_FORMAT(sched_process_wait,
+TRACE_EVENT_FORMAT(sched_process_wait,
TPPROTO(struct pid *pid),
TPARGS(pid),
- TPFMT("pid %d", pid));
+ TPFMT("pid %d", pid_nr(pid)),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, pid, pid_nr(pid))
+ ),
+ TPRAWFMT("task %d")
+ );
-TRACE_FORMAT(sched_process_fork,
+TRACE_EVENT_FORMAT(sched_process_fork,
TPPROTO(struct task_struct *parent, struct task_struct *child),
TPARGS(parent, child),
TPFMT("parent %s:%d child %s:%d",
- parent->comm, parent->pid, child->comm, child->pid));
+ parent->comm, parent->pid, child->comm, child->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(pid_t, parent, parent->pid)
+ TRACE_FIELD(pid_t, child, child->pid)
+ ),
+ TPRAWFMT("parent %d child %d")
+ );
-TRACE_FORMAT(sched_signal_send,
+TRACE_EVENT_FORMAT(sched_signal_send,
TPPROTO(int sig, struct task_struct *p),
TPARGS(sig, p),
- TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid));
+ TPFMT("sig: %d task %s:%d", sig, p->comm, p->pid),
+ TRACE_STRUCT(
+ TRACE_FIELD(int, sig, sig)
+ TRACE_FIELD(pid_t, pid, p->pid)
+ ),
+ TPRAWFMT("sig: %d task %d")
+ );
+
+#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 @@
+/* trace/<type>_event_types.h here */
+
+#include <trace/sched_event_types.h>
+#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 @@
+/* trace/<type>.h here */
+
+#include <trace/sched.h>
+#include <trace/irq.h>