aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Vagin <[email protected]>2011-11-28 12:03:29 +0300
committerArnaldo Carvalho de Melo <[email protected]>2011-12-06 09:22:48 -0200
commit6340cfed48c478cf67451ddcd2daa3438e642632 (patch)
tree23d29fd4ed23d2c5f76cc54f7bdfdf95355d1207
parent38f6ae1e1b0d5e8b0a95f88c1eee2c5e8b001631 (diff)
perf header: Use event_name() to get an event name
perf_evsel.name may be not initialized Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arun Sharma <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andrew Vagin <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index bcd05d05b4f0..33c17a2b2a81 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used,
/*
* write event string as passed on cmdline
*/
- ret = do_write_string(fd, attr->name);
+ ret = do_write_string(fd, event_name(attr));
if (ret < 0)
return ret;
/*