diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-07 12:48:42 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-09 11:15:07 -0200 |
commit | 3835bc00c5b2d8e337a6e9d7b44f47e02760dba3 (patch) | |
tree | c93ec68b81e3c44c0d6e42d9e2bdeebf38657205 /tools/perf/util/session.c | |
parent | b226a5a72901bc9c73d639ea2e53e6c304bf3b74 (diff) | |
download | blackbird-op-linux-3835bc00c5b2d8e337a6e9d7b44f47e02760dba3.tar.gz blackbird-op-linux-3835bc00c5b2d8e337a6e9d7b44f47e02760dba3.zip |
perf event: Prevent unbound event__name array access
event__name[] is missing an entry for PERF_RECORD_FINISHED_ROUND, but we
happily access the array from the dump code.
Make event__name[] static and provide an accessor function, fix up all
callers and add the missing string.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20101207124550.432593943@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 3074d38897e6..b3b145a8ff7c 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -718,7 +718,7 @@ static int perf_session__process_event(struct perf_session *session, if (event->header.type < PERF_RECORD_HEADER_MAX) { dump_printf("%#Lx [%#x]: PERF_RECORD_%s", file_offset, event->header.size, - event__name[event->header.type]); + event__get_event_name(event->header.type)); hists__inc_nr_events(&session->hists, event->header.type); } |