Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.apps/stap-tcl.stp

raw
1 global counts
2
3 probe process(@1).library(@2).mark("*") {
4 counts[$$name]<<<1 # PR10878; check also $$parms length
5 }
6
7 function judge(name, minvalue) {
8 value = @count(counts[name])
9 printf("%s %s Got: %d Expected Minimum: %d\n", ((value>=minvalue)?"OK":"KO"), name, value, minvalue)
10 }
11
12 probe end,error {
13 /* foreach (name in counts-) {
14 printf("== %s %d\n", name, @count(counts[name]))
15 } */
16 judge("proc__entry", 9000)
17 judge("proc__return", 9000)
18 judge("proc__result", 9000)
19 judge("proc__args", 9000)
20 judge("proc__info", 9000)
21 judge("cmd__entry", 37000)
22 judge("cmd__return", 37000)
23 judge("cmd__result", 37000)
24 judge("cmd__args", 37000)
25 judge("cmd__info", 37000)
26 judge("inst__start", 542000)
27 judge("inst__done", 542000)
28 judge("obj__create", 723000)
29 judge("obj__free", 704000)
30 }