lkml.org 
[lkml]   [2010]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 3/5] perf: Add hrtimer code for PMI-less hardware counters
From
Date
On Mon, 2010-08-30 at 13:13 +0100, Matt Fleming wrote:
> Currently, it's impossible to periodically sample hardware counters that
> lack performance monitoring interrupt (PMI) support. In order to sample
> these counters we can create an event group which is backed by a
> hrtimer, thereby simulating a PMI.
>
> When the hrtimer goes off we sample the values in the hardware
> counters. Because we obviously can't rely on the hrtimer going off at
> exactly the sample period (say, every 1000 cache misses) the values need
> to be weighted by the variable period since the last hrtimer went
> off. This is so that we can compensate for the variability in hrtimer
> period.
>
> If perf record tries to create a sampling counter and the hardware
> doesn't support it then we'll fall back to creating an event group with
> a hrtimer.


Why is this changing kernel code?

You can create those groups in userspace..


\
 
 \ /
  Last update: 2010-08-30 14:57    [W:0.116 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site