All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	David Ahern <david.ahern@oracle.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4/6] perf tools: Set JOBS based on CPU or processor
Date: Thu, 26 Mar 2015 12:41:03 -0300	[thread overview]
Message-ID: <1427384465-7601-5-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1427384465-7601-1-git-send-email-acme@kernel.org>

From: David Ahern <david.ahern@oracle.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
1.9.3


  parent reply	other threads:[~2015-03-26 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 15:40 [GIT PULL 0/6] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 1/6] perf timechart: Fix SIBGUS error on sparc64 Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 2/6] perf evlist: Return the first evsel with an invalid filter in apply_filters() Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 3/6] perf: Bump max number of cpus to 1024 Arnaldo Carvalho de Melo
2015-03-26 15:41 ` Arnaldo Carvalho de Melo [this message]
2015-03-26 15:41 ` [PATCH 5/6] perf trace: Fix syscall enter formatting bug Arnaldo Carvalho de Melo
2015-03-26 15:41 ` [PATCH 6/6] tools lib traceevent: Zero should not be considered "not found" in eval_flag() Arnaldo Carvalho de Melo
2015-03-27  7:37 ` [GIT PULL 0/6] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427384465-7601-5-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=david.ahern@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.