On Thu, 24 May 2012, Can Hankendi wrote:

> Processor is AMD 10H family processor and I'm using this raw event (from AMD
> Bios and Kernel Developers Guide):
> 
> EventSelect 0C0h Retired Instructions 
> 
> The number of instructions retired (execution completed and architectural
> state updated). This count includes exceptions and interrupts - each
> exception or interrupt is counted as one instruction.
> 
> Linux is Ubuntu 12.04, with 3.2.0 kernel. 
> 
> I'm collecting system-wide data with perf stat command. I'm well aware about
> the variations in retired instructions. However, I'm collecting the
> "instructions" and raw event 0x0C0h for the same session and ending up with
> different results. So I assume it is not about variations, it's more about
> how the built-in event is configured in perf tool. 

so you're saying you are doing something like:
   perf stat -e instructions:u,rc0:u  my_job

and getting different values for the results?
You keep giving not enough info to diagnose this problem.  What's your
*exact* perf command?

The only way to find out what the kernel is using is to check the source.
(I won't comment on how great a feature I think that is).
In arch/x86/kernel/cpu/perf_event_amd.c you can find
  [PERF_COUNT_HW_INSTRUCTIONS]                  = 0x00c0,

Vince

Reply via email to