aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/dtracetoolkit/Examples/rb_funccalls_example.txt
blob: 27c9c0c071e4ff3a66f62c8ced93a260fe98eabb (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
This is a list of examples of the usage of rb_funccalls.d.

It reports method calls from all Ruby programs on the system that are
running with Ruby provider support.

Here we run it while the program Code/Ruby/func_abc.rb is executing.

# rb_funccalls.d
Tracing... Hit Ctrl-C to end.
^C
 FILE                             CLASS            METHOD              CALLS
 func_abc.rb                      Object           func_a                  1
 func_abc.rb                      Object           func_b                  1
 func_abc.rb                      Object           func_c                  1
 func_abc.rb                      IO               write                   3
 func_abc.rb                      Module           method_added            3
 func_abc.rb                      Object           print                   3
 func_abc.rb                      Object           sleep                   3

We can see that during that one Ruby program, Our 3 user-defined methods,
func_a, func_b and func_c are called once each.  Amongst other calls we can
see that a method from class IO - write, was called three times; probably by
the print method.  If you look at the example program Code/Ruby/func_abc.rb,
you can see that 'print' is used three times, but IO::write is never directly
called.