diff options
| author | Ingo Molnar <[email protected]> | 2012-10-30 08:54:41 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-10-31 14:17:49 +0000 |
| commit | 0e2af956693a8797d658d076ff4c0da4147f0131 (patch) | |
| tree | 224132ab25c0db9f1965e3b67dde294a84c78eee /tools/perf/util/annotate.c | |
| parent | perf tools: Speed up the perf build time by simplifying the perf --version st... (diff) | |
| download | kernel-0e2af956693a8797d658d076ff4c0da4147f0131.tar.gz kernel-0e2af956693a8797d658d076ff4c0da4147f0131.zip | |
perf tools: Further speed up the perf build
There's another source of overhead in the perf version string generator:
git update-index -q --refresh
... which will iterate the whole checked out tree. This can be pretty
slow on NFS volumes, but takes some time even with local SSD disks and a
fully cached kernel tree:
$ perf stat --null --repeat 3 --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
PERF_VERSION = 3.7.rc3.g5399b3b.dirty
PERF_VERSION = 3.7.rc3.g5399b3b.dirty
PERF_VERSION = 3.7.rc3.g5399b3b.dirty
Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
0.306999221 seconds time elapsed ( +- 0.56% )
So remove the .dirty differentiator as well - it adds little information
because locally patched git trees are common, but seldom are the perf
tools modified.
So a lot of version strings are reported as 'dirty' while in fact they
are pristine perf builds. For example 99% of my perf builds are not
patched but the kernel tree is slightly patched, which adds the .dirty
tag.
Eliminating that tag speeds up version generation by another order of
magnitude:
$ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
PERF_VERSION = 3.7.rc3.g4b0bd3
PERF_VERSION = 3.7.rc3.g4b0bd3
PERF_VERSION = 3.7.rc3.g4b0bd3
Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
0.021270923 seconds time elapsed ( +- 1.94% )
(Also clean up some of the comments around this code.)
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Andrew Vagin <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Howells <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions
