Version 0 of Profiling Tcl with gprof

Updated 2005-03-03 00:42:34

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:

  1. get tcl from cvs here: http://sourceforge.net/projects/tcl/
  2. get the tclbench module from cvs here: http://sourceforge.net/projects/tcllib
  3. mkdir tcl_bld
  4. export CC="gcc -pg"
  5. ../tcl/unix/configure --prefix=/tmp --disable-shared
  6. make
  7. env SCRIPT="../tclbench/runbench.tcl -verbose -notk -iterations 500" make shell
  8. gprof tclsh gmon.out | less