linux-mips
[Top] [All Lists]

[PATCH 2/2] perf tools: Hook up MIPS unwind and dwarf-regs in the Makefi

To: linux-mips@linux-mips.org, ralf@linux-mips.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 2/2] perf tools: Hook up MIPS unwind and dwarf-regs in the Makefile
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 17 May 2013 12:00:38 -0700
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <a.p.zijlstra@chello.nl>, Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@ghostprotocols.net>, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=1/lyrST9PdwQIgdxz5JMGlIl3stnzAVwMEuoz7QvloI=; b=q3a7rcR3anlLq/kNBURvHXgqKwKHM8CaXQX059pUYjW1kLVShQUTkPYSK+ivyVNCD9 1L9dlfG3OoNnAltNDrVpT9SJm1V0vduCsopThjH1bpWgsLsn5+Jrz67fjHxGpmCZ3NQ4 ZPwgVHiJWf9yH9BVyuYsuo24iTc8XQn3KfZ1n0kH1aj3zvQSLBKUdDm0Qv58XW2dCJ85 IK5nZ5bcOW5Cp87QZX8+lUubSFIx7IO65iEBGpJdblaQ459xQe3c/MI2FduWLdpbzKFE nyaksYTQlLPDUo4L/WorbAoL01ZxhkNXdXLPluMMZEZ6e8r27wMPIS0O8gwjXjMNfMIi zxhQ==
In-reply-to: <1368817238-11548-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1368817238-11548-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

Define a new symbol (ARCH_SUPPORTS_LIBUNWIND) in config/Makefile.
Use this from x86 and MIPS to gate testing of libunwind.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 tools/perf/config/Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f139dcd..90a0e58 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -11,6 +11,7 @@ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
 # Additional ARCH settings for x86
 ifeq ($(ARCH),i386)
   override ARCH := x86
+  ARCH_SUPPORTS_LIBUNWIND := 1
   NO_PERF_REGS := 0
   LIBUNWIND_LIBS = -lunwind -lunwind-x86
 endif
@@ -26,10 +27,18 @@ ifeq ($(ARCH),x86_64)
     CFLAGS += -DARCH_X86_64
     ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S 
../../arch/x86/lib/memset_64.S
   endif
+  ARCH_SUPPORTS_LIBUNWIND := 1
   NO_PERF_REGS := 0
   LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
 endif
 
+# Additional ARCH settings for MIPS
+ifeq ($(ARCH),mips)
+  ARCH_SUPPORTS_LIBUNWIND := 1
+  NO_PERF_REGS := 0
+  LIBUNWIND_LIBS = -lunwind -lunwind-mips
+endif
+
 ifeq ($(NO_PERF_REGS),0)
   CFLAGS += -DHAVE_PERF_REGS
 endif
@@ -204,8 +213,7 @@ ifeq ($(call 
try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y)
 endif # try-cc
 endif # NO_LIBELF
 
-# There's only x86 (both 32 and 64) support for CFI unwind so far
-ifneq ($(ARCH),x86)
+ifndef ARCH_SUPPORTS_LIBUNWIND
   NO_LIBUNWIND := 1
 endif
 
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>