lkml.org 
[lkml]   [2011]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:perf/urgent] perf header: Use event_name() to get an event name
    Commit-ID:  6340cfed48c478cf67451ddcd2daa3438e642632
    Gitweb: http://git.kernel.org/tip/6340cfed48c478cf67451ddcd2daa3438e642632
    Author: Andrew Vagin <avagin@openvz.org>
    AuthorDate: Mon, 28 Nov 2011 12:03:29 +0300
    Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
    CommitDate: Tue, 6 Dec 2011 09:22:48 -0200

    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>
    ---
    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;
    /*

    \
     
     \ /
      Last update: 2011-12-08 05:37    [W:0.022 / U:1.428 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site