Re: [PATCH v6 2/7] perf evlist: Add evlist__findnew_tracking_event() helper

From: Yang Jihong
Date: Fri Aug 25 2023 - 01:59:46 EST


Hello,

On 2023/8/25 12:55, Ian Rogers wrote:
On Sun, Aug 20, 2023 at 6:30 PM Yang Jihong <yangjihong1@xxxxxxxxxx> wrote:

Currently, intel-bts, intel-pt, and arm-spe may add a dummy event for
tracking to the evlist. We may need to search for the dummy event for
some settings. Therefore, add evlist__findnew_tracking_event() helper.

Given the first two sentences I don't understand why this is
evlist__findnew_tracking_event and not evlist__findnew_dummy_event?
Are you setting tracking on other events other than dummy? If so, then
the commit message isn't right. If not then I'd prefer not to use
tracking event in the function name.

Yes, add this helper to find tracking event for some setting, will modify commit message, like as follows:

Currently, intel-bts, intel-pt, and arm-spe may add tracking event to the evlist. We may need to search for the tracking event for
some settings. Therefore, add evlist__findnew_tracking_event() helper.


evlist__findnew_tracking_event() also deal with system_wide maps if
system_wide is true.

Could you fix the explanation here, what does "deal with system_wide"
mean? A kerneldoc comment and explanation of the system_wide argument
would be useful.

In the next version, details will be described as follows:

If system_wide is true, evlist__findnew_tracking_event() set the cpu map of the evsel to all online CPUs.

Is such an explanation okay?

Thanks,
Yang