[oe-commits] Chong Lu : perf: add libunwind support

git at git.openembedded.org git at git.openembedded.org
Thu Sep 11 10:01:22 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 10dfa4ee4e05841be3d3caaa28778aa40b782f97
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=10dfa4ee4e05841be3d3caaa28778aa40b782f97

Author: Chong Lu <Chong.Lu at windriver.com>
Date:   Mon Sep  8 12:58:25 2014 +0100

perf: add libunwind support

Add a new feature named 'perf-libunwind'. Adding this support to perf allows it
to do stack traces on ARM - thumb2 and MIPS targets. PERF_FEATURES variable in
perf-features.inc will enable the perf-libunwind.

Signed-off-by: Chong Lu <Chong.Lu at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-kernel/perf/perf-features.inc | 2 +-
 meta/recipes-kernel/perf/perf.bb           | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf-features.inc b/meta/recipes-kernel/perf/perf-features.inc
index b8859ab..2dbbb47 100644
--- a/meta/recipes-kernel/perf/perf-features.inc
+++ b/meta/recipes-kernel/perf/perf-features.inc
@@ -1,4 +1,4 @@
-PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
+PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui perf-libunwind"
 
 def perf_feature_enabled(feature, trueval, falseval, d):
     """
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index ebfedb9..cbd03f2 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -20,6 +20,7 @@ BUILDPERF_libc-uclibc = "no"
 # to cover a wide range of kernel we add both dependencies
 TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}"
 SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
+LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}"
 
 DEPENDS = "virtual/kernel \
     virtual/${MLPREFIX}libc \
@@ -27,6 +28,7 @@ DEPENDS = "virtual/kernel \
     ${MLPREFIX}binutils \
     ${TUI_DEPENDS} \
     ${SCRIPTING_DEPENDS} \
+    ${LIBUNWIND_DEPENDS} \
     bison flex \
 "
 
@@ -62,6 +64,7 @@ B = "${WORKDIR}/${BPN}-${PV}"
 
 SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
 TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
+LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1',d)}"
 
 # The LDFLAGS is required or some old kernels fails due missing
 # symbols and this is preferred than requiring patches to every old
@@ -76,7 +79,7 @@ EXTRA_OEMAKE = '\
     CC="${CC}" \
     AR="${AR}" \
     perfexecdir=${libexecdir} \
-    NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 NO_LIBUNWIND=1 ${SCRIPTING_DEFINES} \
+    NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} ${SCRIPTING_DEFINES} \
 '
 
 EXTRA_OEMAKE += "\



More information about the Openembedded-commits mailing list