Page MenuHomeFreeBSD

Use fixed enum values for PMC_CLASSES().
ClosedPublic

Authored by jhb on May 19 2015, 4:02 PM.
Tags
None
Referenced Files
F161720590: D2586.diff
Mon, Jul 6, 5:44 AM
Unknown Object (File)
Sun, Jul 5, 2:47 AM
Unknown Object (File)
Sat, Jul 4, 9:54 AM
Unknown Object (File)
Fri, Jul 3, 11:48 PM
Unknown Object (File)
Fri, Jul 3, 4:11 AM
Unknown Object (File)
Fri, Jul 3, 1:18 AM
Unknown Object (File)
Wed, Jul 1, 11:26 PM
Unknown Object (File)
Fri, Jun 26, 9:15 AM
Subscribers

Details

Summary

Use fixed enum values for PMC_CLASSES().

This removes one of the frequent causes of ABI breakage when new CPU
types are added to hwpmc(4).

Test Plan
  • Haven't tested this yet, but will test that pmcstat and pmccontrol still work on an Intel system.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

jhb retitled this revision from to Use fixed enum values for PMC_CLASSES()..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added reviewers: emaste, davide.
davide edited edge metadata.

Sounds sensible.

sys/dev/hwpmc/hwpmc_mod.c
4639

should we panic here instead, or it is too drastic?

This revision is now accepted and ready to land.May 19 2015, 5:21 PM
emaste edited edge metadata.

seems reasonable

sys/dev/hwpmc/hwpmc_mod.c
4639

too drastic I think

gnn added a reviewer: gnn.
jhb edited edge metadata.
  • Fix the class names output in dmesg.
This revision now requires review to proceed.May 19 2015, 6:54 PM
jhb added a reviewer: jhb.

Tested and works fine on Intel at least modulo the comsetic fix for dmesg output I added.

This revision is now accepted and ready to land.May 19 2015, 6:56 PM
This revision was automatically updated to reflect the committed changes.