[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8738rawxz8.fsf@sejong.aot.lge.com>
Date: Fri, 19 Jul 2013 21:11:39 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 15/23] perf tools: Add perf data version 3 header read
On Wed, 17 Jul 2013 19:49:55 +0200, Jiri Olsa wrote:
> Adding perf data version 3 header read code to load
> data for v3 format.
>
[SNIP]
> +
> + session = container_of(header, struct perf_session, header);
> + if (session->evlist)
> + return 0;
I guess we need version check here. The v2 format still needs to
process it even though it's session already has a evlist, right?
Thanks,
Namhyung
>
> evlist = read_event_desc(header, fd);
> if (!evlist)
> - return 0;
> + return -1;
>
> - session = container_of(header, struct perf_session, header);
> + ph = &session->header;
>
> - list_for_each_entry(evsel, &evlist->entries, node)
> - perf_evlist__set_event_name(session->evlist, evsel);
> + if (ph->version <= PERF_HEADER_VERSION_2) {
> + list_for_each_entry(evsel, &evlist->entries, node)
> + perf_evlist__set_event_name(session->evlist, evsel);
> +
> + perf_evlist__delete(evlist);
> + } else {
> + session->evlist = evlist;
> + symbol_conf.nr_events = evlist->nr_entries;
> + }
>
> - perf_evlist__delete(evlist);
> return 0;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists