Re: [ANNOUNCE] New utility: 'trace'

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frederic Weisbecker
Date: Tuesday, November 16, 2010 - 3:17 pm

On Tue, Nov 16, 2010 at 01:27:35PM -0800, Darren Hart wrote:


No, the trace_marker file sends trace_printk events. And trace_printk
events needs to be converted to use the unified trace event interface
(ie: implement a struct ftrace_event_call).

This shouldn't be so hard, and there are several ways we could do this.

An idea is to reproduce the kernel file hierarchy in a "printk" event
subsystem, but this implies to allow subsystems nesting.

Imagine you have two trace_printk(), one in kernel/sched.c:117
and one in kernel/time/tick-sched.c:228
The result would be:

$ ls /sys/kernel/debug/tracing/events/printk

/sys/kernel/debug/tracing/events/printk:
enable  filter  kernel/

/sys/kernel/debug/tracing/events/printk/kernel:
enable  filter sched.c/ time/

/sys/kernel/debug/tracing/events/printk/kernel/sched.c:
enable  filter  117/

/sys/kernel/debug/tracing/events/printk/kernel/sched.c/117:
enable filter format id

/sys/kernel/debug/tracing/events/printk/kernel/time:
enable  filter tick-sched.c/

/sys/kernel/debug/tracing/events/printk/kernel/time/tick-sched.c:
enable  filter  228/

/sys/kernel/debug/tracing/events/printk/kernel/time/tick-sched.c/228:
enable filter format id


The format would be quite easy, and only one field for the whole string (strloc).

Not sure what to do with trace_marker. I just think we can add it as:
/sys/kernel/debug/tracing/events/printk/sys/kernel/debug/tracing/trace_marker

<:o)


But may be the whole idea is just fancy and nobody will care, and would just
a simple single event in a printk subsystem, on which you can use a kind of
virtual filter:

	echo "path != kernel/whatever.c:226" > /sys/kernel/debug/tracing/events/printk/filter

would turn on every trace_printk() but the one in the given path.

Dunno, I like both ideas. I prefer the first one which looks to me more flexible: could be
useful to list the user his trace_printks for example and implement an interface for him
to quickly select the trace_printk he wants.

