diff options
author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2008-07-18 12:16:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:30:52 -0400 |
commit | 0a16b6075843325dc402edf80c1662838b929aff (patch) | |
tree | 124e49d8c0196f3c6eb7aa09a7c4c3c3157fff7a /kernel/signal.c | |
parent | 4a0897526bbc5c6ac0df80b16b8c60339e717ae2 (diff) |
tracing, sched: LTTng instrumentation - scheduler
Instrument the scheduler activity (sched_switch, migration, wakeups,
wait for a task, signal delivery) and process/thread
creation/destruction (fork, exit, kthread stop). Actually, kthread
creation is not instrumented in this patch because it is architecture
dependent. It allows to connect tracers such as ftrace which detects
scheduling latencies, good/bad scheduler decisions. Tools like LTTng can
export this scheduler information along with instrumentation of the rest
of the kernel activity to perform post-mortem analysis on the scheduler
activity.
About the performance impact of tracepoints (which is comparable to
markers), even without immediate values optimizations, tests done by
Hideo Aoki on ia64 show no regression. His test case was using hackbench
on a kernel where scheduler instrumentation (about 5 events in code
scheduler code) was added. See the "Tracepoints" patch header for
performance result detail.
Changelog :
- Change instrumentation location and parameter to match ftrace
instrumentation, previously done with kernel markers.
[ mingo@elte.hu: conflict resolutions ]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: 'Peter Zijlstra' <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index e661b01d340f..bf40ecc87b26 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/freezer.h> | 27 | #include <linux/freezer.h> |
28 | #include <linux/pid_namespace.h> | 28 | #include <linux/pid_namespace.h> |
29 | #include <linux/nsproxy.h> | 29 | #include <linux/nsproxy.h> |
30 | #include <trace/sched.h> | ||
30 | 31 | ||
31 | #include <asm/param.h> | 32 | #include <asm/param.h> |
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
@@ -803,6 +804,8 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
803 | struct sigpending *pending; | 804 | struct sigpending *pending; |
804 | struct sigqueue *q; | 805 | struct sigqueue *q; |
805 | 806 | ||
807 | trace_sched_signal_send(sig, t); | ||
808 | |||
806 | assert_spin_locked(&t->sighand->siglock); | 809 | assert_spin_locked(&t->sighand->siglock); |
807 | if (!prepare_signal(sig, t)) | 810 | if (!prepare_signal(sig, t)) |
808 | return 0; | 811 | return 0; |