Re: [patch] trace: Add user-space event tracing/injection

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Wednesday, November 17, 2010 - 5:58 am

* Peter Zijlstra <peterz@infradead.org> wrote:


The problem is that it then does not properly mix with other events outside of the 
control of the application.

For example if there are two apps both generating user events, but there's no 
connection with them, a system-wide tracer wont get a properly ordered set of events 
- both apps will trace into their own buffers. So if we have:

  CPU1

  app1: "user event X"
  app2: "user event Y"

Then a 'trace --all' system-wide tracing session will not get proper ordering 
between app1 and app2's events. It only gets timestamps - which may or may not be 
correct.

User-space tracing schemes tend to be clumsy and limiting. There's other 
disadvantages as well: approaches that expose a named pipe in /tmp or an shmem 
region are not transparent and robust either: if user-space owns a pending buffer 
then bugs in the apps can corrupt the trace buffer, can prevent its flushing when 
the app goes down due to an app bug (and when the trace would be the most useful), 
etc. etc.

Also, in general their deployment isnt particularly fast nor lightweight - while 
prctl() is available everywhere.

And when it comes to tracing/instrumentation, if we make deployment too complex, 
people will simply not use it - and we all use. A prctl() isnt particularly sexy 
design, but it's a task/process event that we are generating (so related to prctls), 
plus it's available everywhere and is very easy to deploy.

Thanks,

	Ingo
--
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: [patch] trace: Add user-space event tracing/injection, Ingo Molnar, (Wed Nov 17, 5:58 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)