Steven Rostedt
1b29b01887
ftrace: function tracer
This is a simple trace that uses the ftrace infrastructure. It is
designed to be fast and small, and easy to use. It is useful to
record things that happen over a very short period of time, and
not to analyze the system in general.
Updates:
available_tracers
"function" is added to this file.
current_tracer
To enable the function tracer:
echo function > /debugfs/tracing/current_tracer
To disable the tracer:
echo disable > /debugfs/tracing/current_tracer
The output of the function_trace file is as follows
"echo noverbose > /debugfs/tracing/iter_ctrl"
preemption latency trace v1.1.5 on 2.6.24-rc7-tst
Signed-off-by: Ingo Molnar <mingo@elte.hu>
--------------------------------------------------------------------
latency: 0 us, #419428/4361791, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
-----------------
| task: -0 (uid:0 nice:0 policy:0 rt_prio:0)
-----------------
_------=> CPU#
/ _-----=> irqs-off
| / _----=> need-resched
|| / _---=> hardirq/softirq
||| / _--=> preempt-depth
|||| /
||||| delay
cmd pid ||||| time | caller
\ / ||||| \ | /
swapper-0 0d.h. 1595128us+: set_normalized_timespec+0x8/0x2d <c043841d> (ktime_get_ts+0x4a/0x4e <c04499d4>)
swapper-0 0d.h. 1595131us+: _spin_lock+0x8/0x18 <c0630690> (hrtimer_interrupt+0x6e/0x1b0 <c0449c56>)
Or with verbose turned on:
"echo verbose > /debugfs/tracing/iter_ctrl"
preemption latency trace v1.1.5 on 2.6.24-rc7-tst
--------------------------------------------------------------------
latency: 0 us, #419428/4361791, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
-----------------
| task: -0 (uid:0 nice:0 policy:0 rt_prio:0)
-----------------
swapper 0 0 9 00000000 00000000 [f3675f41] 1595.128ms (+0.003ms): set_normalized_timespec+0x8/0x2d <c043841d> (ktime_get_ts+0x4a/0x4e <c04499d4>)
swapper 0 0 9 00000000 00000001 [f3675f45] 1595.131ms (+0.003ms): _spin_lock+0x8/0x18 <c0630690> (hrtimer_interrupt+0x6e/0x1b0 <c0449c56>)
swapper 0 0 9 00000000 00000002 [f3675f48] 1595.135ms (+0.003ms): _spin_lock+0x8/0x18 <c0630690> (hrtimer_interrupt+0x6e/0x1b0 <c0449c56>)
The "trace" file is not affected by the verbose mode, but is by the symonly.
echo "nosymonly" > /debugfs/tracing/iter_ctrl
tracer:
[ 81.479967] CPU 0: bash:3154 register_ftrace_function+0x5f/0x66 <ffffffff80337a4d> <-- _spin_unlock_irqrestore+0xe/0x5a <ffffffff8048cc8f>
[ 81.479967] CPU 0: bash:3154 _spin_unlock_irqrestore+0x3e/0x5a <ffffffff8048ccbf> <-- sub_preempt_count+0xc/0x7a <ffffffff80233d7b>
[ 81.479968] CPU 0: bash:3154 sub_preempt_count+0x30/0x7a <ffffffff80233d9f> <-- in_lock_functions+0x9/0x24 <ffffffff8025a75d>
[ 81.479968] CPU 0: bash:3154 vfs_write+0x11d/0x155 <ffffffff8029a043> <-- dnotify_parent+0x12/0x78 <ffffffff802d54fb>
[ 81.479968] CPU 0: bash:3154 dnotify_parent+0x2d/0x78 <ffffffff802d5516> <-- _spin_lock+0xe/0x70 <ffffffff8048c910>
[ 81.479969] CPU 0: bash:3154 _spin_lock+0x1b/0x70 <ffffffff8048c91d> <-- add_preempt_count+0xe/0x77 <ffffffff80233df7>
[ 81.479969] CPU 0: bash:3154 add_preempt_count+0x3e/0x77 <ffffffff80233e27> <-- in_lock_functions+0x9/0x24 <ffffffff8025a75d>
echo "symonly" > /debugfs/tracing/iter_ctrl
tracer:
[ 81.479913] CPU 0: bash:3154 register_ftrace_function+0x5f/0x66 <-- _spin_unlock_irqrestore+0xe/0x5a
[ 81.479913] CPU 0: bash:3154 _spin_unlock_irqrestore+0x3e/0x5a <-- sub_preempt_count+0xc/0x7a
[ 81.479913] CPU 0: bash:3154 sub_preempt_count+0x30/0x7a <-- in_lock_functions+0x9/0x24
[ 81.479914] CPU 0: bash:3154 vfs_write+0x11d/0x155 <-- dnotify_parent+0x12/0x78
[ 81.479914] CPU 0: bash:3154 dnotify_parent+0x2d/0x78 <-- _spin_lock+0xe/0x70
[ 81.479914] CPU 0: bash:3154 _spin_lock+0x1b/0x70 <-- add_preempt_count+0xe/0x77
[ 81.479914] CPU 0: bash:3154 add_preempt_count+0x3e/0x77 <-- in_lock_functions+0x9/0x24
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 20:32:13 +02:00
..
2008-05-02 13:40:34 +02:00
Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', 'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release
2008-04-30 13:58:00 -04:00
2008-05-03 18:11:48 +02:00
2008-05-23 20:32:13 +02:00
2008-02-09 23:27:01 -08:00
2008-03-24 19:22:20 -07:00
2008-05-17 03:30:23 -04:00
2008-05-17 03:30:22 -04:00
2008-04-28 06:28:04 -04:00
2008-04-29 11:41:22 -07:00
2008-04-28 06:28:37 -04:00
2008-01-30 13:33:08 +01:00
2008-04-29 08:06:29 -07:00
2008-02-05 09:44:20 -08:00
2008-04-29 08:06:09 -07:00
2008-04-30 08:29:50 -07:00
2008-05-01 08:03:59 -07:00
2008-04-29 08:06:22 -07:00
2008-04-30 08:29:54 -07:00
2008-05-08 10:46:56 -07:00
2007-10-18 14:37:28 -07:00
2008-04-29 08:06:22 -07:00
2007-10-18 14:37:26 -07:00
2008-05-01 13:08:16 -04:00
2008-01-29 17:13:18 +11:00
2008-05-16 17:22:26 -04:00
2008-03-30 14:18:41 -07:00
2008-05-05 08:18:45 -07:00
2008-05-03 18:11:48 +02:00
2008-02-08 09:22:29 -08:00
2008-04-29 08:06:22 -07:00
2008-01-25 21:08:29 +01:00
2008-03-10 18:01:20 -07:00
2008-05-01 08:04:00 -07:00
2007-07-16 09:05:50 -07:00
2008-05-14 19:11:14 -07:00
2008-05-01 13:08:16 -04:00
2008-04-28 08:58:32 -07:00
2008-01-24 20:40:40 -08:00
2008-04-30 08:29:48 -07:00
2008-04-29 08:06:22 -07:00
2006-12-07 08:39:43 -08:00
2008-04-29 08:06:22 -07:00
2008-02-25 23:03:02 +01:00
2008-05-23 20:32:06 +02:00
2008-04-30 08:29:49 -07:00
2008-05-09 07:45:18 -07:00
2008-02-08 09:22:31 -08:00
2006-07-03 15:27:01 -07:00
2008-02-08 09:22:31 -08:00
2006-07-03 15:27:04 -07:00
2008-04-29 08:06:13 -07:00
2008-04-29 08:06:07 -07:00
2008-04-29 08:06:14 -07:00
2008-04-29 08:05:59 -07:00
2008-02-08 09:22:41 -08:00
2008-04-30 08:29:49 -07:00
2008-04-30 08:29:48 -07:00
2008-02-05 09:44:22 -08:00
2008-05-01 08:03:58 -07:00
2008-04-30 08:29:36 -07:00
2008-04-30 08:29:52 -07:00
2008-04-29 08:06:22 -07:00
2008-05-01 10:21:54 -07:00
2008-01-25 21:08:24 +01:00
2008-02-13 16:21:18 -08:00
2008-01-25 21:08:24 +01:00
2008-04-19 19:44:59 +02:00
2008-04-29 08:06:04 -07:00
2008-05-08 14:06:19 +02:00
2008-04-29 08:06:10 -07:00
2008-04-29 08:06:22 -07:00
2008-02-08 09:22:41 -08:00
2008-02-08 09:22:41 -08:00
2006-07-03 15:27:01 -07:00
2008-01-24 20:40:40 -08:00
2008-02-13 15:45:36 +01:00
2006-07-03 15:27:01 -07:00
2007-12-18 15:21:13 +01:00
2008-05-05 23:56:18 +02:00
2008-05-05 23:56:18 +02:00
2008-05-08 17:00:42 +02:00
2008-04-19 19:45:00 +02:00
2008-05-05 23:56:17 +02:00
2008-05-05 23:56:18 +02:00
2008-04-19 19:44:59 +02:00
2008-05-23 20:31:05 +02:00
2007-07-16 09:05:50 -07:00
2008-05-10 20:43:22 -07:00
2008-04-30 08:29:37 -07:00
2008-05-01 08:03:58 -07:00
2008-02-29 18:46:53 +01:00
2008-01-30 13:31:20 +01:00
2008-02-06 10:41:02 -08:00
2006-07-03 15:27:02 -07:00
2008-04-21 16:36:46 -07:00
2008-02-05 09:44:07 -08:00
2008-04-30 08:29:49 -07:00
2008-02-08 09:22:31 -08:00
2008-05-16 17:22:52 -04:00
2008-04-30 08:29:48 -07:00
2008-02-06 10:41:11 -08:00
2008-05-02 16:18:42 -07:00
2008-05-02 16:18:42 -07:00
2008-04-30 08:29:53 -07:00
2007-10-18 14:37:28 -07:00
2008-04-10 17:28:26 -07:00
2008-04-29 08:06:07 -07:00
2008-04-30 08:29:53 -07:00
2007-11-29 09:24:53 -08:00
2008-04-29 08:06:04 -07:00
2008-02-08 09:22:31 -08:00
2008-05-01 08:04:02 -07:00