From 0f579087abbd52ef11e1c0dc0236e0393ccfaba0 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 21 Mar 1996 22:07:14 +0000 Subject: Thu Mar 21 17:02:02 1996 David Mosberger-Tang * gprof.c (default_excluded_list): Add "__mcount". * gprof.c (main): Change ifdef __osf__ to __alpha__. * gmon_io.c (gmon_out_read): If BSD44_FORMAT is defined, get the profiling rate from the header. * gmon.h (struct raw_phdr): Only include pad if both __alpha__ and __osf__ are defined. Add new fields if BSD44_FORMAT is defined. * alpha.h (MIN_INSN_SIZE): Define. * core.c (MIN_INSN_SIZE): If not defined, define as 1. (core_sym_class): Ignore debugging symbols. (core_create_line_syms): Use MIN_INSN_SIZE when gathering line information. --- gprof/gmon_io.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'gprof/gmon_io.c') diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c index 82c3caa..1f0e1ac 100644 --- a/gprof/gmon_io.c +++ b/gprof/gmon_io.c @@ -180,9 +180,27 @@ DEFUN (gmon_out_read, (filename), const char *filename) filename); done (1); } - tmp.low_pc = get_vma (core_bfd, (bfd_byte *) & raw.low_pc[0]); - tmp.high_pc = get_vma (core_bfd, (bfd_byte *) & raw.high_pc[0]); - tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) & raw.ncnt[0]); + tmp.low_pc = get_vma (core_bfd, (bfd_byte *) &raw.low_pc[0]); + tmp.high_pc = get_vma (core_bfd, (bfd_byte *) &raw.high_pc[0]); + tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) &raw.ncnt[0]); + +#ifdef BSD44_FORMAT + { + int profrate; + + profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.version[0]); + if (!s_highpc) + hz = profrate; + else if (hz != profrate) + { + fprintf (stderr, + "%s: profiling rate incompatible with first gmon file\n", + filename); + done (1); + } + } +#endif + if (s_highpc && (tmp.low_pc != h.low_pc || tmp.high_pc != h.high_pc || tmp.ncnt != h.ncnt)) { -- cgit v1.1