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)
Apr 27 2024, 5:07 PM
Unknown Object (File)
Mar 13 2024, 4:11 AM
Unknown Object (File)
Mar 13 2024, 4:06 AM
Unknown Object (File)
Mar 9 2024, 4:04 PM
Unknown Object (File)
Jan 7 2024, 3:55 PM
Unknown Object (File)
Dec 23 2023, 7:17 AM
Unknown Object (File)
Dec 12 2023, 12:42 AM
Unknown Object (File)
Nov 19 2023, 12:22 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.