linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:perf/urgent] tools/perf/build: Fix feature-libunwind-debug-frame handling
@ 2013-11-14 17:06 tip-bot for Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Ingo Molnar @ 2013-11-14 17:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, torvalds, will.deacon, jean.pihet, rmk,
	jolsa, acme, tglx

Commit-ID:  e310718d0e83aeb9969264dc577c45db16d9104d
Gitweb:     http://git.kernel.org/tip/e310718d0e83aeb9969264dc577c45db16d9104d
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Thu, 14 Nov 2013 08:25:24 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 14 Nov 2013 18:00:45 +0100

tools/perf/build: Fix feature-libunwind-debug-frame handling

Set feature-libunwind-debug-frame. We don't want it in
CORE_FEATURE_TESTS because it's not the generic case, but we
need to set it in the !feature-libunwind case.

Also, because x86 distributions typically don't have
dwarf_find_debug_frame() unwinding method:

  test-libunwind-debug-frame.c:(.text+0x31): undefined reference to `_Ux86_64_dwarf_find_debug_frame'

Restrict this new API to ARM for the time being.

With this patch test-all.c works again, so repeat perf builds
are  fast again:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       0,452899660 seconds time elapsed                                          ( +-  0,11% )

While with before it was:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       1,674001829 seconds time elapsed                                          ( +-  0,16% )

[ Includes fix to config/feature-checks/Makefile from Will Deacon. ]

Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Jean Pihet <jean.pihet@linaro.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-scsoctqzmou3rpkixCHezy9e@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/config/Makefile                  | 10 ++++++++--
 tools/perf/config/feature-checks/Makefile   |  3 +++
 tools/perf/config/feature-checks/test-all.c |  4 ----
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 861379e..f7d11a8 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -329,8 +329,14 @@ ifndef NO_LIBUNWIND
     msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1);
     NO_LIBUNWIND := 1
   else
-    ifneq ($(feature-libunwind-debug-frame), 1)
-      msg := $(warning No debug_frame support found in libunwind);
+    ifeq ($(ARCH),arm)
+      $(call feature_check,libunwind-debug-frame)
+      ifneq ($(feature-libunwind-debug-frame), 1)
+        msg := $(warning No debug_frame support found in libunwind);
+        CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
+      endif
+    else
+      # non-ARM has no dwarf_find_debug_frame() function:
       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
     endif
   endif
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index e8e195f..87e7900 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -76,6 +76,9 @@ test-libnuma:
 test-libunwind:
 	$(BUILD) $(LIBUNWIND_LIBS) -lelf
 
+test-libunwind-debug-frame:
+	$(BUILD) $(LIBUNWIND_LIBS) -lelf
+
 test-libaudit:
 	$(BUILD) -laudit
 
diff --git a/tools/perf/config/feature-checks/test-all.c b/tools/perf/config/feature-checks/test-all.c
index 799865b..59e7a70 100644
--- a/tools/perf/config/feature-checks/test-all.c
+++ b/tools/perf/config/feature-checks/test-all.c
@@ -49,10 +49,6 @@
 # include "test-libunwind.c"
 #undef main
 
-#define main main_test_libunwind_debug_frame
-# include "test-libunwind-debug-frame.c"
-#undef main
-
 #define main main_test_libaudit
 # include "test-libaudit.c"
 #undef main

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

* [tip:perf/urgent] tools/perf/build: Fix feature-libunwind-debug-frame handling
@ 2013-11-14 12:43 tip-bot for Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Ingo Molnar @ 2013-11-14 12:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, will.deacon, torvalds, jean.pihet, rmk,
	jolsa, acme, tglx

Commit-ID:  aeec4743f2d99b5643e079df95c41032af8c659a
Gitweb:     http://git.kernel.org/tip/aeec4743f2d99b5643e079df95c41032af8c659a
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Thu, 14 Nov 2013 08:25:24 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 14 Nov 2013 13:36:19 +0100

tools/perf/build: Fix feature-libunwind-debug-frame handling

Set feature-libunwind-debug-frame. We don't want it in
CORE_FEATURE_TESTS because it's not the generic case, but we
need to set it in the !feature-libunwind case.

Also, because x86 distributions typically don't have
dwarf_find_debug_frame() unwinding method:

  test-libunwind-debug-frame.c:(.text+0x31): undefined reference to `_Ux86_64_dwarf_find_debug_frame'

Restrict this new API to ARM for the time being.

With this patch test-all.c works again, so repeat perf builds
are  fast again:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       0,452899660 seconds time elapsed                                          ( +-  0,11% )

