For some ARCHs, e.g., ARM and AMD, to get the availability of the mem-events, perf checks the existence of a specific PMU. For the other ARCHs, e.g., Intel and Power, perf has to check the existence of some specific events. The current perf only iterates the mem-events-supported PMUs. It's not required to check the existence of a specific PMU anymore. Rename sysfs_name to event_name, which stores the specific mem-events. Perf only needs to check those events for the availability of the mem-events. Rename perf_mem_event__supported to perf_pmu__mem_events_supported. Reviewed-by: Ian Rogers <irogers@google.com> Tested-by: Ravi Bangoria <ravi.bangoria@amd.com> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Cc: james.clark@arm.com Cc: will@kernel.org Cc: mike.leach@linaro.org Cc: renyu.zj@linux.alibaba.com Cc: yuhaixin.yhx@linux.alibaba.com Cc: tmricht@linux.ibm.com Cc: atrajeev@linux.vnet.ibm.com Cc: linux-arm-kernel@lists.infradead.org Cc: john.g.garry@oracle.com Link: https://lore.kernel.org/r/20240123185036.3461837-5-kan.liang@linux.intel.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
12 lines
445 B
C
12 lines
445 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include "util/map_symbol.h"
|
|
#include "util/mem-events.h"
|
|
#include "mem-events.h"
|
|
|
|
#define E(t, n, s, l, a) { .tag = t, .name = n, .event_name = s, .ldlat = l, .aux_event = a }
|
|
|
|
struct perf_mem_event perf_mem_events_power[PERF_MEM_EVENTS__MAX] = {
|
|
E("ldlat-loads", "%s/mem-loads/", "mem-loads", false, 0),
|
|
E("ldlat-stores", "%s/mem-stores/", "mem-stores", false, 0),
|
|
E(NULL, NULL, NULL, false, 0),
|
|
};
|