diff options
author | Andrew Vagin <avagin@openvz.org> | 2011-11-28 04:03:29 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-12-06 06:22:48 -0500 |
commit | 6340cfed48c478cf67451ddcd2daa3438e642632 (patch) | |
tree | 23d29fd4ed23d2c5f76cc54f7bdfdf95355d1207 /tools | |
parent | 38f6ae1e1b0d5e8b0a95f88c1eee2c5e8b001631 (diff) |
perf header: Use event_name() to get an event name
perf_evsel.name may be not initialized
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arun Sharma <asharma@fb.com>
Cc: devel@openvz.org
Link: http://lkml.kernel.org/r/1322471015-107825-2-git-send-email-avagin@openvz.org
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/header.c | 2 |
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, | |||
388 | /* | 388 | /* |
389 | * write event string as passed on cmdline | 389 | * write event string as passed on cmdline |
390 | */ | 390 | */ |
391 | ret = do_write_string(fd, attr->name); | 391 | ret = do_write_string(fd, event_name(attr)); |
392 | if (ret < 0) | 392 | if (ret < 0) |
393 | return ret; | 393 | return ret; |
394 | /* | 394 | /* |