Commit 6340cfed authored by Andrew Vagin's avatar Andrew Vagin Committed by Arnaldo Carvalho de Melo

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.orgSigned-off-by: default avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 38f6ae1e
...@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used, ...@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used,
/* /*
* write event string as passed on cmdline * 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) if (ret < 0)
return ret; return ret;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment