From: David Ahern Date: Tue, 24 Mar 2015 16:10:55 +0000 (-0400) Subject: perf tools: Set JOBS based on CPU or processor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6428c59a97de7c3d88fc4e66317daea5e5008758;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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. Signed-off-by: David Ahern Acked-by: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1427213455-127249-1-git-send-email-david.ahern@oracle.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d5020aeb5626..c699dc35eef9 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -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