Messages in this thread | | | Date | Thu, 25 Sep 2008 10:07:17 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [RFC PATCH 1/3] Unified trace buffer |
| |
On Thu, 25 Sep 2008, Steven Rostedt wrote: > > 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.
Ok. It's still true that we absolutely don't want to add random notrace markers to code just because it's shared with the scheduler. And "sched_clock()" is not a single function with just a few well-defined places, nor are all versions of it at all appropriate for tracing (the non-TSC ones are a total joke - it works for scheduling, but not tracing. Same goes for the virtualized versions).
> 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.
Yes. The code looked fine, and had a FIXME. I have no objection to using it as a known buggy approximation for TSC in order to not force every architecture to immediately write one when the patch is discussed. But I literally would expect that on x86, we'd basically just have a function that does "rdtsc" for the common case, along with possibly a generic fallback that does "xadd" in the absense of any other reasonable alternative.
Linus
| |