Commit 966246f5 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf intel-bts: Implement ->evsel_is_auxtrace() callback

Implement ->evsel_is_auxtrace() callback.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200401101613.6201-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6b52bb07
...@@ -728,6 +728,15 @@ static void intel_bts_free(struct perf_session *session) ...@@ -728,6 +728,15 @@ static void intel_bts_free(struct perf_session *session)
free(bts); free(bts);
} }
static bool intel_bts_evsel_is_auxtrace(struct perf_session *session,
struct evsel *evsel)
{
struct intel_bts *bts = container_of(session->auxtrace, struct intel_bts,
auxtrace);
return evsel->core.attr.type == bts->pmu_type;
}
struct intel_bts_synth { struct intel_bts_synth {
struct perf_tool dummy_tool; struct perf_tool dummy_tool;
struct perf_session *session; struct perf_session *session;
...@@ -883,6 +892,7 @@ int intel_bts_process_auxtrace_info(union perf_event *event, ...@@ -883,6 +892,7 @@ int intel_bts_process_auxtrace_info(union perf_event *event,
bts->auxtrace.flush_events = intel_bts_flush; bts->auxtrace.flush_events = intel_bts_flush;
bts->auxtrace.free_events = intel_bts_free_events; bts->auxtrace.free_events = intel_bts_free_events;
bts->auxtrace.free = intel_bts_free; bts->auxtrace.free = intel_bts_free;
bts->auxtrace.evsel_is_auxtrace = intel_bts_evsel_is_auxtrace;
session->auxtrace = &bts->auxtrace; session->auxtrace = &bts->auxtrace;
intel_bts_print_info(&auxtrace_info->priv[0], INTEL_BTS_PMU_TYPE, intel_bts_print_info(&auxtrace_info->priv[0], INTEL_BTS_PMU_TYPE,
......
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