Skip to content
Snippets Groups Projects
Commit bf73fc5f authored by Bruce Ashfield's avatar Bruce Ashfield
Browse files

perf tools: Fix parallel build


1/2 [
Author: Eric Sandeen
Email: sandeen@redhat.com
Subject: perf tools: Fix parallel build
Date: Thu, 20 Sep 2012 21:31:44 -0500

Parallel builds of perf were failing for me on a 32p box, with:

    * new build flags or prefix
util/pmu.l:7:23: error: pmu-bison.h: No such file or directory

...

make: *** [util/pmu-flex.o] Error 1
make: *** Waiting for unfinished jobs....

This can pretty quickly be seen by adding a sleep in front of the bison
calls in tools/perf/Makefile and running make -j4 on a smaller box i.e.:

	sleep 10; $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c

Adding the following dependencies fixes it for me.

Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/505BD190.40707@redhat.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
]

2/2 [
Author: Tom Zanussi
Email: tom.zanussi@intel.com
Subject: perf annotate: replace 'expand' with equivalent sed expression
Date: Fri, 5 Oct 2012 11:35:26 -0500

We don't have 'expand' in our userspace so we need to accomplish the
same thing using 'sed', which we do have.

Signed-off-by: default avatarTom Zanussi <tom.zanussi@intel.com>
]

Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
parent 3e6788d8
No related branches found
No related tags found
No related merge requests found
From 449f7f520350700858f21a5554b81cc8ad23267d Mon Sep 17 00:00:00 2001
From: Tom Zanussi <tom.zanussi@intel.com>
Date: Fri, 5 Oct 2012 11:35:26 -0500
Subject: [PATCH 2/2] perf annotate: replace 'expand' with equivalent sed
expression
We don't have 'expand' in our userspace so we need to accomplish the
same thing using 'sed', which we do have.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
tools/perf/util/annotate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 08c6d13..5594936 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -330,7 +330,7 @@ fallback:
snprintf(command, sizeof(command),
"objdump %s%s --start-address=0x%016" PRIx64
" --stop-address=0x%016" PRIx64
- " -d %s %s -C %s|grep -v %s|expand",
+ " -d %s %s -C %s|grep -v %s|sed 's/\t/ /g'",
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
map__rip_2objdump(map, sym->start),
--
1.7.5.4
From 42dcd1f4e2d8c277285fdf771f3a094ad9e81518 Mon Sep 17 00:00:00 2001
From: Eric Sandeen <sandeen@redhat.com>
Date: Thu, 20 Sep 2012 21:31:44 -0500
Subject: [PATCH 1/2] perf tools: Fix parallel build
Parallel builds of perf were failing for me on a 32p box, with:
* new build flags or prefix
util/pmu.l:7:23: error: pmu-bison.h: No such file or directory
...
make: *** [util/pmu-flex.o] Error 1
make: *** Waiting for unfinished jobs....
This can pretty quickly be seen by adding a sleep in front of the bison
calls in tools/perf/Makefile and running make -j4 on a smaller box i.e.:
sleep 10; $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
Adding the following dependencies fixes it for me.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/505BD190.40707@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 3262f98..b223a60 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -237,13 +237,13 @@ export PERL_PATH
FLEX = flex
BISON= bison
-$(OUTPUT)util/parse-events-flex.c: util/parse-events.l
+$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
-$(OUTPUT)util/pmu-flex.c: util/pmu.l
+$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
$(OUTPUT)util/pmu-bison.c: util/pmu.y
--
1.7.5.4
......@@ -6,3 +6,5 @@ patch perf-change-root-to-prefix-for-python-install.patch
patch perf-add-sgidefs.h-to-for-mips-builds.patch
patch perf-add-SLANG_INC-for-slang.h.patch
patch perf-temporary-gcc-4.7-build-fixes.patch
patch perf-tools-Fix-parallel-build.patch
patch perf-annotate-replace-expand-with-equivalent-sed-exp.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment