This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
run-time function call tree displayer
- To: <gcc at gcc dot gnu dot org>
- Subject: run-time function call tree displayer
- From: Nicolas Devillard <ndevilla at eso dot org>
- Date: Wed, 9 May 2001 16:43:09 +0200 (MET DST)
Hi:
A fairly simple tool, which might be of interest for some.
etrace makes use of the -finstrument-functions feature of
gcc to produce run-time function call trees in a separate
terminal (the tree can also be saved to a file). Here is
the kind of output you get in the first terminal, while the
program is running in another terminal:
main
| first_function
| | second_function
| | | compute
| | | compute (total: 5 times)
| | second_function
| | | compute
| | | compute (total: 5 times)
This tool requires gcc-2.95, Python 1.5 or later, and a
BSD-compatible 'nm' utility. It is all contained in 80 lines
of Python and 100 lines of C. It is public domain.
See: http://www.eso.org/~ndevilla/etrace/
Cheers
--
Nicolas