Re: [PATCH 3/3] perf events: add timehist option to record andreport

From: Frederic Weisbecker
Date: Mon Feb 21 2011 - 16:35:14 EST


On Fri, Feb 18, 2011 at 06:30:15PM -0200, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 18, 2011 at 08:29:56PM +0100, Frederic Weisbecker escreveu:
> > On Fri, Feb 18, 2011 at 04:41:19PM -0200, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Feb 18, 2011 at 06:59:30PM +0100, Frederic Weisbecker escreveu:
> > > > The timestamps will be the cpu time and not the walltime, but at least that seems
> > > > to be partly what you seek?
> > >
> > > The whole issue for him, AFAIK, is to correlate perf events with app
> > > events.
> > >
> > > Think about tcpdump + networking tracepoints or 'perf probe' dynamic
> > > events in the network stack, he wants to merge those logs and correlate
> > > the tcpdump packet exchange with the tracepoints events in the network
> > > stack, etc.
> > >
> > > I.e. it doesn't matter if it is ftrace or not, having a common clock
> > > shared between apps and kernel tracing/whatever infrastructure is what
> > > David is after, right?
> > >
> > > He can change userspace to use the clock the kernel is using in the
> > > perf/ftrace/whatever infrastructure or make the kernel use the clock
> > > userspace uses.
> > >
> > > The issue here is who will bend, u or k ;-)
> >
> > Right. I don't disagree with the need of a walltime. That already
> > in debate :)
> >
> > I was rather arguing about the tracing part. Adding support in perf report
> > in the wrong way to do this. If something must be extended, It should be done
> > in perf script, where we do the tracing support.
>
> Squashing "profiling" and "tracing" differences is something I think
> worthy.
>
> Its all about events, that should be treated as equal in all tools. So I
> don't think 'perf script' is about tracing, its about handling events
> found in the event stream, be it hw, sw, tracepoints, dynamic probes put
> in place by 'perf probe', or whatever event source we end up having.
>
> A 'clock_gettime' like event, sampling whatever POSIX clock the kernel
> supports should be enough flexibility, leaving concerns about sanity of
> any particular use to the rope user.
>
> Of course, extensibility via 'perf script' or 'use perf' in perf scripts
> should provide great avenues for experimentation, not requiring changes
> in the builtins :-)

Right.

So I agree perf script should be tracing/profiling/any semantic agnostic.
But when it's about dumping, displaying events sequentially, it seems
an extension to perf script is a better place for that rather than
perf report. perf script default behaviour is already about displaying
raw traces. If support is needed to print the ip of the event or the
stacktraces, it's very welcome!
--
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/