diff options
author | Jiri Olsa <jolsa@redhat.com> | 2014-02-04 09:37:48 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-10 09:34:31 -0500 |
commit | f67697bd079f4bbcbe7d6d26765a06b18afe0630 (patch) | |
tree | adbb8b017afcd628d7051da58c41ad34ce04b0e5 /tools | |
parent | 981a23792cd02631f8cd5dd65753208a44de5ae1 (diff) |
perf tools: Handle PERF_RECORD_HEADER_EVENT_TYPE properly
We removed event types from data file in following commits:
6065210 perf tools: Remove event types framework completely
44b3c57 perf tools: Remove event types from perf data file
We no longer need this information, because we can get it directly from
tracepoints.
But we still need to handle PERF_RECORD_HEADER_EVENT_TYPE event for the
sake of old perf data files created in pipe mode like:
$ perf.3.4 record -o - foo >perf.data
$ perf.312 report -i - < perf.data
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1391524668-12546-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/session.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 0b39a48e5110..5da6ce74c676 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1008,6 +1008,12 @@ static int perf_session__process_user_event(struct perf_session *session, union | |||
1008 | if (err == 0) | 1008 | if (err == 0) |
1009 | perf_session__set_id_hdr_size(session); | 1009 | perf_session__set_id_hdr_size(session); |
1010 | return err; | 1010 | return err; |
1011 | case PERF_RECORD_HEADER_EVENT_TYPE: | ||
1012 | /* | ||
1013 | * Depreceated, but we need to handle it for sake | ||
1014 | * of old data files create in pipe mode. | ||
1015 | */ | ||
1016 | return 0; | ||
1011 | case PERF_RECORD_HEADER_TRACING_DATA: | 1017 | case PERF_RECORD_HEADER_TRACING_DATA: |
1012 | /* setup for reading amidst mmap */ | 1018 | /* setup for reading amidst mmap */ |
1013 | lseek(fd, file_offset, SEEK_SET); | 1019 | lseek(fd, file_offset, SEEK_SET); |