Page MenuHomeFreeBSD

libpmc: make pmc_pmu_pmcallocate() machine-independent
ClosedPublic

Authored by mhorne on Jun 24 2023, 7:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 5:22 AM
Unknown Object (File)
Thu, Nov 7, 9:53 PM
Unknown Object (File)
Thu, Nov 7, 7:33 PM
Unknown Object (File)
Oct 6 2024, 5:58 AM
Unknown Object (File)
Oct 5 2024, 6:20 PM
Unknown Object (File)
Sep 21 2024, 3:03 AM
Unknown Object (File)
Sep 17 2024, 12:51 PM
Unknown Object (File)
Sep 17 2024, 9:25 AM
Subscribers

Details

Summary

Have it call the platform-dependent version. For better layering, move
the reset logic inside the new function. This is mainly to facilitate an
upcoming change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jkoshy added inline comments.
lib/libpmc/libpmc.c
1051

Not related to this change, but I noticed that the count parameter that was added in 2018 is both undocumented and unnecessary - pmc_set(3)being the recommended way to set or change the counts associated with a PMC.

This revision is now accepted and ready to land.Jul 7 2023, 6:48 AM
lib/libpmc/libpmc.c
1051

It is documented by the pmc_allocate(3) man page at least -- apparently I did this in 50f6c13997008. But to your point, I do not know why it was added.