lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131002092608.GA10099@krava.brq.redhat.com>
Date:	Wed, 2 Oct 2013 11:26:08 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	David Ahern <dsahern@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Namhyung Kim <namhyung@...il.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