aboutsummaryrefslogtreecommitdiff
path: root/gprof/symtab.h
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/symtab.h
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/symtab.h')
-rw-r--r--gprof/symtab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gprof/symtab.h b/gprof/symtab.h
index 9b1a531..f3b49a9 100644
--- a/gprof/symtab.h
+++ b/gprof/symtab.h
@@ -16,6 +16,8 @@
#include "source.h"
+#define NBBS 10
+
/*
* Symbol-entry. For each external in the specified file we gather
* its address, the number of calls and compute its share of cpu time.
@@ -42,6 +44,8 @@ typedef struct sym
int ncalls; /* how many times executed */
int nuses; /* how many times this symbol appears in
a particular context */
+ bfd_vma bb_addr[NBBS]; /* address of basic-block start */
+ int bb_calls[NBBS]; /* how many times basic-block was called */
struct sym *next; /* for building chains of syms */
struct sym *prev; /* for building chains of syms */