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]
Date:	Mon, 11 Jan 2016 10:38:40 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	acme@...nel.org, jolsa@...nel.org, namhyung@...nel.or,
	lizefan@...wei.com, pi3orama@....com, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 4/6] perf tools: Set parallel making options build-test

On Fri, Jan 08, 2016 at 02:23:59PM +0000, Wang Nan wrote:
> 'make build-test' is painful because of time consuming. In a full test,
> all test cases are built twice with tools/perf/Makefile and
> tools/perf/Makefile.perf. 'Makefile' automatically computes parallel
> options for make, but 'Makefile.perf' not, so all test cases is built
> with one job. It is very slow.
> 
> This patch adds '-j' options to Makefile.perf testing. It computes
> parallel building options like what tools/perf/Makefile does, and pass
> '-j' option to Makefile.perf test.
> 
> Signed-off-by: Wang Nan <wangnan0@...wei.com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/tests/make | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index 130be7c..bd9c61a 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -3,7 +3,7 @@ ifeq ($(MAKECMDGOALS),)
>  # no target specified, trigger the whole suite
>  all:
>  	@echo "Testing Makefile";      $(MAKE) -sf tests/make MK=Makefile
> -	@echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf
> +	@echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1
>  else
>  # run only specific test over 'Makefile'
>  %:
> @@ -12,6 +12,15 @@ endif
>  else
>  PERF := .
>  
> +PARALLEL_OPT=
> +ifeq ($(SET_PARALLEL),1)
> +  cores := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null)
> +  ifeq ($(cores),0)
> +    cores := 1
> +  endif
> +  PARALLEL_OPT="-j$(cores)"
> +endif

we could share this with Makefile, but there's probably no point to librarize single line ATM

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