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
F87903300: D34527.diff
Tue, Jul 9, 2:59 PM
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
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44741
Build 41629: arc lint + arc unit

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.