lkml.org 
[lkml]   [2013]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf auto-dep: Speed up feature tests by building them in parallel
On Mon, Sep 30, 2013 at 06:42:10PM +0200, Ingo Molnar wrote:
>
> This series (with combo patch attached) implements (much) faster
> perf-tools feature-auto-detection.
>
> I used 3 tricks to implement feature auto-dependencies and to speed up
> feature detection:
>
> - standalone Makefile in config/feature-checks/ built in parallel
>
> - split-out standalone .c files in config/feature-checks/*.c
>
> - used GCC's auto-dependency generation feature (-MD) to track the
> effects of system library addition/removal.
>
> Before the changes a fully cached re-build of an already built tree took
> 2.6 second:
>
> $ perf stat --null --sync --repeat 3 -a make Makefile
>
> 2.669467209 seconds time elapsed ( +- 0.07% )
>
> After the changes it takes only 0.6 seconds:
>
> 0.599161560 seconds time elapsed ( +- 0.25% )

nice!

>
> So the empty build got 4.4x faster.
>

SNIP

> ifdef NO_DEMANGLE
> CFLAGS += -DNO_DEMANGLE
> else
> - ifdef HAVE_CPLUS_DEMANGLE
> + ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
> EXTLIBS += -liberty
> - CFLAGS += -DHAVE_CPLUS_DEMANGLE
> + CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
> else
> FLAGS_BFD=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd
> - has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd)
> - ifeq ($(has_bfd),y)
> + ifeq ($(feature-libbfd), 1)
> EXTLIBS += -lbfd
> else
> FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
> @@ -388,7 +410,7 @@ else
> has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle)
> ifeq ($(has_cplus_demangle),y)
> EXTLIBS += -liberty
> - CFLAGS += -DHAVE_CPLUS_DEMANGLE
> + CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
> else
> msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
> CFLAGS += -DNO_DEMANGLE
> @@ -400,30 +422,29 @@ else
> endif

Why not add tests for has_bfd_iberty/has_bfd_iberty_z/has_cplus_demangle?

We could remove the config/feature-tests.mak completely
and other cleanup like remove try-cc.

jirka


\
 
 \ /
  Last update: 2013-10-02 11:41    [W:0.290 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site