xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Ruby/Readme (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1*c29d5175SchristosRuby - DTracing Ruby
2*c29d5175Schristos
3*c29d5175Schristos   These scripts trace activity of the Ruby programming language, and
4*c29d5175Schristos   require the DTrace Ruby provider written by Joyent.
5*c29d5175Schristos
6*c29d5175Schristos   Currently, the DTrace Ruby provider is a seperate download either in
7*c29d5175Schristos   patch, source or binary form. Start with the "Ruby DTrace" link on
8*c29d5175Schristos   http://dtrace.joyent.com/, and after getting a version running, the
9*c29d5175Schristos   scripts in this directory should work.
10*c29d5175Schristos
11*c29d5175Schristos   Since the DTrace Ruby provider is under development, there is a chance
12*c29d5175Schristos   that it has changed slightly by the time you are reading this, causing
13*c29d5175Schristos   these scripts to either break or behave oddly. Firstly, check for newer
14*c29d5175Schristos   versions of the DTraceToolkit; if it hasn't been updated and you need
15*c29d5175Schristos   to use these scripts immediately, then updating them shouldn't take
16*c29d5175Schristos   too long. The following was the state of the provider when these scripts
17*c29d5175Schristos   were written - check for changes and update the scripts accordingly,
18*c29d5175Schristos
19*c29d5175Schristos	provider ruby {
20*c29d5175Schristos	    probe function-entry(class, method, file, lineno);
21*c29d5175Schristos	    probe function-return(class, method, file, lineno);
22*c29d5175Schristos	    probe raise(errinfo, file, lineno);
23*c29d5175Schristos	    probe rescue(file, lineno);
24*c29d5175Schristos	    probe line(file, lineno);
25*c29d5175Schristos	    probe gc-begin();
26*c29d5175Schristos	    probe gc-end();
27*c29d5175Schristos	    probe object-create-start(object, file, lineno);
28*c29d5175Schristos	    probe object-create-done(object, file, lineno);
29*c29d5175Schristos	    probe object-free(object);
30*c29d5175Schristos	};
31*c29d5175Schristos
32