Page MenuHomeFreeBSD

libpmc: Allow specifying explicit EVENT_xxH events on armv7 and arm64
ClosedPublic

Authored by jrtc27 on Jan 10 2022, 3:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 6, 3:44 AM
Unknown Object (File)
Fri, Jun 28, 10:22 PM
Unknown Object (File)
Fri, Jun 28, 3:33 AM
Unknown Object (File)
Tue, Jun 25, 12:51 AM
Unknown Object (File)
Mon, Jun 24, 10:24 PM
Unknown Object (File)
Apr 25 2024, 2:16 PM
Unknown Object (File)
Apr 25 2024, 2:16 PM
Unknown Object (File)
Apr 22 2024, 9:59 AM
Subscribers

Details

Summary

This is useful for processors where we don't have an event table; in
those cases we default to a Cortex A8 (armv7) or Cortex A53 (arm64) in
order to attempt to provide something useful, but you're then limited to
the counters in those tables, some of which may also not be implemented
(e.g. LD/ST_RETIRED are no longer implemented in more recent cores,
replaced by LD/ST_SPEC).

Adding the raw EVENT_xxH event lists to each table ensures that you can
always request the exact events you want, regardless of what has been
detected or is known.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

There is already armv7_event_table and armv8_event_table containing these events (declared by PMC_CLASSDEP_TABLE).

I think what needs to happen instead is to register these tables in the pmc_class_table array during pmc_init().

I tried doing something like that but couldn't figure out how to achieve that so went for this approach. If there's a way to do that easily that I've missed then yeah that'd be better, but it seemed like there were baked in assumptions about only having one table per class.

I tried doing something like that but couldn't figure out how to achieve that so went for this approach. If there's a way to do that easily that I've missed then yeah that'd be better, but it seemed like there were baked in assumptions about only having one table per class.

Sounds good. Can you add some kind of TODO comment to the change to indicate this? It's okay if it never gets fixed but it will certainly get lost otherwise.

This revision is now accepted and ready to land.Jan 28 2022, 4:04 PM