Page MenuHomeFreeBSD

x86: Allow sharing of perfomance counter interrupts
ClosedPublic

Authored by bnovkov on Aug 23 2024, 4:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 4:07 PM
Unknown Object (File)
Sun, Dec 15, 1:58 PM
Unknown Object (File)
Fri, Dec 13, 5:17 PM
Unknown Object (File)
Tue, Dec 3, 6:05 AM
Unknown Object (File)
Tue, Dec 3, 6:05 AM
Unknown Object (File)
Tue, Dec 3, 6:05 AM
Unknown Object (File)
Tue, Dec 3, 5:40 AM
Unknown Object (File)
Nov 9 2024, 7:23 PM
Subscribers

Details

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
This revision was automatically updated to reflect the committed changes.
bnovkov marked an inline comment as done.