On Fri, Apr 01, 2011 at 05:05:17PM +0800, Zhiwei Ying wrote: > I built a systemtap1.4 on ubuntu 10.4 32 bits. And also cross-compile > staprun to a develop board with kernel 2.6.35 x86. Userland instrumentation requires the uprobe kernel patch. Uprobe is not in the mainline kernel nor in Ubuntu so it seems normal you cannot probe userland programs with these kernels. I believe the uprobes patch is being maintained in this git repository: http://git.kernel.org/?p=linux/kernel/git/srikar/linux-uprobes.git;a=tree > On the host pc side, > > stap -r /target-board/kernel xxx.stp -p 4 -m traceauto.ko > > then copy the traceauto.ko to the board, > staprun -u -v -m traceauto.ko -c ./hello > > > xxx.stp > probe process("/ddtv/tracedrv/test/dhg/hello/hello").function("*").call > { > printf("USER, %s %s %s\n", thread_indent(1), pp(), $$parms) > } > probe process("/ddtv/tracedrv/test/dhg/hello/hello").function("*").return > { > printf("USER %s %s %s\n", thread_indent(-1), probefunc(), $$return) > } > probe end > { > printf ("end of tracing\n") > } > > It only able to print "end of tracing", nothing in the hello is > printed. Attached is the binary of traceauto.ko. > > BTW, it can trace kernel level code. Just not lucky on user-level code. If it's still not working with uprobe, the output generated at module-compilation time with stap -vvvvv would help to understand what is going on. > Any help is great appreciated. > > Thanks, > Zhiwei