This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Userspace syscall.return probes do not support $arg variables


Hello,

I am trying to use stap to monitor what a java application sends and
receives through sockets. The monitoring should be done in userspace
for some reasons. Here is the stap script that I figured out:

probe process("java").syscall {
    if ($syscall != 45) {
    next;
    }

    printf("%d %s %d %d %d %d %d %d\n", $syscall, probefunc(), $arg1,
$arg2, $arg3, $arg4, $arg5, $arg6);
}

It works fine for send, but for recv I need to hook "syscall.return"
and that probe does not seem to support $argN variables. Therefore, I
am not able to access the contents of the read buffer easily.

The stap compilation gives:
sudo stap stap.userspace --ldd
semantic error: only "process(PATH_OR_PID).syscall" support $argN or
$$parms.: identifier '$arg1' at stap.userspace:10:64

Perhaps, this may be a bug.

Best regards
Tomas Martinec


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]