Skip to contentSkip to conversation

perf tool: Set JOBS based on CPU or processor

PATCH In review David Ahern 3 participants 3 messages Mar 24, 2015 – Mar 27, 2015 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tool: Set JOBS based on CPU or processor

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.

Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
---
 tools/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile +1 -1
index d5020aeb5626..c699dc35eef9 100644
@@ -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
Signature · 1 line
2.2.1
#2 lore raw

[tip:perf/core] perf tools: Set JOBS based on CPU or processor

In reply to David Ahern
perf tools: Set JOBS based on CPU or processor
Commit-ID:  6428c59a97de7c3d88fc4e66317daea5e5008758
Gitweb:     http://git.kernel.org/tip/6428c59a97de7c3d88fc4e66317daea5e5008758
Author:     David Ahern <[email protected]>
AuthorDate: Tue, 24 Mar 2015 12:10:55 -0400
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 26 Mar 2015 10:52:28 -0300

perf tools: Set JOBS based on CPU or processor

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.

---
 tools/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile +1 -1
index d5020ae..c699dc3 100644
@@ -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