GPROF(1) GNU GPROF(1) (NAME) gprof - (SYNOPSIS) gprof [ -[abcDhilLrsTvwxyz] ] [ -[ABCeEfFJnNOpPqQRStZ][name] ] [ -I dirs ] [ -d[num] ] [ -k from/to ] [ -m min-count ] [ -R map_file ] [ -t table-length ] [ --[no-]annotated-source[=name] ] [ --[no-]exec-counts[=name] ] [ --[no-]flat-profile[=name] ] [ --[no-]graph[=name] ] [ --[no-]time=name] [ --all-lines ] [ --brief ] [ --debug[=level] ] [ --function-ordering ] [ --file-ordering map_file ] [ --directory-path=dirs ] [ --display-unused-functions ] [ --file-format=name ] [ --file-info ] [ --help ] [ --line ] [ --inline-file-names ] [ --min-count=n ] [ --no-static ] [ --print-path ] [ --separate-files ] [ --static-call-graph ] [ --sum ] [ --table-length=len ] [ --traditional ] [ --version ] [ --width=n ] [ --ignore-non-functions ] [ --demangle[=STYLE] ] [ --no-demangle ] [--external-symbol-table=name] [ image-file ] [ profile-file ... ] (DESCRIPTION) "gprof" C Pascal Fortran77 . . ( gmon.out) -pg "cc" "pc" "f77" . -pg . "gprof" ( "a.out") gmon.out . "gprof" . "gprof" . . (Cycles) . : (flat profile) . . (call graph) . . . (annotated source) . (OPTIONS) "gprof" . symspec . (symspec) . (-p -q) . "-A[symspec]" "--annotated-source[=symspec]" -A "gprof" . symspec . "-b" "--brief" -b "gprof" . . "-B" -B "gprof" . "-C[symspec]" "--exec-counts[=symspec]" -C "gprof" . symspec . (basic-block) -l -C . "-i" "--file-info" -i "gprof" () . . "-I dirs" "--directory-path=dirs" -I . GPROF_PATH . . "-J[symspec]" "--no-annotated-source[=symspec]" -J "gprof" . symspec "gprof" . "-L" "--print-path" . -L "gprof" . "-p[symspec]" "--flat-profile[=symspec]" -p "gprof" . symspec . "-P[symspec]" "--no-flat-profile[=symspec]" -P "gprof" . symspec "gprof" . "-q[symspec]" "--graph[=symspec]" -q "gprof" . symspec . "-Q[symspec]" "--no-graph[=symspec]" -Q "gprof" . symspec "gprof" . "-t" "--table-length=num" -t num . 10 . "-y" "--separate-files" . "gprof" . path/filename filename-ann . filename-ann filename "gprof" filename.ann ( .ann ). "-Z[symspec]" "--no-exec-counts[=symspec]" -Z "gprof" . symspec . "-r" "--function-ordering" --function-ordering "gprof" . (paging) TLB . . "-R map_file" "--file-ordering map_file" --file-ordering "gprof" .o . (paging) TLB . -a . map_file . "nm" . c-parse.o:00000000 T yyparse c-parse.o:00000004 C yyerrflag c-lang.o:00000000 T maybe_objc_method_name c-lang.o:00000000 T print_lang_statistics c-lang.o:00000000 T recognize_objc_keyword c-decl.o:00000000 T print_lang_identifier c-decl.o:00000000 T print_lang_type ... map_file GNU "nm" : "nm --extern-only --defined-only -v --print-file-name program-name". "-T" "--traditional" -T "gprof" <<>> BSD . "-w width" "--width=width" width . . "-x" "--all-lines" . . . -a "tcov" . "--demangle[=style]" "--no-demangle" C++ (demangle) . . "--no-demangle" . . . (Analysis Options) "-a" "--no-static" -a "gprof" () . ( // .) / . . "-c" "--static-call-graph" -c . . . . 0 . "-D" "--ignore-non-functions" -D "gprof" . ( Solaris HPUX) . "-k from/to" -k symspec from symspec to . "-l" "--line" -l . "gcc" . "gcc" "gcov" . . "gprof" . "--inline-file-names" "gprof" . -L . "-m num" "--min-count=num" . num . "-nsymspec" "--time=symspec" -n "gprof" symspec . "-Nsymspec" "--no-time=symspec" -N "gprof" symspec . "-Sfilename" "--external-symbol-table=filename" -S "gprof" ( "a.out" ) /proc/kallsyms . . "-z" "--display-unused-functions" -z "gprof" . -c . (Miscellaneous Options) "-d[num]" "--debug[=num]" -d num . num . "-h" "--help" -h . "-Oname" "--file-format=name" . auto () bsd 4.4bsd magic prof ( ). "-s" "--sum" -s "gprof" gmon.sum "gprof" . gmon.sum gmon.sum . "gprof" -s gmon.sum . "-v" "--version" -v "gprof" . (Deprecated Options) (symspec) . "-e function_name" -e function "gprof" function_name ( ...) . [not printed] . -e -e function_name . "-E function_name" "-E function" "-e" ( ) . -E -E function_name . "-f function_name" -f function "gprof" function_name ( ...) . -f -f function_name . "-F function_name" -F function "-f" ( ...) . -F -F function_name . -F -E . (FILES) "a.out" . "gmon.out" . "gmon.sum" . (BUGS) . . . . ( ). . "exit"(2) gmon.out . (SEE ALSO) monitor(3) profil(2) cc(1) prof(1) Info gprof. "An Execution Profiler for Modular Programs", by S. Graham, P. Kessler, M. McKusick; Software - Practice and Experience, Vol. 13, pp. 671-685, 1983. "gprof: A Call Graph Execution Profiler", by S. Graham, P. Kessler, M. McKusick; Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices, Vol. 17, No 6, pp. 120-126, June 1982. (COPYRIGHT) Copyright (c) 1988-2026 Free Software Foundation, Inc. (GNU Free Documentation License) 1.3 . "GNU Free Documentation License" . binutils-2.47 2026-08-11 GPROF(1)