PowerPC hardware does not have a builtin latency filter (--ldlat) for the "mem-load" event and perf_mem_events by default includes "/ldlat=30/" which is causing a failure on PowerPC. Refactor the code to support "perf mem/c2c" on PowerPC. This patch depends on kernel side changes done my Madhavan: https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-December/182596.html Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Dick Fowles <fowles@inreach.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Joe Mario <jmario@redhat.com> Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Namhyung Kim <namhyung@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20190129132412.771-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 lines
256 B
C
12 lines
256 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include "mem-events.h"
|
|
|
|
/* PowerPC does not support 'ldlat' parameter. */
|
|
char *perf_mem_events__name(int i)
|
|
{
|
|
if (i == PERF_MEM_EVENTS__LOAD)
|
|
return (char *) "cpu/mem-loads/";
|
|
|
|
return (char *) "cpu/mem-stores/";
|
|
}
|