Page MenuHomeFreeBSD

x86: Allow sharing of perfomance counter interrupts
AcceptedPublic

Authored by bnovkov on Aug 23 2024, 4:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 26, 8:25 AM
Unknown Object (File)
Sat, Oct 26, 12:51 AM
Unknown Object (File)
Tue, Oct 8, 7:02 AM
Unknown Object (File)
Oct 2 2024, 8:06 PM
Unknown Object (File)
Sep 27 2024, 8:46 AM
Unknown Object (File)
Sep 19 2024, 7:22 AM
Unknown Object (File)
Sep 10 2024, 11:35 PM
Unknown Object (File)
Sep 8 2024, 7:26 AM
Subscribers

Details

Reviewers
br
kib
markj
gnn
Summary

This patch refactors the Performance Counter interrupt setup code to allow sharing the interrupt line between multiple drivers.
More specifically, Performance Counter interrupts are used by both hwpmc(4) and hwt(4)'s Intel Processor Trace backend.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/x86/x86/local_apic.c
817

Why do we need these braces? Why not provide pcint() services regardless of hwpmc/hwt? IMO it is more logical, and slight unconditional code addition does not matter for amd64. But we reduce the ifdef maze then.

bnovkov added inline comments.
sys/x86/x86/local_apic.c
817

Right, the initial version was a knee-jerk reaction, what you suggested makes sense.

kib added inline comments.
sys/x86/x86/local_apic.c
39

Are both opts still needed?

This revision is now accepted and ready to land.Aug 26 2024, 11:00 PM