Re: [PATCH 0/4] perf: Precise task / softirq / hardirq filteredstats/profiles

From: Ingo Molnar
Date: Fri May 21 2010 - 11:12:56 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> Hi,
>
> The new task and irq exclusion handling can let you
> confine tracing and profiling to about everything you
> want.

I fixed the subject line ;-)

'exclusion' is the ABI detail. The feature your patches
implement are to allow 'softirq limited' or 'task-context
limited' or 'hardirq profiling' - which is way cool.

One thing i'd like to see in this feature is for it to
work on pure event counting - i.e. 'perf stat' as well.

This would allow some _very_ precise stats, without IRQ
noise. For example, today we have this kind of noise
in instruction counting:


$ for ((i=0;i<10;i++)); do perf stat -e instructions /bin/true 2>&1 | grep instructions; done
217161 instructions # 0,000 IPC
218591 instructions # 0,000 IPC
223268 instructions # 0,000 IPC
217112 instructions # 0,000 IPC
219392 instructions # 0,000 IPC
216801 instructions # 0,000 IPC
217501 instructions # 0,000 IPC
218565 instructions # 0,000 IPC
218682 instructions # 0,000 IPC
218523 instructions # 0,000 IPC

it it's all that bad at ~2% jitter, but many improvements
we are working on in the kernel are much smaller than 1%.

If we extended your feature to perf stat, we might be able
to get a lot more precise measurements in terms of kernel
optimizations (and kernel bloat).

I'm really curious how accurate your scheme could become
that way. From the above 'few thousands instructions'
noise we might be able to get down to a 'hundreds of
instructions' noise? If so then it would allow us to
measure micro-optimizations in a radically more precise
way.

Thanks,

Ingo
--
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/