If an application wants to use PMU counters,
one needs to implement a kernel module to enable these counters.
This change implements the code to enable PMU counters for User mode access,
User just needs to add "device pmu_cntr" to enable PMU counters.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
How does this interact with hwpmc?
We should also consider the security implications if an unprivileged process can program the pmu to trace a privileged process.
| sys/arm64/arm64/pmu_enable.c | ||
|---|---|---|
| 35–48 | These should be in sys/arm64/include/armreg.h | |
| 51 | We don't need this, you can just call smp_rendezvous directly. | |
| 61 | You can use READ_SPECIALREG here. | |
| 69 | You can use WRITE_SPECIALREG here. | |
| 114–115 | How does this work? You are trying to run code on all CPUs before they have started. SI_SUB_DRIVERS is before SI_SUB_SMP on arm64 as we don't support EARLY_AP_STARTUP. | |