libpfc | small library and kernel module
kandi X-RAY | libpfc Summary
kandi X-RAY | libpfc Summary
A small library and kernel module for easy access to x86 performance monitor counters under Linux.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libpfc
libpfc Key Features
libpfc Examples and Code Snippets
Community Discussions
Trending Discussions on libpfc
QUESTION
On recent CPUs (at least the last decade or so) Intel has offered three fixed-function hardware performance counters, in addition to various configurable performance counters. The three fixed counters are:
...ANSWER
Answered 2017-Aug-09 at 14:37The discrepancy you are observing between RDTSC
and REFTSC
and is due to TurboBoost P-state transitions. During these transitions, most of the core, including the fixed-function performance counter REF_TSC
, is halted for approximately 20000-21000 cycles (8.5us), but rdtsc
continues at its invariant frequency. rdtsc
is probably in an isolated power and clock domain because it is so important and because of its documented wallclock-like behaviour.
RDTSC-REFTSC
Discrepancy
The discrepancy manifests itself as a tendency for RDTSC
to overcount REFTSC
. The longer the program runs, the more positive the difference RDTSC-REFTSC
tends to be. Over very long stretches it can mount as high as 1%-2% or even higher.
Of course, it has been observed by yourself already that the overcounting disappears when TurboBoost is disabled, which can be done as follows when using intel_pstate
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libpfc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page