[patch] .statement("function@file.c+5")
Stan Cox
scox@redhat.com
Fri Jun 6 14:21:00 GMT 2008
This supports a relative line offset for .statement. So for example:
.statement("function@file.c:135") would be line 135 of function in
file.c
.statement("function@file.c+3") would be function entry line + 3 in
file.c
So for 2.6.24.5-85.fc8:
kernel.statement("bio_init@fs/bio.c:135")
kernel.statement("bio_init@fs/bio.c+3")
yield the same thing.
A very simple example:
probe kernel.statement("bio_init@fs/bio.c+3") {
printf ("%s -> %s\n", thread_indent(1), probefunc())
print_stack(backtrace())
}
probe timer.ms(2000) {
exit ()
}
yields:
5358 hald-addon-stor(2437): -> bio_init
0xffffffff810c24eb : bio_init+0x19/0x21
0xffffffff810c2521 : bio_alloc_bioset+0x2e/0xd9
0xffffffff810c2619 : bio_alloc+0x10/0x20
0xffffffff810c2666 : bio_map_kern+0x3d/0x103
0xffffffff81116e2b : blk_rq_map_kern+0x2f/0x84
0xffffffff88059413 : scsi_execute+0x57/0xe7 [scsi_mod]
0x00000ffffffff880
(Currently working on test cases.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stap-relative.patch
Type: text/x-patch
Size: 2767 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20080606/f00758bd/attachment.bin>
More information about the Systemtap
mailing list