George Peter Staplin: Mar 2, 2004 - I've been curious about where Tcl spends most of its time during the evaluation/execution of scripts, so I learned how to use gprof to profile the tcl core.
The steps are:
- get tcl from cvs here: http://sourceforge.net/projects/tcl/
- get the tclbench module from cvs here: http://sourceforge.net/projects/tcllib
- mkdir tcl_bld
- export CC="gcc -pg"
- ../tcl/unix/configure --prefix=/tmp --disable-shared
- make
- env SCRIPT="../tclbench/runbench.tcl -verbose -notk -iterations 500" make shell
- gprof tclsh gmon.out | less