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