8 * For a profile to be intelligible to a human user, it is necessary
9 * to map code-addresses into source-code information. Source-code
10 * information can be any combination of: (i) function-name, (ii)
11 * source file-name, and (iii) source line number.
13 * The symbol table is used to map addresses into source-code
20 * Symbol-entry. For each external in the specified file we gather
21 * its address, the number of calls and compute its share of cpu time.
28 * In the symbol-table, fields ADDR and FUNC_NAME are guaranteed
29 * to contain valid information. FILE may be 0, if unknown and
30 * LINE_NUM maybe 0 if unknown.
32 bfd_vma addr
; /* address of entry point */
33 bfd_vma end_addr
; /* end-address */
34 const char *name
; /* name of function this sym is from */
35 Source_File
*file
; /* source file symbol comes from */
36 int line_num
; /* source line number */
37 unsigned int is_func
:1, /* is this a function entry point? */
38 is_static
:1, /* is this a local (static) symbol? */
39 is_bb_head
:1; /* is this the head of a basic-blk? */
40 int ncalls
; /* how many times executed */
41 struct sym
*next
; /* for building chains of syms */
43 /* profile-specific information: */
45 /* histogram specific info: */
48 double time
; /* (weighted) ticks in this routine */
49 bfd_vma scaled_addr
; /* scaled entry point */
53 /* call-graph specific info: */
56 int self_calls
; /* how many calls to self */
57 double child_time
; /* cumulative ticks in children */
58 int index
; /* index in the graph list */
59 int top_order
; /* graph call chain top-sort order */
60 bool print_flag
; /* should this be printed? */
63 double fract
; /* what % of time propagates */
64 double self
; /* how much self time propagates */
65 double child
; /* how much child time propagates */
70 int num
; /* internal number of cycle on */
71 struct sym
*head
; /* head of cycle */
72 struct sym
*next
; /* next member of cycle */
75 struct arc
*parents
; /* list of caller arcs */
76 struct arc
*children
; /* list of callee arcs */
83 * Symbol-tables are always assumed to be sorted in increasing order
88 int len
; /* # of symbols in this table */
89 Sym
*base
; /* first element in symbol table */
90 Sym
*limit
; /* limit = base + len */
94 extern Sym_Table symtab
; /* the symbol table */
96 extern void sym_init
PARAMS ((Sym
* sym
));
97 extern void symtab_finalize
PARAMS ((Sym_Table
* symtab
));
98 extern Sym
*sym_lookup
PARAMS ((Sym_Table
* symtab
, bfd_vma address
));
100 #endif /* symtab_h */
This page took 0.031432 seconds and 4 git commands to generate.