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
Unknown Object (File)
Fri, Jan 17, 4:04 AM
Unknown Object (File)
Fri, Jan 10, 6:21 PM
Unknown Object (File)
Fri, Jan 10, 2:45 PM
Unknown Object (File)
Thu, Jan 9, 10:52 PM
Unknown Object (File)
Dec 4 2024, 7:39 PM
Unknown Object (File)
Nov 26 2024, 3:54 PM
Unknown Object (File)
Nov 13 2024, 6:37 PM
Unknown Object (File)
Nov 11 2024, 9:48 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39124
Build 36013: arc lint + arc unit