This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

run-time function call tree displayer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]