summaryrefslogtreecommitdiff
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-07-17 21:49:47 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-18 00:04:00 +0400
commit2a08c3ec4f7d6058a450d2d4bc6e366955872707 (patch)
treeffcd2c8c95e67260993ab8b7f4e96419adc7bcf8 /tools/perf/util/header.h
parent8d541e974f4b3ed5db7e278b4d64481af34910a9 (diff)
downloadlinux-2a08c3ec4f7d6058a450d2d4bc6e366955872707.tar.xz
perf header: Recognize version number for perf data file
Keep the recognized data file version within 'struct perf_header'. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <ak@linux.intel.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/1374083403-14591-8-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index e6387dcb95c0..307c9aed972e 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -34,6 +34,11 @@ enum {
HEADER_FEAT_BITS = 256,
};
+enum perf_header_version {
+ PERF_HEADER_VERSION_1,
+ PERF_HEADER_VERSION_2,
+};
+
struct perf_file_section {
u64 offset;
u64 size;
@@ -85,12 +90,13 @@ struct perf_session_env {
};
struct perf_header {
- bool needs_swap;
- u64 data_offset;
- u64 data_size;
- u64 feat_offset;
+ enum perf_header_version version;
+ bool needs_swap;
+ u64 data_offset;
+ u64 data_size;
+ u64 feat_offset;
DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS);
- struct perf_session_env env;
+ struct perf_session_env env;
};
struct perf_evlist;