summaryrefslogtreecommitdiffstats
path: root/runtime/tests/test4_probe/README
blob: a503c28e22dc88cda44c43b324e96c30b19513b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Sample probe.

To build, edit the path in buildit and the addresses in struct dtr_probes
in dtr.c Then "source buildit"

This is a translation of on an old dtr probe:

global {
  long @opens[string];
  sum @reads[string], @writes[string];
}

probe sys_open:entry {
  @opens[current->comm]++;
}

probe sys_read:entry {
  @reads[current->comm] << count;
}

probe sys_write:entry {
  @writes[current->comm] << count;
}