Debian Codegraph @

testsuite/systemtap.examples/network/tcp_init_cwnd.stp

raw
1 #! /usr/bin/stap -g
2
3 # Based upon http://blog.yufeng.info/archives/1173, bring the goodness
4 # of linux commit 442b9635c5 to the pre-2.6.39 masses.
5
6 probe kernel.function("tcp_init_cwnd").return
7 {
8 r = $return
9 if (r > 0 && r < 10)
10 $return = 10;
11 counts[r,$return] <<< 1
12 }
13
14 global counts # will be automatically summarized at shutdown
15