mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Wang Nan <wangnan0@huawei.com>
Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.or,
	lizefan@huawei.com, pi3orama@163.com,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH 4/6] perf tools: Set parallel making options build-test
Date: Mon, 11 Jan 2016 10:38:40 +0100	[thread overview]
Message-ID: <20160111093840.GE15415@krava.brq.redhat.com> (raw)
In-Reply-To: <1452263041-225488-5-git-send-email-wangnan0@huawei.com>

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@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.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@kernel.org>

thanks,
jirka

  reply	other threads:[~2016-01-11  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 14:23 [PATCH 0/6] perf tools: Improve 'make build-test' Wang Nan
2016-01-08 14:23 ` [PATCH 1/6] perf tools: Add -lutil in python lib list for broken python-config Wang Nan
2016-01-11  9:28   ` Jiri Olsa
2016-01-11  9:44     ` Wangnan (F)
2016-01-11  9:50       ` Wangnan (F)
2016-01-12  9:41         ` Jiri Olsa
2016-01-08 14:23 ` [PATCH 2/6] perf tools: Add missing headers in perf's MANIFEST Wang Nan
2016-01-09 16:37   ` [tip:perf/core] perf tools: Add missing headers in perf' s MANIFEST tip-bot for Wang Nan
2016-01-11  9:43   ` [PATCH] perf tools: Add missing sources in perf's MANIFEST Jiri Olsa
2016-01-11  9:46     ` Wangnan (F)
2016-01-11 14:12       ` Arnaldo Carvalho de Melo
2016-01-08 14:23 ` [PATCH 3/6] perf tools: Fix phony build target for build-test Wang Nan
2016-01-11  9:29   ` Jiri Olsa
2016-01-08 14:23 ` [PATCH 4/6] perf tools: Set parallel making options build-test Wang Nan
2016-01-11  9:38   ` Jiri Olsa [this message]
2016-01-08 14:24 ` [PATCH 5/6] perf tools: Pass O option to Makefile.perf in build-test Wang Nan
2016-01-08 14:24 ` [PATCH 6/6] perf tools: Test correct path of perf " Wang Nan
2016-01-08 14:32 ` [PATCH 0/6] perf tools: Improve 'make build-test' Arnaldo Carvalho de Melo
2016-01-11  2:55   ` Wangnan (F)
2016-01-11  8:46     ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160111093840.GE15415@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=namhyung@kernel.or \
    --cc=namhyung@kernel.org \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome