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, Nov 21, 10:12 AM
Unknown Object (File)
Oct 27 2024, 5:09 PM
Unknown Object (File)
Oct 27 2024, 9:21 AM
Unknown Object (File)
Oct 17 2024, 11:40 PM
Unknown Object (File)
Oct 4 2024, 3:16 AM
Unknown Object (File)
Sep 27 2024, 12:30 PM
Unknown Object (File)
Sep 26 2024, 2:06 PM
Unknown Object (File)
Sep 25 2024, 2:29 PM
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.