perf tools: Set JOBS based on CPU or processor
authorDavid Ahern <david.ahern@oracle.com>
Tue, 24 Mar 2015 16:10:55 +0000 (12:10 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 Mar 2015 13:52:28 +0000 (10:52 -0300)
Number of JOBS to use is set automatically to the number of processors found
in /proc/cpuinfo. SPARC uses 'CPU' lines rather than 'processor'. Update the
check in perf's Makefile to work for SPARC.

Signed-off-by: David Ahern <david.ahern@oracle.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1427213455-127249-1-git-send-email-david.ahern@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile

index d5020aeb5626495e160ffaa11e7f13aa91d58f4d..c699dc35eef9cbd1bc96427f453acc23a2e9c103 100644 (file)
@@ -24,7 +24,7 @@ unexport MAKEFLAGS
 # (To override it, run 'make JOBS=1' and similar.)
 #
 ifeq ($(JOBS),)
-  JOBS := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
+  JOBS := $(shell egrep -c '^processor|^CPU' /proc/cpuinfo 2>/dev/null)
   ifeq ($(JOBS),0)
     JOBS := 1
   endif