xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Tcl/Readme (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1Tcl - DTracing Tcl Programs
2
3   These scripts trace activity of the Tcl programming language, making use
4   of the Tcl DTrace provider which was integrated into the Tcl source in
5   version tcl8.4.16. See the Tcl DTrace wiki page for details:
6
7	http://wiki.tcl.tk/19923
8
9   This provider was written by Daniel Steffen and is currently available
10   by downloading and compiling the Tcl source with the --enable-dtrace
11   option to configure.
12
13   Since the DTrace Tcl provider could be developed a little further, there is
14   a chance that it has changed slightly by the time you are reading this,
15   causing these scripts to either break or behave oddly. Firstly, check for
16   newer versions of the DTraceToolkit; if it hasn't been updated and you need
17   to use these scripts immediately, then updating them shouldn't take
18   too long. The following was the state of the provider when these scripts
19   were written - check for changes and update the scripts accordingly,
20
21	provider tcl {
22	    probe proc-entry(procname, argc, argv);
23	    probe proc-return(procname, retcode);
24	    probe proc-result(procname, retcode, retval, retobj);
25	    probe proc-args(procname, args, ...);
26	    probe cmd-entry(cmdname, argc, argv);
27	    probe cmd-return(cmdname, retval);
28	    probe cmd-args(procname, args, ...);
29	    probe inst-start(instname, depth, stackobj);
30	    probe inst-done(instname, depth, stackobj);
31	    probe obj-create(object);
32	    probe obj-free(object);
33	    proobe tcl-probe(strings, ...);
34	};
35
36   Update: it looks like two new probes have recently been added to the
37   provider: proc-info and cmd-info. I'll need to update these scripts to
38   make use of these new probes.
39
40