Right now, there are instructions on the wiki on how to configure and use Systemtap with Yocto. While straightforward, they are tedious and unlikely to be useful to most people pressed for time. We need to make it easier to use - in addition to documentation/HOWTO tasks listed elsewhere on this page, we need to make it usable 'out of the box' (i.e. outside of ADT) e.g. all paths and configuration handled via script or something similar
The current set of instructions for using systemtap are here: https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap Using an example to illustrate the problem... I wrote a nice simple script to run a SystemTap script on a target: Suppose we want to see details system-wide on each file open: name: dropbear, pid: 1128, ppid: process.syscall name: stapio, pid: 1130, ppid: process.syscall The trace_open.stp script prints a line for each file open: probe syscall.open { printf ("%s(%d) open (%s)\n", execname(), pid(), argstr) } This runs the trace_open.stp script on the given remote system: $ crosstap trace_open.stp root@192.168.7.2 The end result is (I think) as simple as it can be. But it takes some setup – the user needs to set four things: - Location of SystemTap on the host (to compile target modules) - The target arch and toolchain location to pass to SystemTap - The location of the target's kernel source (from the build) These are variables in the crosstap script, but the user shouldn't have to set them – they should come from the build. The fixed-up crosstap script itself should be in the /scripts dir. I also need to add support for passing params into crosstap and on to the systemtap script. The above is the minimum necessary. But we also want to make it easy to use from Eclipse/ADT. The crosstap script should make it easy to use on the cmdline, but we would really like it to be as seamlessly usable from Eclipse as possible too. Functionality-wise, the user should be able to simply create a SystemTap script in a window and run it. Also need to be able to specify script params. The output should be available just like the output from the other supported tracing and debugging tools. Implementation-wise, we might be able to just use the crosstap script underneath, but tie into Eclipse protocols as much as possible. Of course, since we're in an IDE it would be nice if the IDE could understand SystemTap and provide Systemtap-specific completion and syntax highlighting, but that's not what this task is about. There is a plugin that supposedly does this. I think Jessica looked into it but maybe it wasn't ready for prime time...
Implemented in poky/master: 17b97774c2069015f6eec6736cace3271ab6b82a
Verified on master branch commit ID: 2c3e8280e67721d42d4be48a8e2c1e9ce9bb89fd with a core-image-sato-sdk image. Just start the qemux86 image and run crosstap script. No other setup must be conducted.