forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Mathieu Desnoyers
authored and
Ingo Molnar
committed
Oct 14, 2008
1 parent
4a08975
commit 0a16b60
Showing
6 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef _TRACE_SCHED_H | ||
#define _TRACE_SCHED_H | ||
|
||
#include <linux/sched.h> | ||
#include <linux/tracepoint.h> | ||
|
||
DEFINE_TRACE(sched_kthread_stop, | ||
TPPROTO(struct task_struct *t), | ||
TPARGS(t)); | ||
DEFINE_TRACE(sched_kthread_stop_ret, | ||
TPPROTO(int ret), | ||
TPARGS(ret)); | ||
DEFINE_TRACE(sched_wait_task, | ||
TPPROTO(struct rq *rq, struct task_struct *p), | ||
TPARGS(rq, p)); | ||
DEFINE_TRACE(sched_wakeup, | ||
TPPROTO(struct rq *rq, struct task_struct *p), | ||
TPARGS(rq, p)); | ||
DEFINE_TRACE(sched_wakeup_new, | ||
TPPROTO(struct rq *rq, struct task_struct *p), | ||
TPARGS(rq, p)); | ||
DEFINE_TRACE(sched_switch, | ||
TPPROTO(struct rq *rq, struct task_struct *prev, | ||
struct task_struct *next), | ||
TPARGS(rq, prev, next)); | ||
DEFINE_TRACE(sched_migrate_task, | ||
TPPROTO(struct rq *rq, struct task_struct *p, int dest_cpu), | ||
TPARGS(rq, p, dest_cpu)); | ||
DEFINE_TRACE(sched_process_free, | ||
TPPROTO(struct task_struct *p), | ||
TPARGS(p)); | ||
DEFINE_TRACE(sched_process_exit, | ||
TPPROTO(struct task_struct *p), | ||
TPARGS(p)); | ||
DEFINE_TRACE(sched_process_wait, | ||
TPPROTO(struct pid *pid), | ||
TPARGS(pid)); | ||
DEFINE_TRACE(sched_process_fork, | ||
TPPROTO(struct task_struct *parent, struct task_struct *child), | ||
TPARGS(parent, child)); | ||
DEFINE_TRACE(sched_signal_send, | ||
TPPROTO(int sig, struct task_struct *p), | ||
TPARGS(sig, p)); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters