Question

The following systemtap script fails to compile:

probe process("myexe").function("myFun").return { print("hi mom\n") }

It says:

semantic error: while resolving probe point: identifier 'process' at proxy.stp:6:7 source: probe process("/home/martin/experiments/systemtap/a.out").function("doSomething").return ^

semantic error: process return probes not available [man error::inode-uprobes] Pass 2: analysis failed. [man error::pass2] Tip: /usr/share/doc/systemtap/README.Debian should help you get started.

I want to trap when the function exits, not the process. If I remove the .return it compiles & runs fine. How do I trap the function exit?

I'm on Ubuntu 13.04, Linux 3.8.0-29-generic, system tap 2.1/0.153.

Was it helpful?

Solution

The man error::inode-uprobe man page explains. Linux kernel versions before 3.10 lack the return-probes capability needed to make this work. (Old RHEL kernels do have equivalent functions.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top