xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/rb_objnew_example.txt (revision d909946ca08dceb44d7d0f22ec9488679695d976)
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