Re: [PATCH] perf stat: Use proper cpu for shadow stats

2020-11-13 Thread Namhyung Kim
On Sat, Nov 14, 2020 at 7:16 AM Jiri Olsa wrote: > > On Fri, Nov 13, 2020 at 02:02:36PM +0900, Namhyung Kim wrote: > > Currently perf stat shows some metrics (like IPC) for defined events. > > But when no aggregation mode is used (-A option), it shows incorrect > > values since it used a value

Re: [PATCH] perf stat: Use proper cpu for shadow stats

2020-11-13 Thread Jiri Olsa
On Fri, Nov 13, 2020 at 02:02:36PM +0900, Namhyung Kim wrote: > Currently perf stat shows some metrics (like IPC) for defined events. > But when no aggregation mode is used (-A option), it shows incorrect > values since it used a value from a different cpu. > > Before: > > $ perf stat -aA -e

Re: [PATCH] perf stat: Use proper cpu for shadow stats

2020-11-13 Thread Andi Kleen
> CPU0 109,621,384 cycles > CPU1 159,026,454 cycles > CPU2 99,460,366 cycles > CPU3 124,144,142 cycles > CPU0 44,396,706 instructions #0.41 insn per cycle > CPU1 120,195,425 instructions #0.76 insn per

[PATCH] perf stat: Use proper cpu for shadow stats

2020-11-12 Thread Namhyung Kim
Currently perf stat shows some metrics (like IPC) for defined events. But when no aggregation mode is used (-A option), it shows incorrect values since it used a value from a different cpu. Before: $ perf stat -aA -e cycles,instructions sleep 1 Performance counter stats for 'system wide':