[PATCH v1 3/9] perf auxtrace: Refactor auxtrace__evsel_is_auxtrace()

Adrian Hunter adrian.hunter at intel.com
Thu Aug 8 05:58:37 PDT 2024


On 6/08/24 23:41, Leo Yan wrote:
> The auxtrace__evsel_is_auxtrace() function invokes the callback
> .evsel_is_auxtrace() to check if an event is an AUX trace. In the
> low-level code, every AUX trace module provides its callback to
> compare the PMU type.
> 
> This commit refactors auxtrace__evsel_is_auxtrace() by simply
> calling evsel__is_aux_event() rather than using the callback function.
> As a result, the callback .evsel_is_auxtrace() is no longer needed, so
> the definition and implementations are removed.

evsel__is_aux_event() assumes it is on the target machine e.g.
being called from perf record.  It indirectly reads from sysfs
to find PMUs, which will not necessarily be the same a different
machine.

For example, what happens if a perf data file from one arch is
being processed on a machine from another arch.




More information about the linux-arm-kernel mailing list