Re: perf_counters issue with enable_on_exec

From: Paul Mackerras
Date: Mon Aug 24 2009 - 18:43:24 EST


Peter Zijlstra writes:

> 2. enable_on_exec only works on leaders, Paul, was that intended?

I think I thought that would be sufficient, but I guess it would be
cleaner if it also worked on non-leaders.

> 3. the scale stuff seems broken
>
> # perf stat -e cycles -e instructions --repeat 10 true
>
> Performance counter stats for 'true' (10 runs):
>
> 2612124 cycles ( +- 1.327% )
> 1870479 instructions # 0.716 IPC ( +- 0.132% )
>
> 0.003743155 seconds time elapsed ( +- 1.203% )
>
> # ./test-enable_on_exec true
> 2651600 PERF_COUNT_HW_CPU_CYCLES 1111509 1111509 2651600.000000
> 1832720 PERF_COUNT_HW_INSTRUCTIONS 839395242 1111509 1384043177.264637
>
> Paul, would a counter's time start running when its 'enabled' but part
> of a non-runnable group?

No, it shouldn't. If it does it's a bug.

Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/