diff options
author | Alan Modra <amodra@gmail.com> | 2002-02-01 08:24:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-02-01 08:24:16 +0000 |
commit | 1355568ab48a9dcfd079493f7deb5e1c5e88015b (patch) | |
tree | 9b1cc576a383708096f9c89c5800bd25f6126768 /gprof/hist.c | |
parent | 48fa4a5def1116273c2c2a236939e96eb9b6231a (diff) | |
download | gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.zip gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.gz gdb-1355568ab48a9dcfd079493f7deb5e1c5e88015b.tar.bz2 |
* alpha.c (alpha_find_call): Warning fixes.
* mips.c (mips_find_call): Likewise.
* sparc.c (sparc_find_call): Likewise.
* basic_blocks.c: Warning fixes. Eliminate DEFUN.
* call_graph.c: Likewise.
* cg_arcs.c: Likewise.
* cg_dfn.cp: Likewise.
* gprof.c: Likewise.
* gprof.h: Likewise.
* hist.c: Likewise.
* search_list.c: Likewise.
* source.c: Likewise.
* source.h: Likewise.
* sym_ids.c: Likewise.
* symtab.c: Likewise.
* symtab.h: Likewise.
* utils.c: Likewise.
* cg_print.c: Likewise.
(struct function_map, symbol_map, symbol_map_count): Move
declaration to..
* corefile: ..here.
* corefile.c: Warning fixes. Eliminate DEFUN.
(struct function_map): Remove declaration.
* gmon_io.c: Warning fixes. Eliminate DEFUN.
(gmon_io_read_64): Make static.
(gmon_io_write_64): Likewise.
(gmon_read_raw_arc): Likewise.
(gmon_write_raw_arc): Likewise.
(gmon_io_write_8): Don't pass char, pass int param.
* gmon_io.h (gmon_io_write_8): Likewise.
and a few copyright dates that should have been done previously.
Diffstat (limited to 'gprof/hist.c')
-rw-r--r-- | gprof/hist.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/gprof/hist.c b/gprof/hist.c index 0d0df01..d987656 100644 --- a/gprof/hist.c +++ b/gprof/hist.c @@ -1,6 +1,6 @@ /* hist.c - Histogram related operations. - Copyright 2000, 2001 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -34,6 +34,9 @@ #define UNITS_TO_CODE (offset_to_code / sizeof(UNIT)) static void scale_and_align_entries PARAMS ((void)); +static void print_header PARAMS ((int)); +static void print_line PARAMS ((Sym *, double)); +static int cmp_time PARAMS ((const PTR, const PTR)); /* Declarations of automatically generated functions to output blurbs. */ extern void flat_blurb PARAMS ((FILE * fp)); @@ -77,7 +80,9 @@ SItab[] = is provided for formatting error messages only. */ void -DEFUN (hist_read_rec, (ifp, filename), FILE * ifp AND const char *filename) +hist_read_rec (ifp, filename) + FILE * ifp; + const char *filename; { bfd_vma n_lowpc, n_highpc; int i, ncnt, profrate; @@ -152,7 +157,9 @@ DEFUN (hist_read_rec, (ifp, filename), FILE * ifp AND const char *filename) of OFP and is provided for formatting error-messages only. */ void -DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename) +hist_write_hist (ofp, filename) + FILE * ofp; + const char *filename; { UNIT count; int i; @@ -173,7 +180,7 @@ DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename) for (i = 0; i < hist_num_bins; ++i) { - bfd_put_16 (core_bfd, hist_sample[i], (bfd_byte *) & count[0]); + bfd_put_16 (core_bfd, (bfd_vma) hist_sample[i], (bfd_byte *) &count[0]); if (fwrite (&count[0], sizeof (count), 1, ofp) != 1) { @@ -255,7 +262,7 @@ scale_and_align_entries () cases, above). */ void -DEFUN_VOID (hist_assign_samples) +hist_assign_samples () { bfd_vma bin_low_pc, bin_high_pc; bfd_vma sym_low_pc, sym_high_pc; @@ -344,7 +351,8 @@ DEFUN_VOID (hist_assign_samples) /* Print header for flag histogram profile. */ static void -DEFUN (print_header, (prefix), const char prefix) +print_header (prefix) + int prefix; { char unit[64]; @@ -383,7 +391,9 @@ DEFUN (print_header, (prefix), const char prefix) static void -DEFUN (print_line, (sym, scale), Sym * sym AND double scale) +print_line (sym, scale) + Sym *sym; + double scale; { if (ignore_zeros && sym->ncalls == 0 && sym->hist.time == 0) return; @@ -420,7 +430,9 @@ DEFUN (print_line, (sym, scale), Sym * sym AND double scale) lexicographic order of the function names. */ static int -DEFUN (cmp_time, (lp, rp), const PTR lp AND const PTR rp) +cmp_time (lp, rp) + const PTR lp; + const PTR rp; { const Sym *left = *(const Sym **) lp; const Sym *right = *(const Sym **) rp; @@ -447,7 +459,7 @@ DEFUN (cmp_time, (lp, rp), const PTR lp AND const PTR rp) /* Print the flat histogram profile. */ void -DEFUN_VOID (hist_print) +hist_print () { Sym **time_sorted_syms, *top_dog, *sym; unsigned int index; |