linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] perf build-test: Honour JOBS to override detection of
@ 2020-03-30 13:03 Arnaldo Carvalho de Melo
  2020-03-30 13:16 ` Jiri Olsa
  2020-04-04  8:41 ` [tip: perf/urgent] perf build-test: Honour JOBS to override detection of number of cores tip-bot2 for Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-30 13:03 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim; +Cc: Adrian Hunter, Linux Kernel Mailing List

Jiri,

	Ack?

----

When one does:

  $ make -C tools/perf build-test

The makefile in tools/perf/tests/ will, just like the main one, detect
how many cores are in the system and use it with -j.

Sometimes we may need to override that, for instance, when using
icecream or distcc to use multiple machines in the build process, then
we need to, as with the main makefile, use:

  $ make JOBS=N -C tools/perf build-test

Fix the tests makefile to honour that.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/make | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index c850d1664c56..5d0c3a9c47a1 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -28,9 +28,13 @@ endif
 
 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
+  ifeq ($(JOBS),)
+    cores := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null)
+    ifeq ($(cores),0)
+      cores := 1
+    endif
+  else
+    cores=$(JOBS)
   endif
   PARALLEL_OPT="-j$(cores)"
 endif
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] perf build-test: Honour JOBS to override detection of
  2020-03-30 13:03 [PATCH 1/1] perf build-test: Honour JOBS to override detection of Arnaldo Carvalho de Melo
@ 2020-03-30 13:16 ` Jiri Olsa
  2020-04-04  8:41 ` [tip: perf/urgent] perf build-test: Honour JOBS to override detection of number of cores tip-bot2 for Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2020-03-30 13:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Linux Kernel Mailing List

On Mon, Mar 30, 2020 at 10:03:01AM -0300, Arnaldo Carvalho de Melo wrote:
> Jiri,
> 
> 	Ack?

yep ;-)

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

jirka

> 
> ----
> 
> When one does:
> 
>   $ make -C tools/perf build-test
> 
> The makefile in tools/perf/tests/ will, just like the main one, detect
> how many cores are in the system and use it with -j.
> 
> Sometimes we may need to override that, for instance, when using
> icecream or distcc to use multiple machines in the build process, then
> we need to, as with the main makefile, use:
> 
>   $ make JOBS=N -C tools/perf build-test
> 
> Fix the tests makefile to honour that.
> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/tests/make | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index c850d1664c56..5d0c3a9c47a1 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -28,9 +28,13 @@ endif
>  
>  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
> +  ifeq ($(JOBS),)
> +    cores := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null)
> +    ifeq ($(cores),0)
> +      cores := 1
> +    endif
> +  else
> +    cores=$(JOBS)
>    endif
>    PARALLEL_OPT="-j$(cores)"
>  endif
> -- 
> 2.25.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: perf/urgent] perf build-test: Honour JOBS to override detection of number of cores
  2020-03-30 13:03 [PATCH 1/1] perf build-test: Honour JOBS to override detection of Arnaldo Carvalho de Melo
  2020-03-30 13:16 ` Jiri Olsa
@ 2020-04-04  8:41 ` tip-bot2 for Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2020-04-04  8:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Jiri Olsa, Adrian Hunter, Namhyung Kim, Arnaldo Carvalho de Melo,
	x86, LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     7b1642f2fc1e1f20948e806b7ce319f660633342
Gitweb:        https://git.kernel.org/tip/7b1642f2fc1e1f20948e806b7ce319f660633342
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Mon, 30 Mar 2020 09:32:41 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Fri, 03 Apr 2020 09:37:55 -03:00

perf build-test: Honour JOBS to override detection of number of cores

When one does:

  $ make -C tools/perf build-test

The makefile in tools/perf/tests/ will, just like the main one, detect
how many cores are in the system and use it with -j.

Sometimes we may need to override that, for instance, when using
icecream or distcc to use multiple machines in the build process, then
we need to, as with the main makefile, use:

  $ make JOBS=N -C tools/perf build-test

Fix the tests makefile to honour that.

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20200330130301.GA31702@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/make | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index c850d16..5d0c3a9 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -28,9 +28,13 @@ endif
 
 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
+  ifeq ($(JOBS),)
+    cores := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null)
+    ifeq ($(cores),0)
+      cores := 1
+    endif
+  else
+    cores=$(JOBS)
   endif
   PARALLEL_OPT="-j$(cores)"
 endif

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-04  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 13:03 [PATCH 1/1] perf build-test: Honour JOBS to override detection of Arnaldo Carvalho de Melo
2020-03-30 13:16 ` Jiri Olsa
2020-04-04  8:41 ` [tip: perf/urgent] perf build-test: Honour JOBS to override detection of number of cores tip-bot2 for Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).