Saturday 17 December 2011

llquantify

Spent the week updating the dtrace source code to align with the
latest illumos sources. One of the new features in the latest dtrace
is the llquantify() function.

Rather than me trying to do justice to this function, its better to
let Bryan Cantrill give you the low-down, as in here:

http://dtrace.org/blogs/bmc/2011/02/08/llquantize/

Theres some kernel fixes/enhancements in here. (A fix for
ungarbage collected ecb's when a module is unloaded, but thats
currently disabled until I put in a fix for the timer callback;
module unloading is relatively rare, and untested on Linux/dtrace).

Heres the output of a run (inside a VirtualBox VM):


$ dtrace -n "tick-1ms{@ = llquantize(i++, 10, 0, 6, 20);}
tick-1ms/i==1500/{exit(0);}"
dtrace: description 'tick-1ms' matched 2 probes
CPU ID FUNCTION:NAME
1 279854 :tick-1ms


value ------------- Distribution ------------- count
< 1 | 1
1 | 1
2 | 1
3 | 1
4 | 1
5 | 1
6 | 1
7 | 1
8 | 1
9 | 1
10 | 5
15 | 5
20 | 5
25 | 5
30 | 5
35 | 5
40 | 5
45 | 5
50 | 5
55 | 5
60 | 5
65 | 5
70 | 5
75 | 5
80 | 5
85 | 5
90 | 5
95 | 5
100 |@ 50
150 |@ 50
200 |@ 50
250 |@ 50
300 |@ 50
350 |@ 50
400 |@ 50
450 |@ 50
500 |@ 50
550 |@ 50
600 |@ 50
650 |@ 50
700 |@ 50
750 |@ 50
800 |@ 50
850 |@ 50
900 |@ 50
950 |@ 50
1000 |@@@@@@@@@@@@@ 500
1500 | 0




Post created by CRiSP v10.0.20a-b6134


No comments:

Post a Comment