[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201028063813.8562-9-leo.yan@linaro.org>
Date: Wed, 28 Oct 2020 14:38:12 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
John Garry <john.garry@...wei.com>,
Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Kemeng Shi <shikemeng@...wei.com>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Ian Rogers <irogers@...gle.com>, Al Grant <Al.Grant@....com>,
James Clark <james.clark@....com>,
Wei Li <liwei391@...wei.com>,
André Przywara <andre.przywara@....com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: Leo Yan <leo.yan@...aro.org>
Subject: [PATCH v3 8/9] perf mem: Return NULL for event 'ldst' on PowerPC
If user specifies event type "ldst", PowerPC's perf_mem_events__name()
will wrongly return the store event name "cpu/mem-stores/".
This patch changes to return NULL for the event "ldst" on PowerPC.
Signed-off-by: Leo Yan <leo.yan@...aro.org>
---
tools/perf/arch/powerpc/util/mem-events.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/arch/powerpc/util/mem-events.c b/tools/perf/arch/powerpc/util/mem-events.c
index 07fb5e049488..90c5a0760685 100644
--- a/tools/perf/arch/powerpc/util/mem-events.c
+++ b/tools/perf/arch/powerpc/util/mem-events.c
@@ -7,6 +7,8 @@ char *perf_mem_events__name(int i)
{
if (i == PERF_MEM_EVENTS__LOAD)
return (char *) "cpu/mem-loads/";
-
- return (char *) "cpu/mem-stores/";
+ else if (i == PERF_MEM_EVENTS__STORE)
+ return (char *) "cpu/mem-stores/";
+ else
+ return NULL;
}
--
2.17.1
Powered by blists - more mailing lists