From: John L. <le...@mo...> - 2006-04-18 13:56:32
|
On Tue, Apr 18, 2006 at 06:21:21AM -0700, Stephane Eranian wrote: > Randomization is important when doing event-based sampling with a sampling > event that can occur very frequently such as counting the number of taken branches. > It is very easy to fall into situations where the sampling period (assuming you measure > only at the user level) That assumption is incorrect. Nor is the counter virtualised per-process (in which case it seems a lot more likely). > fast. We have implemented the Carta algorithm in perfmon2. The pseudo-random number series is > fully determined by the seed value, as such it can be reproduced. The range of variation /Any/ randomisation is at least another cache line taken by the top-level interrupt handler. I'd be more fond of using something likely in cache already such as some bits from 'jiffies' (or something more suitable). regards john |