perf mem: Introduce weak function perf_mem_events__ptr()
authorLeo Yan <leo.yan@linaro.org>
Fri, 6 Nov 2020 09:48:46 +0000 (17:48 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 11 Nov 2020 13:29:12 +0000 (10:29 -0300)
commiteaf6aaeec5fa301c0eb8ae92962909b15d075e5f
tree7eaf70180284fc30b5b72ec594722c51c6face8c
parentf9f16dfbe76e63ba9aec68055c08242b09be297e
perf mem: Introduce weak function perf_mem_events__ptr()

Different architectures might use different event or different event
parameters for memory profiling, this patch introduces a weak
perf_mem_events__ptr() function which allows to return back a
architecture specific memory event.

Since the variable 'perf_mem_events' can be only accessed by the
perf_mem_events__ptr() function, mark the variable as 'static', this
allows the architectures to define its own memory event array.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20201106094853.21082-3-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-c2c.c
tools/perf/builtin-mem.c
tools/perf/util/mem-events.c
tools/perf/util/mem-events.h