For example I'm currently working with dozens of trace_printk() and I would be very happy
to turn some of them off half of the time.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE] New utility: 'trace', Thomas Gleixner, (Tue Nov 16, 2:04 pm)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Tue Nov 16, 2:27 pm)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Tue Nov 16, 2:35 pm)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Tue Nov 16, 2:59 pm)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Tue Nov 16, 3:03 pm)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Tue Nov 16, 3:07 pm)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Tue Nov 16, 3:08 pm)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Tue Nov 16, 3:09 pm)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Tue Nov 16, 3:17 pm)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Tue Nov 16, 3:48 pm)
Re: [ANNOUNCE] New utility: 'trace', Ted Ts'o, (Tue Nov 16, 6:37 pm)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Tue Nov 16, 6:47 pm)
Re: [ANNOUNCE] New utility: 'trace', Ted Ts'o, (Tue Nov 16, 8:16 pm)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Tue Nov 16, 8:34 pm)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Wed Nov 17, 1:30 am)
Re: [ANNOUNCE] New utility: 'trace', Philipp Marek, (Wed Nov 17, 2:49 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 4:35 am)
[patch] trace: Add user-space event tracing/injection, Ingo Molnar, (Wed Nov 17, 5:07 am)
Re: [patch] trace: Add user-space event tracing/injection, Peter Zijlstra, (Wed Nov 17, 5:29 am)
Re: [patch] trace: Add user-space event tracing/injection, Peter Zijlstra, (Wed Nov 17, 5:37 am)
Re: [patch] trace: Add user-space event tracing/injection, Peter Zijlstra, (Wed Nov 17, 5:42 am)
Re: [ANNOUNCE] New utility: 'trace', Török Edwin, (Wed Nov 17, 5:47 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 5:51 am)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Wed Nov 17, 5:53 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 6:02 am)
Re: [ANNOUNCE] New utility: 'trace', Török Edwin, (Wed Nov 17, 6:05 am)
Re: [patch] trace: Add user-space event tracing/injection, Peter Zijlstra, (Wed Nov 17, 6:09 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 6:10 am)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Wed Nov 17, 6:10 am)
Re: [patch] trace: Add user-space event tracing/injection, Frederic Weisbecker, (Wed Nov 17, 6:10 am)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Wed Nov 17, 6:24 am)
Re: [patch] trace: Add user-space event tracing/injection, Peter Zijlstra, (Wed Nov 17, 6:31 am)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Wed Nov 17, 6:32 am)
Re: [patch] trace: Add user-space event tracing/injection, Frederic Weisbecker, (Wed Nov 17, 6:33 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 6:36 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 6:38 am)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Wed Nov 17, 6:43 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 6:53 am)
Re: [ANNOUNCE] New utility: 'trace', Ingo Molnar, (Wed Nov 17, 7:00 am)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Wed Nov 17, 7:10 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 7:11 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 7:18 am)
Re: [ANNOUNCE] New utility: 'trace', Thomas Gleixner, (Wed Nov 17, 7:37 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 7:41 am)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Wed Nov 17, 8:02 am)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Wed Nov 17, 8:10 am)
Re: [ANNOUNCE] New utility: 'trace', Tom Zanussi, (Wed Nov 17, 8:33 am)
Re: [ANNOUNCE] New utility: 'trace', Tom Zanussi, (Wed Nov 17, 8:41 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 8:43 am)
Re: [ANNOUNCE] New utility: 'trace', Avi Kivity, (Wed Nov 17, 8:55 am)
Re: [ANNOUNCE] New utility: 'trace', Thomas Gleixner, (Wed Nov 17, 8:58 am)
Re: [ANNOUNCE] New utility: 'trace', Peter Zijlstra, (Wed Nov 17, 8:59 am)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Wed Nov 17, 9:04 am)
Re: [ANNOUNCE] New utility: 'trace', Avi Kivity, (Wed Nov 17, 9:08 am)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Wed Nov 17, 9:15 am)
Re: [ANNOUNCE] New utility: 'trace', Avi Kivity, (Wed Nov 17, 9:20 am)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Wed Nov 17, 9:49 am)
Re: [ANNOUNCE] New utility: 'trace', Ted Ts'o, (Wed Nov 17, 11:13 am)
Re: [ANNOUNCE] New utility: 'trace', Mathieu Desnoyers, (Wed Nov 17, 11:23 am)
Re: [ANNOUNCE] New utility: 'trace', Frederic Weisbecker, (Wed Nov 17, 11:29 am)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Wed Nov 17, 11:30 am)
Re: [ANNOUNCE] New utility: 'trace', Mathieu Desnoyers, (Wed Nov 17, 11:36 am)
Re: [ANNOUNCE] New utility: 'trace', Tom Zanussi, (Wed Nov 17, 11:53 am)
Re: [ANNOUNCE] New utility: 'trace', Bob Copeland, (Wed Nov 17, 12:00 pm)
Re: [ANNOUNCE] New utility: 'trace', Mathieu Desnoyers, (Wed Nov 17, 12:02 pm)
Re: [ANNOUNCE] New utility: 'trace', Steven Rostedt, (Wed Nov 17, 12:25 pm)
Re: [ANNOUNCE] New utility: 'trace', Tom Zanussi, (Wed Nov 17, 12:25 pm)
Re: [ANNOUNCE] New utility: 'trace', Darren Hart, (Wed Nov 17, 12:40 pm)
Re: [ANNOUNCE] New utility: 'trace', Ian Munsie, (Wed Nov 17, 5:47 pm)
Re: [ANNOUNCE] New utility: 'trace', Masami Hiramatsu, (Wed Nov 17, 10:58 pm)
Re: [ANNOUNCE] New utility: 'trace', Masami Hiramatsu, (Wed Nov 17, 11:00 pm)
AW: [patch] trace: Add user-space event tracing/injection, Reichert, Hans-Peter, (Thu Nov 18, 12:13 pm)
Re: [ANNOUNCE] New utility: 'trace', Joe Perches, (Thu Nov 18, 4:23 pm)
Re: [ANNOUNCE] New utility: 'trace', Ian Munsie, (Thu Nov 18, 7:32 pm)
Re: [ANNOUNCE] New utility: 'trace', Jason Baron, (Fri Nov 19, 8:23 am)