From 22ccaa9985211ad13e8486bf2845114f409df55d Mon Sep 17 00:00:00 2001 From: hunt Date: Sat, 18 Jun 2005 07:06:38 +0000 Subject: 2005-06-18 Martin Hunt * build: Modified to use build_probe. * build_probe: New file. This does the work of building a single probe or set of probes in a directory. * Makefile.template: New file. Template used by build_probe to create Makefiles. * agg: New set of probes to test/demonstrate Counter and Stat aggregations. * all probes modified for latest changes and new build process. --- runtime/probes/test4/test4.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'runtime/probes/test4/test4.c') 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); -- cgit