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

From: Namhyung Kim
Date: Thu Mar 05 2015 - 23:21:30 EST


Hi Jiri,

On Wed, Mar 04, 2015 at 05:19:54PM +0100, Jiri Olsa wrote:
> On Tue, Mar 03, 2015 at 12:07:19PM +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/util/session.c | 62 ++++++++++++++++++++++++++++++++++++++---------
> > tools/perf/util/session.h | 5 ++++
> > 2 files changed, 55 insertions(+), 12 deletions(-)
> >
> > diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> > index e4f166981ff0..00cd1ad427be 100644
> > --- a/tools/perf/util/session.c
> > +++ b/tools/perf/util/session.c
> > @@ -1300,11 +1300,10 @@ fetch_mmaped_event(struct perf_session *session,
> > #define NUM_MMAPS 128
> > #endif
> >
> > -static int __perf_session__process_events(struct perf_session *session,
> > +static int __perf_session__process_events(struct perf_session *session, int fd,
> > u64 data_offset, u64 data_size,
> > u64 file_size, struct perf_tool *tool)
> > {
> > - int fd = perf_data_file__fd(session->file);
>
> why is 'fd' passed separatelly here? we have single file now
> and the only 'file::fd' we use is in session, no?

You're right, it's a leftover from the old code. Will change.

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/