Page MenuHomeFreeBSD

libpmc: fall-back to kernel tables if pmu-events fails
ClosedPublic

Authored by mhorne on May 11 2021, 5:33 PM.
Tags
None
Referenced Files
F102410229: D30216.diff
Mon, Nov 11, 9:48 PM
Unknown Object (File)
Oct 11 2024, 12:59 AM
Unknown Object (File)
Oct 4 2024, 11:40 AM
Unknown Object (File)
Oct 1 2024, 8:11 PM
Unknown Object (File)
Sep 30 2024, 12:19 AM
Unknown Object (File)
Sep 20 2024, 2:46 PM
Unknown Object (File)
Sep 15 2024, 5:51 AM
Unknown Object (File)
Sep 8 2024, 4:37 PM
Subscribers

Details

Summary

On x86, the pmu_events table is the source of truth for finding
supported events. However, events not found there may still be present
in the kernel's static event tables. For example, the events described
by pmc.soft(3) will never be described by pmu-events, therefore they
can't be used.

Update pmc_allocate() to search the legacy event tables if
pmc_pmu_pmcallocate() fails to return a result. This allows both event
sources to be consulted before giving up, thus restoring pmc.soft(3) and
pmc.tsc(3) on x86.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable