summaryrefslogtreecommitdiffstats
path: root/runtime/probes/test4
diff options
context:
space:
mode:
authorhunt <hunt>2005-03-22 08:57:11 +0000
committerhunt <hunt>2005-03-22 08:57:11 +0000
commitb9c556e44326b40b2c927a0a5b5626332a8c9587 (patch)
treed0497c9323dedcb292d353d79fef769fa6fef210 /runtime/probes/test4
parent4a4753cb066f60eb09906a6021997ec280d3fdc5 (diff)
downloadsystemtap-steved-b9c556e44326b40b2c927a0a5b5626332a8c9587.tar.gz
systemtap-steved-b9c556e44326b40b2c927a0a5b5626332a8c9587.tar.xz
systemtap-steved-b9c556e44326b40b2c927a0a5b5626332a8c9587.zip
*** empty log message ***
Diffstat (limited to 'runtime/probes/test4')
-rw-r--r--runtime/probes/test4/README10
-rw-r--r--runtime/probes/test4/dtr.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/runtime/probes/test4/README b/runtime/probes/test4/README
index 20a1ad23..75d4be10 100644
--- a/runtime/probes/test4/README
+++ b/runtime/probes/test4/README
@@ -1,7 +1,9 @@
-Sample probe.
-
-This is a translation of on an old dtr probe:
+/** @dir test4
+This example probe tracks file opens, reads and writes.
+It demonstrates maps, stats, and iterators.
+This is a translation of on an old dtr probe. Original source is
+\verbatim
global {
long @opens[string];
sum @reads[string], @writes[string];
@@ -18,3 +20,5 @@ probe sys_read:entry {
probe sys_write:entry {
@writes[current->comm] << count;
}
+\endverbatim
+*/
diff --git a/runtime/probes/test4/dtr.c b/runtime/probes/test4/dtr.c
index 1c8d8f05..8c6257e2 100644
--- a/runtime/probes/test4/dtr.c
+++ b/runtime/probes/test4/dtr.c
@@ -15,7 +15,7 @@ MAP opens, reads, writes;
asmlinkage long inst_sys_open (const char __user * filename, int flags, int mode)
{
_stp_map_key_str (opens, current->comm);
- _stp_map_set_int64 (opens, _stp_map_get_int64(opens) + 1);
+ _stp_map_add_int64 (opens, 1);
jprobe_return();
return 0;
}