From: Andrew Vagin Date: Mon, 28 Nov 2011 09:03:29 +0000 (+0300) Subject: perf header: Use event_name() to get an event name X-Git-Tag: v3.2-rc5~8^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6340cfed48c478cf67451ddcd2daa3438e642632;p=profile%2Fivi%2Fkernel-x86-ivi.git perf header: Use event_name() to get an event name perf_evsel.name may be not initialized Cc: David Ahern Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Arun Sharma Cc: devel@openvz.org Link: http://lkml.kernel.org/r/1322471015-107825-2-git-send-email-avagin@openvz.org Signed-off-by: Andrew Vagin Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index bcd05d05b4f..33c17a2b2a8 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; /*