Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Friday, January 18, 2008 - 3:26 pm

* Steven Rostedt (rostedt@goodmis.org) wrote:

Exactly. We have, at the marker site :

- a marker identifier
- format string containing field names and types
- arguments

I would like to keep that as much in a straight line as possible with
what ends up in the trace.

However, I see that it limits what can be done by in-kernel tracers. And
by the way, I also suffer from the same kind of limitation in LTTng. Here
is an example :

I would like to replace blktrace (actually, I already have a quite
complete implementation). However, there is some code ran in the kernel
to "prepare" the information for the trace which is blktrace specific.
Since this code is not required to run when tracing is disabled, it can
be seen as "glue-code" between the kernel tracing point and the
extraction of data to trace.

What looked like the less intrusive solution was to create inline
functions that consist of branches over code considered unlikely (could
be a function call) where the glue-code is executed to prepare the data.
It's a bit like what the markers are doing, except that there is no
marker name associated and no format string : the subsystem being traced
must enable its tracing features by itself (could be a /proc file). It
makes sense, since this type of code has to be subsystem-specific
anyway.

But I have not seen a lot of situations where that kind of glue-code was
needed, so I think it makes sense to keep markers simple to use and
efficient for the common case.

Then, in this glue-code, we can put trace_mark() and calls to in-kernel
tracers.

Since the markers are eventually meant to become an API visible from
user-space, I think it makes sense to keep it clean. If an in-kernel
tracer needs extra information, I think it would make sense for it to
get it from a mechanism that does not make the exported information
visible to user-space.

What do you think ?



It could be done I guess. But it looks a bit ugly. :) I would rather
prefer to export the "pretty stuff" through an interface not involving
markers. Or if there is a way to separate the "callback" mechanism from
the "export to user-space" API parts of the markers, I am open to
proposals.

Mathieu


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 9, 4:29 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Daniel Walker, (Wed Jan 9, 8:28 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Tue Jan 15, 2:46 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Tue Jan 15, 3:01 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Tue Jan 15, 3:03 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Tue Jan 15, 3:08 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Tue Jan 15, 6:38 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Tue Jan 15, 8:17 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 6:17 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 7:56 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 8:06 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 8:28 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 8:58 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 10:00 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Tim Bird, (Wed Jan 16, 11:01 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 12:43 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 1:17 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, john stultz, (Wed Jan 16, 3:36 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, john stultz, (Wed Jan 16, 3:51 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 4:33 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 4:39 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 4:50 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, john stultz, (Wed Jan 16, 5:33 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 5:36 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Linus Torvalds, (Wed Jan 16, 6:03 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 6:35 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, john stultz, (Wed Jan 16, 7:20 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 7:20 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, john stultz, (Wed Jan 16, 7:28 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 7:35 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 7:40 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 7:50 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 7:51 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 8:02 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Paul Mackerras, (Wed Jan 16, 8:21 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Wed Jan 16, 8:39 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 9:14 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Wed Jan 16, 9:25 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Thu Jan 17, 8:22 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Linus Torvalds, (Thu Jan 17, 10:46 am)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Thu Jan 17, 1:08 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Frank Ch. Eigler, (Thu Jan 17, 1:37 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Thu Jan 17, 2:03 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Fri Jan 18, 3:26 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Steven Rostedt, (Fri Jan 18, 3:49 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Frank Ch. Eigler, (Fri Jan 18, 8:32 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Frank Ch. Eigler, (Fri Jan 18, 8:36 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Frank Ch. Eigler, (Fri Jan 18, 9:23 pm)
Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles, Mathieu Desnoyers, (Sat Jan 19, 8:29 am)