Page MenuHomeFreeBSD

libpmc: userland support and pmc.rapl.3 for the RAPL class
AcceptedPublic

Authored by afscoelho_gmail.com on Fri, Jul 3, 6:00 PM.
Tags
None
Referenced Files
F162219574: D58029.diff
Sat, Jul 11, 12:19 AM
F162219184: D58029.id181268.diff
Sat, Jul 11, 12:10 AM
F162198593: D58029.id.diff
Fri, Jul 10, 7:59 PM
Unknown Object (File)
Thu, Jul 9, 10:29 PM
Unknown Object (File)
Thu, Jul 9, 3:14 PM
Unknown Object (File)
Wed, Jul 8, 4:43 PM
Unknown Object (File)
Wed, Jul 8, 4:33 PM
Unknown Object (File)
Tue, Jul 7, 2:45 AM
Subscribers

Details

Summary

Register PMC_CLASS_RAPL in libpmc: event table, allocator, class-table
descriptor, and the event-name/class-listing lookups, all x86-guarded
and modeled on the TSC class. Energy events are read-only and
unqualified. The class prefix (RAPL-) supplies the friendly spelling, so
pmcstat -S rapl-energy-pkg resolves to the canonical ENERGY_PKG event.

Add a pmc.rapl.3 manual page documenting the events, counter scope, the
microjoule unit and wrap handling, and the NUMA/package domain mapping;
link it from pmc.3.

Diff Detail

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

Event Timeline

lib/libpmc/pmc.rapl.3
27

sentence after the semicolon doesn't follow. If your talking about the bug fix drop it?

40

Maybe something close to: The RAPL PMC driver provides a virtual 64-bit counter that is guaranteed to be monotonic, by periodically sampling the 32-bit hardware counters that wrap frequently. Saying the kernel folds them is awkward.

mhorne added inline comments.
lib/libpmc/libpmc.c
895

Are the casts needed?

899
This revision is now accepted and ready to land.Fri, Jul 10, 4:48 PM