Add support for parsing event names with libpfm4 #309
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
libpfm4 contains information about hundreds of events for dozens of architectures. With this, a user interested in the count of retired instructions on, for example, A64Fx can now use the name "INST_RETIRED".
There are some beauty issues we have to discuss here:
libpfms event name format is hierarchical:
pmu::event:[sub event]
. in--list-events
I currently just flatten this hierarchy:but maybe we want
or even
Also libpfm has detailed descriptionts for events. Including them in
--list-events
is probably too noisy, so may by introduce something like--list-event-details
?Lastly, libpfm also contains the the pre-defined perf events that we have hard-coded into lo2s, like
cache-misses
cpu-clock
etc. Throwing our hard-coded values away is probably not an option on grounds of backwards compatibility, so maybe filter them from libpfm?