Re: [PATCH] tracing/function-return-tracer: set a more human readableoutput

From: Steven Rostedt
Date: Wed Nov 26 2008 - 07:21:25 EST



On Wed, 26 Nov 2008, Fr?d?ric Weisbecker wrote:

> >>
> >> 3) The first column: single-character visual shortcuts for "overhead".
> >> This is a concept we used in the -rt tracer and it still lives in
> >> the latency tracer bits of ftrace and is quite useful:
> >>
> >> '+' means "overhead spike": overhead is above 10 usecs.
> >> '!' means "large overhead": overhead is above 100 usecs.
> >>
> >> These give at-a-glance hotspot analysis - hotspots are easier to
> >> miss as pure numbers.
> >
> > The latency_trace file has this too. And it uses the above peek to figure
> > it out ;-)
>
>
> That's right, the latency_trace does it. But it is based on a
> ring-buffer entry timestamp.
> I wanted to use ring-buffer entry timestamp, but it would be hard to
> calculate the duration
> since the return trace of a function doesn't often follow immediately
> its entry trace.
> And I can't reuse lat_print_timestamp() because I need the nsec
> remaining part....
>
> This is too specific to reuse latency_trace...

I'd suggest just looking at how those are implemented, and use your own.
One note, the latency tracer looks at the next entry, even if it is on
another CPU. This is incorrect, and will definitely be incorrect for you.
Just use the ring_buffer_iter_peek, that will get you what you want. Well,
for leaf functions.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/