projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85a9fb4
)
perf tools: Use getconf to determine number of online CPUs
author
Will Deacon
<
[email protected]
>
Thu, 23 Apr 2015 14:00:16 +0000
(15:00 +0100)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Tue, 12 May 2015 21:11:16 +0000
(18:11 -0300)
Parsing /proc/cpuinfo is a fiddly, arch-dependent business and a recent
change to get it working for Sparc broke arm and arm64 platforms.
Use sysconf to determine the number of online CPUs only parsing
/proc/cpuinfo when sysconf is not available.
Signed-off-by: Will Deacon <
[email protected]
>
Acked-by: Jiri Olsa <
[email protected]
>
Tested-by: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: David Ahern <
[email protected]
>
Cc: Mark Rutland <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
[ Made it fall back to parsing /proc when getconf not found ]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/Makefile
patch
|
blob
|
history
diff --git
a/tools/perf/Makefile
b/tools/perf/Makefile
index c699dc35eef9cbd1bc96427f453acc23a2e9c103..d31a7bbd7cee8610db236c7842cfb5ec63dc56b0 100644
(file)
--- 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
egrep -c '^processor|^CPU' /proc/cpuinfo
2>/dev/null)
+ JOBS := $(shell
(getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo)
2>/dev/null)
ifeq ($(JOBS),0)
JOBS := 1
endif