summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2011-11-12 01:17:32 +0100
committerArnaldo Carvalho de Melo2011-11-28 13:37:11 +0100
commitd04b35f8085f0d4c5c874515b8f65e7664357148 (patch)
tree8115d7e30c274756097ce27742338438a14fabd5 /tools/perf/util/header.c
parentperf ui progress: Fix divide by zero (diff)
downloadkernel-qcow2-linux-d04b35f8085f0d4c5c874515b8f65e7664357148.tar.gz
kernel-qcow2-linux-d04b35f8085f0d4c5c874515b8f65e7664357148.tar.xz
kernel-qcow2-linux-d04b35f8085f0d4c5c874515b8f65e7664357148.zip
perf symbols: Add nr_events to symbol_conf
Since symbol__alloc_hists need it, to avoid passing it around in many functions have it in the symbol_conf struct. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-cwv8ysvpywzjq4v3xtbd4zwv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index bcd05d05b4f0..41424a16be8e 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2041,6 +2041,8 @@ int perf_session__read_header(struct perf_session *session, int fd)
lseek(fd, tmp, SEEK_SET);
}
+ symbol_conf.nr_events = nr_attrs;
+
if (f_header.event_types.size) {
lseek(fd, f_header.event_types.offset, SEEK_SET);
events = malloc(f_header.event_types.size);