summaryrefslogtreecommitdiffstats
path: root/runtime/probes/test4/test4.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-06-18 07:06:38 +0000
committerhunt <hunt>2005-06-18 07:06:38 +0000
commit22ccaa9985211ad13e8486bf2845114f409df55d (patch)
treedc4c286990a692ef0b5991b81405bb7b10292392 /runtime/probes/test4/test4.c
parentb55bc428b7e03ce7bcf6ec1eb502f5f443fbd0b8 (diff)
downloadsystemtap-steved-22ccaa9985211ad13e8486bf2845114f409df55d.tar.gz
systemtap-steved-22ccaa9985211ad13e8486bf2845114f409df55d.tar.xz
systemtap-steved-22ccaa9985211ad13e8486bf2845114f409df55d.zip
2005-06-18 Martin Hunt <hunt@redhat.com>
* 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.
Diffstat (limited to 'runtime/probes/test4/test4.c')
-rw-r--r--runtime/probes/test4/test4.c16
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);