." Text automatically generated by txt2man-1.4.7 .TH cgprof 1 "December 16, 2004" "cgprof-1.2" "Linux Reference Manual" .SH NAME \fBcgprof \fP- generate colored call graph for profiled executables \fB .SH SYNOPSIS .nf .fam C \fBcgprof\fP [-h] [-T \fIdev\fP] [-g \fIgmon_data\fP] [\fIgprof_file\fP] .fam T .fi .SH DESCRIPTION \fBcgprof\fP generate a function calling graph for a profiled executable. The executable must have been compiled and linked to output data suitable for \fBgprof\fP(1) (look at -pg option of \fBgcc\fP(1)). If no -T option is given, output is \fBdot\fP(1) commands. All the results are printed on standard output. \fBcgprof\fP takes \fIgprof_file\fP as input, or standard input. .PP The result is a directed acyclic graph (DAG), where nodes represent functions traversed during the program execution, and edges function calls (arrow is from the caller to the called). .PP Node colors represent the cumulative execution time spent by a function and its children. Colors range from intense red (100 % time) to pale violet (0 %), like a rainbow. A node is white filled when it has no time execution data available, which may be the case for profiling functions or not instrumented functions. .PP \fBcgprof\fP helps to have a better understanding of program structure and execution. It makes hot spots identification visual and intuitive, and provides a minimum code coverage function. .SH OPTIONS .TP .B -h Display this help text. .TP .B -T \fIdev\fP This option sets the output format to \fIdev\fP. Possible values of \fIdev\fP are : .RS .TP .B X X11 output, with direct previewing using \fBdotty\fP(1). .TP .B ps Postscript output, using \fBdot\fP(1) processor. The drawing will be sized to fill one landscape page. .SH EXAMPLE to print a report from execution of test_hash, run the following command: .PP .nf .fam C $ cc -pg -o test_hash test_hash.c $ test_hash < test_data $ gprof test_hash | cgprof -Tps | lpr .fam T .fi .SH SEE ALSO \fBgprof\fP(1), \fBdot\fP(1), \fBdotty\fP(1), \fBcc\fP(1). .SH HISTORY \fBcgprof\fP is inspired by a gprof2dot, a similar tool from AT&T Research Labs, distributed part of graphviz (http://www.graphviz.org) which includes also dot tools. .SH AUTHOR Marc Vertes