]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Examples/rb_funccalls_example.txt
MFC r368207,368607:
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Examples / rb_funccalls_example.txt
1 This is a list of examples of the usage of rb_funccalls.d.
2
3 It reports method calls from all Ruby programs on the system that are
4 running with Ruby provider support.
5
6 Here we run it while the program Code/Ruby/func_abc.rb is executing.
7
8 # rb_funccalls.d
9 Tracing... Hit Ctrl-C to end.
10 ^C
11  FILE                             CLASS            METHOD              CALLS
12  func_abc.rb                      Object           func_a                  1
13  func_abc.rb                      Object           func_b                  1
14  func_abc.rb                      Object           func_c                  1
15  func_abc.rb                      IO               write                   3
16  func_abc.rb                      Module           method_added            3
17  func_abc.rb                      Object           print                   3
18  func_abc.rb                      Object           sleep                   3
19
20 We can see that during that one Ruby program, Our 3 user-defined methods,
21 func_a, func_b and func_c are called once each.  Amongst other calls we can
22 see that a method from class IO - write, was called three times; probably by
23 the print method.  If you look at the example program Code/Ruby/func_abc.rb,
24 you can see that 'print' is used three times, but IO::write is never directly
25 called.