Page MenuHomeFreeBSD

libpmc: remove PMC_MDEP_TABLE logic
ClosedPublic

Authored by mhorne on May 10 2021, 8:14 PM.

Details

Summary

This logic was added for handling some of the complicated relationships
between events and x86 CPU models. Since that logic has been mostly
removed from libpmc(3) in favor of pmu-events, this no longer serves
much of a purpose. Mapping CPU types to event tables is already handled
by the switch statement in pmc_init().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

So in effect this basically just repeated existing tests that exist elsewhere?

This revision is now accepted and ready to land.May 10 2021, 8:20 PM

So in effect this basically just repeated existing tests that exist elsewhere?

Pretty much. pmc_init() adds only supported classes to the pmc_class_table array, so pmc_mdep_is_supported_class() only duplicates work by checking those classes against its own tables.

I like it.
Thanks!

This revision was automatically updated to reflect the committed changes.