Messages in this thread | | | Date | Thu, 25 Sep 2008 12:53:49 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [RFC PATCH 1/3] Unified trace buffer |
| |
On Thu, 25 Sep 2008, Linus Torvalds wrote: > > Not only that, but have you forgotten about FTRACE and -pg? Which means > that every single C function calls into tracing code, and that can > basically only be disabled on a per-file basis?
Slight correction. You can annotate the function with "notrace" and that function will not be traced. So the "only be disabled on a per-file basis" statement is false.
> > Yeah, it would probably cause some code duplication, but the low-leel > trace infrastructure really is special. It can't afford to call other > subsystems helper functions, because people want to trace _those_.
Currently my code calls "ring_buffer_time_stamp" to get the time stamp, whatever it will be. Currently it is using sched_clock, but since I have it as a wrapper, it shouldn't be too hard to modify later.
I'll also add a "ring_buffer_time_stamp_normalize(ts)" function to be called on reading of the trace. This will normalize whatever time stamp that we use back to ns for the users. For now it will just return "ts" since sched_clock is already normalize.
IOW, for my current work, I don't care what timing we use. Others do, and I will try to make the tracing infrastructure let it be easy to change what is used. For now, I'm concentrating on the infrastructure itself.
-- Steve
| |