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

From: Yang Jihong
Date: Thu Jul 20 2023 - 03:24:03 EST


Hello,

On 2023/7/20 0:44, Ian Rogers wrote:
On Fri, Jul 14, 2023 at 8:31 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.

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

I'm wondering if we can simplify the naming in the API, we have "dummy
event" which makes sense as we literally call the event "dummy",
"sideband" which refers to the kind of samples/events the dummy event
will record but "tracking" I think tends to get used as a verb rather
than a noun. So I think evlist__findnew_tracking_event should be
evlist__findnew_dummy_event.

Uh, from the discussion that followed, it seems that there is no consensus yet...
If there is a clear consensus on whether to use "dummy event" or "tracking event", I will change the name of the API.

I think sideband event is equivalent to tracking event (refer evsel__config(), tracking events include task, mmap, mmap2, and comm sideband events, which are all sideband).

tracking event are instances of dummy event. For example, we create another dummy event to record the text poke event of ksymbol (refer perf record --kcore).

An evlist contains only one tracking event, but can contain multiple dummy events.

Thanks,
Yang