diff options
author | hunt <hunt> | 2005-03-29 18:07:58 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-03-29 18:07:58 +0000 |
commit | e32551b18f4560056d2d482f5e1505b1b98fa82a (patch) | |
tree | 4e9e07a9b46a4fd5dea27732571cbb04c0ef5dee /runtime/probes | |
parent | 13b35bb112459702e7371ecc89d7deb789818a86 (diff) | |
download | systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.gz systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.xz systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.zip |
*** empty log message ***
Diffstat (limited to 'runtime/probes')
-rw-r--r-- | runtime/probes/test4/Makefile | 2 | ||||
-rwxr-xr-x | runtime/probes/test4/build | 3 | ||||
-rw-r--r-- | runtime/probes/where_func/kprobe_where_funct.c | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/runtime/probes/test4/Makefile b/runtime/probes/test4/Makefile index 8fff0dc4..7afe0c0f 100644 --- a/runtime/probes/test4/Makefile +++ b/runtime/probes/test4/Makefile @@ -4,7 +4,7 @@ # make -C path/to/kernel/src M=`pwd` modules STP_RUNTIME=path_to_systemtap_rt CFLAGS += -I $(STP_RUNTIME) -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) \ - -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) + -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -D KTA=$(KTA) obj-m := dtr.o clean: diff --git a/runtime/probes/test4/build b/runtime/probes/test4/build index 3713f08a..fb344b37 100755 --- a/runtime/probes/test4/build +++ b/runtime/probes/test4/build @@ -4,10 +4,11 @@ KVERSION=`uname -r` echo $KVERSION KALLSYMS_LOOKUP_NAME=`grep " kallsyms_lookup_name" /boot/System.map-$KVERSION |awk '{print $1}'` KALLSYMS_LOOKUP=`grep " kallsyms_lookup$" /boot/System.map-$KVERSION |awk '{print $1}'` +KTA=`grep "__kernel_text_address" /boot/System.map-$KVERSION |awk '{print $1}'` make V=1 -C /lib/modules/`uname -r`/build M=`pwd` modules \ KALLSYMS_LOOKUP_NAME=0x$KALLSYMS_LOOKUP_NAME \ - KALLSYMS_LOOKUP=0x$KALLSYMS_LOOKUP \ + KALLSYMS_LOOKUP=0x$KALLSYMS_LOOKUP KTA=0x$KTA\ STP_RUNTIME=`pwd`/../.. diff --git a/runtime/probes/where_func/kprobe_where_funct.c b/runtime/probes/where_func/kprobe_where_funct.c index f90f71bc..e527fa03 100644 --- a/runtime/probes/where_func/kprobe_where_funct.c +++ b/runtime/probes/where_func/kprobe_where_funct.c @@ -11,6 +11,8 @@ #include "io.c" #include "map.c" #include "probes.c" +#include "current.c" +#include "sym.c" MODULE_DESCRIPTION("SystemTap probe: where_func"); MODULE_AUTHOR("Will Cohen and Martin Hunt"); @@ -26,7 +28,7 @@ MAP funct_locations; static int inst_funct(struct kprobe *p, struct pt_regs *regs) { - long ret_addr = cur_ret_addr(regs); + long ret_addr = _stp_ret_addr(regs); ++count_funct; _stp_map_key_long(funct_locations, ret_addr); _stp_map_add_int64(funct_locations, 1); @@ -67,9 +69,9 @@ void cleanup_module(void) /* now walk the hash table and print out all the information */ foreach(funct_locations, ptr) { - _stp_print_buf_init(); - _stp_print_symbol("%s\n", key1int(ptr)); - dlog("%lld\t0x%p\t(%s)\n", ptr->val, key1int(ptr), _stp_pbuf); + _stp_scbuf_clear(); + _stp_symbol_sprint (key1int(ptr)); + dlog("%lld\t0x%p\t(%s)\n", ptr->val, key1int(ptr), _stp_scbuf); } _stp_map_del(funct_locations); |