Page MenuHomeFreeBSD

arm64 hwpmc: Support restricting counters to user or kernel mode.
ClosedPublic

Authored by jhb on Mar 11 2022, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 12:44 PM
Unknown Object (File)
Wed, Jun 26, 4:06 PM
Unknown Object (File)
Wed, Jun 26, 2:34 PM
Unknown Object (File)
Jun 2 2024, 10:51 AM
Unknown Object (File)
Apr 27 2024, 6:36 AM
Unknown Object (File)
Apr 27 2024, 6:33 AM
Unknown Object (File)
Apr 27 2024, 6:33 AM
Unknown Object (File)
Apr 27 2024, 4:18 AM
Subscribers

Details

Summary

Support the "usr" and "os" qualifiers on arm64 events to restrict
event counting to either usermode or the kernel, respectively.
If neither qualifier is given, events are counted in both.

Sponsored by: University of Cambridge, Google, Inc.

Diff Detail

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

Event Timeline

emaste added inline comments.
sys/dev/hwpmc/hwpmc_arm64.c
191

using a switch here to "handle" PMC_CAP_SYSTEM | PMC_CAP_USER is clever but IMO might be worth a comment

This revision is now accepted and ready to land.Mar 11 2022, 3:42 AM
sys/dev/hwpmc/hwpmc_arm64.c
191

Ok, I will add a default case with a comment.

sys/dev/hwpmc/hwpmc_arm64.c
191

Sounds good - at first I didn't read the description in the commit message and it looked strange to me. I figured it out after looking at the Arm ARM.