All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] perf-scripting/perf-tui features, v3
@ 2012-07-09 17:07 tom.zanussi
  2012-07-09 17:07 ` [PATCH 1/3] perf: add perf.inc tom.zanussi
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tom.zanussi @ 2012-07-09 17:07 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, sgw

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 are now turned on by default via a new variable,
PERF_FEATURES_ENABLE, which can be overridden if the default set of
perf features aren't desired (perf-scripting and perf-tui).

Because perf isn't normally enabled except in sdk builds, which
contains most of the additional packages that these features drag
in anyway e.g. Python and Perl, it shouldn't be too bothersome
to unconidtionally turn the perf features on if perf itself is
enabled.  Future work will probably allow these features to be
disabled individually using PACKAGECONFIG for example.

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

This patchset depends on the associated kernel changes posted
along with the original patchset:

http://www.mail-archive.com/yocto@yoctoproject.org/msg07279.html
http://www.mail-archive.com/yocto@yoctoproject.org/msg07286.html

Bruce Ashfield submitted a SRCREV update for the 3.4 kernel today
that you'll also need to build this.

I just started testing this, it works so far, but thought
I'd put it out there now in case there were comments before
putting too much effort into that, and possibly giving other
people a chance to try it out.

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

qemuarm

The following changes since commit 5051e9837fa698e03d0a7a8a918ee7aa98409ce1:
  Robert P. J. Day (1):
        bitbake: usermanual: Fix missing markup

are available in the git repository at:

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

Tom Zanussi (3):
  perf: add perf.inc
  perf: add perf-scripting feature
  perf: add perf-tui feature

 meta/recipes-kernel/perf/perf.inc    |   22 ++++++++++++++++++++++
 meta/recipes-kernel/perf/perf_3.4.bb |   18 +++++++++++++++---
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-kernel/perf/perf.inc




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

* [PATCH 1/3] perf: add perf.inc
  2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
@ 2012-07-09 17:07 ` tom.zanussi
  2012-07-09 17:07 ` [PATCH 2/3] perf: add perf-scripting feature tom.zanussi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-07-09 17:07 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, sgw

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

Add a perf.inc to contain utility functions and definitions and to
avoid cluttering up the main recipe.

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

diff --git a/meta/recipes-kernel/perf/perf.inc b/meta/recipes-kernel/perf/perf.inc
new file mode 100644
index 0000000..d112751
--- /dev/null
+++ b/meta/recipes-kernel/perf/perf.inc
@@ -0,0 +1,22 @@
+PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
+
+def perf_feature_enabled(feature, trueval, falseval, d):
+    """
+    Check which perf features are enabled.
+
+    The PERF_FEATURES_ENABLE variable lists the perf features to
+    enable.  Override it if you want something different from what's
+    listed above, which is the default.  If empty, the build won't
+    enable any features (which may be exactly what you want, just a
+    barebones perf without any extra baggage, what you get if you
+    specify an empty feature list).
+
+    Available perf features:
+      perf-scripting: enable support for Perl and Python bindings
+      perf-tui: enable support for the perf TUI (via libnewt)
+
+    """
+    enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or ""
+    if feature in enabled_features:
+		return trueval
+    return falseval
diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index 381332e..d494243 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
 PR = "r1"
 
+require perf.inc
+
 BUILDPERF_libc-uclibc = "no"
 
 DEPENDS = "virtual/kernel \
-- 
1.7.0.4




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

* [PATCH 2/3] perf: add perf-scripting feature
  2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
  2012-07-09 17:07 ` [PATCH 1/3] perf: add perf.inc tom.zanussi
@ 2012-07-09 17:07 ` tom.zanussi
  2012-07-09 17:07 ` [PATCH 3/3] perf: add perf-tui feature tom.zanussi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-07-09 17:07 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, sgw

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

Add a new feature named 'perf-scripting'.  Adding this into the
PERF_FEATURES variable in perf.inc will enable perf scripting on a
target, which will turn on all the language bindings currently
available 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 |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index d494243..e96552c 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 = "r1"
+PR = "r2"
 
 require perf.inc
 
@@ -21,7 +21,8 @@ DEPENDS = "virtual/kernel \
            ${MLPREFIX}binutils \
           "
 
-RDEPENDS_${PN} += "elfutils perl perl-modules python"
+SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
+RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}"
 
 PROVIDES = "virtual/perf"
 
@@ -45,6 +46,8 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
 S = "${STAGING_KERNEL_DIR}"
 B = "${WORKDIR}/${BPN}-${PV}"
 
+SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
+
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
 		O=${B} \
@@ -53,7 +56,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() {
@@ -62,6 +65,9 @@ do_compile() {
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
+	if [ "${@perf_feature_enabled('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] 6+ messages in thread

* [PATCH 3/3] perf: add perf-tui feature
  2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
  2012-07-09 17:07 ` [PATCH 1/3] perf: add perf.inc tom.zanussi
  2012-07-09 17:07 ` [PATCH 2/3] perf: add perf-scripting feature tom.zanussi
@ 2012-07-09 17:07 ` tom.zanussi
  2012-07-10 19:26 ` [PATCH 0/3] perf-scripting/perf-tui features, v3 Richard Purdie
  2012-07-10 19:41 ` Saul Wold
  4 siblings, 0 replies; 6+ messages in thread
From: tom.zanussi @ 2012-07-09 17:07 UTC (permalink / raw)
  To: openembedded-core, richard.purdie, sgw

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

Add a new feature named 'perf-tui'.  Adding this into the
PERF_FEATURES variable in perf.inc will enable the perf TUI (Text-base
UI) user interface on a 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 |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb
index e96552c..ccb7425 100644
--- a/meta/recipes-kernel/perf/perf_3.4.bb
+++ b/meta/recipes-kernel/perf/perf_3.4.bb
@@ -9,16 +9,19 @@ as well."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
-PR = "r2"
+PR = "r3"
 
 require perf.inc
 
 BUILDPERF_libc-uclibc = "no"
 
+TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt', '',d)}"
+
 DEPENDS = "virtual/kernel \
            virtual/${MLPREFIX}libc \
            ${MLPREFIX}elfutils \
            ${MLPREFIX}binutils \
+           ${TUI_DEPENDS} \
           "
 
 SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}"
@@ -47,6 +50,7 @@ S = "${STAGING_KERNEL_DIR}"
 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)}"
 
 EXTRA_OEMAKE = \
 		'-C ${S}/tools/perf \
@@ -56,7 +60,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] 6+ messages in thread

* Re: [PATCH 0/3] perf-scripting/perf-tui features, v3
  2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
                   ` (2 preceding siblings ...)
  2012-07-09 17:07 ` [PATCH 3/3] perf: add perf-tui feature tom.zanussi
@ 2012-07-10 19:26 ` Richard Purdie
  2012-07-10 19:41 ` Saul Wold
  4 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2012-07-10 19:26 UTC (permalink / raw)
  To: tom.zanussi; +Cc: openembedded-core

On Mon, 2012-07-09 at 12:07 -0500, 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 are now turned on by default via a new variable,
> PERF_FEATURES_ENABLE, which can be overridden if the default set of
> perf features aren't desired (perf-scripting and perf-tui).
> 
> Because perf isn't normally enabled except in sdk builds, which
> contains most of the additional packages that these features drag
> in anyway e.g. Python and Perl, it shouldn't be too bothersome
> to unconidtionally turn the perf features on if perf itself is
> enabled.  Future work will probably allow these features to be
> disabled individually using PACKAGECONFIG for example.
> 
> These changes need corresponding changes made to linux-yocto and posted
> separately on the yocto and linux-yocto mailing lists.
> 
> This patchset depends on the associated kernel changes posted
> along with the original patchset:
> 
> http://www.mail-archive.com/yocto@yoctoproject.org/msg07279.html
> http://www.mail-archive.com/yocto@yoctoproject.org/msg07286.html
> 
> Bruce Ashfield submitted a SRCREV update for the 3.4 kernel today
> that you'll also need to build this.
> 
> I just started testing this, it works so far, but thought
> I'd put it out there now in case there were comments before
> putting too much effort into that, and possibly giving other
> people a chance to try it out.
> 
> This patchset has been build-tested on the following machines:
> 
> qemuarm
> 
> The following changes since commit 5051e9837fa698e03d0a7a8a918ee7aa98409ce1:
>   Robert P. J. Day (1):
>         bitbake: usermanual: Fix missing markup
> 
> are available in the git repository at:
> 
>   git://git.yoctoproject.org/poky-contrib.git tzanussi/perf-scripting-v3
>   http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/perf-scripting-v3
> 
> Tom Zanussi (3):
>   perf: add perf.inc
>   perf: add perf-scripting feature
>   perf: add perf-tui feature

Merged to master, thanks.

Richard




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

* Re: [PATCH 0/3] perf-scripting/perf-tui features, v3
  2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
                   ` (3 preceding siblings ...)
  2012-07-10 19:26 ` [PATCH 0/3] perf-scripting/perf-tui features, v3 Richard Purdie
@ 2012-07-10 19:41 ` Saul Wold
  4 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2012-07-10 19:41 UTC (permalink / raw)
  To: tom.zanussi; +Cc: openembedded-core

On 07/09/2012 10:07 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 are now turned on by default via a new variable,
> PERF_FEATURES_ENABLE, which can be overridden if the default set of
> perf features aren't desired (perf-scripting and perf-tui).
>
> Because perf isn't normally enabled except in sdk builds, which
> contains most of the additional packages that these features drag
> in anyway e.g. Python and Perl, it shouldn't be too bothersome
> to unconidtionally turn the perf features on if perf itself is
> enabled.  Future work will probably allow these features to be
> disabled individually using PACKAGECONFIG for example.
>
> These changes need corresponding changes made to linux-yocto and posted
> separately on the yocto and linux-yocto mailing lists.
>
> This patchset depends on the associated kernel changes posted
> along with the original patchset:
>
> http://www.mail-archive.com/yocto@yoctoproject.org/msg07279.html
> http://www.mail-archive.com/yocto@yoctoproject.org/msg07286.html
>
> Bruce Ashfield submitted a SRCREV update for the 3.4 kernel today
> that you'll also need to build this.
>
> I just started testing this, it works so far, but thought
> I'd put it out there now in case there were comments before
> putting too much effort into that, and possibly giving other
> people a chance to try it out.
>
> This patchset has been build-tested on the following machines:
>
> qemuarm
>
> The following changes since commit 5051e9837fa698e03d0a7a8a918ee7aa98409ce1:
>    Robert P. J. Day (1):
>          bitbake: usermanual: Fix missing markup
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/poky-contrib.git tzanussi/perf-scripting-v3
>    http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/perf-scripting-v3
>
> Tom Zanussi (3):
>    perf: add perf.inc
>    perf: add perf-scripting feature
>    perf: add perf-tui feature
>
>   meta/recipes-kernel/perf/perf.inc    |   22 ++++++++++++++++++++++
>   meta/recipes-kernel/perf/perf_3.4.bb |   18 +++++++++++++++---
>   2 files changed, 37 insertions(+), 3 deletions(-)
>   create mode 100644 meta/recipes-kernel/perf/perf.inc
>
>

Merged into OE-Core



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

end of thread, other threads:[~2012-07-10 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 17:07 [PATCH 0/3] perf-scripting/perf-tui features, v3 tom.zanussi
2012-07-09 17:07 ` [PATCH 1/3] perf: add perf.inc tom.zanussi
2012-07-09 17:07 ` [PATCH 2/3] perf: add perf-scripting feature tom.zanussi
2012-07-09 17:07 ` [PATCH 3/3] perf: add perf-tui feature tom.zanussi
2012-07-10 19:26 ` [PATCH 0/3] perf-scripting/perf-tui features, v3 Richard Purdie
2012-07-10 19:41 ` 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.