Lines Matching refs:sym
124 Sym *sym; in bb_read_rec() local
166 sym = sym_lookup (&symtab, addr); in bb_read_rec()
168 if (sym) in bb_read_rec()
174 (unsigned long) addr, (unsigned long) sym->addr, in bb_read_rec()
175 sym->name, sym->line_num, (unsigned long) ncalls)); in bb_read_rec()
179 if (! sym->bb_addr[i] || sym->bb_addr[i] == addr) in bb_read_rec()
181 sym->bb_addr[i] = addr; in bb_read_rec()
182 sym->bb_calls[i] += ncalls; in bb_read_rec()
211 Sym *sym; in bb_write_blocks() local
215 for (sym = symtab.base; sym < symtab.limit; ++sym) in bb_write_blocks()
217 for (i = 0; i < NBBS && sym->bb_addr[i]; i++) in bb_write_blocks()
231 for (sym = symtab.base; sym < symtab.limit; ++sym) in bb_write_blocks()
233 for (i = 0; i < NBBS && sym->bb_addr[i]; i++) in bb_write_blocks()
235 if (gmon_io_write_vma (ofp, sym->bb_addr[i]) in bb_write_blocks()
236 || gmon_io_write_vma (ofp, (bfd_vma) sym->bb_calls[i])) in bb_write_blocks()
253 Sym **sorted_bbs, *sym; in print_exec_counts() local
265 for (sym = symtab.base; sym < symtab.limit; ++sym) in print_exec_counts()
270 if (sym_lookup (&syms[INCL_EXEC], sym->addr) in print_exec_counts()
272 && !sym_lookup (&syms[EXCL_EXEC], sym->addr))) in print_exec_counts()
274 sorted_bbs[len++] = sym; in print_exec_counts()
284 sym = sorted_bbs [i]; in print_exec_counts()
286 if (sym->ncalls > 0 || ! ignore_zeros) in print_exec_counts()
290 sym->file ? sym->file->name : _("<unknown>"), sym->line_num, in print_exec_counts()
291 sym->name, (unsigned long) sym->addr, sym->ncalls); in print_exec_counts()
294 for (j = 0; j < NBBS && sym->bb_addr[j]; j ++) in print_exec_counts()
296 if (sym->bb_calls[j] > 0 || ! ignore_zeros) in print_exec_counts()
300 sym->file ? sym->file->name : _("<unknown>"), sym->line_num, in print_exec_counts()
301 sym->name, (unsigned long) sym->bb_addr[j], in print_exec_counts()
302 sym->bb_calls[j]); in print_exec_counts()
464 Sym *sym, *line_stats, *new_line; in print_annotated_source() local
471 for (sym = symtab.base; sym < symtab.limit; ++sym) in print_annotated_source()
477 if (sym->file && sym->line_num > sym->file->num_lines in print_annotated_source()
478 && (sym_lookup (&syms[INCL_ANNO], sym->addr) in print_annotated_source()
480 && !sym_lookup (&syms[EXCL_ANNO], sym->addr)))) in print_annotated_source()
482 sym->file->num_lines = sym->line_num; in print_annotated_source()
497 for (sym = symtab.base; sym < symtab.limit; ++sym) in print_annotated_source()
499 if (sym->file && sym->file->num_lines in print_annotated_source()
500 && (sym_lookup (&syms[INCL_ANNO], sym->addr) in print_annotated_source()
502 && !sym_lookup (&syms[EXCL_ANNO], sym->addr)))) in print_annotated_source()
504 sym->file->ncalls += sym->ncalls; in print_annotated_source()
505 line_stats = sym->file->line[sym->line_num - 1]; in print_annotated_source()
510 sym->file->line[sym->line_num - 1] = sym; in print_annotated_source()
515 line_stats->ncalls += sym->ncalls; in print_annotated_source()
523 new_line->ncalls += sym->ncalls; in print_annotated_source()
524 sym->file->line[sym->line_num - 1] = new_line; in print_annotated_source()
555 sym = sf->line[i]; in print_annotated_source()
557 if (!sym || sym->ncalls == 0) in print_annotated_source()
560 fprintf (ofp, "%9d %10lu\n", sym->line_num, sym->ncalls); in print_annotated_source()