Re: [PATCH 0/5] perf events finer grained context instrumentation/ context exclusion

From: Frederic Weisbecker
Date: Thu Jun 10 2010 - 03:31:52 EST


On Thu, Jun 10, 2010 at 08:26:18AM +0200, Ingo Molnar wrote:
>
> * Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
>
> > Here is the new version of per context exclusion, based on hooks on
> > irq_enter/irq_exit. I haven't observed slowdowns but I haven't actually
> > measured the impact.
>
> One thing that would be nice to see in this discussion is a comparison of
> before/after perf stat --repeat runs.
>
> Something like:
>
> perf stat --repeat ./hackbench 5
>
> Done with full stat, and then also done with hardirqs/softirqs excluded. (i.e.
> task context stats only)
>
> I.e. does the feature really give us the expected statistical stability in
> results? Does it really exclude hardirq/softirq workloads, etc.?
>
> Thanks,
>
> Ingo


Just got some results:

$ sudo ./perf stat -e instructions -e cycles -e branches -e branch-misses -v -r 10 ./hackbench 5

Performance counter stats for './hackbench 5' (10 runs):

1313640764 instructions # 0,241 IPC ( +- 1,393% ) (scaled from 100,05%)
5440853130 cycles ( +- 0,925% ) (scaled from 100,05%)
214737441 branches ( +- 0,948% )
12332109 branch-misses # 5,743 % ( +- 1,239% )

1,727051101 seconds time elapsed ( +- 0,897% )


$ sudo ./perf stat -e instructions:t -e cycles:t -e branches:t -e branch-misses:t -v -r 10 ./hackbench 5

Performance counter stats for './hackbench 5' (10 runs):

1293802776 instructions # 0,245 IPC ( +- 0,343% )
5280769301 cycles ( +- 0,471% ) (scaled from 100,02%)
209495435 branches ( +- 0,392% )
11890938 branch-misses # 5,676 % ( +- 0,491% )

1,750534923 seconds time elapsed ( +- 0,463% )


So yeah, the results look a bit better. Still not perfects:

- we are still instrumenting the tiny parts between the true interrupt
and irq_enter() (same for irq_exit() and the end). Same for softirqs.

- random randomnesses...


Another try, this time with a kernel downloading in parallel, to generate
network interrupts:


$ sudo ./perf stat -e instructions -e cycles -e branches -e branch-misses -v -r 10 ./hackbench 5

Performance counter stats for './hackbench 5' (10 runs):

1324759169 instructions # 0,244 IPC ( +- 0,494% ) (scaled from 100,09%)
5424824320 cycles ( +- 0,503% )
214443106 branches ( +- 0,516% )
12245614 branch-misses # 5,710 % ( +- 0,604% )

1,723413199 seconds time elapsed ( +- 0,483% )


$ sudo ./perf stat -e instructions:t -e cycles:t -e branches:t -e branch-misses:t -v -r 10 ./hackbench 5

Performance counter stats for './hackbench 5' (10 runs):

1292119132 instructions # 0,251 IPC ( +- 0,138% )
5138407131 cycles ( +- 2,708% )
209052068 branches ( +- 0,139% )
11835090 branch-misses # 5,661 % ( +- 0,105% )

1,752192124 seconds time elapsed ( +- 0,278% )


Again, globally better, except for the cycles this time.

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