Page MenuHomeFreeBSD

libpmc: group allocation/commit API and scaled read
Needs ReviewPublic

Authored by raghavendra.kt_amd.com on Thu, Jun 18, 7:06 AM.
Tags
None
Referenced Files
F160174230: D57635.id179980.diff
Sun, Jun 21, 10:00 PM
Unknown Object (File)
Sat, Jun 20, 9:45 PM
Unknown Object (File)
Sat, Jun 20, 6:53 PM
Unknown Object (File)
Fri, Jun 19, 2:48 AM
Subscribers
None

Details

Summary

Add userland glue for the new in-kernel PMU group/multiplex machinery:

pmc_allocate_group() wrapper around pmc_allocate that or-s

			PMC_F_GROUP_DEFER into the flags.

pmc_group_create() allocate a kernel group id.
pmc_group_add() bind a pmcid (allocated with

			pmc_allocate_group) to a group, optionally as
			the leader.

pmc_group_commit() freeze membership; the kernel scheduler is

			free to place the group on hardware afterwards.

pmc_group_release() tear down a group and detach its members.

In addition, pmc_read() returns the time-scaled count when the kernel
sets PMC_F_SCALED on a read, and the new pmc_read_pair() returns the
raw count together with time_enabled / time_running for callers that
want to do their own scaling.

libpmc is not symbol-versioned, so the new entry points are exported
automatically; no map file needs to change.

Sponsored by: AMD
Signed-off-by: Raghavendra K T <raghavendra.kt@amd.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73963
Build 70846: arc lint + arc unit