Re: [PATCH 10/38] perf tools: Pass session arg to perf_event__preprocess_sample()

From: Namhyung Kim
Date: Tue Mar 03 2015 - 09:19:28 EST


On Tue, Mar 03, 2015 at 10:59:30AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 03, 2015 at 12:07:22PM +0900, Namhyung Kim escreveu:
> > The perf_event__preprocess_sample() translates a given ip into a
> > matching symbol. To do that, it first finds a corresponding thread
> > and map in the current thread tree. But for indexed data files, it
> > needs to find a thread (and map) with slightly different APIs using
> > timestamp. So it needs a way to know whether this session deals with
> > an indexed data file or not.
>
> I need to look into this, but in general, I'm trying to _remove_
> accesses to perf_session :-)

The reason is that it needs to know whether the current session has
index so that it's accessing the samples in sequence or in random
order. If we can save that info at some other place (like a global
variable?) it doesn't need to pass session.

Thanks,
Namhyung
--
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/