Bug 97

Summary: create target images to contain perf/ftrace
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jessica <jessica.zhang>
Component: meta-yoctoAssignee: Bruce Ashfield <bruce.ashfield>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: dexuan.cui, kevin.tian, lianhao.lu, 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: Program Management Documentation change: ---
Attachments:
Description Flags
trace-cmd added to RRECOMMENDS none

Description Jessica 2010-06-15 22:58:20 UTC
create a tools target images (both device and qemu) to contain the following tools: gdb-server, oprofile, oprofile-server, powertop, latencytop, pref and ftrace/lttng to better support cross development work and ease of use. Also, make it configuration to add remote agent to the target image
Comment 1 Dexuan Cui 2010-07-28 18:45:58 UTC
(In reply to comment #0)
> create a tools target images (both device and qemu) to contain the following
> tools: gdb-server, oprofile, oprofile-server, powertop, latencytop, pref and
> ftrace/lttng to better support cross development work and ease of use. Also,
> make it configuration to add remote agent to the target image
I have added gdb-server, oprofile, oprofile-server (in the package oprofileui), powertop, latencytop, lttng and tcf-agent into the target image.

Since Bruce will add pref and ftrace, let me re-assign the bug to him. :-)
Comment 2 Bruce Ashfield 2010-08-05 14:48:53 UTC
As agreed during the F2F, perf will be done first. Followed by ftrace-cmd.
perf is a sprint 1 deliverable, and is nearly complete. We are waiting on a 
resource for ftrace-cmd.
Comment 3 Lianhao Lu 2010-08-26 01:37:51 UTC
In poky master commit 9a8b644, the target poky-image-sdk with MACHINE set to qemux86 doesn't contains the perf application.
Comment 4 Bruce Ashfield 2010-08-26 05:55:34 UTC
My part of the bug is complete (perf/ftrace), Richard was
going to add perf into a recommends or put it in another
package list.

Has anyone checked with him ?
Comment 5 Lianhao Lu 2010-08-26 05:59:13 UTC
Yes. I've seen the perf application was built in the tmp/work directory and also the perf was added into the task-poky-tools.bb as a recommend. But in the final poky-image-sdk, there is no perf. 

Not sure about the package.
Comment 6 Dexuan Cui 2010-09-02 21:41:54 UTC
(In reply to comment #5)
> Yes. I've seen the perf application was built in the tmp/work directory and
> also the perf was added into the task-poky-tools.bb as a recommend. But in the
> final poky-image-sdk, there is no perf. 
> Not sure about the package.

ftrace is not in any RECOMMENDD or RDEPENDS yet.
I do see perf in meta/packages/tasks/task-poky-tools.bb:
RRECOMMENDS_task-poky-tools-profile = "\
    perf"
but I can't find it in qemu target image. Looks this is a bug?? Or we need to update some other place to build perf into the target?

Richard and Saul, can you please comment on this?
Comment 7 Lianhao Lu 2010-09-05 19:35:26 UTC
Kevin has pinned the bug to the multiple "RRECOMMENDS_task-poky-tools-profile = XXX" in the file "meta/packages/tasks/task-poky-tools.bb". The latter "RRECOMMENDS_task-poky-tools-profile = kernel-module-oprofile" overrides the original "RRECOMMENDS_task-poky-tools-profile = perf".
Comment 8 Kevin Tian 2010-09-05 19:46:37 UTC
I've sent the fix for this bug.
Comment 9 Dexuan Cui 2010-09-06 20:23:55 UTC
(In reply to comment #7)
> Kevin has pinned the bug to the multiple "RRECOMMENDS_task-poky-tools-profile =
> XXX" in the file "meta/packages/tasks/task-poky-tools.bb". The latter
> "RRECOMMENDS_task-poky-tools-profile = kernel-module-oprofile" overrides the
> original "RRECOMMENDS_task-poky-tools-profile = perf".

Yes, that's it. Sorry, I didn't concentrate on the bug -- I should have been able to fix it... :-)  Thanks for Kevin's fix!

> (In reply to comment #5)
> > Yes. I've seen the perf application was built in the tmp/work directory and
> > also the perf was added into the task-poky-tools.bb as a recommend. But in the
> > final poky-image-sdk, there is no perf. 
> > Not sure about the package.
> ftrace is not in any RECOMMENDD or RDEPENDS yet.
However, looks ftrace (the PN is trace-cmd) has not added into any RECOMMENDD or RDEPENDS yet? Lianhao, can you use ftrace now? I suppost not. I think we need to send more more fix for it.
Comment 10 Lianhao Lu 2010-09-06 20:31:25 UTC
no, the image created(commit e359e25) doesn't have the ftrace user interface "trace-cmd".
Comment 11 Bruce Ashfield 2010-09-06 20:57:35 UTC
Created attachment 39 [details]
trace-cmd added to RRECOMMENDS
Comment 12 Bruce Ashfield 2010-09-06 20:58:40 UTC
The simple/obvious fix is this:

diff --git a/meta/packages/tasks/task-poky-tools.bb b/meta/packages/tasks/task-poky-tools.bb
index 581af84..e5d4200 100644
--- a/meta/packages/tasks/task-poky-tools.bb
+++ b/meta/packages/tasks/task-poky-tools.bb
@@ -44,6 +44,7 @@ RDEPENDS_task-poky-tools-profile = "\
 
 RRECOMMENDS_task-poky-tools-profile = "\
     perf \
+    trace-cmd \
     kernel-module-oprofile"
 
 #    exmap-console
-- 

Which I attached as well. My builder is offline, so I didn't send a pull for
this, since I'm hesitant to send anything as a pull request without actually
building it.
Comment 14 Jessica 2010-10-21 00:51:44 UTC
The tools are available and we've been interacting with them through Eclipse plugin