aboutsummaryrefslogtreecommitdiff
path: root/Tcl/Readme
blob: 68c73528085c21d9ac2d2e4a19943212557b62f6 (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
30
31
32
33
34
35
36
37
38
39
Tcl - DTracing Tcl Programs

   These scripts trace activity of the Tcl programming language, making use
   of the Tcl DTrace provider which was integrated into the Tcl source in
   version tcl8.4.16. See the Tcl DTrace wiki page for details:

	http://wiki.tcl.tk/19923

   This provider was written by Daniel Steffen and is currently available
   by downloading and compiling the Tcl source with the --enable-dtrace
   option to configure.

   Since the DTrace Tcl provider could be developed a little further, there is
   a chance that it has changed slightly by the time you are reading this,
   causing these scripts to either break or behave oddly. Firstly, check for
   newer versions of the DTraceToolkit; if it hasn't been updated and you need
   to use these scripts immediately, then updating them shouldn't take
   too long. The following was the state of the provider when these scripts
   were written - check for changes and update the scripts accordingly,

	provider tcl {
	    probe proc-entry(procname, argc, argv);
	    probe proc-return(procname, retcode);
	    probe proc-result(procname, retcode, retval, retobj);
	    probe proc-args(procname, args, ...);
	    probe cmd-entry(cmdname, argc, argv);
	    probe cmd-return(cmdname, retval);
	    probe cmd-args(procname, args, ...);
	    probe inst-start(instname, depth, stackobj);
	    probe inst-done(instname, depth, stackobj);
	    probe obj-create(object);
	    probe obj-free(object);
	    proobe tcl-probe(strings, ...);
	};

   Update: it looks like two new probes have recently been added to the
   provider: proc-info and cmd-info. I'll need to update these scripts to
   make use of these new probes.