xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Examples/rb_objnew_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following are examples of running rb_objnew.d.
2
3The rb_objnew.d script reports the new Ruby objects created (by filename and
4class) while the script is tracing.   Here we see it running while
5Code/Ruby/func_abc.rb is executed.
6
7# rb_objnew.d
8Tracing... Hit Ctrl-C to end.
9^C
10 FILE                     CLASS                                   COUNT
11 .                        NoMemoryError                               1
12 .                        SystemStackError                            1
13 .                        ThreadGroup                                 1
14 .                        fatal                                       1
15 .                        Object                                      3
16
17Since this is a simple example, not many objects were allocated - a few
18for the ruby engine, and three of class Object. No file was associated
19with these allocations, as they may have been caused by Ruby engine startup,
20and not necessarily lines of code in the example program.
21
22