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]

new syscall tapset checked in, but needs work


I've checked in 4 files in stp/src/tapset

I'm working on these
syscalls.stp          (sys_[a-m]*)
x86_64/syscalls.stp

Hien, can you take these?
syscalls2.stp         (sys_[n-z]*)
i686/syscalls.stp

Here's a quick script to test with:

probe syscall.*, syscall.*.return {
        if (pid() == target()) {
                if (returnp)
                        printf("%d\n", returnval())
                else
                        printf("%s (%s) = ", name, argstr)
        }
}

> stap -c bash sys.stp
execve () = 0
brk (0x0) = 165474304
access ("/etc/ld.so.preload", F_OK|R_OK) = -2
open ("/etc/ld.so.cache", O_RDONLY) = 4
open ("/lib/libtermcap.so.2", O_RDONLY) = 4
read (4, ..., 512) = 512
open ("/lib/libdl.so.2", O_RDONLY) = 4
read (4, ..., 512) = 512
open ("/lib/libc.so.6", O_RDONLY) = 4
read (4, ..., 512) = 512
open ("/dev/tty", O_RDWR|O_NONBLOCK) = 4
brk (0x0) = 165474304
brk (0x9df0000) = 165609472
open ("/etc/mtab", O_RDONLY) = 4
read (4, ..., 4096) = 372
open ("/proc/meminfo", O_RDONLY) = 4
read (4, ..., 1024) = 670
access ("/bin/sh", X_OK) = 0
access ("/bin/sh", X_OK) = 0
access ("/bin/bash", X_OK) = 0
access ("/bin/bash", X_OK) = 0
execve () = 0
brk (0x0) = 157106176
access ("/etc/ld.so.preload", F_OK|R_OK) = -2
open ("/etc/ld.so.cache", O_RDONLY) = 4
open ("/lib/libtermcap.so.2", O_RDONLY) = 4
read (4, ..., 512) = 512
open ("/lib/libdl.so.2", O_RDONLY) = 4
read (4, ..., 512) = 512
open ("/lib/libc.so.6", O_RDONLY) = 4
[...]

The files are mostly the old syscall tapset, divided up. I am slowly
converting to the new format. I've seen quite a few typos and a bunch of
commented out code that does userspace copies along with warnings. Those
are bogus; we should not sleep while copying from userspace.

I'm using an strace-like output format for the args, although that
really isn't possible for things like sys_read() where strace shows the
results that get written in the input buffer. It is possible to write a
systemtap script to do that, but not at the tapset level.

Martin



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