Re: [PATCH 07/40] perf tools: Handle indexed data file properly

From: Namhyung Kim
Date: Tue May 19 2015 - 02:49:40 EST


On Mon, May 18, 2015 at 08:37:28PM +0200, Jiri Olsa wrote:
> On Mon, May 18, 2015 at 09:30:22AM +0900, Namhyung Kim wrote:
> > When perf detects data file has index table, process header part first
> > and then rest data files in a row. Note that the indexed sample data is
> > recorded for each cpu/thread separately, it's already ordered with
> > respect to themselves so no need to use the ordered event queue
> > interface.
> >
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> > ---
> > tools/perf/perf.c | 1 +
> > tools/perf/perf.h | 2 ++
> > tools/perf/util/session.c | 55 +++++++++++++++++++++++++++++++++++++++--------
> > 3 files changed, 49 insertions(+), 9 deletions(-)
> >
> > diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> > index b857fcbd00cf..960942d9a0b7 100644
> > --- a/tools/perf/perf.c
> > +++ b/tools/perf/perf.c
> > @@ -27,6 +27,7 @@ const char perf_more_info_string[] =
> > int use_browser = -1;
> > static int use_pager = -1;
> > const char *input_name;
> > +bool perf_has_index;
>
> I probably missed some discussion here, but why is this not
> perf_session function? I saw some non session related functions
> further in the patchset using this.. is that the reason?
>
> it seems fairly perf_session specific.. might be worth to
> keep it there? just asking ;-)

I agree. But it requires to pass a pointer to session wherever
processing samples. Arnaldo said that he wanted to remove accesses to
a session in general. So I added the global variable.

https://lkml.org/lkml/2015/3/3/353

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/