diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-09-24 04:14:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-24 10:44:05 -0400 |
commit | e93699b3c7aeb13eee473b1dc36cbe3a8a0ca397 (patch) | |
tree | b7542015ca4ee42fd560f736ad83aa23d8338719 /tools/perf | |
parent | e0dcd6fb2564c20e53ee8b7d2884a7e375fe9e75 (diff) |
perf header: Add struct perf_session_env
The struct perf_session_env will preserve environment information at the
time of perf record. It can be accessed anytime after parsing a
perf.data file if needed.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1348474503-15070-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/header.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index 58de08b21bce..5867c7d74f97 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h | |||
@@ -58,6 +58,29 @@ struct perf_header; | |||
58 | int perf_file_header__read(struct perf_file_header *header, | 58 | int perf_file_header__read(struct perf_file_header *header, |
59 | struct perf_header *ph, int fd); | 59 | struct perf_header *ph, int fd); |
60 | 60 | ||
61 | struct perf_session_env { | ||
62 | char *hostname; | ||
63 | char *os_release; | ||
64 | char *version; | ||
65 | char *arch; | ||
66 | int nr_cpus_online; | ||
67 | int nr_cpus_avail; | ||
68 | char *cpu_desc; | ||
69 | char *cpuid; | ||
70 | unsigned long long total_mem; | ||
71 | |||
72 | int nr_cmdline; | ||
73 | char *cmdline; | ||
74 | int nr_sibling_cores; | ||
75 | char *sibling_cores; | ||
76 | int nr_sibling_threads; | ||
77 | char *sibling_threads; | ||
78 | int nr_numa_nodes; | ||
79 | char *numa_nodes; | ||
80 | int nr_pmu_mappings; | ||
81 | char *pmu_mappings; | ||
82 | }; | ||
83 | |||
61 | struct perf_header { | 84 | struct perf_header { |
62 | int frozen; | 85 | int frozen; |
63 | bool needs_swap; | 86 | bool needs_swap; |
@@ -67,6 +90,7 @@ struct perf_header { | |||
67 | u64 event_offset; | 90 | u64 event_offset; |
68 | u64 event_size; | 91 | u64 event_size; |
69 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); | 92 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); |
93 | struct perf_session_env env; | ||
70 | }; | 94 | }; |
71 | 95 | ||
72 | struct perf_evlist; | 96 | struct perf_evlist; |