Page MenuHomeFreeBSD

Use fixed enum values for PMC_CLASSES().
ClosedPublic

Authored by jhb on May 19 2015, 4:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 1:26 AM
Unknown Object (File)
Wed, Mar 20, 1:26 AM
Unknown Object (File)
Thu, Feb 29, 4:08 PM
Unknown Object (File)
Jan 8 2024, 9:15 AM
Unknown Object (File)
Dec 20 2023, 12:39 AM
Unknown Object (File)
Nov 23 2023, 6:21 PM
Unknown Object (File)
Nov 22 2023, 7:06 PM
Unknown Object (File)
Nov 22 2023, 7:05 PM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #5482)

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 ↗(On Diff #5482)

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.