aboutsummaryrefslogtreecommitdiff
path: root/gprof/gprof.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1998-02-04 00:30:48 +0000
committerIan Lance Taylor <ian@airs.com>1998-02-04 00:30:48 +0000
commit7862d7d065c91e32b2d1d12590b0b6219034c7cf (patch)
tree7bfb85a6bfb8c0c2cfe349a141e1696916a442f7 /gprof/gprof.c
parent70b3329c0cdaac62bf1ea1b8bc8b133439420234 (diff)
downloadgdb-7862d7d065c91e32b2d1d12590b0b6219034c7cf.zip
gdb-7862d7d065c91e32b2d1d12590b0b6219034c7cf.tar.gz
gdb-7862d7d065c91e32b2d1d12590b0b6219034c7cf.tar.bz2
Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
* symtab.c (symtab_finalize): Prefer function symbols over line symbols. (dbg_sym_lookup): Correct debugging messages. * gprof.c (main): --sum implies --line. * cg_print.c (cg_print): When doing line by line profiling, don't use a non-function as a main listing item. * call_graph.c (cg_tally): When using line by line profiling, use the function symbol as the child. * symtab.h (NBBS): Define. (Sym): Add bb_addr and bb_calls fields. * basic_blocks.c (bb_read_rec): Save multiple basic blocks per symbol. (bb_write_blocks): Adjust for multiple basic blocks per symbol. (print_exec_counts): Don't check whether a symbol is the start of a basic block. Print all basic blocks for a symbol. (annotate_with_count): Rewrite to print all basic block counts and to pay attention to width argument. (print_annotated_source): Don't check whether symbol is the start of a basic block.
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r--gprof/gprof.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 449ab20..3677c40 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -419,6 +419,12 @@ This program is free software. This program has absolutely no warranty.\n");
done (1);
}
+ /* --sum implies --line, otherwise we'd lose b-b counts in gmon.sum */
+ if (output_style & STYLE_SUMMARY_FILE)
+ {
+ line_granularity = 1;
+ }
+
/* append value of GPROF_PATH to source search list if set: */
str = (char *) getenv ("GPROF_PATH");
if (str)