All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] perl: keep original libperl location
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 2/9] perl: add @STAGINGDIR@ for config.sh substitions tom.zanussi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Things like ExtTools expect to find libperl at the original
(${libdir}/perl/${PV}/CORE/libperl.so) location, so keep it there but
symlink to it for the original (?) reason.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 2452a44..a50fedb 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db grep-native"
 DEPENDS += "gdbm zlib"
-PR = "r7"
+PR = "r8"
 
 # 5.10.1 has Module::Build built-in
 PROVIDES += "libmodule-build-perl"
@@ -200,6 +200,7 @@ do_install() {
         # Fix up shared library
         mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
         ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
+        ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
 
         # target config, used by cpan.bbclass to extract version information
         install config.sh ${D}${libdir}/perl
-- 
1.7.0.4




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

* [PATCH 2/9] perl: add @STAGINGDIR@ for config.sh substitions
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
  2012-07-03 18:10 ` [PATCH 1/9] perl: keep original libperl location tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 3/9] perl: use @STAGINGDIR@ in config.sh tom.zanussi
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

For some config.sh substitions, we'd like to be able to use
STAGING_DIR_HOST; add @STAGINGDIR@ to allow for that.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index a50fedb..3ba1223 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -147,6 +147,7 @@ do_configure() {
         sed -i -e 's,@DESTDIR@,${prefix},g' \
                -e 's,@ARCH@-thread-multi,,g' \
                -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
+               -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
                -e "s%/usr/include%${STAGING_INCDIR}%g" \
 	       -e 's,/usr/lib/,${libdir}/,g' \
 	       -e 's,/usr/,${exec_prefix}/,g' \
-- 
1.7.0.4




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

* [PATCH 3/9] perl: use @STAGINGDIR@ in config.sh
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
  2012-07-03 18:10 ` [PATCH 1/9] perl: keep original libperl location tom.zanussi
  2012-07-03 18:10 ` [PATCH 2/9] perl: add @STAGINGDIR@ for config.sh substitions tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 4/9] perf: enable Python bindings tom.zanussi
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

archlibexp in the snapshotted config.sh needs to be relative to
staging dir - it gets generated into Config_heavy.pl as one of the
settings and is used by ExtUtils::Embed during the target build.

The substituted setting doesn't make it into the target package
because it's removed by perl_package_preprocess() before packaging.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl-5.14.2/config.sh b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
index b3e2d43..75dc2d0 100644
--- a/meta/recipes-devtools/perl/perl-5.14.2/config.sh
+++ b/meta/recipes-devtools/perl/perl-5.14.2/config.sh
@@ -68,7 +68,7 @@ api_version='14'
 api_versionstring='5.14.0'
 ar='ar'
 archlib='/usr/lib/perl5/5.14.2/@ARCH@-thread-multi'
-archlibexp='/usr/lib/perl5/5.14.2/@ARCH@-thread-multi'
+archlibexp='@STAGINGDIR@/usr/lib/perl5/5.14.2/@ARCH@-thread-multi'
 archname64=''
 archname='@ARCH@-thread-multi'
 archobjs=''
-- 
1.7.0.4




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

* [PATCH 4/9] perf: enable Python bindings
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (2 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 3/9] perl: use @STAGINGDIR@ in config.sh tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 5/9] perf: enable Perl binding tom.zanussi
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Add support to enable the perf python bindings.  The combination of
these changes and the changes in the python-config sections in the
kernel Makefile enable all the python bindings currently available in
perf.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 997beb4..9f36484 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -9,7 +9,7 @@ as well."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-PR = "r0"
+PR = "r1"
 
 BUILDPERF_libc-uclibc = "no"
 
@@ -24,6 +24,13 @@ PROVIDES = "virtual/perf"
 
 inherit kernel-arch
 
+# needed for building the tools/perf Python bindings
+inherit python-dir
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS
+export HOST_SYS
+
 S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
@@ -44,7 +51,10 @@ do_compile() {
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
+	oe_runmake DESTDIR=${D} install-python_ext
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
+FILES_${PN} += "${libdir}/python*/site-packages"
-- 
1.7.0.4




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

* [PATCH 5/9] perf: enable Perl binding
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (3 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 4/9] perf: enable Python bindings tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 6/9] perf: add libexec/perf-core and contents tom.zanussi
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Add support to enable the perf Perl binding.

The build depends on perl-native to retrieve the configuration
settings needed for the binding.  cpan-base adds some useful functions
like is_target() and get_perl_version() that we need for
PERLCONFIGTARGET and related settings, which allow us to use the
target's Config_heavy.pl settings for ExtUtils:Embed when building for
the target.

Also adds the perl-modules dependency to give the target the perl
modules that scripts using the binding need.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 9f36484..514876b 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -18,7 +18,8 @@ DEPENDS = "virtual/kernel \
            ${MLPREFIX}elfutils \
            ${MLPREFIX}binutils \
           "
-RDEPENDS_${PN} += "elfutils perl python"
+
+RDEPENDS_${PN} += "elfutils perl perl-modules python"
 
 PROVIDES = "virtual/perf"
 
@@ -31,6 +32,14 @@ export STAGING_LIBDIR
 export BUILD_SYS
 export HOST_SYS
 
+# needed for building the tools/perf Perl binding
+inherit perlnative cpan-base
+# Env var which tells perl if it should use host (no) or target (yes) settings
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}/CORE"
+export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+
 S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
-- 
1.7.0.4




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

* [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI
@ 2012-07-03 18:10 tom.zanussi
  2012-07-03 18:10 ` [PATCH 1/9] perl: keep original libperl location tom.zanussi
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

This patchset enables the Perl and Python bindings for perf, as well as
the perf TUI (text-based UI).

These can be separately enabled on a machine basis by adding
'perf-scripting' and/or 'perf-tui' to the machine's MACHINE_FEATURES.
The default is to completely disable all scripting and TUI features.

There are also a couple patches that fix other problems noticed along
the way.

These changes need corresponding changes made to linux-yocto and posted
separately on the yocto and linux-yocto mailing lists.

This patchset has been build- and run-tested on the following machines:

qemux86
qemux86-64
qemuarm
sugarbay
crownbay

The following changes since commit 644ad4bf1e30fcee4b9d5abb819046d1f2193d27:
  Scott Rifenbark (1):
        documentation/bsp-guide/bsp.xml: Yocto term paring

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib.git tzanussi/perf-scripting
  http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/perf-scripting

Tom Zanussi (9):
  perl: keep original libperl location
  perl: add @STAGINGDIR@ for config.sh substitions
  perl: use @STAGINGDIR@ in config.sh
  perf: enable Python bindings
  perf: enable Perl binding
  perf: add libexec/perf-core and contents
  perf: add perf-scripting MACHINE_FEATURE
  qemumachines: make MACHINE_FEATURES append follow qemu.inc include
  perf: add perf-tui MACHINE_FEATURE

 meta/conf/machine/qemux86-64.conf                |    4 +-
 meta/conf/machine/qemux86.conf                   |    4 +-
 meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
 meta/recipes-devtools/perl/perl_5.14.2.bb        |    4 ++-
 meta/recipes-kernel/perf/perf_3.4.bb             |   36 ++++++++++++++++++++--
 5 files changed, 41 insertions(+), 9 deletions(-)




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

* [PATCH 6/9] perf: add libexec/perf-core and contents
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (4 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 5/9] perf: enable Perl binding tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE tom.zanussi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

libexec/perf-core contains all the pre-canned scripts and modules
needed by both the Perl and Python bindigs.  Add libexec/perf-core
along with all the pre-defined perf scripts underneath it.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 514876b..a1628bb 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -65,5 +65,6 @@ do_install() {
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+FILES_${PN} += "${libexecdir}/perf-core"
 FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
 FILES_${PN} += "${libdir}/python*/site-packages"
-- 
1.7.0.4




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

* [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (5 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 6/9] perf: add libexec/perf-core and contents tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-04 14:02   ` Richard Purdie
  2012-07-03 18:10 ` [PATCH 8/9] qemumachines: make MACHINE_FEATURES append follow qemu.inc include tom.zanussi
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Add a new MACHINE_FEATURE named 'perf-scripting'.  Adding this into
any machine configuration will enable perf scripting on the target,
which will turn on all the language bindings currently aavailable in
perf (Perl and Python), if perf is included in an image.

If 'perf-scripting' isn't named as a feature (the default), all perf
language bindings will be disabled and unavailable.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index a1628bb..81121c1 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -19,7 +19,8 @@ DEPENDS = "virtual/kernel \
            ${MLPREFIX}binutils \
           "
 
-RDEPENDS_${PN} += "elfutils perl perl-modules python"
+SCRIPTING_RDEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', 'perl perl-modules python', '',d)}"
+RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}"
 
 PROVIDES = "virtual/perf"
 
@@ -43,6 +44,8 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
 S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
+SCRIPTING_DEFINES = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
+
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
 		O=${B} \
@@ -51,7 +54,7 @@ EXTRA_OEMAKE = \
 		CC="${CC}" \
 		AR="${AR}" \
 		prefix=/usr \
-		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \
+		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 ${SCRIPTING_DEFINES} \
 		'
 
 do_compile() {
@@ -60,7 +63,9 @@ do_compile() {
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
-	oe_runmake DESTDIR=${D} install-python_ext
+	if [ "${@base_contains('MACHINE_FEATURES', 'perf-scripting', 1, 0, d)}" = "1" ]; then
+		oe_runmake DESTDIR=${D} install-python_ext
+	fi
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-- 
1.7.0.4




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

* [PATCH 8/9] qemumachines: make MACHINE_FEATURES append follow qemu.inc include
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (6 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-03 18:10 ` [PATCH 9/9] perf: add perf-tui MACHINE_FEATURE tom.zanussi
  2012-07-05 17:56 ` [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI Saul Wold
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

qemu.inc does a straight assign to MACHINE_FEATURES so overwriting the
preceding append to MACHINE_FEATURES, so the MACHINE_FEATURES append
needs to be moved after the include.

This situation came about as a result of commit 71a4bf386:

    qemumachines: Enable xserver-xorg as default xserver

    For qemux86 and qemux86-64 include qemu.inc after defining XSERVER

which missed this side-effect (and maybe others).

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/conf/machine/qemux86-64.conf |    4 ++--
 meta/conf/machine/qemux86.conf    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index 2e361a5..998ef60 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -7,8 +7,6 @@ PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
 
 require conf/machine/include/tune-x86_64.inc
 
-MACHINE_FEATURES += "x86"
-
 KERNEL_IMAGETYPE = "bzImage"
 
 SERIAL_CONSOLE = "115200 ttyS0"
@@ -24,6 +22,8 @@ XSERVER ?= "xserver-xorg \
 
 require conf/machine/include/qemu.inc
 
+MACHINE_FEATURES += "x86"
+
 GLIBC_ADDONS = "nptl"
 GLIBC_EXTRA_OECONF = "--with-tls"
 
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index ad840c0..57e480c 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -7,8 +7,6 @@ PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
 
 require conf/machine/include/tune-i586.inc
 
-MACHINE_FEATURES += "x86"
-
 KERNEL_IMAGETYPE = "bzImage"
 
 SERIAL_CONSOLE = "115200 ttyS0"
@@ -24,6 +22,8 @@ XSERVER ?= "xserver-xorg \
 
 require conf/machine/include/qemu.inc
 
+MACHINE_FEATURES += "x86"
+
 GLIBC_ADDONS = "nptl"
 GLIBC_EXTRA_OECONF = "--with-tls"
 
-- 
1.7.0.4




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

* [PATCH 9/9] perf: add perf-tui MACHINE_FEATURE
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (7 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 8/9] qemumachines: make MACHINE_FEATURES append follow qemu.inc include tom.zanussi
@ 2012-07-03 18:10 ` tom.zanussi
  2012-07-05 17:56 ` [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI Saul Wold
  9 siblings, 0 replies; 15+ messages in thread
From: tom.zanussi @ 2012-07-03 18:10 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Add a new MACHINE_FEATURE named 'perf-tui'.  Adding this into any
machine configuration will enable perf TUI (Text-base UI) user
interface on the target, which adds libnewt and turns on the perf text
UI options in perf, if perf is included in an image.

If 'perf-tui' isn't named as a feature (the default), the perf TUI
will be disabled and unavailable.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-kernel/perf/perf_3.4.bb |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 81121c1..8932bd1 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -9,17 +9,21 @@ as well."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-PR = "r1"
+PR = "r2"
 
 BUILDPERF_libc-uclibc = "no"
 
+TUI_DEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-tui', 'libnewt', '',d)}"
+
 DEPENDS = "virtual/kernel \
            virtual/${MLPREFIX}libc \
            ${MLPREFIX}elfutils \
            ${MLPREFIX}binutils \
+           ${TUI_DEPENDS} \
           "
 
 SCRIPTING_RDEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', 'perl perl-modules python', '',d)}"
+TUI_RDEPENDS = "${@base_contains('MACHINE_FEATURES', 'perf-tui', 'libnewt', '',d)}"
 RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}"
 
 PROVIDES = "virtual/perf"
@@ -45,6 +49,7 @@ S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
 SCRIPTING_DEFINES = "${@base_contains('MACHINE_FEATURES', 'perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
+TUI_DEFINES = "${@base_contains('MACHINE_FEATURES', 'perf-tui', '', 'NO_NEWT=1',d)}"
 
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
@@ -54,7 +59,7 @@ EXTRA_OEMAKE = \
 		CC="${CC}" \
 		AR="${AR}" \
 		prefix=/usr \
-		NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 ${SCRIPTING_DEFINES} \
+		NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
 		'
 
 do_compile() {
-- 
1.7.0.4




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

* Re: [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE
  2012-07-03 18:10 ` [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE tom.zanussi
@ 2012-07-04 14:02   ` Richard Purdie
  2012-07-04 19:16     ` Tom Zanussi
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Purdie @ 2012-07-04 14:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, 2012-07-03 at 13:10 -0500, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
> 
> Add a new MACHINE_FEATURE named 'perf-scripting'.  Adding this into
> any machine configuration will enable perf scripting on the target,
> which will turn on all the language bindings currently aavailable in
> perf (Perl and Python), if perf is included in an image.
> 
> If 'perf-scripting' isn't named as a feature (the default), all perf
> language bindings will be disabled and unavailable.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> ---
>  meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)

Does this make sense as a MACHINE specific feature? Wouldn't it make
sense done on a per architecture basis for example?

Cheers,

Richard




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

* Re: [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE
  2012-07-04 14:02   ` Richard Purdie
@ 2012-07-04 19:16     ` Tom Zanussi
  2012-07-05 13:42       ` Richard Purdie
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Zanussi @ 2012-07-04 19:16 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-07-04 at 15:02 +0100, Richard Purdie wrote:
> On Tue, 2012-07-03 at 13:10 -0500, tom.zanussi@intel.com wrote:
> > From: Tom Zanussi <tom.zanussi@intel.com>
> > 
> > Add a new MACHINE_FEATURE named 'perf-scripting'.  Adding this into
> > any machine configuration will enable perf scripting on the target,
> > which will turn on all the language bindings currently aavailable in
> > perf (Perl and Python), if perf is included in an image.
> > 
> > If 'perf-scripting' isn't named as a feature (the default), all perf
> > language bindings will be disabled and unavailable.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> > ---
> >  meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++---
> >  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> Does this make sense as a MACHINE specific feature? Wouldn't it make
> sense done on a per architecture basis for example?
> 

To me it made sense to do it as a machine-specific feature e.g. although
scripting would probably be something that all x86-64-based machines
could be assumed to easily handle and would therefore probably want, for
x86 it might not always be so clear.  For example, the crownbay and
cedartrail machines might have the horsepower for scripting to make
sense on the target, while the n450 or some similarly underpowered Atom
machines, maybe not.

So, making it a per-machine feature would allow for that kind of
flexibility...

Tom

> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core





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

* Re: [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE
  2012-07-04 19:16     ` Tom Zanussi
@ 2012-07-05 13:42       ` Richard Purdie
  2012-07-05 13:54         ` Tom Zanussi
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Purdie @ 2012-07-05 13:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-07-04 at 14:16 -0500, Tom Zanussi wrote:
> On Wed, 2012-07-04 at 15:02 +0100, Richard Purdie wrote:
> > On Tue, 2012-07-03 at 13:10 -0500, tom.zanussi@intel.com wrote:
> > > From: Tom Zanussi <tom.zanussi@intel.com>
> > > 
> > > Add a new MACHINE_FEATURE named 'perf-scripting'.  Adding this into
> > > any machine configuration will enable perf scripting on the target,
> > > which will turn on all the language bindings currently aavailable in
> > > perf (Perl and Python), if perf is included in an image.
> > > 
> > > If 'perf-scripting' isn't named as a feature (the default), all perf
> > > language bindings will be disabled and unavailable.
> > > 
> > > Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> > > ---
> > >  meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++---
> > >  1 files changed, 8 insertions(+), 3 deletions(-)
> > 
> > Does this make sense as a MACHINE specific feature? Wouldn't it make
> > sense done on a per architecture basis for example?
> > 
> 
> To me it made sense to do it as a machine-specific feature e.g. although
> scripting would probably be something that all x86-64-based machines
> could be assumed to easily handle and would therefore probably want, for
> x86 it might not always be so clear.  For example, the crownbay and
> cedartrail machines might have the horsepower for scripting to make
> sense on the target, while the n450 or some similarly underpowered Atom
> machines, maybe not.
> 
> So, making it a per-machine feature would allow for that kind of
> flexibility...

What is the implication if the machine lacks horsepower though? Isn't
this something you'd only hit when trying to use specific features?

I'm just not feeling this is the best way to make this decision.

Cheers,

Richard




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

* Re: [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE
  2012-07-05 13:42       ` Richard Purdie
@ 2012-07-05 13:54         ` Tom Zanussi
  0 siblings, 0 replies; 15+ messages in thread
From: Tom Zanussi @ 2012-07-05 13:54 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2012-07-05 at 14:42 +0100, Richard Purdie wrote:
> On Wed, 2012-07-04 at 14:16 -0500, Tom Zanussi wrote:
> > On Wed, 2012-07-04 at 15:02 +0100, Richard Purdie wrote:
> > > On Tue, 2012-07-03 at 13:10 -0500, tom.zanussi@intel.com wrote:
> > > > From: Tom Zanussi <tom.zanussi@intel.com>
> > > > 
> > > > Add a new MACHINE_FEATURE named 'perf-scripting'.  Adding this into
> > > > any machine configuration will enable perf scripting on the target,
> > > > which will turn on all the language bindings currently aavailable in
> > > > perf (Perl and Python), if perf is included in an image.
> > > > 
> > > > If 'perf-scripting' isn't named as a feature (the default), all perf
> > > > language bindings will be disabled and unavailable.
> > > > 
> > > > Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> > > > ---
> > > >  meta/recipes-kernel/perf/perf_3.4.bb |   11 ++++++++---
> > > >  1 files changed, 8 insertions(+), 3 deletions(-)
> > > 
> > > Does this make sense as a MACHINE specific feature? Wouldn't it make
> > > sense done on a per architecture basis for example?
> > > 
> > 
> > To me it made sense to do it as a machine-specific feature e.g. although
> > scripting would probably be something that all x86-64-based machines
> > could be assumed to easily handle and would therefore probably want, for
> > x86 it might not always be so clear.  For example, the crownbay and
> > cedartrail machines might have the horsepower for scripting to make
> > sense on the target, while the n450 or some similarly underpowered Atom
> > machines, maybe not.
> > 
> > So, making it a per-machine feature would allow for that kind of
> > flexibility...
> 
> What is the implication if the machine lacks horsepower though? Isn't
> this something you'd only hit when trying to use specific features?
> 

Nothing earth-shattering in that it won't break anything, it's just that
you're now dragging in the perl and python dependencies for no good
reason, since the scripting feature won't be too usable on the
underpowered machine.

> I'm just not feeling this is the best way to make this decision.
> 

Yeah, let me come up with something per architecture that also allows
individual machines to opt out...

Tom

> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core





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

* Re: [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI
  2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
                   ` (8 preceding siblings ...)
  2012-07-03 18:10 ` [PATCH 9/9] perf: add perf-tui MACHINE_FEATURE tom.zanussi
@ 2012-07-05 17:56 ` Saul Wold
  9 siblings, 0 replies; 15+ messages in thread
From: Saul Wold @ 2012-07-05 17:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 07/03/2012 11:10 AM, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
>
> This patchset enables the Perl and Python bindings for perf, as well as
> the perf TUI (text-based UI).
>
> These can be separately enabled on a machine basis by adding
> 'perf-scripting' and/or 'perf-tui' to the machine's MACHINE_FEATURES.
> The default is to completely disable all scripting and TUI features.
>
> There are also a couple patches that fix other problems noticed along
> the way.
>
> These changes need corresponding changes made to linux-yocto and posted
> separately on the yocto and linux-yocto mailing lists.
>
> This patchset has been build- and run-tested on the following machines:
>
> qemux86
> qemux86-64
> qemuarm
> sugarbay
> crownbay
>
> The following changes since commit 644ad4bf1e30fcee4b9d5abb819046d1f2193d27:
>    Scott Rifenbark (1):
>          documentation/bsp-guide/bsp.xml: Yocto term paring
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/poky-contrib.git tzanussi/perf-scripting
>    http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/perf-scripting
>
> Tom Zanussi (9):
>    perl: keep original libperl location
>    perl: add @STAGINGDIR@ for config.sh substitions
>    perl: use @STAGINGDIR@ in config.sh
>    perf: enable Python bindings
>    perf: enable Perl binding
>    perf: add libexec/perf-core and contents
The above where all merged into OE-Core
>    perf: add perf-scripting MACHINE_FEATURE
Not Merged
>    qemumachines: make MACHINE_FEATURES append follow qemu.inc include
Merged into OE-Core
>    perf: add perf-tui MACHINE_FEATURE
>
Not Merged

Thanks
	Sau!


>   meta/conf/machine/qemux86-64.conf                |    4 +-
>   meta/conf/machine/qemux86.conf                   |    4 +-
>   meta/recipes-devtools/perl/perl-5.14.2/config.sh |    2 +-
>   meta/recipes-devtools/perl/perl_5.14.2.bb        |    4 ++-
>   meta/recipes-kernel/perf/perf_3.4.bb             |   36 ++++++++++++++++++++--
>   5 files changed, 41 insertions(+), 9 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




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

end of thread, other threads:[~2012-07-05 18:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 18:10 [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI tom.zanussi
2012-07-03 18:10 ` [PATCH 1/9] perl: keep original libperl location tom.zanussi
2012-07-03 18:10 ` [PATCH 2/9] perl: add @STAGINGDIR@ for config.sh substitions tom.zanussi
2012-07-03 18:10 ` [PATCH 3/9] perl: use @STAGINGDIR@ in config.sh tom.zanussi
2012-07-03 18:10 ` [PATCH 4/9] perf: enable Python bindings tom.zanussi
2012-07-03 18:10 ` [PATCH 5/9] perf: enable Perl binding tom.zanussi
2012-07-03 18:10 ` [PATCH 6/9] perf: add libexec/perf-core and contents tom.zanussi
2012-07-03 18:10 ` [PATCH 7/9] perf: add perf-scripting MACHINE_FEATURE tom.zanussi
2012-07-04 14:02   ` Richard Purdie
2012-07-04 19:16     ` Tom Zanussi
2012-07-05 13:42       ` Richard Purdie
2012-07-05 13:54         ` Tom Zanussi
2012-07-03 18:10 ` [PATCH 8/9] qemumachines: make MACHINE_FEATURES append follow qemu.inc include tom.zanussi
2012-07-03 18:10 ` [PATCH 9/9] perf: add perf-tui MACHINE_FEATURE tom.zanussi
2012-07-05 17:56 ` [PATCH 0/9] perf: enable Perl and Python bindings, and perf TUI Saul Wold

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.