All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: fix an error introduced by commit 93cbb398
@ 2013-05-27 15:27 Runzhen Wang
  2013-05-29 11:56 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: Runzhen Wang @ 2013-05-27 15:27 UTC (permalink / raw)
  To: linux-kernel, jolsa; +Cc: acme, mingo, dsahern, Runzhen Wang, Runzhen Wang

commit 0a720538e5dd3f424bfcc15c1e4af09df0becf92
and
commit 93cbb3985d5de867fb32e6e130fcfb1b5de4142b
move some contents of Makefile from perf/Makefile to
perf/config/Makefile.

However, that introduce the following error messages when compile perf:

util/unwind.c: In function ‘access_mem’:
util/unwind.c:400:50: error: ‘PERF_REG_SP’ undeclared (first use in this
function)
util/unwind.c:400:50: note: each undeclared identifier is reported only
once for each function it appears in
util/unwind.c: In function ‘unwind__get_entries’:
util/unwind.c:562:41: error: ‘PERF_REG_IP’ undeclared (first use in this
function)

That because the assignment statement of 'BASIC_CFLAGS' is behind
'BASIC_CFLAGS += -DHAVE_PERF_REGS', which will rewrite the value of
'BASIC_CFLAGS'.

Without the definition of 'HAVE_PERF_REGS', perf/util/perf_regs.h can't
include perf/arch/x86/include/perf_regs.h, that will cause the error.

The solution is to move the assignment statement of BASIC_CFLAGS ahead of
BASIC_CFLAGS += -DHAVE_PERF_REGS.

Signed-off-by: Runzhen Wang <runzhen@linux.vnet.ibm.com>
---
 tools/perf/config/Makefile |   33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 1f12a55..a8ec66f 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -5,6 +5,23 @@ ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
 				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 				  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
+
+BASIC_CFLAGS = \
+	-Iutil/include \
+	-Iarch/$(ARCH)/include \
+	$(if $(objtree),-I$(objtree)/arch/$(ARCH)/include/generated/uapi) \
+	-I$(srctree)/arch/$(ARCH)/include/uapi \
+	-I$(srctree)/arch/$(ARCH)/include \
+	$(if $(objtree),-I$(objtree)/include/generated/uapi) \
+	-I$(srctree)/include/uapi \
+	-I$(srctree)/include \
+	-I$(OUTPUT)util \
+	-Iutil \
+	-I. \
+	-I$(TRACE_EVENT_DIR) \
+	-I../lib/ \
+	-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+
 NO_PERF_REGS := 1
 
 # Additional ARCH settings for x86
@@ -84,22 +101,6 @@ ifndef PERF_DEBUG
 	endif
 endif
 
-BASIC_CFLAGS = \
-	-Iutil/include \
-	-Iarch/$(ARCH)/include \
-	$(if $(objtree),-I$(objtree)/arch/$(ARCH)/include/generated/uapi) \
-	-I$(srctree)/arch/$(ARCH)/include/uapi \
-	-I$(srctree)/arch/$(ARCH)/include \
-	$(if $(objtree),-I$(objtree)/include/generated/uapi) \
-	-I$(srctree)/include/uapi \
-	-I$(srctree)/include \
-	-I$(OUTPUT)util \
-	-Iutil \
-	-I. \
-	-I$(TRACE_EVENT_DIR) \
-	-I../lib/ \
-	-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-
 BASIC_LDFLAGS =
 
 ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf tools: fix an error introduced by commit 93cbb398
  2013-05-27 15:27 [PATCH] perf tools: fix an error introduced by commit 93cbb398 Runzhen Wang
@ 2013-05-29 11:56 ` Jiri Olsa
  2013-05-30  3:42   ` Runzhen Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2013-05-29 11:56 UTC (permalink / raw)
  To: Runzhen Wang; +Cc: linux-kernel, acme, mingo, dsahern, Runzhen Wang

On Mon, May 27, 2013 at 11:27:35PM +0800, Runzhen Wang wrote:
> commit 0a720538e5dd3f424bfcc15c1e4af09df0becf92
> and
> commit 93cbb3985d5de867fb32e6e130fcfb1b5de4142b
> move some contents of Makefile from perf/Makefile to
> perf/config/Makefile.

hi,
so you based on latest acme's perf/core, right?

I think it's fixed right now within the branch.
The issue was there and got fixed by using:

-BASIC_CFLAGS = \
+BASIC_CFLAGS += \


should work right now,

thanks,
jirka

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf tools: fix an error introduced by commit 93cbb398
  2013-05-29 11:56 ` Jiri Olsa
@ 2013-05-30  3:42   ` Runzhen Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Runzhen Wang @ 2013-05-30  3:42 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Runzhen Wang, linux-kernel, acme, mingo, dsahern, xiaoguangrong

On Wed, May 29, 2013 at 01:56:15PM +0200, Jiri Olsa wrote:
>On Mon, May 27, 2013 at 11:27:35PM +0800, Runzhen Wang wrote:
>> commit 0a720538e5dd3f424bfcc15c1e4af09df0becf92
>> and
>> commit 93cbb3985d5de867fb32e6e130fcfb1b5de4142b
>> move some contents of Makefile from perf/Makefile to
>> perf/config/Makefile.
>
>hi,
>so you based on latest acme's perf/core, right?
>
>I think it's fixed right now within the branch.
>The issue was there and got fixed by using:
>
>-BASIC_CFLAGS = \
>+BASIC_CFLAGS += \
>
Yes, I based on the perf/core tree.
I have fetched the latest code and found it had been fixed.

thank you :)
Runzhen Wang
>should work right now,
>
>thanks,
>jirka
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-30  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 15:27 [PATCH] perf tools: fix an error introduced by commit 93cbb398 Runzhen Wang
2013-05-29 11:56 ` Jiri Olsa
2013-05-30  3:42   ` Runzhen Wang

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.