lkml.org 
[lkml]   [2008]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/3] Unified trace buffer


On Thu, 25 Sep 2008, Steven Rostedt wrote:
>
> If we do not normalize, then we must come up yet another generic way to read
> the CPU clock for all archs. And then we also need to come up with another
> generic way to normalize it later for output.

Why would any of this be "generic"?

Quite the reverse. It should be as trace-buffer specific as possible, so
that we do *not* share any code or any constraints with other people.

Just do rdtsc at first, and make it depend on x86. If the thing is made
simple enough, it will be a couple of lines of code for architectures to
read their own timestamp counters.

And since the normalization is then no longer in the critical part, _that_
can be architecture-independent, but obviously still trace-specific. You
need to know the frequency, and that involves having frequency events in
the trace if it changes, but if you don't see any frequency events you
just take "current frequency".

And doing it at trace parse time, we can some day enable a boot trace that
actually WORKS. Have you looked at the timestamp events we get from
"sched_clock()" in early bootup? They show up in the kernel logs when you
have CONFIG_PRINTK_TIME. And they are totally and utterly broken and
_useless_ for the early stages right now. And they shouldn't have to be
that way.

Yeah, we'll never be able to trace stuff that happens really early
(tracing will obviously always need kernel page tables and some really
basic stuf working), but we should be able to trace through things like
TSC calibration for boot time analysis. It wasn't that long ago that we
had the whole discussion about TSC calibration taking 200ms. Or the early
ACPI code. And get meaningful data.

Linus


\
 
 \ /
  Last update: 2008-09-25 19:27    [W:0.104 / U:1.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site