diff options
Diffstat (limited to 'runtime/probes/test4/test4.c')
-rw-r--r-- | runtime/probes/test4/test4.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/runtime/probes/test4/test4.c b/runtime/probes/test4/test4.c index f89cc6b9..9867d8ef 100644 --- a/runtime/probes/test4/test4.c +++ b/runtime/probes/test4/test4.c @@ -2,15 +2,12 @@ #define STP_NUM_STRINGS 1 #include "runtime.h" +#define NEED_INT64_VALS +#define NEED_STAT_VALS + #define KEY1_TYPE STRING #include "map-keys.c" -#define VALUE_TYPE INT64 -#include "map-values.c" - -#define VALUE_TYPE STAT -#include "map-values.c" - #include "map.c" #include "probes.c" @@ -31,7 +28,7 @@ asmlinkage long inst_sys_open (const char __user * filename, int flags, int mode asmlinkage ssize_t inst_sys_read (unsigned int fd, char __user * buf, size_t count) { _stp_map_key_str (reads, current->comm); - _stp_map_add_int64_stat (reads, count); + _stp_map_add_int64 (reads, count); jprobe_return(); return 0; } @@ -39,7 +36,7 @@ asmlinkage ssize_t inst_sys_read (unsigned int fd, char __user * buf, size_t cou asmlinkage ssize_t inst_sys_write (unsigned int fd, const char __user * buf, size_t count) { _stp_map_key_str (writes, current->comm); - _stp_map_add_int64_stat (writes, count); + _stp_map_add_int64 (writes, count); jprobe_return(); return 0; } @@ -78,7 +75,8 @@ int init_module(void) printk("init: Couldn't open transport\n"); return -1; } - + + /* FIXME. Check return values */ opens = _stp_map_new_str (1000, INT64); reads = _stp_map_new_str (1000, HSTAT_LOG, 8); writes = _stp_map_new_str (1000, HSTAT_LOG, 8); |