Commit 508c71e3 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf arm-spe: Implement ->evsel_is_auxtrace() callback

Implement ->evsel_is_auxtrace() callback.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Link: http://lore.kernel.org/lkml/20200401101613.6201-5-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 966246f5
...@@ -176,6 +176,14 @@ static void arm_spe_free(struct perf_session *session) ...@@ -176,6 +176,14 @@ static void arm_spe_free(struct perf_session *session)
free(spe); free(spe);
} }
static bool arm_spe_evsel_is_auxtrace(struct perf_session *session,
struct evsel *evsel)
{
struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe, auxtrace);
return evsel->core.attr.type == spe->pmu_type;
}
static const char * const arm_spe_info_fmts[] = { static const char * const arm_spe_info_fmts[] = {
[ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n", [ARM_SPE_PMU_TYPE] = " PMU Type %"PRId64"\n",
}; };
...@@ -218,6 +226,7 @@ int arm_spe_process_auxtrace_info(union perf_event *event, ...@@ -218,6 +226,7 @@ int arm_spe_process_auxtrace_info(union perf_event *event,
spe->auxtrace.flush_events = arm_spe_flush; spe->auxtrace.flush_events = arm_spe_flush;
spe->auxtrace.free_events = arm_spe_free_events; spe->auxtrace.free_events = arm_spe_free_events;
spe->auxtrace.free = arm_spe_free; spe->auxtrace.free = arm_spe_free;
spe->auxtrace.evsel_is_auxtrace = arm_spe_evsel_is_auxtrace;
session->auxtrace = &spe->auxtrace; session->auxtrace = &spe->auxtrace;
arm_spe_print_info(&auxtrace_info->priv[0]); arm_spe_print_info(&auxtrace_info->priv[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment