]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: performance analysis tools for Linux
authorBruce Ashfield <bruce.ashfield@windriver.com>
Thu, 5 Aug 2010 20:38:23 +0000 (16:38 -0400)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 9 Aug 2010 16:20:36 +0000 (17:20 +0100)
Performance counters for Linux are a new kernel-based subsystem
that provide a framework for all things performance analysis. It
covers hardware level (CPU/PMU, Performance Monitoring Unit) features
and software features (software counters, tracepoints) as well.

To enforce the coupling between userspace and kernel, this
commit introduces perf as a subpackage of the linux-wrs tree.

perf is built directly inside the kernel tree (and hence picks
up all appropriate patches), but is packaged as a separate
utility that can be added to the rootfs and used to analyze
the kernel.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
meta/packages/linux/linux-wrs_git.bb

index ddd387743b36408cad311e1365eb3a963d21390c..4f1808930e6d51ab7b0c8e0e6e64f5544af1253e 100644 (file)
@@ -95,6 +95,14 @@ do_wrlinux_link_vmlinux() {
        ln -sf ../../../vmlinux
 }
 
+do_compile_perf() {
+       oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix}
+}
+
+do_install_perf() {
+       oe_runmake -C ${S}/tools/perf CC="${KERNEL_CC}" LD="${KERNEL_LD}" prefix=${prefix} DESTDIR=${D} install
+}
+
 do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot"
 addtask wrlinux_configme before do_configure after do_patch
 addtask wrlinux_link_vmlinux after do_compile before do_install
@@ -104,3 +112,20 @@ inherit kernel
 
 # object files are in B, not S, so we need to override this
 do_deploy[dirs] = "${B}"
+
+# perf subpackage variables
+PROVIDES += perf
+
+PACKAGES =+ "perf"
+FILES_perf = "${bindir}/* \
+              ${libexecdir}"
+
+
+# perf tasks
+addtask compile_perf after do_compile before do_install
+addtask install_perf after do_install before do_deploy
+
+do_compile_perf[depends] =  "glibc:do_populate_sysroot"
+do_compile_perf[depends] =+ "elfutils:do_populate_sysroot"
+do_compile_perf[depends] =+ "perl:do_populate_sysroot"
+do_compile_perf[depends] =+ "python:do_populate_sysroot"