[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1339158207-20575-1-git-send-email-dmitry.antipov@linaro.org>
Date: Fri, 8 Jun 2012 16:23:27 +0400
From: Dmitry Antipov <dmitry.antipov@...aro.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Ingo Molnar <mingo@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: linux-kernel@...r.kernel.org, linaro-dev@...ts.linaro.org,
patches@...aro.org, Dmitry Antipov <dmitry.antipov@...aro.org>
Subject: [PATCH] perf report: fix event name reporting
Use trace_find_event to find event name before looking through
/sys files. This helps 'perf report' to show real event names
instead of 'unknown:unknown' when processing perf.data recorded
on another machine.
Signed-off-by: Dmitry Antipov <dmitry.antipov@...aro.org>
---
tools/perf/builtin-report.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8c767c6..a6fd309 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -24,6 +24,7 @@
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/header.h"
+#include "util/trace-event.h"
#include "util/session.h"
#include "util/tool.h"
@@ -314,7 +315,8 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
list_for_each_entry(pos, &evlist->entries, node) {
struct hists *hists = &pos->hists;
- const char *evname = event_name(pos);
+ struct event_format *event = trace_find_event(pos->attr.config);
+ const char *evname = event ? event->name : event_name(pos);
hists__fprintf_nr_sample_events(hists, evname, stdout);
hists__fprintf(hists, NULL, false, true, 0, 0, stdout);
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists