Bug 311

Summary: fixes for perf
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Tom Zanussi <tom.zanussi>
Component: meta-yoctoAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: bruce.ashfield, kevin.tian, poky.bs.watcher, poky.watcher, richard.purdie, sgw
Version: 0.9   
Target Milestone: 0.9 M4   
Hardware: All   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Tom Zanussi 2010-09-13 09:19:09 UTC
perf is included in poky, but there are few things needed to make it work/work better - this bug is meant to track the problems until everything is fixed.

The first problem an unresolved library reference:

perf: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

The fix, which I'll check in once I'm set up for it, is:

diff --git a/meta/recipes-kernel/linux/linux-wrs_git.bb b/meta/recipes-kernel/li
index 34451dd..cf910e0 100644
--- a/meta/recipes-kernel/linux/linux-wrs_git.bb
+++ b/meta/recipes-kernel/linux/linux-wrs_git.bb
@@ -167,4 +167,4 @@ addtask install_perf after do_install before do_package do_d
 
 do_compile_perf[depends] =  "virtual/libc:do_populate_sysroot"
 do_compile_perf[depends] =+ "elfutils:do_populate_sysroot"
-RDEPENDS_perf += "python perl"
+RDEPENDS_perf += "python perl elfutils"

Thanks to Bruce Ashfield for point out the fix.

The next problem is that 'perf trace -l' shows no scripts, which should be fixed by including all the files copied by 'perf install' e.g. using prefix=/usr should put them in /usr/libexec (note that there may be a perf/tools patch needed to properly handle the new prefix).  Also probably need to install and compile against libperl-dev and python-dev in order to get support for the embedded interpreters.
Comment 1 Bruce Ashfield 2010-09-13 12:23:53 UTC
The missing embedded interpreters part was on purpose. 
For an embedded target, those aren't always available and
keeping foot print in mind, they are skipped. If added, they need
to be optional.