summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-02-23 15:46:49 +0100
committerRobert Richter <robert.richter@amd.com>2010-02-26 15:14:02 +0100
commitba52078e1917c5116c0802298d88ad0e54a6728b (patch)
tree29557edad8b13f46b781b6d8dda12906fc5c21da /tools/perf/builtin-annotate.c
parentf125be1469303f7b9324447f251d74a0da24952f (diff)
oprofile/x86: implement randomization for IBS periodic op counter
IBS selects an op (execution operation) for sampling by counting either cycles or dispatched ops. Better statistical samples can be produced by adding a software generated random offset to the periodic op counter value with each sample. This patch adds software randomization to the IBS periodic op counter. The lower 12 bits of the 20 bit counter are randomized. IbsOpCurCnt is initialized with a 12 bit random value. There is a work around if the hw can not write to IbsOpCurCnt. Then the lower 8 bits of the 16 bit IbsOpMaxCnt [15:0] value are randomized in the range of -128 to +127 by adding/subtracting an offset to the maximum count (IbsOpMaxCnt). The linear feedback shift register (LFSR) algorithm is used for pseudo-random number generation to have low impact to the memory system. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
0 files changed, 0 insertions, 0 deletions