blob: 48e8a78abbcbab67378fdc9e7c1c733af10847f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
The following are examples of running rb_objcpu.d.
The rb_objnew.d script reports the on-CPU time for new Object creation in Ruby
while the script is tracing. Here we see it running while
Code/Ruby/func_abc.rb is executed.
# rb_objcpu.d
Tracing... Hit Ctrl-C to end.
^C
Total object creation on-CPU time (ms): 0
Object creation on-CPU time distributions (us),
NoMemoryError
value ------------- Distribution ------------- count
0 | 0
1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
2 | 0
SystemStackError
value ------------- Distribution ------------- count
0 | 0
1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
2 | 0
fatal
value ------------- Distribution ------------- count
0 | 0
1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
2 | 0
ThreadGroup
value ------------- Distribution ------------- count
4 | 0
8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
16 | 0
Object
value ------------- Distribution ------------- count
0 | 0
1 |@@@@@@@@@@@@@ 1
2 |@@@@@@@@@@@@@ 1
4 | 0
8 |@@@@@@@@@@@@@ 1
16 | 0
We can see that there were several different types of Objects created
including three of type 'Object', one of which took 1 microsecond, one of
which took 2 to 3 microseconds, and the last of which took between 8 and 15
microseconds.
|