aboutsummaryrefslogtreecommitdiff
path: root/Examples/rb_calls_example.txt
blob: acc0d4d4ef7ba6227e9293f3be991cefcfb2081e (plain) (blame)
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
The following are examples of the results of running the rb_calls.d script.

This script traces activity from all Ruby programs on the system that are
running with Ruby provider support. In this example we see it running while
the Code/Ruby/func_abc.rb script is run.

# rb_calls.d
Tracing... Hit Ctrl-C to end.
^C
 FILE                     TYPE       NAME                              CALLS
 .                        obj-new    NoMemoryError                         1
 .                        obj-new    SystemStackError                      1
 .                        obj-new    ThreadGroup                           1
 .                        obj-new    fatal                                 1
 func_abc.rb              method     Object::func_a                        1
 func_abc.rb              method     Object::func_b                        1
 func_abc.rb              method     Object::func_c                        1
 .                        obj-new    Object                                3
 func_abc.rb              method     IO::write                             3
 func_abc.rb              method     Module::method_added                  3
 func_abc.rb              method     Object::print                         3
 func_abc.rb              method     Object::sleep                         3

We can see that the file func_abc.rb called each of the user-defined functions
included in the script; func_a, func_b, and func_c.  It also called the print
object and sleep amongst other things.  Interspersed in the output are calls
to new objects that are not tied to the program func_abc.rb.  They are called
from the Ruby engine for some other reason.