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
F148622381: D30216.id89157.diff
Thu, Mar 19, 5:06 AM
F148556365: D30216.id89157.diff
Wed, Mar 18, 5:36 PM
Unknown Object (File)
Sun, Mar 15, 11:02 AM
Unknown Object (File)
Sat, Mar 14, 2:45 PM
Unknown Object (File)
Wed, Mar 11, 1:53 AM
Unknown Object (File)
Tue, Mar 10, 8:18 PM
Unknown Object (File)
Sun, Mar 1, 9:49 PM
Unknown Object (File)
Sat, Feb 28, 11:52 AM
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