Steven Rostedt (Red Hat)
dd42cd3ea9
tracing: Add function probe to trigger stack traces
Add a function probe that will cause a stack trace to be traced in
the ring buffer when the given function(s) are called.
format is:
<function>:stacktrace[:<count>]
echo 'schedule:stacktrace' > /debug/tracing/set_ftrace_filter
cat /debug/tracing/trace_pipe
kworker/2:0-4329 [002] ...2 2933.558007: <stack trace>
=> kthread
=> ret_from_fork
<idle>-0 [000] .N.2 2933.558019: <stack trace>
=> rest_init
=> start_kernel
=> x86_64_start_reservations
=> x86_64_start_kernel
kworker/2:0-4329 [002] ...2 2933.558109: <stack trace>
=> kthread
=> ret_from_fork
[...]
This can be set to only trace a specific amount of times:
echo 'schedule:stacktrace:3' > /debug/tracing/set_ftrace_filter
cat /debug/tracing/trace_pipe
<...>-58 [003] ...2 841.801694: <stack trace>
=> kthread
=> ret_from_fork
<idle>-0 [001] .N.2 841.801697: <stack trace>
=> start_secondary
<...>-2059 [001] ...2 841.801736: <stack trace>
=> wait_for_common
=> wait_for_completion
=> flush_work
=> tty_flush_to_ldisc
=> input_available_p
=> n_tty_poll
=> tty_poll
=> do_select
=> core_sys_select
=> sys_select
=> system_call_fastpath
To remove these:
echo '!schedule:stacktrace' > /debug/tracing/set_ftrace_filter
echo '!schedule:stacktrace:0' > /debug/tracing/set_ftrace_filter
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-03-15 00:36:05 -04:00
..
2013-03-15 00:35:40 -04:00
2013-03-15 00:36:03 -04:00
2013-03-15 00:35:47 -04:00
2012-09-13 22:52:08 -04:00
2011-01-04 08:16:54 +01:00
2011-06-14 22:04:39 -04:00
2013-03-15 00:35:52 -04:00
2011-09-27 22:53:27 +02:00
2013-03-15 00:35:54 -04:00
2013-02-19 17:49:41 -08:00
2013-03-15 00:35:55 -04:00
2012-08-21 11:27:00 +02:00
2011-08-19 14:35:59 -04:00
2013-03-15 00:34:40 -04:00
2013-03-15 00:36:04 -04:00
2013-03-15 00:34:54 -04:00
2013-03-15 00:35:40 -04:00
2013-03-15 00:36:05 -04:00
2013-03-15 00:35:40 -04:00
2013-03-15 00:35:40 -04:00
2012-11-02 10:21:52 -04:00
2013-03-15 00:35:40 -04:00
2009-03-23 09:22:15 +01:00
2013-03-15 00:35:55 -04:00
2013-03-15 00:35:55 -04:00
2012-04-23 21:15:55 -04:00
2012-10-31 16:45:23 -04:00
2013-02-08 18:24:30 +01:00
2013-03-15 00:35:40 -04:00
2013-03-15 00:35:40 -04:00
2011-05-18 19:24:51 -04:00
2013-03-15 00:35:40 -04:00
2012-11-19 15:07:13 -05:00
2010-03-30 22:02:32 +09:00
2009-07-10 12:14:05 +02:00
2013-03-15 00:35:40 -04:00
2013-02-08 18:28:08 +01:00
2013-03-15 00:36:05 -04:00
2013-03-15 00:35:56 -04:00