While with before it was:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       1,674001829 seconds time elapsed                                          ( +-  0,16% )

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/n/tip-scsoctqzmou3rpkixCHezy9e@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/config/Makefile                  | 10 ++++++++--
 tools/perf/config/feature-checks/test-all.c |  4 ----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 861379e..f7d11a8 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -329,8 +329,14 @@ ifndef NO_LIBUNWIND
     msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1);
     NO_LIBUNWIND := 1
   else
-    ifneq ($(feature-libunwind-debug-frame), 1)
-      msg := $(warning No debug_frame support found in libunwind);
+    ifeq ($(ARCH),arm)
+      $(call feature_check,libunwind-debug-frame)
+      ifneq ($(feature-libunwind-debug-frame), 1)
+        msg := $(warning No debug_frame support found in libunwind);
+        CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
+      endif
+    else
+      # non-ARM has no dwarf_find_debug_frame() function:
       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
     endif
   endif
diff --git a/tools/perf/config/feature-checks/test-all.c b/tools/perf/config/feature-checks/test-all.c
index 799865b..59e7a70 100644
--- a/tools/perf/config/feature-checks/test-all.c
+++ b/tools/perf/config/feature-checks/test-all.c
@@ -49,10 +49,6 @@
 # include "test-libunwind.c"
 #undef main
 
-#define main main_test_libunwind_debug_frame
-# include "test-libunwind-debug-frame.c"
-#undef main
-
 #define main main_test_libaudit
 # include "test-libaudit.c"
 #undef main

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

* [tip:perf/urgent] tools/perf/build: Fix feature-libunwind-debug-frame handling
@ 2013-11-14  8:18 tip-bot for Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Ingo Molnar @ 2013-11-14  8:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, will.deacon, torvalds, jean.pihet, rmk,
	jolsa, acme, tglx

Commit-ID:  12413057fa8b6f2993f573e6e83f843fc86d044c
Gitweb:     http://git.kernel.org/tip/12413057fa8b6f2993f573e6e83f843fc86d044c
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Thu, 14 Nov 2013 08:25:24 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 14 Nov 2013 08:40:23 +0100

tools/perf/build: Fix feature-libunwind-debug-frame handling

Set feature-libunwind-debug-frame. We don't want it in
CORE_FEATURE_TESTS because it's not the generic case, but we
need to set it in the !feature-libunwind case.

Also, because x86 distributions typically don't have
dwarf_find_debug_frame() unwinding method:

  test-libunwind-debug-frame.c:(.text+0x31): undefined reference to `_Ux86_64_dwarf_find_debug_frame'

Restrict this new API to ARM for the time being.

With this patch test-all.c works again, so repeat perf builds
are  fast again:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       0,452899660 seconds time elapsed                                          ( +-  0,11% )

While with before it was:

  comet:~/tip> perf stat --null --repeat 5 make -C tools/perf/
  [...]

       1,674001829 seconds time elapsed                                          ( +-  0,16% )

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/n/tip-scsoctqzmou3rpkixCHezy9e@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/perf/config/Makefile                  | 10 ++++++++--
 tools/perf/config/feature-checks/test-all.c |  4 ----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f5905f2..a8abd0e 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -328,8 +328,14 @@ ifndef NO_LIBUNWIND
     msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1);
     NO_LIBUNWIND := 1
   else
-    ifneq ($(feature-libunwind-debug-frame), 1)
-      msg := $(warning No debug_frame support found in libunwind);
+    ifeq ($(ARCH),arm)
+      $(call feature_check,feature-libunwind-debug-frame)
+      ifneq ($(feature-libunwind-debug-frame), 1)
+        msg := $(warning No debug_frame support found in libunwind);
+        CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
+      endif
+    else
+      # non-ARM has no dwarf_find_debug_frame() function:
       CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
     endif
   endif
diff --git a/tools/perf/config/feature-checks/test-all.c b/tools/perf/config/feature-checks/test-all.c
index 799865b..59e7a70 100644
--- a/tools/perf/config/feature-checks/test-all.c
+++ b/tools/perf/config/feature-checks/test-all.c
@@ -49,10 +49,6 @@
 # include "test-libunwind.c"
 #undef main
 
-#define main main_test_libunwind_debug_frame
-# include "test-libunwind-debug-frame.c"
-#undef main
-
 #define main main_test_libaudit
 # include "test-libaudit.c"
 #undef main

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

end of thread, other threads:[~2013-11-14 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-14 17:06 [tip:perf/urgent] tools/perf/build: Fix feature-libunwind-debug-frame handling tip-bot for Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2013-11-14 12:43 tip-bot for Ingo Molnar
2013-11-14  8:18 tip-bot for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).