OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 1/7] perf: use event_name() to get an event name
[PATCH 1/7] perf: use event_name() to get an event name [message #44254] Mon, 28 November 2011 09:03 Go to next message
Andrew Vagin is currently offline  Andrew Vagin
Messages: 28
Registered: November 2011
Junior Member
From: *parallels.com
perf_evsel.name may be not initialized

Signed-off-by: Andrew Vagin <avagin@openvz.org>
---
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 bcd05d0..33c17a2 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;
/*
--
1.7.1
Re: [PATCH 1/7] perf: use event_name() to get an event name [message #44596 is a reply to message #44254] Tue, 06 December 2011 14:02 Go to previous message
Arnaldo Carvalho de M[2] is currently offline  Arnaldo Carvalho de M[2]
Messages: 17
Registered: November 2011
Junior Member
From: *parallels.com
Em Mon, Nov 28, 2011 at 12:03:29PM +0300, Andrew Vagin escreveu:
> perf_evsel.name may be not initialized

I'm applying this one to my perf/urgent branch and will ask Ingo to
merge it today.

> Signed-off-by: Andrew Vagin <avagin@openvz.org>
> ---
> 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 bcd05d0..33c17a2 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;
> /*
> --
> 1.7.1
Previous Topic: [PATCH v7 00/10] Request for Inclusion: per-cgroup tcp memory pressure
Next Topic: [PATCH 2/2] SUNRPC: register service stats /proc entries in passed network namespace context
Goto Forum:
  


Current Time: Mon Aug 19 04:40:40 GMT 2019