From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <david.ahern@oracle.com>,
Will Deacon <will.deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Rutland <Mark.Rutland@arm.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: arm/arm64 perf build issue with mainline
Date: Mon, 27 Apr 2015 15:45:35 -0300 [thread overview]
Message-ID: <20150427184535.GD2698@redhat.com> (raw)
In-Reply-To: <20150427184120.GB474@krava.redhat.com>
Em Mon, Apr 27, 2015 at 08:41:20PM +0200, Jiri Olsa escreveu:
> On Mon, Apr 27, 2015 at 03:39:53PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Apr 27, 2015 at 07:49:06PM +0200, Jiri Olsa escreveu:
> > > On Mon, Apr 27, 2015 at 02:40:17PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > Em Mon, Apr 27, 2015 at 11:13:02AM -0600, David Ahern escreveu:
> > > > >
> > > > > I think the right thing to do is to remove JOBS completely.
> > > >
> > > > That is up for discussion, Ingo, Jiri, Namhyung, others?
> > > >
> > > > > Barring that use of getconf with a fallback to grepping /proc/cpuinfo.
> > > >
> > > > Ok, but no patch so far doing that, right? 8-)
> > >
> > > heh, I've got the idea that you're preparing something ;-)
> > >
> > > as for me I've got used to the automatic -jX being added,
> > > so I'd prefer we fix that JOBS setup for arm
> > >
> > > I'll try to send something ;-)
> >
> > [acme@ssdandy linux]$ (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU' /proc/cpuinfo) 2>/dev/null
> > 8
> > [acme@ssdandy linux]$ (not-found-getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU' /proc/cpuinfo) 2>/dev/null
> > 8
> > [acme@ssdandy linux]$
> >
>
> how about this one
I came up with this one, that doesn't introduces a new file:
>From e8155c06652a05f2307d53823a7937be5dad4e32 Mon Sep 17 00:00:00 2001
From: Will Deacon <will.deacon@arm.com>
Date: Thu, 23 Apr 2015 15:00:16 +0100
Subject: [PATCH] tools perf: Use getconf to determine number of online CPUs
Parsing /proc/cpuinfo is a fiddly, arch-dependent business anda 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 <will.deacon@arm.com>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <Mark.Rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150423140454.GJ1652@arm.com
[ Made it fall back to parsing /proc when getconf not found ]
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 c699dc35eef9..bc846b83c295 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 egrep -c '^processor|^CPU' /proc/cpuinfo 2>/dev/null)
+ JOBS := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU' /proc/cpuinfo) 2>/dev/null)
ifeq ($(JOBS),0)
JOBS := 1
endif
--
1.8.3.1
next prev parent reply other threads:[~2015-04-27 18:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 11:29 arm/arm64 perf build issue with mainline Will Deacon
2015-04-23 14:04 ` Will Deacon
2015-04-23 14:16 ` David Ahern
2015-04-24 16:10 ` Arnaldo Carvalho de Melo
2015-04-24 16:22 ` Will Deacon
2015-04-24 17:21 ` David Ahern
2015-04-27 16:26 ` Arnaldo Carvalho de Melo
2015-04-27 17:13 ` David Ahern
2015-04-27 17:40 ` Arnaldo Carvalho de Melo
2015-04-27 17:49 ` Jiri Olsa
2015-04-27 18:39 ` Arnaldo Carvalho de Melo
2015-04-27 18:41 ` Jiri Olsa
2015-04-27 18:45 ` Arnaldo Carvalho de Melo [this message]
2015-04-27 18:52 ` Jiri Olsa
2015-04-27 19:00 ` Arnaldo Carvalho de Melo
2015-04-27 19:03 ` Jiri Olsa
2015-05-06 3:09 ` [tip:perf/core] perf tools: Use getconf to determine number of online CPUs tip-bot for Will Deacon
2015-05-13 6:24 ` [tip:perf/urgent] " tip-bot for Will Deacon
2015-04-23 14:29 ` arm/arm64 perf build issue with mainline David Ahern
2015-05-11 8:21 ` Ingo Molnar
2015-05-11 12:31 ` Will Deacon
2015-05-11 12:33 ` Ingo Molnar
2015-05-11 15:58 ` acme
2015-05-11 15:59 ` acme
2015-05-11 17:29 ` Will Deacon
2015-05-11 19:01 ` Arnaldo Carvalho de Melo
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=20150427184535.GD2698@redhat.com \
--to=acme@redhat.com \
--cc=Mark.Rutland@arm.com \
--cc=david.ahern@oracle.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=will.deacon@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox