Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils/gprof
Files:
56 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/gprof/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 2001-06-11  Alan Modra  <amodra@bigpond.net.au>
    2 
    3         Merge from mainline.
    4         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
     12003-03-27  Chris Demetriou  <cgd@broadcom.com>
     2
     3        * gmon_io.c (enum gmon_ptr_size, enum gmon_ptr_signedness): New.
     4        (gmon_get_ptr_size, gmon_get_ptr_signedness): New.
     5        (gmon_io_read_vma, gmon_io_write_vma, gmon_read_raw_arc)
     6        (gmon_write_raw_arc, gmon_out_read, gmon_out_write): Adjust to
     7        use new functions and enums.
     8
     92003-02-21  K Schutte  <schutte@fel.tno.nl>
     10
     11        * corefile.c (core_create_line_syms): Check for a NULL sentinel
     12        value before using it.
     13
     142002-12-02  Nick Clifton  <nickc@redhat.com>
     15
     16        * configure.in (LINGUAS): Add pt_BR.
     17        * configure: Regenerate.
     18        * po/pt_BR: New Brazillian Portugese translation.
     19
     202002-11-30  Alan Modra  <amodra@bigpond.net.au>
     21
     22        * basic_blocks.c, basic_blocks.h, cg_arcs.c, cg_dfn.c, cg_print.c,
     23        corefile.c, gmon_io.c, gprof.c, gprof.h, hist.c, mips.c, source.c,
     24        source.h, sym_ids.c, sym_ids.h, symtab.h, tahoe.c, vax.c: Replace
     25        boolean with bfd_boolean, true with TRUE, false with FALSE.
     26        Formatting.
     27
     282002-11-12  Nick Clifton  <nickc@redhat.com>
     29
     30        * configure.in (ALL_LINGUAS): Add da.
     31        * configure: Regenerate.
     32        * po/da.po: New Danish translation.
     33
     342002-08-22  Nick Clifton  <nickc@redhat.com>
     35
     36        * gprof.c (main): Turn off default excluded functions in FLAT
     37        profile.
     38
     392002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     40
     41        * gmon_io.c (gmon_io_read_64, gmon_io_write_64): Define only if
     42        BFD_HOST_U_64_BIT is defined.
     43        (gmon_io_read_vma, gmon_io_write_vma): Add ifdefs.
     44
     452002-07-30  Nick Clifton  <nickc@redhat.com>
     46
     47        * po/tr.po: Updated Turkish translation.
     48
     492002-07-30  Nick Clifton  <nickc@redhat.com>
     50
     51        * alpha.c, cg_arcs.c, cg_dfn.c, gmon.h, gprof.c, gprof.h, hertz.c,
     52        i386.c, mips.c, sparc.c, tahoe.c, utils.c, vax.c: Update Copyright
     53        notice so that it applies even if the sources are modified.
     54
     552002-07-29  Ulrich Drepper  <drepper@redhat.com>
     56
     57        * gprof.texi (Executing the Program): Add documentation on how to use
     58        bbconv.pl.  Patch by Eric Hanchrow.
     59
     602002-07-25  Nick Clifton  <nickc@redhat.com>
     61
     62        * po/es.po: Updated Spanish translation.
     63        * po/fr.po: Updated French translation.
     64
     652002-07-24  Dave Brolley  <brolley@redhat.com>
     66
     67        * corefile.c (core_create_function_syms): Use the end of the section
     68        containing the symbol to compute max_vma.
     69
     702002-07-24  Nick Clifton  <nickc@redhat.com>
     71
     72        * po/sv.po: Updated Swedish translation.
     73        * po/es.po: Updated Spanish translation.
     74
     752002-07-23  Nick Clifton  <nickc@redhat.com>
     76
     77        * po/fr.po: Updated French translation.
     78        * po/id.po: New Indonesian translation.
     79        * configure.in (LINGUAS): Add id.
     80        * configure: Regenerate.
     81
     822002-05-02  Nick Clifton  <nickc@cambridge.redhat.com>
     83
     84        * po/Make-in (.po.gmo): Do not attempt to create a .gmo file if
     85        the sources are read-only.
     86
     872002-04-04  Alan Modra  <amodra@bigpond.net.au>
     88
     89        * dep-in.sed: Cope with absolute paths.
     90        * Makefile.am (dep.sed): Subst TOPDIR.
     91        Run "make dep-am".
     92        * Makefile.in: Regenerate.
     93
     942002-03-21  Alan Modra  <amodra@bigpond.net.au>
     95
     96        * Makefile.am: Run "make dep-am".
     97        * Makefile.in: Regenerate.
     98
     992002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
     100
     101        * po/fr.po: Updated version.
     102
     1032002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
     104
     105        * po/fr.po: Updated version.
     106
     1072002-03-07  Daniel Jacobowitz  <drow@mvista.com>
     108
     109        * gprof.texi: Wrap @menu in @ifnottex, not @ifinfo.
     110
     1112002-02-19  Frank Ch. Eigler  <fche@redhat.com>
     112
     113        * hist.c (hist_print): Rewrite log_scale calculation loop.
     114
     1152002-02-11  Alan Modra  <amodra@bigpond.net.au>
     116
     117        * Makefile.am: "make dep-am".
     118        * Makefile.in: Regenerate.
     119
     1202002-02-10  Daniel Jacobowitz  <drow@mvista.com>
     121
     122        * gprof.c: Include "getopt.h" after other includes, so that
     123        the proper macros are defined.
     124        * gen-c-prog.awk: Emit a prototype for the generated function.
     125
     1262002-02-01  Alan Modra  <amodra@bigpond.net.au>
     127
     128        * configure.in (build_warnings): Add -Wstrict-prototypes
     129        -Wmissing-prototypes.
     130        * aclocal.m4: Regenerate.
     131        * gconfig.in: Regenerate.
     132        * configure: Regenerate.
     133        * Makefile.am: Run "make dep-am".
     134        * Makefile.in: Regenerate.
     135
     136        * alpha.c (alpha_find_call): Warning fixes.
     137        * mips.c (mips_find_call): Likewise.
     138        * sparc.c (sparc_find_call): Likewise.
     139        * basic_blocks.c: Warning fixes.  Eliminate DEFUN.
     140        * call_graph.c: Likewise.
     141        * cg_arcs.c: Likewise.
     142        * cg_dfn.cp: Likewise.
     143        * gprof.c: Likewise.
     144        * gprof.h: Likewise.
     145        * hist.c: Likewise.
     146        * search_list.c: Likewise.
     147        * source.c: Likewise.
     148        * source.h: Likewise.
     149        * sym_ids.c: Likewise.
     150        * symtab.c: Likewise.
     151        * symtab.h: Likewise.
     152        * utils.c: Likewise.
     153        * cg_print.c: Likewise.
     154        (struct function_map, symbol_map, symbol_map_count): Move
     155        declaration to..
     156        * corefile: ..here.
     157        * corefile.c: Warning fixes.  Eliminate DEFUN.
     158        (struct function_map): Remove declaration.
     159        * gmon_io.c: Warning fixes.  Eliminate DEFUN.
     160        (gmon_io_read_64): Make static.
     161        (gmon_io_write_64): Likewise.
     162        (gmon_read_raw_arc): Likewise.
     163        (gmon_write_raw_arc): Likewise.
     164        (gmon_io_write_8): Don't pass char, pass int param.
     165        * gmon_io.h (gmon_io_write_8): Likewise.
     166
     167        * Makefile.am: Run "make dep-am"
     168        * Makefile.in: Regenerate.
     169
     170        * basic_blocks.c: Replace bool with boolean, TRUE with true and
     171        FALSE with false throughout.
     172        * basic_blocks.h: Likewise.
     173        * cg_arcs.c: Likewise.
     174        * cg_dfn.c: Likewise.
     175        * cg_print.c: Likewise.
     176        * corefile.c: Likewise.
     177        * gmon_io.c: Likewise.
     178        * gprof.c: Likewise.
     179        * hist.c: Likewise.
     180        * mips.c: Likewise.
     181        * source.c: Likewise.
     182        * source.h: Likewise.
     183        * sym_ids.c: Likewise.
     184        * sym_ids.h: Likewise.
     185        * symtab.h: Likewise.
     186        * tahoe.c: Likewise.
     187        * vax.c: Likewise.
     188        * gprof.h: Likewise.
     189        (TRUE): Don't define.
     190        (FALSE): Don't define.
     191
     1922002-01-31  Jason R Thorpe <thorpej@wasabisystems.com>
     193
     194        * TODO: Remove "host architecture pointer size" item.
     195        * acconfig.h: Remove.
     196        * gconfig.in: Regenerate.
     197        * configure.in: Remove check for gmon pointer size.
     198        * configure: Regenerate.
     199        * gmon.h (GMON_HDRSIZE_BSD44_32): Define.
     200        (GMON_HDRSIZE_BSD44_64): Ditto.
     201        (GMON_HDRSIZE_OLDBSD_32): Ditto.
     202        (GMON_HDRSIZE_OLDBSD_64): Ditto.
     203        (struct raw_phdr): Wrap in #if 0, keeping it for
     204        documentation purposes only.
     205        (struct old_raw_phdr): Likewise.
     206        (struct raw_arc): Likewise.  Change type/size of
     207        "count" member to long match 4.4BSD.
     208        * gmon_io: Update copyright years.
     209        (gmon_io_read_64): New function.
     210        (gmon_io_read_vma): Use bfd_arch_bits_per_address to
     211        determine target pointer size.  Use gmon_io_read_32
     212        and gmon_io_read_64.
     213        (gmon_io_write_64): New function.
     214        (gmon_io_write_vma): Use bfd_arch_bits_per_address to
     215        determine target pointer size.  Use gmon_io_write_32
     216        and gmon_io_write_64.
     217        (get_vma): Remove.
     218        (put_vma): Ditto.
     219        (gmon_read_raw_arc): New function.
     220        (gmon_write_raw_arc): New function.
     221        (gmon_out_read): Do not use struct raw_phdr or
     222        struct old_raw_phdr to read the gmon header.  Use
     223        gmon_read_raw_arc to read call graph records.
     224        (gmon_out_write): Do not use struct raw_phdr or
     225        struct old_raw_phdr to write the gmon header.  Use
     226        gmon_write_raw_arc to write call graph records.
     227        * po/gprof.pot: Regenerate.
     228        * Makefile.in: Regenerate.
     229
     2302002-01-31  Alan Modra  <amodra@bigpond.net.au>
     231
     232        * alpha.c (alpha_Instruction): Don't use.
     233        (alpha_find_call): Avoid use of bitfields and casts between
     234        pointers and integers of different sizes.  Avoid endian problems
     235        when cross-compiling.
     236        * vax.c (vax_find_call): Likewise.
     237        (struct modebyte): Don't use.
     238        (vax_operandmode): Pass in an unsigned char *.
     239        (vax_operandlength): Likewise.
     240        (vax_reladdr): Rename to vax_offset and return relative offset
     241        rather than address.
     242        * i386.c (i386_find_call): Avoid casts between pointers and
     243        integers of different sizes.
     244        * sparc.c (sparc_find_call): Likewise.  Avoid endian problems.
     245        * tahoe.c (tahoe_find_call): Likewise.
     246        (tahoe_reladdr): Rename to tahoe_offset and return relative offset
     247        rather than address.
     248
     249        * basic_blocks.h: Don't include headers here.
     250        * call_graph.h: Likewise.
     251        * cg_arcs.h: Likewise.
     252        * cg_print.h: Likewise.
     253        * corefile.h: Likewise.
     254        * gmon_io.h: Likewise.
     255        * gmon_out.h: Likewise.
     256        * hertz.h: Likewise.
     257        * hist.h: Likewise.
     258        * source.h: Likewise.
     259        * sym_ids.h: Likewise.
     260        * symtab.h: Likewise.
     261        * gprof.h: Don't include ansidecl.h, do include bfd.h.
     262        (bool): Don't typedef.
     263        * alpha.c: Adjust #include's for above header changes.
     264        * basic_blocks.c: Likewise.
     265        * call_graph.c: Likewise.
     266        * cg_arcs.c: Likewise.
     267        * cg_dfn.c: Likewise.
     268        * cg_print.c: Likewise.
     269        * corefile.c: Likewise.
     270        * gmon_io.c: Likewise.
     271        * gprof.c: Likewise.
     272        * hertz.c: Likewise.
     273        * hist.c: Likewise.
     274        * i386.c: Likewise.
     275        * mips.c: Likewise.
     276        * sparc.c: Likewise.
     277        * sym_ids.c: Likewise.
     278        * symtab.c: Likewise.
     279        * tahoe.c: Likewise.
     280        * utils.c: Likewise.
     281        * vax.c: Likewise.
     282
     283        * po/POTFILES.in: Regenerate.
     284
     2852002-01-27  Daniel Jacobowitz  <drow@mvista.com>
     286
     287        * configure: Regenerated.
     288
     2892002-01-26  Richard Henderson  <rth@redhat.com>
     290
     291        * i386.c (i386_iscall): Static.
     292        * tahoe.c (indirectchild, tahoe_operandmode): Static.
     293        (tahoe_operandlength, tahoe_reladdr): Static.
     294        * vax.c (indirectchild): Static.
     295
     2962002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
     297
     298        * Makefile.am (install): Depend on install-info.
     299        * Makefile.in: Regenerate.
     300
     3012002-01-26  Jason Thorpe  <thorpej@wasabisystems.com>
     302
     303        * mips.c: New file.
     304        * Makefile.am (sources): Add mips.c.
     305        (mips.o): New rule.
     306        * Makefile.in: Regenerate.
     307        * corefile.c: Update copyright years.
     308        (find_call): Call mips_find_call for bfd_arch_mips.
     309
     3102002-01-26  Nick Clifton  <nickc@cambridge.redhat.com>
     311
     312        * po/fr.po: Updated version.
     313
     3142002-01-25  Nick Clifton  <nickc@cambridge.redhat.com>
     315
     316        * po/es.po: Updated version.
     317
     3182002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
     319
     320        * po/gprof.pot: Regenerate.
     321
     3222002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
     323
     324        * po/es.po: New file: Spanish translation.
     325        * configure.in (ALL_LINGUAS): Add es.
     326        * configure: Regenerate.
     327
     3282002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
     329
     330        * gmon_io.c (gmon_out_read): Remove use of ngettext().  It is not
     331        present under AIX.
     332
     3332002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
     334
     335        * cg_print.c (print_header): Fix spelling typo.
     336
     337        * gmon_io.c (gmon_out_read): Fix formatting of text messages to
     338        allow easier translation into other languages.
     339
     3402001-12-21  Nick Clifton  <nickc@cambridge.redhat.com>
     341
     342        * configure.in (ALL_LINGUAS): Add sv.
     343        * configure: Regenerate.
     344        * po/sv.po: Import from translation project web site.
     345
     3462001-12-03  Nick Clifton  <nickc@cambridge.redhat.com>
     347
     348        * configure.in (LINGUAS): Add tr.
     349        * configure: Regenerate.
     350        * po/tr.po: Import from translation project's web site.
     351
     3522001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
     353
     354        * configure.in (ALL_LINGUAS): Add 'fr'.
     355        * configure: Regernate.
     356        * po/fr.po: New file.
     357
     3582001-10-03  Alan Modra  <amodra@bigpond.net.au>
     359
     360        * configure: Regenerate.
     361
     3622001-10-02  Alan Modra  <amodra@bigpond.net.au>
     363
     364        * Makefile.am (Makefile): Depend on bfd/configure.in.
     365        Run "make dep-am".
     366        * Makefile.in: Regenerate.
     367
     3682001-09-18  Bruno Haible  <haible@clisp.cons.org>
     369
     370        * gprof.c (main): For gettext, also set the LC_CTYPE locate facet.
     371        * sym_ids.c: Include "safe-ctype.h" instead of <ctype.h>.
     372        (parse_spec): Use ISDIGIT instead of isdigit.
     373
     3742001-09-18  Alan Modra  <amodra@bigpond.net.au>
     375
     376        * sparc.c (sparc_find_call): Warning fix.
     377        * alpha.c (alpha_find_call): Likewise.
     378
     3792001-08-09  Alan Modra  <amodra@bigpond.net.au>
     380
     381        * alpha.c: Add missing prototypes.
     382        * sparc.c: Likewise.
     383        * tahoe.c: Likewise.
     384        * vax.c: Likewise.
     385        * i386.c: Likewise.
     386        (i386_iscall): Don't use DEFUN.
     387
     3882001-07-19  Nick Clifton  <nickc@cambridge.redhat.com>
     389
     390        * NOTES: Rename to README for consistency with other binutils.
     391
     3922001-06-18  H.J. Lu <hjl@gnu.org>
     393
     394        * Makefile.am (diststuff): Add $(MANS).
     395        (gprof.1): Remove the prefix `$(srcdir)/'.
     396        * Makefile.in: Regenerated.
     397
     398        * gprof.1: Removed.
     399
     4002001-06-12  Ben Elliston  <bje@redhat.com>
     401
     402        * gprof.texi (File Format): Profile data files are stored in
     403        target byte order, not host byte order.
     404
     4052001-05-16  Alexandre Oliva  <aoliva@redhat.com>
     406
    5407        * gmon_io.c (gmon_io_read, gmon_io_write_vma,
    6408        gmon_io_write_32, gmon_io_write_8, gmon_io_write): Adjust
    7409        argument list for K&R C.
    8410
    9         2001-03-13  David Mosberger  <davidm@hpl.hp.com>
     4112001-04-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
     412
     413        * gprof.texi: Put @c man begin and @c man end indications
     414        to generate man page using texi2pod and pod2man.  Added SEEALSO,
     415        SYNOPSIS, BUGS, FILES and DESCRIPTION from original gprof.1
     416        enclosed in @ifset man condition.
     417        * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variable.
     418        Generate gprof.1 from gprof.texi.
     419        * gprof.1: Generate from gprof.texi.
     420        * Makefile.in: Regenerate.
     421
     4222001-03-13  David Mosberger  <davidm@hpl.hp.com>
     423
    10424        * hist.c (hist_dimension): Declare as an array of 16 characters.
    11425        (hist_read_rec): If SAMPLEDEBUG, print each histogram bin count.
     426
    12427        * basic_blocks.c: Whitespace and formatting changes.
    13428        * bb_exit_func.c: Ditto.
     
    37452        * utils.c: Ditto.
    38453        * vax.c: Ditto.
     454
    39455        * gmon_out.h (gmon_hist_hdr): Delete.
    40456        (gmon_cg_arc_record): Delete.
     457
    41458        * gmon_io.c (put_vma): Declare "static".
    42459        (get_vma): Ditto.
     
    55472        * hist.c (hist_read_rec): Ditto.
    56473        (hist_write_hist): Ditto.
     474
    57475        From Jes Sorensen  <jes@linuxcare.com>
    58476        * gmon_out.h: Use GMON_PTR_SIZE instead of sizeof(char*).
     
    65483        * Makefile.in: Regenerate.
    66484
    67         2001-02-27  Alan Modra  <alan@linuxcare.com.au>
     4852001-02-27  Alan Modra  <alan@linuxcare.com.au>
     486
    68487        * configure.in (BFD_VERSION): New.
    69488        (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
     
    72491        * Makefile.am: Run "make dep-am"
    73492        * Makefile.in: Regenerate.
    74 
    75 2001-06-10  Philip Blundell  <philb@gnu.org>
    76 
    77         * configure.in: Set version to 2.11.1.
    78         * configure: Regenerate.
    79 
    80 2001-06-07  Alan Modra  <amodra@bigpond.net.au>
    81 
    82         * Many files: Update copyright notices.
    83 
    84 2001-03-16  Philip Blundell  <philb@gnu.org>
    85 
    86         * configure: Regenerate.
    87 
    88 2001-03-11  Philip Blundell  <philb@gnu.org>
    89 
    90         * configure.in: Set version to 2.11.
    91493
    924942001-01-27  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
     
    242644        HAVE_SYSCONF, try setitimer and fall back on sysconf.
    243645
    244 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
     6462000-04-07  Andrew Cagney  <cagney@b1.cygnus.com>
    245647 
    246648        * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
     
    331733        * Makefile.in: Rebuild.
    332734
    333 Mon Jun 14 10:35:28 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
     7351999-06-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
    334736
    335737        * gprof.texi: Fix typo.
     
    383785        * gconfig.in: Rebuild.
    384786
    385 Sun Dec  6 21:57:50 1998  Ian Lance Taylor  <ian@cygnus.com>
     7871998-12-06  Ian Lance Taylor  <ian@cygnus.com>
    386788
    387789        * gprof.texi (Symspecs): Mention that you have to add any
    388790        underscore yourself when naming a symbol.
    389791
    390 Mon Nov  2 15:05:33 1998  Geoffrey Noer  <noer@cygnus.com>
     7921998-11-02  Geoffrey Noer  <noer@cygnus.com>
    391793
    392794        * configure.in: detect cygwin* instead of cygwin32*
     
    16612063        * gprof.c: symbol values are now real values, don't add the vma
    16622064        anymore. (done for solaris; should verify this on other platforms)
    1663         * ChangeLog: created.
  • branches/GNU/src/binutils/gprof/Makefile.am

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2424        cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
    2525        search_list.c symtab.c sym_ids.c utils.c \
    26         i386.c alpha.c vax.c tahoe.c sparc.c
     26        i386.c alpha.c vax.c tahoe.c sparc.c mips.c
    2727gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
    2828gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS)
     
    3434        search_list.h source.h sym_ids.h symtab.h utils.h
    3535
    36 EXTRA_DIST = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c bbconv.pl
    37 
    3836BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
    39 
    40 diststuff: $(BUILT_SOURCES) info
     37EXTRA_DIST    = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
     38
     39diststuff: $(BUILT_SOURCES) info $(man_MANS)
    4140
    4241.m.c:
     
    5049          && mv tmp $(srcdir)/po/POTFILES.in
    5150
     51MANCONF  = -Dman
     52
     53TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
     54
     55POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
     56
    5257info_TEXINFOS = gprof.texi
    5358man_MANS = gprof.1
     59
     60# Build the man page from the texinfo file
     61# The sed command removes the no-adjust Nroff command so that
     62# the man output looks standard.
     63gprof.1: $(srcdir)/gprof.texi
     64        touch $@
     65        -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
     66        -($(POD2MAN) gprof.pod | \
     67               sed -e '/^.if n .na/d' > $@.T$$$$ && \
     68               mv -f $@.T$$$$ $@) || \
     69               (rm -f $@.T$$$$ && exit 1)
     70        rm -f gprof.pod
     71
     72Makefile: $(BFDDIR)/configure.in
     73
     74# We want install to imply install-info as per GNU standards, despite the
     75# cygnus option.
     76install: install-info
    5477
    5578# Targets to rebuild dependencies in this Makefile.
     
    78101                -e 's!@BFDDIR@!$(BFDDIR)!'      \
    79102                -e 's!@SRCDIR@!$(srcdir)!'      \
    80                 -e "s!@OBJDIR@!$${objdir}!"
     103                -e "s!@OBJDIR@!$${objdir}!"     \
     104                -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
    81105
    82106dep: DEP
     
    101125# DO NOT DELETE THIS LINE -- mkdep uses it.
    102126# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
    103 basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \
    104   $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    105   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    106   $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \
    107   ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
    108   $(INCDIR)/libiberty.h sym_ids.h
    109 call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
    110   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    111   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    112   symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \
    113   corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h
     127basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
     128  $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
     129  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     130  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h basic_blocks.h \
     131  corefile.h gmon_io.h gmon_out.h search_list.h source.h \
     132  symtab.h sym_ids.h
     133call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
     134  $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     135  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     136  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     137  symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
     138  gmon_out.h sym_ids.h
    114139cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    115140  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    116   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    117   call_graph.h symtab.h ../bfd/bfd.h source.h search_list.h \
    118   cg_arcs.h cg_dfn.h cg_print.h utils.h sym_ids.h
     141  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     142  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     143  symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
     144  utils.h sym_ids.h
    119145cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    120146  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    121   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    122   cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
    123   cg_dfn.h utils.h
     147  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     148  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     149  symtab.h cg_arcs.h cg_dfn.h utils.h
    124150cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    125   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    126   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    127   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
    128   search_list.h cg_print.h hist.h utils.h
     151  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     152  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     153  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     154  symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
    129155corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    130156  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    131   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    132   corefile.h ../bfd/bfd.h symtab.h source.h search_list.h
    133 gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
    134   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    135   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    136   symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \
    137   corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \
     157  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     158  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     159  symtab.h corefile.h
     160gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     161  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     162  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     163  search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
     164  corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
    138165  hertz.h hist.h $(INCDIR)/libiberty.h
    139 gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
    140   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    141   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    142   $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
    143   symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
    144   corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h \
    145   $(INCDIR)/demangle.h
    146 hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
    147   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    148   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h
     166gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
     167  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     168  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     169  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     170  symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
     171  corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
     172hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     173  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     174  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     175  hertz.h
    149176hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    150177  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    151   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    152   corefile.h ../bfd/bfd.h gmon_io.h gmon.h gmon_out.h \
    153   hist.h symtab.h source.h search_list.h sym_ids.h utils.h
    154 source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    155   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    156   gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \
    157   search_list.h source.h
     178  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     179  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     180  symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
     181  utils.h
     182source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     183  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     184  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     185  $(INCDIR)/libiberty.h search_list.h source.h
    158186search_list.o: search_list.c $(INCDIR)/libiberty.h \
    159187  $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    160   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    161   $(INCDIR)/bin-bugs.h search_list.h
    162 symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    163   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    164   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    165   source.h search_list.h corefile.h
     188  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     189  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h
     190symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     191  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     192  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     193  search_list.h source.h symtab.h cg_arcs.h corefile.h
    166194sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    167   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    168   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    169   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
    170   search_list.h sym_ids.h
    171 utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    172   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    173   $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    174   source.h search_list.h
    175 i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    176   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    177   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    178   source.h search_list.h corefile.h hist.h
    179 alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    180   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    181   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    182   source.h search_list.h corefile.h hist.h
    183 vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    184   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    185   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    186   source.h search_list.h corefile.h hist.h
    187 tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    188   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    189   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    190   source.h search_list.h corefile.h hist.h
    191 sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
    192   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    193   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    194   source.h search_list.h corefile.h hist.h
    195 flat_bl.o: flat_bl.c
    196 bsd_callg_bl.o: bsd_callg_bl.c
    197 fsf_callg_bl.o: fsf_callg_bl.c
     195  $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
     196  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     197  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
     198  source.h symtab.h cg_arcs.h sym_ids.h
     199utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/ansidecl.h \
     200  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     201  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     202  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     203  symtab.h cg_arcs.h utils.h
     204i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     205  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     206  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     207  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     208  hist.h
     209alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     210  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     211  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     212  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     213  hist.h
     214vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     215  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     216  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     217  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     218  hist.h
     219tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     220  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     221  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     222  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     223  hist.h
     224sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     225  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     226  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     227  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     228  hist.h
     229mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     230  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     231  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     232  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     233  hist.h
     234flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
     235bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
     236fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
    198237# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  • branches/GNU/src/binutils/gprof/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 # Makefile.in generated automatically by automake 1.4 from Makefile.am
    2 
    3 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
     1# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
     2
     3# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
    44# This Makefile.in is free software; the Free Software Foundation
    55# gives unlimited permission to copy and/or distribute it,
     
    124124        cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
    125125        search_list.c symtab.c sym_ids.c utils.c \
    126         i386.c alpha.c vax.c tahoe.c sparc.c
     126        i386.c alpha.c vax.c tahoe.c sparc.c mips.c
    127127
    128128gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
     
    136136
    137137
    138 EXTRA_DIST = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c bbconv.pl
    139 
    140138BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
     139EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
    141140
    142141POTFILES = $(sources) $(noinst_HEADERS)
     142
     143MANCONF = -Dman
     144
     145TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
     146
     147POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
    143148
    144149info_TEXINFOS = gprof.texi
     
    163168hist.$(OBJEXT) source.$(OBJEXT) search_list.$(OBJEXT) symtab.$(OBJEXT) \
    164169sym_ids.$(OBJEXT) utils.$(OBJEXT) i386.$(OBJEXT) alpha.$(OBJEXT) \
    165 vax.$(OBJEXT) tahoe.$(OBJEXT) sparc.$(OBJEXT) flat_bl.$(OBJEXT) \
    166 bsd_callg_bl.$(OBJEXT) fsf_callg_bl.$(OBJEXT)
     170vax.$(OBJEXT) tahoe.$(OBJEXT) sparc.$(OBJEXT) mips.$(OBJEXT) \
     171flat_bl.$(OBJEXT) bsd_callg_bl.$(OBJEXT) fsf_callg_bl.$(OBJEXT)
    167172gprof_LDFLAGS =
    168173CFLAGS = @CFLAGS@
     
    182187HEADERS =  $(noinst_HEADERS)
    183188
    184 DIST_COMMON =  ./stamp-h.in ChangeLog Makefile.am Makefile.in TODO \
    185 acconfig.h acinclude.m4 aclocal.m4 configure configure.in gconfig.in
     189DIST_COMMON =  README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
     190TODO acinclude.m4 aclocal.m4 configure configure.in gconfig.in
    186191
    187192
     
    226231                $(MAKE) $(srcdir)/stamp-h.in; \
    227232        else :; fi
    228 $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
     233$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
    229234        cd $(top_srcdir) && $(AUTOHEADER)
    230235        @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
     
    385390        list='$(INFO_DEPS)'; \
    386391        for file in $$list; do \
    387           test -z "$ii" \
     392          test -z "$$ii" \
    388393            || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
    389394        done
     
    499504        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
    500505          rev="$$subdir $$rev"; \
    501           test "$$subdir" = "." && dot_seen=yes; \
     506          test "$$subdir" != "." || dot_seen=yes; \
    502507        done; \
    503508        test "$$dot_seen" = "no" && rev=". $$rev"; \
     
    707712
    708713
    709 diststuff: $(BUILT_SOURCES) info
     714diststuff: $(BUILT_SOURCES) info $(man_MANS)
    710715
    711716.m.c:
     
    716721        for file in $(POTFILES); do echo $$file; done | sort > tmp \
    717722          && mv tmp $(srcdir)/po/POTFILES.in
     723
     724# Build the man page from the texinfo file
     725# The sed command removes the no-adjust Nroff command so that
     726# the man output looks standard.
     727gprof.1: $(srcdir)/gprof.texi
     728        touch $@
     729        -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
     730        -($(POD2MAN) gprof.pod | \
     731               sed -e '/^.if n .na/d' > $@.T$$$$ && \
     732               mv -f $@.T$$$$ $@) || \
     733               (rm -f $@.T$$$$ && exit 1)
     734        rm -f gprof.pod
     735
     736Makefile: $(BFDDIR)/configure.in
     737
     738# We want install to imply install-info as per GNU standards, despite the
     739# cygnus option.
     740install: install-info
    718741
    719742# Targets to rebuild dependencies in this Makefile.
     
    742765                -e 's!@BFDDIR@!$(BFDDIR)!'      \
    743766                -e 's!@SRCDIR@!$(srcdir)!'      \
    744                 -e "s!@OBJDIR@!$${objdir}!"
     767                -e "s!@OBJDIR@!$${objdir}!"     \
     768                -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
    745769
    746770dep: DEP
     
    763787# DO NOT DELETE THIS LINE -- mkdep uses it.
    764788# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
    765 basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \
    766   $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    767   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    768   $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \
    769   ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
    770   $(INCDIR)/libiberty.h sym_ids.h
    771 call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
    772   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    773   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    774   symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \
    775   corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h
     789basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
     790  $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
     791  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     792  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h basic_blocks.h \
     793  corefile.h gmon_io.h gmon_out.h search_list.h source.h \
     794  symtab.h sym_ids.h
     795call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
     796  $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     797  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     798  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     799  symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
     800  gmon_out.h sym_ids.h
    776801cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    777802  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    778   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    779   call_graph.h symtab.h ../bfd/bfd.h source.h search_list.h \
    780   cg_arcs.h cg_dfn.h cg_print.h utils.h sym_ids.h
     803  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     804  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     805  symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
     806  utils.h sym_ids.h
    781807cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    782808  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    783   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    784   cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
    785   cg_dfn.h utils.h
     809  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     810  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     811  symtab.h cg_arcs.h cg_dfn.h utils.h
    786812cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    787   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    788   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    789   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
    790   search_list.h cg_print.h hist.h utils.h
     813  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     814  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     815  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     816  symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
    791817corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    792818  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    793   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    794   corefile.h ../bfd/bfd.h symtab.h source.h search_list.h
    795 gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
    796   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    797   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    798   symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \
    799   corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \
     819  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     820  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     821  symtab.h corefile.h
     822gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     823  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     824  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     825  search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
     826  corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
    800827  hertz.h hist.h $(INCDIR)/libiberty.h
    801 gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
    802   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    803   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    804   $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
    805   symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
    806   corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h \
    807   $(INCDIR)/demangle.h
    808 hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
    809   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    810   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h
     828gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
     829  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     830  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     831  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     832  symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
     833  corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
     834hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     835  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     836  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     837  hertz.h
    811838hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    812839  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
    813   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
    814   corefile.h ../bfd/bfd.h gmon_io.h gmon.h gmon_out.h \
    815   hist.h symtab.h source.h search_list.h sym_ids.h utils.h
    816 source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     840  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     841  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     842  symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
     843  utils.h
     844source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    817845  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    818   gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \
    819   search_list.h source.h
     846  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     847  $(INCDIR)/libiberty.h search_list.h source.h
    820848search_list.o: search_list.c $(INCDIR)/libiberty.h \
    821849  $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    822   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    823   $(INCDIR)/bin-bugs.h search_list.h
    824 symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     850  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     851  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h
     852symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    825853  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    826   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    827   source.h search_list.h corefile.h
     854  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     855  search_list.h source.h symtab.h cg_arcs.h corefile.h
    828856sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    829   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    830   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    831   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
    832   search_list.h sym_ids.h
    833 utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
    834   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
    835   $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    836   source.h search_list.h
    837 i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     857  $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
     858  $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
     859  $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
     860  source.h symtab.h cg_arcs.h sym_ids.h
     861utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/ansidecl.h \
     862  gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
     863  $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     864  gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
     865  symtab.h cg_arcs.h utils.h
     866i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    838867  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    839   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    840   source.h search_list.h corefile.h hist.h
    841 alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     868  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     869  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     870  hist.h
     871alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    842872  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    843   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    844   source.h search_list.h corefile.h hist.h
    845 vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     873  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     874  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     875  hist.h
     876vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    846877  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    847   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    848   source.h search_list.h corefile.h hist.h
    849 tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     878  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     879  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     880  hist.h
     881tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    850882  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    851   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    852   source.h search_list.h corefile.h hist.h
    853 sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
     883  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     884  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     885  hist.h
     886sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
    854887  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
    855   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
    856   source.h search_list.h corefile.h hist.h
    857 flat_bl.o: flat_bl.c
    858 bsd_callg_bl.o: bsd_callg_bl.c
    859 fsf_callg_bl.o: fsf_callg_bl.c
     888  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     889  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     890  hist.h
     891mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
     892  ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
     893  ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
     894  search_list.h source.h symtab.h cg_arcs.h corefile.h \
     895  hist.h
     896flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
     897bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
     898fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
    860899# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
    861900
  • branches/GNU/src/binutils/gprof/TODO

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11
    2 - gmon_io.c cannot deal with target architecture that have a pointer size
    3   that is different from the host architectures pointer size---fix this
    4   (gmon_out.h, and gmon_io.c)
    52- add support for prof file format so that prof files can be displayed
    63  at the line-level (this is useful for the uprofile tool under DEC's
  • branches/GNU/src/binutils/gprof/aclocal.m4

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 dnl aclocal.m4 generated automatically by aclocal 1.4
     1dnl aclocal.m4 generated automatically by aclocal 1.4-p5
    22
    3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
     3dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
    44dnl This file is free software; the Free Software Foundation
    55dnl gives unlimited permission to copy and/or distribute it,
     
    3535dnl AM_INIT_AUTOMAKE(package,version, [no-define])
    3636
    37 AC_DEFUN(AM_INIT_AUTOMAKE,
     37AC_DEFUN([AM_INIT_AUTOMAKE],
    3838[AC_REQUIRE([AC_PROG_INSTALL])
    3939PACKAGE=[$1]
     
    6363#
    6464
    65 AC_DEFUN(AM_SANITY_CHECK,
     65AC_DEFUN([AM_SANITY_CHECK],
    6666[AC_MSG_CHECKING([whether build environment is sane])
    6767# Just in case
     
    104104dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
    105105dnl The program must properly implement --version.
    106 AC_DEFUN(AM_MISSING_PROG,
     106AC_DEFUN([AM_MISSING_PROG],
    107107[AC_MSG_CHECKING(for working $2)
    108108# Run test in a subshell; some versions of sh will print an error if
     
    120120# Like AC_CONFIG_HEADER, but automatically create stamp file.
    121121
    122 AC_DEFUN(AM_CONFIG_HEADER,
     122AC_DEFUN([AM_CONFIG_HEADER],
    123123[AC_PREREQ([2.12])
    124124AC_CONFIG_HEADER([$1])
     
    146146# serial 1
    147147
    148 AC_DEFUN(AM_MAINTAINER_MODE,
     148AC_DEFUN([AM_MAINTAINER_MODE],
    149149[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
    150150  dnl maintainer-mode is disabled by default
     
    163163# Define a conditional.
    164164
    165 AC_DEFUN(AM_CONDITIONAL,
     165AC_DEFUN([AM_CONDITIONAL],
    166166[AC_SUBST($1_TRUE)
    167167AC_SUBST($1_FALSE)
  • branches/GNU/src/binutils/gprof/alpha.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 1998 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 1998
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "gprof.h"
     30#include "search_list.h"
     31#include "source.h"
     32#include "symtab.h"
    2033#include "cg_arcs.h"
    2134#include "corefile.h"
    2235#include "hist.h"
    23 #include "symtab.h"
    2436
    2537/*
     
    3446#define Jxx_FUNC_JSR_COROUTINE  3
    3547
     48#if 0
     49/* Here to document only.  We can't use this when cross compiling as
     50   the bitfield layout might not be the same as native.  */
    3651typedef union
    3752  {
     
    6075  }
    6176alpha_Instruction;
     77#endif
    6278
    6379static Sym indirect_child;
    6480
     81void alpha_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
    6582
    6683/*
     
    7794     bfd_vma p_highpc;
    7895{
    79   static bfd_vma delta = 0;
    80   bfd_vma dest_pc;
    81   alpha_Instruction *pc;
     96  bfd_vma pc, dest_pc;
     97  unsigned int insn;
    8298  Sym *child;
    8399
    84   if (!delta)
     100  if (indirect_child.name == NULL)
    85101    {
    86       delta = (bfd_vma) core_text_space - core_text_sect->vma;
    87 
    88102      sym_init (&indirect_child);
    89103      indirect_child.name = _("<indirect child>");
     
    107121                          parent->name, (unsigned long) p_lowpc,
    108122                          (unsigned long) p_highpc));
    109   for (pc = (alpha_Instruction *) (p_lowpc + delta);
    110        pc < (alpha_Instruction *) (p_highpc + delta);
    111        ++pc)
     123  for (pc = (p_lowpc + 3) & ~(bfd_vma) 3; pc < p_highpc; pc += 4)
    112124    {
    113       switch (pc->a.op_code)
     125      insn = bfd_get_32 (core_bfd, ((unsigned char *) core_text_space
     126                                    + pc - core_text_sect->vma));
     127      switch (insn & (0x3f << 26))
    114128        {
    115         case OP_Jxx:
     129        case OP_Jxx << 26:
    116130          /*
    117131           * There is no simple and reliable way to determine the
     
    122136           * to see that there are other calls as well.
    123137           */
    124           if (pc->j.func == Jxx_FUNC_JSR
    125               || pc->j.func == Jxx_FUNC_JSR_COROUTINE)
     138          if ((insn & (3 << 14)) == Jxx_FUNC_JSR << 14
     139              || (insn & (3 << 14)) == Jxx_FUNC_JSR_COROUTINE << 14)
    126140            {
    127141              DBG (CALLDEBUG,
    128142                   printf (_("[find_call] 0x%lx: jsr%s <indirect_child>\n"),
    129                            (unsigned long) pc - delta,
    130                            pc->j.func == Jxx_FUNC_JSR ? "" : "_coroutine"));
     143                           (unsigned long) pc,
     144                           ((insn & (3 << 14)) == Jxx_FUNC_JSR << 14
     145                            ? "" : "_coroutine")));
    131146              arc_add (parent, &indirect_child, (unsigned long) 0);
    132147            }
    133148          break;
    134149
    135         case OP_BSR:
     150        case OP_BSR << 26:
    136151          DBG (CALLDEBUG,
    137                printf (_("[find_call] 0x%lx: bsr"),
    138                        (unsigned long) pc - delta));
     152               printf (_("[find_call] 0x%lx: bsr"), (unsigned long) pc));
    139153          /*
    140154           * Regular PC relative addressing.  Check that this is the
    141155           * address of a function.  The linker sometimes redirects
    142156           * the entry point by 8 bytes to skip loading the global
    143            * pointer, so we all for either address:
     157           * pointer, so we allow for either address:
    144158           */
    145           dest_pc = ((bfd_vma) (pc + 1 + pc->b.disp)) - delta;
     159          dest_pc = pc + 4 + (((bfd_signed_vma) (insn & 0x1fffff)
     160                               ^ 0x100000) - 0x100000);
    146161          if (dest_pc >= s_lowpc && dest_pc <= s_highpc)
    147162            {
  • branches/GNU/src/binutils/gprof/basic_blocks.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33   basic-block related statistics.
    44
    5    Copyright 2000, 2001 Free Software Foundation, Inc.
     5   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    66
    77   This file is part of GNU Binutils.
     
    2323
    2424
    25 #include <stdio.h>
     25#include "libiberty.h"
     26#include "gprof.h"
    2627#include "basic_blocks.h"
    2728#include "corefile.h"
    2829#include "gmon_io.h"
    2930#include "gmon_out.h"
    30 #include "gprof.h"
    31 #include "libiberty.h"
     31#include "search_list.h"
    3232#include "source.h"
     33#include "symtab.h"
    3334#include "sym_ids.h"
    34 #ifdef HAVE_UNISTD_H
    35 #include <unistd.h>
    36 #endif
     35
     36static int cmp_bb PARAMS ((const PTR, const PTR));
     37static int cmp_ncalls PARAMS ((const PTR, const PTR));
     38static void fskip_string PARAMS ((FILE *));
     39static void annotate_with_count PARAMS ((char *, unsigned int, int, PTR));
    3740
    3841/* Default option values:  */
    39 bool bb_annotate_all_lines = FALSE;
     42bfd_boolean bb_annotate_all_lines = FALSE;
    4043unsigned long bb_min_calls = 1;
    4144int bb_table_length = 10;
     
    5154
    5255static int
    53 DEFUN (cmp_bb, (lp, rp), const void *lp AND const void *rp)
     56cmp_bb (lp, rp)
     57     const PTR lp;
     58     const PTR rp;
    5459{
    5560  int r;
     
    8085   calls, ties are broken in increasing order of line numbers.  */
    8186static int
    82 DEFUN (cmp_ncalls, (lp, rp), const void *lp AND const void *rp)
     87cmp_ncalls (lp, rp)
     88     const PTR lp;
     89     const PTR rp;
    8390{
    8491  const Sym *left = *(const Sym **) lp;
     
    100107/* Skip over variable length string.  */
    101108static void
    102 DEFUN (fskip_string, (fp), FILE * fp)
     109fskip_string (fp)
     110     FILE *fp;
    103111{
    104112  int ch;
     
    115123
    116124void
    117 DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
     125bb_read_rec (ifp, filename)
     126     FILE *ifp;
     127     const char *filename;
    118128{
    119129  int nblocks, b;
     
    185195      else
    186196        {
    187           static bool user_warned = FALSE;
     197          static bfd_boolean user_warned = FALSE;
    188198
    189199          if (!user_warned)
     
    203213   only.  */
    204214void
    205 DEFUN (bb_write_blocks, (ofp, filename), FILE * ofp AND const char *filename)
    206 {
    207   int nblocks = 0;
     215bb_write_blocks (ofp, filename)
     216     FILE *ofp;
     217     const char *filename;
     218{
     219  unsigned int nblocks = 0;
    208220  Sym *sym;
    209221  int i;
     
    231243        {
    232244          if (gmon_io_write_vma (ofp, sym->bb_addr[i])
    233               || gmon_io_write_vma (ofp, sym->bb_calls[i]))
     245              || gmon_io_write_vma (ofp, (bfd_vma) sym->bb_calls[i]))
    234246            {
    235247              perror (filename);
     
    246258
    247259void
    248 DEFUN_VOID (print_exec_counts)
     260print_exec_counts ()
    249261{
    250262  Sym **sorted_bbs, *sym;
    251   int i, j, len;
     263  unsigned int i, j, len;
    252264
    253265  if (first_output)
     
    313325
    314326static void
    315 DEFUN (annotate_with_count, (buf, width, line_num, arg),
    316        char *buf AND int width AND int line_num AND void *arg)
     327annotate_with_count (buf, width, line_num, arg)
     328     char *buf;
     329     unsigned int width;
     330     int line_num;
     331     PTR arg;
    317332{
    318333  Source_File *sf = arg;
    319334  Sym *b;
    320   int i;
     335  unsigned int i;
    321336  static unsigned long last_count;
    322337  unsigned long last_print = (unsigned long) -1;
     
    339354      unsigned long ncalls;
    340355      int ncalls_set;
    341       int len;
     356      unsigned int len;
    342357
    343358      ++num_executable_lines;
     
    415430      if (! ncalls_set)
    416431        {
    417           int c;
     432          unsigned int c;
    418433
    419434          for (c = 0; c < width; c++)
     
    442457      else
    443458        {
    444           int c;
     459          unsigned int c;
    445460
    446461          strcpy (buf + width - len, tmpbuf);
     
    456471
    457472void
    458 DEFUN_VOID (print_annotated_source)
     473print_annotated_source ()
    459474{
    460475  Sym *sym, *line_stats, *new_line;
  • branches/GNU/src/binutils/gprof/basic_blocks.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* basic_blocks.h
    2    Copyright 2000 Free Software Foundation, Inc.
     2   Copyright 2000, 2002 Free Software Foundation, Inc.
    33
    44This file is part of GNU Binutils.
     
    2222#define basic_blocks_h
    2323
    24 #include <stdio.h>
    25 #include "gprof.h"
    26 #include "source.h"
    27 #include "symtab.h"
    28 
    2924/* Options:  */
    30 extern bool bb_annotate_all_lines;      /* Force annotation of all lines?  */
     25extern bfd_boolean bb_annotate_all_lines; /* Force annotation of all lines?  */
    3126extern int bb_table_length;             /* Length of most-used bb table.  */
    3227extern unsigned long bb_min_calls;      /* Minimum execution count.  */
  • branches/GNU/src/binutils/gprof/bsd_callg_bl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33
    44#include <stdio.h>
     5#include "ansidecl.h"
    56
     7void  bsd_callg_blurb PARAMS ((FILE *));
    68void
    79bsd_callg_blurb (file)
  • branches/GNU/src/binutils/gprof/call_graph.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* call_graph.c  -  Create call graphs.
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2121
    2222
     23#include "gprof.h"
     24#include "search_list.h"
     25#include "source.h"
     26#include "symtab.h"
    2327#include "cg_arcs.h"
    2428#include "call_graph.h"
     
    2630#include "gmon_io.h"
    2731#include "gmon_out.h"
    28 #include "symtab.h"
    2932#include "sym_ids.h"
    3033
    31 extern void
    32 DEFUN (cg_tally, (from_pc, self_pc, count),
    33        bfd_vma from_pc AND bfd_vma self_pc AND unsigned long count)
     34void
     35cg_tally (from_pc, self_pc, count)
     36     bfd_vma from_pc;
     37     bfd_vma self_pc;
     38     unsigned long count;
    3439{
    3540  Sym *parent;
     
    7782
    7883void
    79 DEFUN (cg_read_rec, (ifp, filename), FILE * ifp AND CONST char *filename)
     84cg_read_rec (ifp, filename)
     85     FILE *ifp;
     86     const char *filename;
    8087{
    8188  bfd_vma from_pc, self_pc;
     
    104111
    105112void
    106 DEFUN (cg_write_arcs, (ofp, filename), FILE * ofp AND const char *filename)
     113cg_write_arcs (ofp, filename)
     114     FILE *ofp;
     115     const char *filename;
    107116{
    108117  Arc *arc;
  • branches/GNU/src/binutils/gprof/call_graph.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323#define call_graph_h
    2424
    25 #include <stdio.h>
    26 #include "gprof.h"
    27 #include "symtab.h"
    28 
    2925extern void cg_tally      PARAMS ((bfd_vma, bfd_vma, unsigned long));
    3026extern void cg_read_rec   PARAMS ((FILE *, const char *));
  • branches/GNU/src/binutils/gprof/cg_arcs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "libiberty.h"
    2030#include "gprof.h"
     31#include "search_list.h"
     32#include "source.h"
     33#include "symtab.h"
    2134#include "call_graph.h"
    2235#include "cg_arcs.h"
     
    2639#include "sym_ids.h"
    2740
     41static int cmp_topo PARAMS ((const PTR, const PTR));
     42static void propagate_time PARAMS ((Sym *));
     43static void cycle_time PARAMS ((void));
     44static void cycle_link PARAMS ((void));
     45static void inherit_flags PARAMS ((Sym *));
     46static void propagate_flags PARAMS ((Sym **));
     47static int cmp_total PARAMS ((const PTR, const PTR));
     48
    2849Sym *cycle_header;
    2950unsigned int num_cycles;
     
    3657 */
    3758Arc *
    38 DEFUN (arc_lookup, (parent, child), Sym * parent AND Sym * child)
     59arc_lookup (parent, child)
     60     Sym *parent;
     61     Sym *child;
    3962{
    4063  Arc *arc;
     
    6588 */
    6689void
    67 DEFUN (arc_add, (parent, child, count),
    68        Sym * parent AND Sym * child AND unsigned long count)
     90arc_add (parent, child, count)
     91     Sym *parent;
     92     Sym *child;
     93     unsigned long count;
    6994{
    7095  static unsigned int maxarcs = 0;
     
    132157
    133158static int
    134 DEFUN (cmp_topo, (lp, rp), const PTR lp AND const PTR rp)
     159cmp_topo (lp, rp)
     160     const PTR lp;
     161     const PTR rp;
    135162{
    136163  const Sym *left = *(const Sym **) lp;
     
    142169
    143170static void
    144 DEFUN (propagate_time, (parent), Sym * parent)
     171propagate_time (parent)
     172     Sym *parent;
    145173{
    146174  Arc *arc;
     
    226254 */
    227255static void
    228 DEFUN_VOID (cycle_time)
     256cycle_time ()
    229257{
    230258  Sym *member, *cyc;
     
    250278
    251279static void
    252 DEFUN_VOID (cycle_link)
     280cycle_link ()
    253281{
    254282  Sym *sym, *cyc, *member;
     
    338366 */
    339367static void
    340 DEFUN (inherit_flags, (child), Sym * child)
     368inherit_flags (child)
     369     Sym *child;
    341370{
    342371  Sym *head, *parent, *member;
     
    416445 */
    417446static void
    418 DEFUN (propagate_flags, (symbols), Sym ** symbols)
     447propagate_flags (symbols)
     448     Sym **symbols;
    419449{
    420450  int index;
     
    516546 */
    517547static int
    518 DEFUN (cmp_total, (lp, rp), const PTR lp AND const PTR rp)
     548cmp_total (lp, rp)
     549     const PTR lp;
     550     const PTR rp;
    519551{
    520552  const Sym *left = *(const Sym **) lp;
     
    573605 */
    574606Sym **
    575 DEFUN_VOID (cg_assemble)
     607cg_assemble ()
    576608{
    577609  Sym *parent, **time_sorted_syms, **top_sorted_syms;
  • branches/GNU/src/binutils/gprof/cg_arcs.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#ifndef cg_arcs_h
    22#define cg_arcs_h
    3 
    4 #include "gprof.h"
    5 #include "symtab.h"
    63
    74/*
  • branches/GNU/src/binutils/gprof/cg_dfn.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    18  */
    19 #include <stdio.h>
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
     28 */
    2029#include "libiberty.h"
    2130#include "gprof.h"
     31#include "search_list.h"
     32#include "source.h"
     33#include "symtab.h"
    2234#include "cg_arcs.h"
    2335#include "cg_dfn.h"
    24 #include "symtab.h"
    2536#include "utils.h"
    2637
     
    3445DFN_Stack;
    3546
     47static bfd_boolean is_numbered PARAMS ((Sym *));
     48static bfd_boolean is_busy PARAMS ((Sym *));
     49static void find_cycle PARAMS ((Sym *));
     50static void pre_visit PARAMS ((Sym *));
     51static void post_visit PARAMS ((Sym *));
     52
    3653DFN_Stack *dfn_stack = NULL;
    3754int dfn_maxdepth = 0;
     
    4360 * Is CHILD already numbered?
    4461 */
    45 static bool
    46 DEFUN (is_numbered, (child), Sym * child)
     62static bfd_boolean
     63is_numbered (child)
     64     Sym *child;
    4765{
    4866  return child->cg.top_order != DFN_NAN && child->cg.top_order != DFN_BUSY;
     
    5371 * Is CHILD already busy?
    5472 */
    55 static bool
    56 DEFUN (is_busy, (child), Sym * child)
     73static bfd_boolean
     74is_busy (child)
     75     Sym *child;
    5776{
    5877  if (child->cg.top_order == DFN_NAN)
     
    7190 */
    7291static void
    73 DEFUN (find_cycle, (child), Sym * child)
     92find_cycle (child)
     93     Sym *child;
    7494{
    7595  Sym *head = 0;
     
    194214 */
    195215static void
    196 DEFUN (pre_visit, (parent), Sym * parent)
     216pre_visit (parent)
     217     Sym *parent;
    197218{
    198219  ++dfn_depth;
     
    218239 */
    219240static void
    220 DEFUN (post_visit, (parent), Sym * parent)
     241post_visit (parent)
     242     Sym *parent;
    221243{
    222244  Sym *member;
     
    252274 */
    253275void
    254 DEFUN (cg_dfn, (parent), Sym * parent)
     276cg_dfn (parent)
     277     Sym *parent;
    255278{
    256279  Arc *arc;
  • branches/GNU/src/binutils/gprof/cg_print.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* cg_print.c -  Print routines for displaying call graphs.
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2222
    2323#include "libiberty.h"
     24#include "gprof.h"
     25#include "search_list.h"
     26#include "source.h"
     27#include "symtab.h"
    2428#include "cg_arcs.h"
    2529#include "cg_print.h"
    2630#include "hist.h"
    2731#include "utils.h"
     32#include "corefile.h"
    2833
    2934/* Return value of comparison functions used to sort tables.  */
     
    3237#define GREATERTHAN     1
    3338
    34 static void order_and_dump_functions_by_arcs PARAMS ((Arc **, unsigned long,
    35                                                       int, Arc **,
    36                                                       unsigned long *));
     39static void print_header PARAMS ((void));
     40static void print_cycle PARAMS ((Sym *));
     41static int cmp_member PARAMS ((Sym *, Sym *));
     42static void sort_members PARAMS ((Sym *));
     43static void print_members PARAMS ((Sym *));
     44static int cmp_arc PARAMS ((Arc *, Arc *));
     45static void sort_parents PARAMS ((Sym *));
     46static void print_parents PARAMS ((Sym *));
     47static void sort_children PARAMS ((Sym *));
     48static void print_children PARAMS ((Sym *));
     49static void print_line PARAMS ((Sym *));
     50static int cmp_name PARAMS ((const PTR, const PTR));
     51static int cmp_arc_count PARAMS ((const PTR, const PTR));
     52static int cmp_fun_nuses PARAMS ((const PTR, const PTR));
     53static void order_and_dump_functions_by_arcs
     54  PARAMS ((Arc **, unsigned long, int, Arc **, unsigned long *));
     55
    3756/* Declarations of automatically generated functions to output blurbs.  */
    3857extern void bsd_callg_blurb PARAMS ((FILE * fp));
     
    4362
    4463static void
    45 DEFUN_VOID (print_header)
     64print_header ()
    4665{
    4766  if (first_output)
     
    7796              "", "", "", "", _("called"), _("total"), _("parents"));
    7897      printf ("%-6.6s %5.5s %7.7s %11.11s %7.7s+%-7.7s %-8.8s\t%5.5s\n",
    79               _("index"), _("%time"), _("self"), _("descendents"),
     98              _("index"), _("%time"), _("self"), _("descendants"),
    8099              _("called"), _("self"), _("name"), _("index"));
    81100      printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s     %-8.8s\n",
     
    92111
    93112static void
    94 DEFUN (print_cycle, (cyc), Sym * cyc)
     113print_cycle (cyc)
     114     Sym *cyc;
    95115{
    96116  char buf[BUFSIZ];
     
    115135
    116136static int
    117 DEFUN (cmp_member, (left, right), Sym * left AND Sym * right)
     137cmp_member (left, right)
     138     Sym *left;
     139     Sym *right;
    118140{
    119141  double left_time = left->cg.prop.self + left->cg.prop.child;
     
    140162
    141163static void
    142 DEFUN (sort_members, (cyc), Sym * cyc)
     164sort_members (cyc)
     165     Sym *cyc;
    143166{
    144167  Sym *todo, *doing, *prev;
     
    167190
    168191static void
    169 DEFUN (print_members, (cyc), Sym * cyc)
     192print_members (cyc)
     193     Sym *cyc;
    170194{
    171195  Sym *member;
     
    201225
    202226static int
    203 DEFUN (cmp_arc, (left, right), Arc * left AND Arc * right)
     227cmp_arc (left, right)
     228     Arc *left;
     229     Arc *right;
    204230{
    205231  Sym *left_parent = left->parent;
     
    287313
    288314static void
    289 DEFUN (sort_parents, (child), Sym * child)
     315sort_parents (child)
     316     Sym * child;
    290317{
    291318  Arc *arc, *detached, sorted, *prev;
     
    320347
    321348static void
    322 DEFUN (print_parents, (child), Sym * child)
     349print_parents (child)
     350     Sym *child;
    323351{
    324352  Sym *parent;
     
    374402
    375403static void
    376 DEFUN (sort_children, (parent), Sym * parent)
     404sort_children (parent)
     405     Sym *parent;
    377406{
    378407  Arc *arc, *detached, sorted, *prev;
     
    407436
    408437static void
    409 DEFUN (print_children, (parent), Sym * parent)
     438print_children (parent)
     439     Sym *parent;
    410440{
    411441  Sym *child;
     
    446476
    447477static void
    448 DEFUN (print_line, (np), Sym * np)
     478print_line (np)
     479     Sym *np;
    449480{
    450481  char buf[BUFSIZ];
     
    479510
    480511void
    481 DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
     512cg_print (timesortsym)
     513     Sym ** timesortsym;
    482514{
    483515  unsigned int index;
     
    530562
    531563static int
    532 DEFUN (cmp_name, (left, right), const PTR left AND const PTR right)
     564cmp_name (left, right)
     565     const PTR left;
     566     const PTR right;
    533567{
    534568  const Sym **npp1 = (const Sym **) left;
     
    540574
    541575void
    542 DEFUN_VOID (cg_print_index)
     576cg_print_index ()
    543577{
    544578  unsigned int index;
     
    654688
    655689static int
    656 DEFUN (cmp_arc_count, (left, right), const PTR left AND const PTR right)
     690cmp_arc_count (left, right)
     691     const PTR left;
     692     const PTR right;
    657693{
    658694  const Arc **npp1 = (const Arc **) left;
     
    671707
    672708static int
    673 DEFUN (cmp_fun_nuses, (left, right), const PTR left AND const PTR right)
     709cmp_fun_nuses (left, right)
     710     const PTR left;
     711     const PTR right;
    674712{
    675713  const Sym **npp1 = (const Sym **) left;
     
    753791
    754792void
    755 DEFUN_VOID (cg_print_function_ordering)
     793cg_print_function_ordering ()
    756794{
    757795  unsigned long index, used, unused, scratch_index;
     
    958996}
    959997
    960 /* Place functions based on the arcs in ARCS with NUMARCS entries;
     998/* Place functions based on the arcs in THE_ARCS with ARC_COUNT entries;
    961999   place unused arcs into UNPLACED_ARCS/UNPLACED_ARC_COUNT.
    9621000
    963    If ALL is nonzero, then place all functions referenced by ARCS,
    964    else only place those referenced in the top 99% of the arcs in ARCS.  */
     1001   If ALL is nonzero, then place all functions referenced by THE_ARCS,
     1002   else only place those referenced in the top 99% of the arcs in THE_ARCS.  */
    9651003
    9661004#define MOST 0.99
    9671005static void
    968 order_and_dump_functions_by_arcs (arcs, numarcs, all,
     1006order_and_dump_functions_by_arcs (the_arcs, arc_count, all,
    9691007                                  unplaced_arcs, unplaced_arc_count)
    970      Arc **arcs;
    971      unsigned long numarcs;
     1008     Arc **the_arcs;
     1009     unsigned long arc_count;
    9721010     int all;
    9731011     Arc **unplaced_arcs;
     
    9871025    {
    9881026      total_arcs = 0;
    989       for (index = 0; index < numarcs; index++)
    990         total_arcs += arcs[index]->count;
     1027      for (index = 0; index < arc_count; index++)
     1028        total_arcs += the_arcs[index]->count;
    9911029    }
    9921030  else
     
    9951033  tmp_arcs = 0;
    9961034
    997   for (index = 0; index < numarcs; index++)
     1035  for (index = 0; index < arc_count; index++)
    9981036    {
    9991037      Sym *sym1, *sym2;
    10001038      Sym *child, *parent;
    10011039
    1002       tmp_arcs += arcs[index]->count;
     1040      tmp_arcs += the_arcs[index]->count;
    10031041
    10041042      /* Ignore this arc if it's already been placed.  */
    1005       if (arcs[index]->has_been_placed)
     1043      if (the_arcs[index]->has_been_placed)
    10061044        continue;
    10071045
    1008       child = arcs[index]->child;
    1009       parent = arcs[index]->parent;
     1046      child = the_arcs[index]->child;
     1047      parent = the_arcs[index]->parent;
    10101048
    10111049      /* If we're not using all arcs, and this is a rarely used
     
    10151053          || child->has_been_placed || parent->has_been_placed)
    10161054        {
    1017           unplaced_arcs[(*unplaced_arc_count)++] = arcs[index];
     1055          unplaced_arcs[(*unplaced_arc_count)++] = the_arcs[index];
    10181056          continue;
    10191057        }
     
    10251063      if (parent->next && parent->prev && child->next && child->prev)
    10261064        {
    1027           unplaced_arcs[(*unplaced_arc_count)++] = arcs[index];
     1065          unplaced_arcs[(*unplaced_arc_count)++] = the_arcs[index];
    10281066          continue;
    10291067        }
     
    10801118          /* Couldn't find anywhere to attach the functions,
    10811119             put the arc on the unplaced arc list.  */
    1082           unplaced_arcs[(*unplaced_arc_count)++] = arcs[index];
     1120          unplaced_arcs[(*unplaced_arc_count)++] = the_arcs[index];
    10831121          continue;
    10841122        }
     
    11051143        {
    11061144          /* This would tie two ends together.  */
    1107           unplaced_arcs[(*unplaced_arc_count)++] = arcs[index];
     1145          unplaced_arcs[(*unplaced_arc_count)++] = the_arcs[index];
    11081146          continue;
    11091147        }
     
    11171155              parent->prev = child;
    11181156              child->next = parent;
    1119               arcs[index]->has_been_placed = 1;
     1157              the_arcs[index]->has_been_placed = 1;
    11201158            }
    11211159        }
     
    11281166              parent->next = child;
    11291167              child->prev = parent;
    1130               arcs[index]->has_been_placed = 1;
     1168              the_arcs[index]->has_been_placed = 1;
    11311169            }
    11321170        }
     
    11401178              parent->prev = child;
    11411179              child->next = parent;
    1142               arcs[index]->has_been_placed = 1;
     1180              the_arcs[index]->has_been_placed = 1;
    11431181            }
    11441182          else
     
    11471185              parent->next = child;
    11481186              child->prev = parent;
    1149               arcs[index]->has_been_placed = 1;
     1187              the_arcs[index]->has_been_placed = 1;
    11501188            }
    11511189        }
     
    11531191
    11541192  /* Dump the chains of functions we've made.  */
    1155   for (index = 0; index < numarcs; index++)
     1193  for (index = 0; index < arc_count; index++)
    11561194    {
    11571195      Sym *sym;
    1158       if (arcs[index]->parent->has_been_placed
    1159           || arcs[index]->child->has_been_placed)
     1196      if (the_arcs[index]->parent->has_been_placed
     1197          || the_arcs[index]->child->has_been_placed)
    11601198        continue;
    11611199
    1162       sym = arcs[index]->parent;
     1200      sym = the_arcs[index]->parent;
    11631201
    11641202      /* If this symbol isn't attached to any other
     
    11861224     those which weren't placed by the main algorithm.  */
    11871225  if (all)
    1188     for (index = 0; index < numarcs; index++)
     1226    for (index = 0; index < arc_count; index++)
    11891227      {
    11901228        Sym *sym;
    1191         if (arcs[index]->parent->has_been_placed
    1192             || arcs[index]->child->has_been_placed)
     1229        if (the_arcs[index]->parent->has_been_placed
     1230            || the_arcs[index]->child->has_been_placed)
    11931231          continue;
    11941232
    1195         sym = arcs[index]->parent;
     1233        sym = the_arcs[index]->parent;
    11961234
    11971235        sym->has_been_placed = 1;
     
    12041242   code for the bulk of its work.  */
    12051243
    1206 struct function_map
    1207 {
    1208   char *function_name;
    1209   char *file_name;
    1210 };
    1211 
    12121244void
    1213 DEFUN_VOID (cg_print_file_ordering)
     1245cg_print_file_ordering ()
    12141246{
    12151247  unsigned long scratch_arc_count, index;
    12161248  Arc **scratch_arcs;
    1217   extern struct function_map *symbol_map;
    1218   extern unsigned int symbol_map_count;
    12191249  char *last;
    12201250
  • branches/GNU/src/binutils/gprof/cg_print.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323#define cg_print_h
    2424
    25 #include "gprof.h"
    26 #include "symtab.h"
    27 
    2825extern double print_time;       /* Total of time being printed.  */
    2926
  • branches/GNU/src/binutils/gprof/configure

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5050silent=
    5151site=
    52 sitefile=
    5352srcdir=
    5453target=NONE
     
    165164  --no-create             do not create output files
    166165  --quiet, --silent       do not print \`checking...' messages
    167   --site-file=FILE        use FILE as the site file
    168166  --version               print the version of autoconf that created configure
    169167Directory and file names:
     
    336334    site="$ac_optarg" ;;
    337335
    338   -site-file | --site-file | --site-fil | --site-fi | --site-f)
    339     ac_prev=sitefile ;;
    340   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
    341     sitefile="$ac_optarg" ;;
    342 
    343336  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    344337    ac_prev=srcdir ;;
     
    506499
    507500# Prefer explicitly selected file to automatically selected ones.
    508 if test -z "$sitefile"; then
    509   if test -z "$CONFIG_SITE"; then
    510     if test "x$prefix" != xNONE; then
    511       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
    512     else
    513       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    514     fi
     501if test -z "$CONFIG_SITE"; then
     502  if test "x$prefix" != xNONE; then
     503    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
     504  else
     505    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    515506  fi
    516 else
    517   CONFIG_SITE="$sitefile"
    518507fi
    519508for ac_site_file in $CONFIG_SITE; do
     
    554543
    555544echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
    556 echo "configure:557: checking for Cygwin environment" >&5
     545echo "configure:546: checking for Cygwin environment" >&5
    557546if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
    558547  echo $ac_n "(cached) $ac_c" 1>&6
    559548else
    560549  cat > conftest.$ac_ext <<EOF
    561 #line 562 "configure"
     550#line 551 "configure"
    562551#include "confdefs.h"
    563552
     
    570559; return 0; }
    571560EOF
    572 if { (eval echo configure:573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     561if { (eval echo configure:562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    573562  rm -rf conftest*
    574563  ac_cv_cygwin=yes
     
    587576test "$ac_cv_cygwin" = yes && CYGWIN=yes
    588577echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
    589 echo "configure:590: checking for mingw32 environment" >&5
     578echo "configure:579: checking for mingw32 environment" >&5
    590579if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
    591580  echo $ac_n "(cached) $ac_c" 1>&6
    592581else
    593582  cat > conftest.$ac_ext <<EOF
    594 #line 595 "configure"
     583#line 584 "configure"
    595584#include "confdefs.h"
    596585
     
    599588; return 0; }
    600589EOF
    601 if { (eval echo configure:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     590if { (eval echo configure:591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    602591  rm -rf conftest*
    603592  ac_cv_mingw32=yes
     
    664653
    665654echo $ac_n "checking host system type""... $ac_c" 1>&6
    666 echo "configure:667: checking host system type" >&5
     655echo "configure:656: checking host system type" >&5
    667656
    668657host_alias=$host
     
    685674
    686675echo $ac_n "checking target system type""... $ac_c" 1>&6
    687 echo "configure:688: checking target system type" >&5
     676echo "configure:677: checking target system type" >&5
    688677
    689678target_alias=$target
     
    703692
    704693echo $ac_n "checking build system type""... $ac_c" 1>&6
    705 echo "configure:706: checking build system type" >&5
     694echo "configure:695: checking build system type" >&5
    706695
    707696build_alias=$build
     
    728717set dummy gcc; ac_word=$2
    729718echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    730 echo "configure:731: checking for $ac_word" >&5
     719echo "configure:720: checking for $ac_word" >&5
    731720if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    732721  echo $ac_n "(cached) $ac_c" 1>&6
     
    758747set dummy cc; ac_word=$2
    759748echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    760 echo "configure:761: checking for $ac_word" >&5
     749echo "configure:750: checking for $ac_word" >&5
    761750if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    762751  echo $ac_n "(cached) $ac_c" 1>&6
     
    809798set dummy cl; ac_word=$2
    810799echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    811 echo "configure:812: checking for $ac_word" >&5
     800echo "configure:801: checking for $ac_word" >&5
    812801if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    813802  echo $ac_n "(cached) $ac_c" 1>&6
     
    841830
    842831echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    843 echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     832echo "configure:833: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    844833
    845834ac_ext=c
     
    852841cat > conftest.$ac_ext << EOF
    853842
    854 #line 855 "configure"
     843#line 844 "configure"
    855844#include "confdefs.h"
    856845
    857846main(){return(0);}
    858847EOF
    859 if { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     848if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    860849  ac_cv_prog_cc_works=yes
    861850  # If we can't run a trivial program, we are probably using a cross compiler.
     
    883872fi
    884873echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    885 echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     874echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    886875echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    887876cross_compiling=$ac_cv_prog_cc_cross
    888877
    889878echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    890 echo "configure:891: checking whether we are using GNU C" >&5
     879echo "configure:880: checking whether we are using GNU C" >&5
    891880if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    892881  echo $ac_n "(cached) $ac_c" 1>&6
     
    897886#endif
    898887EOF
    899 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     888if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    900889  ac_cv_prog_gcc=yes
    901890else
     
    916905CFLAGS=
    917906echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    918 echo "configure:919: checking whether ${CC-cc} accepts -g" >&5
     907echo "configure:908: checking whether ${CC-cc} accepts -g" >&5
    919908if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    920909  echo $ac_n "(cached) $ac_c" 1>&6
     
    948937
    949938echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
    950 echo "configure:951: checking for POSIXized ISC" >&5
     939echo "configure:940: checking for POSIXized ISC" >&5
    951940if test -d /etc/conf/kconfig.d &&
    952941  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
     
    982971# ./install, which can be erroneously created by make from ./install.sh.
    983972echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    984 echo "configure:985: checking for a BSD compatible install" >&5
     973echo "configure:974: checking for a BSD compatible install" >&5
    985974if test -z "$INSTALL"; then
    986975if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    10351024
    10361025echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
    1037 echo "configure:1038: checking whether build environment is sane" >&5
     1026echo "configure:1027: checking whether build environment is sane" >&5
    10381027# Just in case
    10391028sleep 1
     
    10921081
    10931082echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    1094 echo "configure:1095: checking whether ${MAKE-make} sets \${MAKE}" >&5
     1083echo "configure:1084: checking whether ${MAKE-make} sets \${MAKE}" >&5
    10951084set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    10961085if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    11381127missing_dir=`cd $ac_aux_dir && pwd`
    11391128echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
    1140 echo "configure:1141: checking for working aclocal" >&5
     1129echo "configure:1130: checking for working aclocal" >&5
    11411130# Run test in a subshell; some versions of sh will print an error if
    11421131# an executable is not found, even if stderr is redirected.
     
    11511140
    11521141echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
    1153 echo "configure:1154: checking for working autoconf" >&5
     1142echo "configure:1143: checking for working autoconf" >&5
    11541143# Run test in a subshell; some versions of sh will print an error if
    11551144# an executable is not found, even if stderr is redirected.
     
    11641153
    11651154echo $ac_n "checking for working automake""... $ac_c" 1>&6
    1166 echo "configure:1167: checking for working automake" >&5
     1155echo "configure:1156: checking for working automake" >&5
    11671156# Run test in a subshell; some versions of sh will print an error if
    11681157# an executable is not found, even if stderr is redirected.
     
    11771166
    11781167echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
    1179 echo "configure:1180: checking for working autoheader" >&5
     1168echo "configure:1169: checking for working autoheader" >&5
    11801169# Run test in a subshell; some versions of sh will print an error if
    11811170# an executable is not found, even if stderr is redirected.
     
    11901179
    11911180echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
    1192 echo "configure:1193: checking for working makeinfo" >&5
     1181echo "configure:1182: checking for working makeinfo" >&5
    11931182# Run test in a subshell; some versions of sh will print an error if
    11941183# an executable is not found, even if stderr is redirected.
     
    12081197  enableval="$enable_shared"
    12091198  p=${PACKAGE-default}
    1210 case "$enableval" in
     1199case $enableval in
    12111200yes) enable_shared=yes ;;
    12121201no) enable_shared=no ;;
     
    12311220  enableval="$enable_static"
    12321221  p=${PACKAGE-default}
    1233 case "$enableval" in
     1222case $enableval in
    12341223yes) enable_static=yes ;;
    12351224no) enable_static=no ;;
     
    12541243  enableval="$enable_fast_install"
    12551244  p=${PACKAGE-default}
    1256 case "$enableval" in
     1245case $enableval in
    12571246yes) enable_fast_install=yes ;;
    12581247no) enable_fast_install=no ;;
     
    12821271
    12831272ac_prog=ld
    1284 if test "$ac_cv_prog_gcc" = yes; then
     1273if test "$GCC" = yes; then
    12851274  # Check if gcc -print-prog-name=ld gives a path.
    12861275  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
    1287 echo "configure:1288: checking for ld used by GCC" >&5
     1276echo "configure:1277: checking for ld used by GCC" >&5
    12881277  case $host in
    12891278  *-*-mingw*)
     
    12931282    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
    12941283  esac
    1295   case "$ac_prog" in
     1284  case $ac_prog in
    12961285    # Accept absolute paths.
    12971286    [\\/]* | [A-Za-z]:[\\/]*)
     
    13151304elif test "$with_gnu_ld" = yes; then
    13161305  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
    1317 echo "configure:1318: checking for GNU ld" >&5
     1306echo "configure:1307: checking for GNU ld" >&5
    13181307else
    13191308  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
    1320 echo "configure:1321: checking for non-GNU ld" >&5
    1321 fi
    1322 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
     1309echo "configure:1310: checking for non-GNU ld" >&5
     1310fi
     1311if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
    13231312  echo $ac_n "(cached) $ac_c" 1>&6
    13241313else
     
    13281317    test -z "$ac_dir" && ac_dir=.
    13291318    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
    1330       ac_cv_path_LD="$ac_dir/$ac_prog"
     1319      lt_cv_path_LD="$ac_dir/$ac_prog"
    13311320      # Check to see if the program is GNU ld.  I'd rather use --version,
    13321321      # but apparently some GNU ld's only accept -v.
    13331322      # Break only if it was the GNU/non-GNU ld that we prefer.
    1334       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
     1323      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
    13351324        test "$with_gnu_ld" != no && break
    13361325      else
     
    13411330  IFS="$ac_save_ifs"
    13421331else
    1343   ac_cv_path_LD="$LD" # Let the user override the test with a path.
    1344 fi
    1345 fi
    1346 
    1347 LD="$ac_cv_path_LD"
     1332  lt_cv_path_LD="$LD" # Let the user override the test with a path.
     1333fi
     1334fi
     1335
     1336LD="$lt_cv_path_LD"
    13481337if test -n "$LD"; then
    13491338  echo "$ac_t""$LD" 1>&6
     
    13531342test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
    13541343echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
    1355 echo "configure:1356: checking if the linker ($LD) is GNU ld" >&5
    1356 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
     1344echo "configure:1345: checking if the linker ($LD) is GNU ld" >&5
     1345if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
    13571346  echo $ac_n "(cached) $ac_c" 1>&6
    13581347else
    13591348  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
    13601349if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
    1361   ac_cv_prog_gnu_ld=yes
    1362 else
    1363   ac_cv_prog_gnu_ld=no
    1364 fi
    1365 fi
    1366 
    1367 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
    1368 with_gnu_ld=$ac_cv_prog_gnu_ld
     1350  lt_cv_prog_gnu_ld=yes
     1351else
     1352  lt_cv_prog_gnu_ld=no
     1353fi
     1354fi
     1355
     1356echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
     1357with_gnu_ld=$lt_cv_prog_gnu_ld
    13691358
    13701359
    13711360echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
    1372 echo "configure:1373: checking for $LD option to reload object files" >&5
     1361echo "configure:1362: checking for $LD option to reload object files" >&5
    13731362if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
    13741363  echo $ac_n "(cached) $ac_c" 1>&6
     
    13821371
    13831372echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
    1384 echo "configure:1385: checking for BSD-compatible nm" >&5
    1385 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
     1373echo "configure:1374: checking for BSD-compatible nm" >&5
     1374if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
    13861375  echo $ac_n "(cached) $ac_c" 1>&6
    13871376else
    13881377  if test -n "$NM"; then
    13891378  # Let the user override the test.
    1390   ac_cv_path_NM="$NM"
     1379  lt_cv_path_NM="$NM"
    13911380else
    13921381  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
     
    14001389      # Tru64's nm complains that /dev/null is an invalid object file
    14011390      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
    1402         ac_cv_path_NM="$tmp_nm -B"
     1391        lt_cv_path_NM="$tmp_nm -B"
    14031392        break
    14041393      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
    1405         ac_cv_path_NM="$tmp_nm -p"
     1394        lt_cv_path_NM="$tmp_nm -p"
    14061395        break
    14071396      else
    1408         ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
     1397        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
    14091398        continue # so that we can try to find one that supports BSD flags
    14101399      fi
     
    14121401  done
    14131402  IFS="$ac_save_ifs"
    1414   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
    1415 fi
    1416 fi
    1417 
    1418 NM="$ac_cv_path_NM"
     1403  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
     1404fi
     1405fi
     1406
     1407NM="$lt_cv_path_NM"
    14191408echo "$ac_t""$NM" 1>&6
    14201409
    14211410echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
    1422 echo "configure:1423: checking whether ln -s works" >&5
     1411echo "configure:1412: checking whether ln -s works" >&5
    14231412if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    14241413  echo $ac_n "(cached) $ac_c" 1>&6
     
    14411430
    14421431echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
    1443 echo "configure:1444: checking how to recognise dependant libraries" >&5
     1432echo "configure:1433: checking how to recognise dependant libraries" >&5
    14441433if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
    14451434  echo $ac_n "(cached) $ac_c" 1>&6
     
    14591448# whether `pass_all' will *always* work, you probably want this one.
    14601449
    1461 case "$host_os" in
    1462 aix4*)
     1450case $host_os in
     1451aix*)
    14631452  lt_cv_deplibs_check_method=pass_all
    14641453  ;;
     
    14691458
    14701459bsdi4*)
    1471     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
    1472     lt_cv_file_magic_cmd='/usr/bin/file -L'
     1460  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
     1461  lt_cv_file_magic_cmd='/usr/bin/file -L'
    14731462  lt_cv_file_magic_test_file=/shlib/libc.so
    14741463  ;;
     
    14791468  ;;
    14801469
     1470darwin* | rhapsody*)
     1471  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
     1472  lt_cv_file_magic_cmd='/usr/bin/file -L'
     1473  case "$host_os" in
     1474  rhapsody* | darwin1.012)
     1475    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
     1476    ;;
     1477  *) # Darwin 1.3 on
     1478    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
     1479    ;;
     1480  esac
     1481  ;;
     1482
    14811483freebsd* )
    14821484  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    1483     case "$host_cpu" in
     1485    case $host_cpu in
    14841486    i*86 )
    14851487      # Not sure whether the presence of OpenBSD here was a mistake.
    14861488      # Let's accept both of them until this is cleared up.
    1487             lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
    1488             lt_cv_file_magic_cmd=/usr/bin/file
     1489      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
     1490      lt_cv_file_magic_cmd=/usr/bin/file
    14891491      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
    14901492      ;;
     
    14991501  ;;
    15001502
    1501 hpux10.20*)
    1502   # TODO:  Does this work for hpux-11 too?
    1503   lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
    1504   lt_cv_file_magic_cmd=/usr/bin/file
    1505   lt_cv_file_magic_test_file=/usr/lib/libc.sl
     1503hpux10.20*|hpux11*)
     1504  case $host_cpu in
     1505  hppa*)
     1506    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
     1507    lt_cv_file_magic_cmd=/usr/bin/file
     1508    lt_cv_file_magic_test_file=/usr/lib/libc.sl
     1509    ;;
     1510  ia64*)
     1511    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
     1512    lt_cv_file_magic_cmd=/usr/bin/file
     1513    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     1514    ;;
     1515  esac
    15061516  ;;
    15071517
    15081518irix5* | irix6*)
    1509   case "$host_os" in
     1519  case $host_os in
    15101520  irix5*)
    15111521    # this will be overridden with pass_all, but let us keep it just in case
     
    15131523    ;;
    15141524  *)
    1515     case "$LD" in
     1525    case $LD in
    15161526    *-32|*"-32 ") libmagic=32-bit;;
    15171527    *-n32|*"-n32 ") libmagic=N32;;
     
    15201530    esac
    15211531    # this will be overridden with pass_all, but let us keep it just in case
    1522         lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
    1523         ;;
     1532    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
     1533    ;;
    15241534  esac
    15251535  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
     
    15291539# This must be Linux ELF.
    15301540linux-gnu*)
    1531   case "$host_cpu" in
    1532   alpha* | i*86 | powerpc* | sparc* | ia64* )
     1541  case $host_cpu in
     1542  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
    15331543    lt_cv_deplibs_check_method=pass_all ;;
    15341544  *)
    15351545    # glibc up to 2.1.1 does not perform some relocations on ARM
    1536         lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
    1537       esac
     1546    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
     1547  esac
    15381548  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
    15391549  ;;
    15401550
    15411551netbsd*)
    1542   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
     1552  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     1553    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
    15431554  else
    1544         lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
    1545         lt_cv_file_magic_cmd='/usr/bin/file -L'
    1546     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     1555    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
    15471556  fi
     1557  ;;
     1558
     1559newsos6)
     1560  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
     1561  lt_cv_file_magic_cmd=/usr/bin/file
     1562  lt_cv_file_magic_test_file=/usr/lib/libnls.so
    15481563  ;;
    15491564
     
    15641579  ;;
    15651580
     1581sysv5uw[78]* | sysv4*uw2*)
     1582  lt_cv_deplibs_check_method=pass_all
     1583  ;;
     1584
    15661585sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
    1567   case "$host_vendor" in
     1586  case $host_vendor in
    15681587  ncr)
    15691588    lt_cv_deplibs_check_method=pass_all
    15701589    ;;
    15711590  motorola)
    1572         lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
    1573         lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     1591    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
     1592    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
    15741593    ;;
    15751594  esac
     
    15841603
    15851604echo $ac_n "checking for object suffix""... $ac_c" 1>&6
    1586 echo "configure:1587: checking for object suffix" >&5
     1605echo "configure:1606: checking for object suffix" >&5
    15871606if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
    15881607  echo $ac_n "(cached) $ac_c" 1>&6
     
    15901609  rm -f conftest*
    15911610echo 'int i = 1;' > conftest.$ac_ext
    1592 if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1611if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    15931612  for ac_file in conftest.*; do
    15941613    case $ac_file in
     
    16101629
    16111630echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
    1612 echo "configure:1613: checking for executable suffix" >&5
     1631echo "configure:1632: checking for executable suffix" >&5
    16131632if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    16141633  echo $ac_n "(cached) $ac_c" 1>&6
     
    16201639  echo 'int main () { return 0; }' > conftest.$ac_ext
    16211640  ac_cv_exeext=
    1622   if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     1641  if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    16231642    for file in conftest.*; do
    16241643      case $file in
    1625       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
     1644      *.c | *.o | *.obj) ;;
    16261645      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
    16271646      esac
     
    16491668
    16501669# Only perform the check for file, if the check method requires it
    1651 case "$deplibs_check_method" in
     1670case $deplibs_check_method in
    16521671file_magic*)
    16531672  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
    16541673    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
    1655 echo "configure:1656: checking for ${ac_tool_prefix}file" >&5
     1674echo "configure:1675: checking for ${ac_tool_prefix}file" >&5
    16561675if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
    16571676  echo $ac_n "(cached) $ac_c" 1>&6
    16581677else
    1659   case "$MAGIC_CMD" in
     1678  case $MAGIC_CMD in
    16601679  /*)
    16611680  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
     
    16731692      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
    16741693      if test -n "$file_magic_test_file"; then
    1675         case "$deplibs_check_method" in
     1694        case $deplibs_check_method in
    16761695        "file_magic "*)
    16771696          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
     
    17151734  if test -n "$ac_tool_prefix"; then
    17161735    echo $ac_n "checking for file""... $ac_c" 1>&6
    1717 echo "configure:1718: checking for file" >&5
     1736echo "configure:1737: checking for file" >&5
    17181737if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
    17191738  echo $ac_n "(cached) $ac_c" 1>&6
    17201739else
    1721   case "$MAGIC_CMD" in
     1740  case $MAGIC_CMD in
    17221741  /*)
    17231742  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
     
    17351754      lt_cv_path_MAGIC_CMD="$ac_dir/file"
    17361755      if test -n "$file_magic_test_file"; then
    1737         case "$deplibs_check_method" in
     1756        case $deplibs_check_method in
    17381757        "file_magic "*)
    17391758          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
     
    17861805set dummy ${ac_tool_prefix}ranlib; ac_word=$2
    17871806echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1788 echo "configure:1789: checking for $ac_word" >&5
     1807echo "configure:1808: checking for $ac_word" >&5
    17891808if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    17901809  echo $ac_n "(cached) $ac_c" 1>&6
     
    18181837set dummy ranlib; ac_word=$2
    18191838echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1820 echo "configure:1821: checking for $ac_word" >&5
     1839echo "configure:1840: checking for $ac_word" >&5
    18211840if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    18221841  echo $ac_n "(cached) $ac_c" 1>&6
     
    18531872set dummy ${ac_tool_prefix}strip; ac_word=$2
    18541873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1855 echo "configure:1856: checking for $ac_word" >&5
     1874echo "configure:1875: checking for $ac_word" >&5
    18561875if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
    18571876  echo $ac_n "(cached) $ac_c" 1>&6
     
    18851904set dummy strip; ac_word=$2
    18861905echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1887 echo "configure:1888: checking for $ac_word" >&5
     1906echo "configure:1907: checking for $ac_word" >&5
    18881907if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
    18891908  echo $ac_n "(cached) $ac_c" 1>&6
     
    19231942test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
    19241943test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
    1925 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
    1926 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
     1944test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
     1945test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
    19271946
    19281947
     
    19491968# Some flags need to be propagated to the compiler or linker for good
    19501969# libtool support.
    1951 case "$host" in
     1970case $host in
    19521971*-*-irix6*)
    19531972  # Find out which ABI we are using.
    1954   echo '#line 1955 "configure"' > conftest.$ac_ext
    1955   if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    1956     case "`/usr/bin/file conftest.o`" in
     1973  echo '#line 1974 "configure"' > conftest.$ac_ext
     1974  if { (eval echo configure:1975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1975    case `/usr/bin/file conftest.$ac_objext` in
    19571976    *32-bit*)
    19581977      LD="${LD-ld} -32"
     
    19691988  ;;
    19701989
     1990ia64-*-hpux*)
     1991  # Find out which ABI we are using.
     1992  echo 'int i;' > conftest.$ac_ext
     1993  if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1994    case "`/usr/bin/file conftest.o`" in
     1995    *ELF-32*)
     1996      HPUX_IA64_MODE="32"
     1997      ;;
     1998    *ELF-64*)
     1999      HPUX_IA64_MODE="64"
     2000      ;;
     2001    esac
     2002  fi
     2003  rm -rf conftest*
     2004  ;;
     2005
    19712006*-*-sco3.2v5*)
    19722007  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
     
    19742009  CFLAGS="$CFLAGS -belf"
    19752010  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
    1976 echo "configure:1977: checking whether the C compiler needs -belf" >&5
     2011echo "configure:2012: checking whether the C compiler needs -belf" >&5
    19772012if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
    19782013  echo $ac_n "(cached) $ac_c" 1>&6
     
    19872022
    19882023     cat > conftest.$ac_ext <<EOF
    1989 #line 1990 "configure"
     2024#line 2025 "configure"
    19902025#include "confdefs.h"
    19912026
     
    19942029; return 0; }
    19952030EOF
    1996 if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2031if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    19972032  rm -rf conftest*
    19982033  lt_cv_cc_needs_belf=yes
     
    21042139exec 5>>./config.log
    21052140
    2106 
    21072141 
    21082142
     
    21182152set dummy gcc; ac_word=$2
    21192153echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2120 echo "configure:2121: checking for $ac_word" >&5
     2154echo "configure:2155: checking for $ac_word" >&5
    21212155if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    21222156  echo $ac_n "(cached) $ac_c" 1>&6
     
    21482182set dummy cc; ac_word=$2
    21492183echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2150 echo "configure:2151: checking for $ac_word" >&5
     2184echo "configure:2185: checking for $ac_word" >&5
    21512185if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    21522186  echo $ac_n "(cached) $ac_c" 1>&6
     
    21992233set dummy cl; ac_word=$2
    22002234echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2201 echo "configure:2202: checking for $ac_word" >&5
     2235echo "configure:2236: checking for $ac_word" >&5
    22022236if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    22032237  echo $ac_n "(cached) $ac_c" 1>&6
     
    22312265
    22322266echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    2233 echo "configure:2234: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     2267echo "configure:2268: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    22342268
    22352269ac_ext=c
     
    22422276cat > conftest.$ac_ext << EOF
    22432277
    2244 #line 2245 "configure"
     2278#line 2279 "configure"
    22452279#include "confdefs.h"
    22462280
    22472281main(){return(0);}
    22482282EOF
    2249 if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2283if { (eval echo configure:2284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    22502284  ac_cv_prog_cc_works=yes
    22512285  # If we can't run a trivial program, we are probably using a cross compiler.
     
    22732307fi
    22742308echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    2275 echo "configure:2276: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     2309echo "configure:2310: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    22762310echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    22772311cross_compiling=$ac_cv_prog_cc_cross
    22782312
    22792313echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    2280 echo "configure:2281: checking whether we are using GNU C" >&5
     2314echo "configure:2315: checking whether we are using GNU C" >&5
    22812315if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    22822316  echo $ac_n "(cached) $ac_c" 1>&6
     
    22872321#endif
    22882322EOF
    2289 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     2323if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    22902324  ac_cv_prog_gcc=yes
    22912325else
     
    23062340CFLAGS=
    23072341echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    2308 echo "configure:2309: checking whether ${CC-cc} accepts -g" >&5
     2342echo "configure:2343: checking whether ${CC-cc} accepts -g" >&5
    23092343if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    23102344  echo $ac_n "(cached) $ac_c" 1>&6
     
    23492383# ./install, which can be erroneously created by make from ./install.sh.
    23502384echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    2351 echo "configure:2352: checking for a BSD compatible install" >&5
     2385echo "configure:2386: checking for a BSD compatible install" >&5
    23522386if test -z "$INSTALL"; then
    23532387if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    24052439do
    24062440echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2407 echo "configure:2408: checking for $ac_func" >&5
     2441echo "configure:2442: checking for $ac_func" >&5
    24082442if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    24092443  echo $ac_n "(cached) $ac_c" 1>&6
    24102444else
    24112445  cat > conftest.$ac_ext <<EOF
    2412 #line 2413 "configure"
     2446#line 2447 "configure"
    24132447#include "confdefs.h"
    24142448/* System header to define __stub macros and hopefully few prototypes,
     
    24332467; return 0; }
    24342468EOF
    2435 if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2469if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    24362470  rm -rf conftest*
    24372471  eval "ac_cv_func_$ac_func=yes"
     
    24582492
    24592493
    2460 ALL_LINGUAS=
     2494ALL_LINGUAS="fr tr sv es id da pt_BR"
    24612495echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    2462 echo "configure:2463: checking how to run the C preprocessor" >&5
     2496echo "configure:2497: checking how to run the C preprocessor" >&5
    24632497# On Suns, sometimes $CPP names a directory.
    24642498if test -n "$CPP" && test -d "$CPP"; then
     
    24752509  # not just through cpp.
    24762510  cat > conftest.$ac_ext <<EOF
    2477 #line 2478 "configure"
    2478 #include "confdefs.h"
    2479 #include <assert.h>
    2480 Syntax Error
    2481 EOF
    2482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2483 { (eval echo configure:2484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    2484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    2485 if test -z "$ac_err"; then
    2486   :
    2487 else
    2488   echo "$ac_err" >&5
    2489   echo "configure: failed program was:" >&5
    2490   cat conftest.$ac_ext >&5
    2491   rm -rf conftest*
    2492   CPP="${CC-cc} -E -traditional-cpp"
    2493   cat > conftest.$ac_ext <<EOF
    2494 #line 2495 "configure"
    2495 #include "confdefs.h"
    2496 #include <assert.h>
    2497 Syntax Error
    2498 EOF
    2499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2500 { (eval echo configure:2501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    2501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    2502 if test -z "$ac_err"; then
    2503   :
    2504 else
    2505   echo "$ac_err" >&5
    2506   echo "configure: failed program was:" >&5
    2507   cat conftest.$ac_ext >&5
    2508   rm -rf conftest*
    2509   CPP="${CC-cc} -nologo -E"
    2510   cat > conftest.$ac_ext <<EOF
    25112511#line 2512 "configure"
    25122512#include "confdefs.h"
     
    25242524  cat conftest.$ac_ext >&5
    25252525  rm -rf conftest*
     2526  CPP="${CC-cc} -E -traditional-cpp"
     2527  cat > conftest.$ac_ext <<EOF
     2528#line 2529 "configure"
     2529#include "confdefs.h"
     2530#include <assert.h>
     2531Syntax Error
     2532EOF
     2533ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     2534{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2535ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     2536if test -z "$ac_err"; then
     2537  :
     2538else
     2539  echo "$ac_err" >&5
     2540  echo "configure: failed program was:" >&5
     2541  cat conftest.$ac_ext >&5
     2542  rm -rf conftest*
     2543  CPP="${CC-cc} -nologo -E"
     2544  cat > conftest.$ac_ext <<EOF
     2545#line 2546 "configure"
     2546#include "confdefs.h"
     2547#include <assert.h>
     2548Syntax Error
     2549EOF
     2550ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     2551{ (eval echo configure:2552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2552ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     2553if test -z "$ac_err"; then
     2554  :
     2555else
     2556  echo "$ac_err" >&5
     2557  echo "configure: failed program was:" >&5
     2558  cat conftest.$ac_ext >&5
     2559  rm -rf conftest*
    25262560  CPP=/lib/cpp
    25272561fi
     
    25422576set dummy ranlib; ac_word=$2
    25432577echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2544 echo "configure:2545: checking for $ac_word" >&5
     2578echo "configure:2579: checking for $ac_word" >&5
    25452579if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    25462580  echo $ac_n "(cached) $ac_c" 1>&6
     
    25702604
    25712605echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    2572 echo "configure:2573: checking for ANSI C header files" >&5
     2606echo "configure:2607: checking for ANSI C header files" >&5
    25732607if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    25742608  echo $ac_n "(cached) $ac_c" 1>&6
    25752609else
    25762610  cat > conftest.$ac_ext <<EOF
    2577 #line 2578 "configure"
     2611#line 2612 "configure"
    25782612#include "confdefs.h"
    25792613#include <stdlib.h>
     
    25832617EOF
    25842618ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2585 { (eval echo configure:2586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2619{ (eval echo configure:2620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    25862620ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    25872621if test -z "$ac_err"; then
     
    26002634  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    26012635cat > conftest.$ac_ext <<EOF
    2602 #line 2603 "configure"
     2636#line 2637 "configure"
    26032637#include "confdefs.h"
    26042638#include <string.h>
     
    26182652  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    26192653cat > conftest.$ac_ext <<EOF
    2620 #line 2621 "configure"
     2654#line 2655 "configure"
    26212655#include "confdefs.h"
    26222656#include <stdlib.h>
     
    26392673else
    26402674  cat > conftest.$ac_ext <<EOF
    2641 #line 2642 "configure"
     2675#line 2676 "configure"
    26422676#include "confdefs.h"
    26432677#include <ctype.h>
     
    26502684
    26512685EOF
    2652 if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2686if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    26532687then
    26542688  :
     
    26742708
    26752709echo $ac_n "checking for working const""... $ac_c" 1>&6
    2676 echo "configure:2677: checking for working const" >&5
     2710echo "configure:2711: checking for working const" >&5
    26772711if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    26782712  echo $ac_n "(cached) $ac_c" 1>&6
    26792713else
    26802714  cat > conftest.$ac_ext <<EOF
    2681 #line 2682 "configure"
     2715#line 2716 "configure"
    26822716#include "confdefs.h"
    26832717
     
    27282762; return 0; }
    27292763EOF
    2730 if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2764if { (eval echo configure:2765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    27312765  rm -rf conftest*
    27322766  ac_cv_c_const=yes
     
    27492783
    27502784echo $ac_n "checking for inline""... $ac_c" 1>&6
    2751 echo "configure:2752: checking for inline" >&5
     2785echo "configure:2786: checking for inline" >&5
    27522786if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    27532787  echo $ac_n "(cached) $ac_c" 1>&6
     
    27562790for ac_kw in inline __inline__ __inline; do
    27572791  cat > conftest.$ac_ext <<EOF
    2758 #line 2759 "configure"
     2792#line 2793 "configure"
    27592793#include "confdefs.h"
    27602794
     
    27632797; return 0; }
    27642798EOF
    2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2799if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    27662800  rm -rf conftest*
    27672801  ac_cv_c_inline=$ac_kw; break
     
    27892823
    27902824echo $ac_n "checking for off_t""... $ac_c" 1>&6
    2791 echo "configure:2792: checking for off_t" >&5
     2825echo "configure:2826: checking for off_t" >&5
    27922826if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    27932827  echo $ac_n "(cached) $ac_c" 1>&6
    27942828else
    27952829  cat > conftest.$ac_ext <<EOF
    2796 #line 2797 "configure"
     2830#line 2831 "configure"
    27972831#include "confdefs.h"
    27982832#include <sys/types.h>
     
    28222856
    28232857echo $ac_n "checking for size_t""... $ac_c" 1>&6
    2824 echo "configure:2825: checking for size_t" >&5
     2858echo "configure:2859: checking for size_t" >&5
    28252859if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    28262860  echo $ac_n "(cached) $ac_c" 1>&6
    28272861else
    28282862  cat > conftest.$ac_ext <<EOF
    2829 #line 2830 "configure"
     2863#line 2864 "configure"
    28302864#include "confdefs.h"
    28312865#include <sys/types.h>
     
    28572891# for constant arguments.  Useless!
    28582892echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
    2859 echo "configure:2860: checking for working alloca.h" >&5
     2893echo "configure:2894: checking for working alloca.h" >&5
    28602894if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    28612895  echo $ac_n "(cached) $ac_c" 1>&6
    28622896else
    28632897  cat > conftest.$ac_ext <<EOF
    2864 #line 2865 "configure"
     2898#line 2899 "configure"
    28652899#include "confdefs.h"
    28662900#include <alloca.h>
     
    28692903; return 0; }
    28702904EOF
    2871 if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2905if { (eval echo configure:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    28722906  rm -rf conftest*
    28732907  ac_cv_header_alloca_h=yes
     
    28902924
    28912925echo $ac_n "checking for alloca""... $ac_c" 1>&6
    2892 echo "configure:2893: checking for alloca" >&5
     2926echo "configure:2927: checking for alloca" >&5
    28932927if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    28942928  echo $ac_n "(cached) $ac_c" 1>&6
    28952929else
    28962930  cat > conftest.$ac_ext <<EOF
    2897 #line 2898 "configure"
     2931#line 2932 "configure"
    28982932#include "confdefs.h"
    28992933
     
    29232957; return 0; }
    29242958EOF
    2925 if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29262960  rm -rf conftest*
    29272961  ac_cv_func_alloca_works=yes
     
    29552989
    29562990echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
    2957 echo "configure:2958: checking whether alloca needs Cray hooks" >&5
     2991echo "configure:2992: checking whether alloca needs Cray hooks" >&5
    29582992if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    29592993  echo $ac_n "(cached) $ac_c" 1>&6
    29602994else
    29612995  cat > conftest.$ac_ext <<EOF
    2962 #line 2963 "configure"
     2996#line 2997 "configure"
    29632997#include "confdefs.h"
    29642998#if defined(CRAY) && ! defined(CRAY2)
     
    29853019for ac_func in _getb67 GETB67 getb67; do
    29863020  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2987 echo "configure:2988: checking for $ac_func" >&5
     3021echo "configure:3022: checking for $ac_func" >&5
    29883022if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    29893023  echo $ac_n "(cached) $ac_c" 1>&6
    29903024else
    29913025  cat > conftest.$ac_ext <<EOF
    2992 #line 2993 "configure"
     3026#line 3027 "configure"
    29933027#include "confdefs.h"
    29943028/* System header to define __stub macros and hopefully few prototypes,
     
    30133047; return 0; }
    30143048EOF
    3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3049if { (eval echo configure:3050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    30163050  rm -rf conftest*
    30173051  eval "ac_cv_func_$ac_func=yes"
     
    30403074
    30413075echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
    3042 echo "configure:3043: checking stack direction for C alloca" >&5
     3076echo "configure:3077: checking stack direction for C alloca" >&5
    30433077if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    30443078  echo $ac_n "(cached) $ac_c" 1>&6
     
    30483082else
    30493083  cat > conftest.$ac_ext <<EOF
    3050 #line 3051 "configure"
     3084#line 3085 "configure"
    30513085#include "confdefs.h"
    30523086find_stack_direction ()
     
    30673101}
    30683102EOF
    3069 if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3103if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    30703104then
    30713105  ac_cv_c_stack_direction=1
     
    30883122fi
    30893123
    3090 for ac_hdr in unistd.h
     3124for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
    30913125do
    30923126ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    30933127echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    3094 echo "configure:3095: checking for $ac_hdr" >&5
     3128echo "configure:3129: checking for $ac_hdr" >&5
    30953129if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    30963130  echo $ac_n "(cached) $ac_c" 1>&6
    30973131else
    30983132  cat > conftest.$ac_ext <<EOF
    3099 #line 3100 "configure"
     3133#line 3134 "configure"
    31003134#include "confdefs.h"
    31013135#include <$ac_hdr>
    31023136EOF
    31033137ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3104 { (eval echo configure:3105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3138{ (eval echo configure:3139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    31053139ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    31063140if test -z "$ac_err"; then
     
    31313165do
    31323166echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3133 echo "configure:3134: checking for $ac_func" >&5
     3167echo "configure:3168: checking for $ac_func" >&5
    31343168if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    31353169  echo $ac_n "(cached) $ac_c" 1>&6
    31363170else
    31373171  cat > conftest.$ac_ext <<EOF
    3138 #line 3139 "configure"
     3172#line 3173 "configure"
    31393173#include "confdefs.h"
    31403174/* System header to define __stub macros and hopefully few prototypes,
     
    31593193; return 0; }
    31603194EOF
    3161 if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3195if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    31623196  rm -rf conftest*
    31633197  eval "ac_cv_func_$ac_func=yes"
     
    31843218
    31853219echo $ac_n "checking for working mmap""... $ac_c" 1>&6
    3186 echo "configure:3187: checking for working mmap" >&5
     3220echo "configure:3221: checking for working mmap" >&5
    31873221if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
    31883222  echo $ac_n "(cached) $ac_c" 1>&6
     
    31923226else
    31933227  cat > conftest.$ac_ext <<EOF
    3194 #line 3195 "configure"
     3228#line 3229 "configure"
    31953229#include "confdefs.h"
    31963230
     
    32203254#include <sys/mman.h>
    32213255
     3256#if HAVE_SYS_TYPES_H
     3257# include <sys/types.h>
     3258#endif
     3259
     3260#if HAVE_STDLIB_H
     3261# include <stdlib.h>
     3262#endif
     3263
     3264#if HAVE_SYS_STAT_H
     3265# include <sys/stat.h>
     3266#endif
     3267
     3268#if HAVE_UNISTD_H
     3269# include <unistd.h>
     3270#endif
     3271
    32223272/* This mess was copied from the GNU getpagesize.h.  */
    32233273#ifndef HAVE_GETPAGESIZE
    3224 # ifdef HAVE_UNISTD_H
    3225 #  include <unistd.h>
    3226 # endif
    32273274
    32283275/* Assume that all systems that can run configure have sys/param.h.  */
     
    33323379
    33333380EOF
    3334 if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3381if { (eval echo configure:3382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    33353382then
    33363383  ac_cv_func_mmap_fixed_mapped=yes
     
    33603407ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    33613408echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    3362 echo "configure:3363: checking for $ac_hdr" >&5
     3409echo "configure:3410: checking for $ac_hdr" >&5
    33633410if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    33643411  echo $ac_n "(cached) $ac_c" 1>&6
    33653412else
    33663413  cat > conftest.$ac_ext <<EOF
    3367 #line 3368 "configure"
     3414#line 3415 "configure"
    33683415#include "confdefs.h"
    33693416#include <$ac_hdr>
    33703417EOF
    33713418ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3372 { (eval echo configure:3373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3419{ (eval echo configure:3420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    33733420ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    33743421if test -z "$ac_err"; then
     
    34003447do
    34013448echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3402 echo "configure:3403: checking for $ac_func" >&5
     3449echo "configure:3450: checking for $ac_func" >&5
    34033450if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    34043451  echo $ac_n "(cached) $ac_c" 1>&6
    34053452else
    34063453  cat > conftest.$ac_ext <<EOF
    3407 #line 3408 "configure"
     3454#line 3455 "configure"
    34083455#include "confdefs.h"
    34093456/* System header to define __stub macros and hopefully few prototypes,
     
    34283475; return 0; }
    34293476EOF
    3430 if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3477if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    34313478  rm -rf conftest*
    34323479  eval "ac_cv_func_$ac_func=yes"
     
    34573504do
    34583505echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3459 echo "configure:3460: checking for $ac_func" >&5
     3506echo "configure:3507: checking for $ac_func" >&5
    34603507if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    34613508  echo $ac_n "(cached) $ac_c" 1>&6
    34623509else
    34633510  cat > conftest.$ac_ext <<EOF
    3464 #line 3465 "configure"
     3511#line 3512 "configure"
    34653512#include "confdefs.h"
    34663513/* System header to define __stub macros and hopefully few prototypes,
     
    34853532; return 0; }
    34863533EOF
    3487 if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3534if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    34883535  rm -rf conftest*
    34893536  eval "ac_cv_func_$ac_func=yes"
     
    35193566   if test $ac_cv_header_locale_h = yes; then
    35203567    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
    3521 echo "configure:3522: checking for LC_MESSAGES" >&5
     3568echo "configure:3569: checking for LC_MESSAGES" >&5
    35223569if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
    35233570  echo $ac_n "(cached) $ac_c" 1>&6
    35243571else
    35253572  cat > conftest.$ac_ext <<EOF
    3526 #line 3527 "configure"
     3573#line 3574 "configure"
    35273574#include "confdefs.h"
    35283575#include <locale.h>
     
    35313578; return 0; }
    35323579EOF
    3533 if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3580if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    35343581  rm -rf conftest*
    35353582  am_cv_val_LC_MESSAGES=yes
     
    35523599  fi
    35533600   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
    3554 echo "configure:3555: checking whether NLS is requested" >&5
     3601echo "configure:3602: checking whether NLS is requested" >&5
    35553602        # Check whether --enable-nls or --disable-nls was given.
    35563603if test "${enable_nls+set}" = set; then
     
    35723619
    35733620      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
    3574 echo "configure:3575: checking whether included gettext is requested" >&5
     3621echo "configure:3622: checking whether included gettext is requested" >&5
    35753622      # Check whether --with-included-gettext or --without-included-gettext was given.
    35763623if test "${with_included_gettext+set}" = set; then
     
    35913638        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
    35923639echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
    3593 echo "configure:3594: checking for libintl.h" >&5
     3640echo "configure:3641: checking for libintl.h" >&5
    35943641if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    35953642  echo $ac_n "(cached) $ac_c" 1>&6
    35963643else
    35973644  cat > conftest.$ac_ext <<EOF
    3598 #line 3599 "configure"
     3645#line 3646 "configure"
    35993646#include "confdefs.h"
    36003647#include <libintl.h>
    36013648EOF
    36023649ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3603 { (eval echo configure:3604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3650{ (eval echo configure:3651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    36043651ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    36053652if test -z "$ac_err"; then
     
    36183665  echo "$ac_t""yes" 1>&6
    36193666  echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
    3620 echo "configure:3621: checking for gettext in libc" >&5
     3667echo "configure:3668: checking for gettext in libc" >&5
    36213668if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
    36223669  echo $ac_n "(cached) $ac_c" 1>&6
    36233670else
    36243671  cat > conftest.$ac_ext <<EOF
    3625 #line 3626 "configure"
     3672#line 3673 "configure"
    36263673#include "confdefs.h"
    36273674#include <libintl.h>
     
    36303677; return 0; }
    36313678EOF
    3632 if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3679if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    36333680  rm -rf conftest*
    36343681  gt_cv_func_gettext_libc=yes
     
    36463693           if test "$gt_cv_func_gettext_libc" != "yes"; then
    36473694             echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
    3648 echo "configure:3649: checking for bindtextdomain in -lintl" >&5
     3695echo "configure:3696: checking for bindtextdomain in -lintl" >&5
    36493696ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
    36503697if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    36543701LIBS="-lintl  $LIBS"
    36553702cat > conftest.$ac_ext <<EOF
    3656 #line 3657 "configure"
     3703#line 3704 "configure"
    36573704#include "confdefs.h"
    36583705/* Override any gcc2 internal prototype to avoid an error.  */
     
    36653712; return 0; }
    36663713EOF
    3667 if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3714if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    36683715  rm -rf conftest*
    36693716  eval "ac_cv_lib_$ac_lib_var=yes"
     
    36813728  echo "$ac_t""yes" 1>&6
    36823729  echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
    3683 echo "configure:3684: checking for gettext in libintl" >&5
     3730echo "configure:3731: checking for gettext in libintl" >&5
    36843731if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
    36853732  echo $ac_n "(cached) $ac_c" 1>&6
    36863733else
    36873734  cat > conftest.$ac_ext <<EOF
    3688 #line 3689 "configure"
     3735#line 3736 "configure"
    36893736#include "confdefs.h"
    36903737
     
    36933740; return 0; }
    36943741EOF
    3695 if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3742if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    36963743  rm -rf conftest*
    36973744  gt_cv_func_gettext_libintl=yes
     
    37213768set dummy msgfmt; ac_word=$2
    37223769echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3723 echo "configure:3724: checking for $ac_word" >&5
     3770echo "configure:3771: checking for $ac_word" >&5
    37243771if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
    37253772  echo $ac_n "(cached) $ac_c" 1>&6
     
    37553802do
    37563803echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    3757 echo "configure:3758: checking for $ac_func" >&5
     3804echo "configure:3805: checking for $ac_func" >&5
    37583805if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    37593806  echo $ac_n "(cached) $ac_c" 1>&6
    37603807else
    37613808  cat > conftest.$ac_ext <<EOF
    3762 #line 3763 "configure"
     3809#line 3810 "configure"
    37633810#include "confdefs.h"
    37643811/* System header to define __stub macros and hopefully few prototypes,
     
    37833830; return 0; }
    37843831EOF
    3785 if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3832if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    37863833  rm -rf conftest*
    37873834  eval "ac_cv_func_$ac_func=yes"
     
    38103857set dummy gmsgfmt; ac_word=$2
    38113858echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3812 echo "configure:3813: checking for $ac_word" >&5
     3859echo "configure:3860: checking for $ac_word" >&5
    38133860if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
    38143861  echo $ac_n "(cached) $ac_c" 1>&6
     
    38463893set dummy xgettext; ac_word=$2
    38473894echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3848 echo "configure:3849: checking for $ac_word" >&5
     3895echo "configure:3896: checking for $ac_word" >&5
    38493896if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
    38503897  echo $ac_n "(cached) $ac_c" 1>&6
     
    38783925
    38793926                cat > conftest.$ac_ext <<EOF
    3880 #line 3881 "configure"
     3927#line 3928 "configure"
    38813928#include "confdefs.h"
    38823929
     
    38863933; return 0; }
    38873934EOF
    3888 if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3935if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    38893936  rm -rf conftest*
    38903937  CATOBJEXT=.gmo
     
    39183965set dummy msgfmt; ac_word=$2
    39193966echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3920 echo "configure:3921: checking for $ac_word" >&5
     3967echo "configure:3968: checking for $ac_word" >&5
    39213968if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
    39223969  echo $ac_n "(cached) $ac_c" 1>&6
     
    39523999set dummy gmsgfmt; ac_word=$2
    39534000echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3954 echo "configure:3955: checking for $ac_word" >&5
     4001echo "configure:4002: checking for $ac_word" >&5
    39554002if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
    39564003  echo $ac_n "(cached) $ac_c" 1>&6
     
    39884035set dummy xgettext; ac_word=$2
    39894036echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3990 echo "configure:3991: checking for $ac_word" >&5
     4037echo "configure:4038: checking for $ac_word" >&5
    39914038if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
    39924039  echo $ac_n "(cached) $ac_c" 1>&6
     
    40784125     else
    40794126       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
    4080 echo "configure:4081: checking for catalogs to be installed" >&5
     4127echo "configure:4128: checking for catalogs to be installed" >&5
    40814128       NEW_LINGUAS=
    40824129       for lang in ${LINGUAS=$ALL_LINGUAS}; do
     
    41064153         ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
    41074154echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
    4108 echo "configure:4109: checking for linux/version.h" >&5
     4155echo "configure:4156: checking for linux/version.h" >&5
    41094156if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    41104157  echo $ac_n "(cached) $ac_c" 1>&6
    41114158else
    41124159  cat > conftest.$ac_ext <<EOF
    4113 #line 4114 "configure"
     4160#line 4161 "configure"
    41144161#include "confdefs.h"
    41154162#include <linux/version.h>
    41164163EOF
    41174164ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    4118 { (eval echo configure:4119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     4165{ (eval echo configure:4166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    41194166ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    41204167if test -z "$ac_err"; then
     
    41614208   
    41624209
    4163             if test -d $srcdir/po; then
     4210            if test -f $srcdir/po/POTFILES.in; then
    41644211      test -d po || mkdir po
    41654212      if test "x$srcdir" != "x."; then
     
    41794226
    41804227echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    4181 echo "configure:4182: checking whether to enable maintainer-specific portions of Makefiles" >&5
     4228echo "configure:4229: checking whether to enable maintainer-specific portions of Makefiles" >&5
    41824229    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    41834230if test "${enable_maintainer_mode+set}" = set; then
     
    42044251
    42054252echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
    4206 echo "configure:4207: checking for executable suffix" >&5
     4253echo "configure:4254: checking for executable suffix" >&5
    42074254if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    42084255  echo $ac_n "(cached) $ac_c" 1>&6
     
    42144261  echo 'int main () { return 0; }' > conftest.$ac_ext
    42154262  ac_cv_exeext=
    4216   if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     4263  if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    42174264    for file in conftest.*; do
    42184265      case $file in
    4219       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
     4266      *.c | *.o | *.obj) ;;
    42204267      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
    42214268      esac
     
    42394286ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    42404287echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    4241 echo "configure:4242: checking for $ac_hdr" >&5
     4288echo "configure:4289: checking for $ac_hdr" >&5
    42424289if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    42434290  echo $ac_n "(cached) $ac_c" 1>&6
    42444291else
    42454292  cat > conftest.$ac_ext <<EOF
    4246 #line 4247 "configure"
     4293#line 4294 "configure"
    42474294#include "confdefs.h"
    42484295#include <$ac_hdr>
    42494296EOF
    42504297ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    4251 { (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     4298{ (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    42524299ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    42534300if test -z "$ac_err"; then
     
    42764323
    42774324
    4278 echo $ac_n "checking the size of gmon pointers""... $ac_c" 1>&6
    4279 echo "configure:4280: checking the size of gmon pointers" >&5
    4280 if test "$cross_compiling" = yes; then
    4281   gmon_ptr_size=4
    4282 else
    4283   cat > conftest.$ac_ext <<EOF
    4284 #line 4285 "configure"
    4285 #include "confdefs.h"
    4286 #include <stdio.h>
    4287 #include <stdlib.h>
    4288 #if HAVE_SYS_GMON_OUT_H
    4289 #include <sys/gmon_out.h>
    4290 #endif
    4291 main()
    4292 {
    4293 #if HAVE_SYS_GMON_OUT_H
    4294   struct gmon_cg_arc_record arc;
    4295   FILE *f=fopen("conftestval", "w");
    4296   if (!f) exit(1);
    4297   fprintf(f, "%d\n", sizeof(arc.from_pc));
    4298   exit(0);
    4299 #else
    4300   FILE *f=fopen("conftestval", "w");
    4301   if (!f) exit(1);
    4302   fprintf(f, "%d\n", (int) sizeof(char *));
    4303   exit(1);
    4304 #endif
    4305 }
    4306 EOF
    4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    4308 then
    4309   gmon_ptr_size=`cat conftestval`
    4310 else
    4311   echo "configure: failed program was:" >&5
    4312   cat conftest.$ac_ext >&5
    4313   rm -fr conftest*
    4314   gmon_ptr_size=4
    4315 fi
    4316 rm -fr conftest*
    4317 fi
    4318 
    4319 echo "$ac_t""$gmon_ptr_size" 1>&6
    4320 
    4321 cat >> confdefs.h <<EOF
    4322 #define GMON_PTR_SIZE $gmon_ptr_size
    4323 EOF
    4324 
    4325 
    4326 build_warnings="-W -Wall"
     4325build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
    43274326# Check whether --enable-build-warnings or --disable-build-warnings was given.
    43284327if test "${enable_build_warnings+set}" = set; then
  • branches/GNU/src/binutils/gprof/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2424AC_CHECK_FUNCS(setmode)
    2525
    26 ALL_LINGUAS=
     26ALL_LINGUAS="fr tr sv es id da pt_BR"
    2727CY_GNU_GETTEXT
    2828
     
    3232AC_CHECK_HEADERS(sys/gmon_out.h)
    3333
    34 AC_MSG_CHECKING(the size of gmon pointers)
    35 AC_TRY_RUN([#include <stdio.h>
    36 #include <stdlib.h>
    37 #if HAVE_SYS_GMON_OUT_H
    38 #include <sys/gmon_out.h>
    39 #endif
    40 main()
    41 {
    42 #if HAVE_SYS_GMON_OUT_H
    43   struct gmon_cg_arc_record arc;
    44   FILE *f=fopen("conftestval", "w");
    45   if (!f) exit(1);
    46   fprintf(f, "%d\n", sizeof(arc.from_pc));
    47   exit(0);
    48 #else
    49   FILE *f=fopen("conftestval", "w");
    50   if (!f) exit(1);
    51   fprintf(f, "%d\n", (int) sizeof(char *));
    52   exit(1);
    53 #endif
    54 }], gmon_ptr_size=`cat conftestval`, gmon_ptr_size=4, gmon_ptr_size=4)
    55 AC_MSG_RESULT($gmon_ptr_size)
    56 
    57 AC_DEFINE_UNQUOTED(GMON_PTR_SIZE, $gmon_ptr_size)
    58 
    59 build_warnings="-W -Wall"
     34build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
    6035AC_ARG_ENABLE(build-warnings,
    6136[  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
  • branches/GNU/src/binutils/gprof/corefile.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* corefile.c
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2323#include "libiberty.h"
    2424#include "gprof.h"
     25#include "search_list.h"
     26#include "source.h"
     27#include "symtab.h"
    2528#include "corefile.h"
    26 #include "symtab.h"
    2729
    2830bfd *core_bfd;
     
    3638
    3739/* For mapping symbols to specific .o files during file ordering.  */
    38 struct function_map
    39 {
    40   char *function_name;
    41   char *file_name;
    42 };
    43 
    4440struct function_map *symbol_map;
    4541unsigned int symbol_map_count;
     42
     43static void read_function_mappings PARAMS ((const char *));
     44static int core_sym_class PARAMS ((asymbol *));
     45static bfd_boolean get_src_info
     46  PARAMS ((bfd_vma, const char **, const char **, int *));
    4647
    4748extern void i386_find_call  PARAMS ((Sym *, bfd_vma, bfd_vma));
     
    5051extern void tahoe_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
    5152extern void sparc_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
     53extern void mips_find_call  PARAMS ((Sym *, bfd_vma, bfd_vma));
    5254
    5355static void
    54 DEFUN (read_function_mappings, (filename), const char *filename)
     56read_function_mappings (filename)
     57     const char *filename;
    5558{
    5659  FILE *file = fopen (filename, "r");
     
    138141
    139142void
    140 DEFUN (core_init, (a_out_name), const char *a_out_name)
     143core_init (aout_name)
     144     const char *aout_name;
    141145{
    142   core_bfd = bfd_openr (a_out_name, 0);
     146  core_bfd = bfd_openr (aout_name, 0);
    143147
    144148  if (!core_bfd)
    145149    {
    146       perror (a_out_name);
     150      perror (aout_name);
    147151      done (1);
    148152    }
     
    150154  if (!bfd_check_format (core_bfd, bfd_object))
    151155    {
    152       fprintf (stderr, _("%s: %s: not in a.out format\n"), whoami, a_out_name);
     156      fprintf (stderr, _("%s: %s: not in a.out format\n"), whoami, aout_name);
    153157      done (1);
    154158    }
     
    162166        {
    163167          fprintf (stderr, _("%s: can't find .text section in %s\n"),
    164                    whoami, a_out_name);
     168                   whoami, aout_name);
    165169          done (1);
    166170        }
     
    173177  if (core_num_syms < 0)
    174178    {
    175       fprintf (stderr, "%s: %s: %s\n", whoami, a_out_name,
     179      fprintf (stderr, "%s: %s: %s\n", whoami, aout_name,
    176180               bfd_errmsg (bfd_get_error ()));
    177181      done (1);
     
    183187  if (core_num_syms < 0)
    184188    {
    185       fprintf (stderr, "%s: %s: %s\n", whoami, a_out_name,
     189      fprintf (stderr, "%s: %s: %s\n", whoami, aout_name,
    186190               bfd_errmsg (bfd_get_error ()));
    187191      done (1);
     
    213217
    214218void
    215 DEFUN (core_get_text_space, (core_bfd), bfd * core_bfd)
     219core_get_text_space (cbfd)
     220     bfd *cbfd;
    216221{
    217   core_text_space = (PTR) malloc (core_text_sect->_raw_size);
     222  core_text_space = (PTR) malloc ((unsigned int) core_text_sect->_raw_size);
    218223
    219224  if (!core_text_space)
     
    224229    }
    225230
    226   if (!bfd_get_section_contents (core_bfd, core_text_sect, core_text_space,
    227                                  0, core_text_sect->_raw_size))
     231  if (!bfd_get_section_contents (cbfd, core_text_sect, core_text_space,
     232                                 (bfd_vma) 0, core_text_sect->_raw_size))
    228233    {
    229234      bfd_perror ("bfd_get_section_contents");
     
    238243
    239244void
    240 DEFUN (find_call, (parent, p_lowpc, p_highpc),
    241        Sym * parent AND bfd_vma p_lowpc AND bfd_vma p_highpc)
     245find_call (parent, p_lowpc, p_highpc)
     246     Sym *parent;
     247     bfd_vma p_lowpc;
     248     bfd_vma p_highpc;
    242249{
    243250  switch (bfd_get_arch (core_bfd))
     
    261268    case bfd_arch_tahoe:
    262269      tahoe_find_call (parent, p_lowpc, p_highpc);
     270      break;
     271
     272    case bfd_arch_mips:
     273      mips_find_call (parent, p_lowpc, p_highpc);
    263274      break;
    264275
     
    278289
    279290static int
    280 DEFUN (core_sym_class, (sym), asymbol * sym)
     291core_sym_class (sym)
     292     asymbol *sym;
    281293{
    282294  symbol_info syminfo;
     
    360372/* Get whatever source info we can get regarding address ADDR.  */
    361373
    362 static bool
    363 DEFUN (get_src_info, (addr, filename, name, line_num),
    364        bfd_vma addr AND const char **filename AND const char **name
    365        AND int *line_num)
     374static bfd_boolean
     375get_src_info (addr, filename, name, line_num)
     376     bfd_vma addr;
     377     const char **filename;
     378     const char **name;
     379     int *line_num;
    366380{
    367381  const char *fname = 0, *func_name = 0;
     
    393407
    394408void
    395 core_create_function_syms (core_bfd)
    396      bfd *core_bfd ATTRIBUTE_UNUSED;
     409core_create_function_syms (cbfd)
     410     bfd *cbfd ATTRIBUTE_UNUSED;
    397411{
    398   bfd_vma min_vma = ~0, max_vma = 0;
     412  bfd_vma min_vma = ~(bfd_vma) 0;
     413  bfd_vma max_vma = 0;
    399414  int class;
    400415  long i, found, skip;
     
    529544        symtab.limit->is_static = TRUE;
    530545
     546      /* Keep track of the minimum and maximum vma addresses used by all
     547         symbols.  When computing the max_vma, use the ending address of the
     548         section containing the symbol, if available.  */
    531549      min_vma = MIN (symtab.limit->addr, min_vma);
    532       max_vma = MAX (symtab.limit->addr, max_vma);
     550      if (core_syms[i]->section)
     551        max_vma = MAX (core_syms[i]->section->vma
     552                       + core_syms[i]->section->_cooked_size - 1, max_vma);
     553      else
     554        max_vma = MAX (symtab.limit->addr, max_vma);
    533555
    534556      /* If we see "main" without an initial '_', we assume names
     
    555577  symtab.limit->name = "<hicore>";
    556578  symtab.limit->addr = max_vma + 1;
    557   symtab.limit->end_addr = ~0;
     579  symtab.limit->end_addr = ~(bfd_vma) 0;
    558580  ++symtab.limit;
    559581
     
    566588
    567589void
    568 DEFUN (core_create_line_syms, (core_bfd), bfd * core_bfd)
     590core_create_line_syms (cbfd)
     591     bfd *cbfd;
    569592{
    570593  char *prev_name, *prev_filename;
    571   int prev_name_len, prev_filename_len;
    572   bfd_vma vma, min_vma = ~0, max_vma = 0;
     594  unsigned int prev_name_len, prev_filename_len;
     595  bfd_vma vma, min_vma = ~(bfd_vma) 0, max_vma = 0;
    573596  bfd_vma offset;
    574597  Sym *prev, dummy, *sentinel, *sym;
     
    580603     cases where parts of a program were not compiled with -g.  For
    581604     those parts we still want to get info at the function level.  */
    582   core_create_function_syms (core_bfd);
     605  core_create_function_syms (cbfd);
    583606
    584607  /* Pass 1 - counter number of symbols.  */
     
    600623  for (offset = 0; offset < core_text_sect->_raw_size; offset += min_insn_size)
    601624    {
    602       int len;
     625      unsigned int len;
    603626
    604627      vma = core_text_sect->vma + offset;
     
    713736
    714737  /* Update sentinels.  */
    715   sentinel = sym_lookup (&symtab, 0);
    716 
    717   if (strcmp (sentinel->name, "<locore>") == 0
     738  sentinel = sym_lookup (&symtab, (bfd_vma) 0);
     739
     740  if (sentinel
     741      && strcmp (sentinel->name, "<locore>") == 0
    718742      && min_vma <= sentinel->end_addr)
    719743    sentinel->end_addr = min_vma - 1;
    720744
    721   sentinel = sym_lookup (&symtab, ~0);
    722 
    723   if (strcmp (sentinel->name, "<hicore>") == 0 && max_vma >= sentinel->addr)
     745  sentinel = sym_lookup (&symtab, ~(bfd_vma) 0);
     746
     747  if (sentinel
     748      && strcmp (sentinel->name, "<hicore>") == 0
     749      && max_vma >= sentinel->addr)
    724750    sentinel->addr = max_vma + 1;
    725751
  • branches/GNU/src/binutils/gprof/corefile.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* corefile.h
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55This file is part of GNU Binutils.
     
    2323#define corefile_h
    2424
    25 #include "bfd.h"
     25struct function_map
     26{
     27  char *function_name;
     28  char *file_name;
     29};
     30
     31extern struct function_map *symbol_map;
     32extern unsigned int symbol_map_count;
    2633
    2734extern bfd *core_bfd;           /* BFD for core-file.  */
  • branches/GNU/src/binutils/gprof/dep-in.sed

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    44
    55s!@INCDIR@!$(INCDIR)!g
     6s!@TOPDIR@/include!$(INCDIR)!g
    67s!@BFDDIR@!$(BFDDIR)!g
     8s!@TOPDIR@/bfd!$(BFDDIR)!g
    79s!@SRCDIR@/!!g
    810s!@OBJDIR@/!!g
  • branches/GNU/src/binutils/gprof/flat_bl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33
    44#include <stdio.h>
     5#include "ansidecl.h"
    56
     7void  flat_blurb PARAMS ((FILE *));
    68void
    79flat_blurb (file)
  • branches/GNU/src/binutils/gprof/fsf_callg_bl.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33
    44#include <stdio.h>
     5#include "ansidecl.h"
    56
     7void  fsf_callg_blurb PARAMS ((FILE *));
    68void
    79fsf_callg_blurb (file)
  • branches/GNU/src/binutils/gprof/gconfig.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    4343/* Define if you have the ANSI C header files.  */
    4444#undef STDC_HEADERS
    45 
    46 /* Define as the size of a pointer in the target profile file format.  */
    47 #undef GMON_PTR_SIZE
    4845
    4946/* Define if you have the __argz_count function.  */
     
    104101#undef HAVE_NL_TYPES_H
    105102
     103/* Define if you have the <stdlib.h> header file.  */
     104#undef HAVE_STDLIB_H
     105
    106106/* Define if you have the <string.h> header file.  */
    107107#undef HAVE_STRING_H
     
    112112/* Define if you have the <sys/param.h> header file.  */
    113113#undef HAVE_SYS_PARAM_H
     114
     115/* Define if you have the <sys/stat.h> header file.  */
     116#undef HAVE_SYS_STAT_H
     117
     118/* Define if you have the <sys/types.h> header file.  */
     119#undef HAVE_SYS_TYPES_H
    114120
    115121/* Define if you have the <unistd.h> header file.  */
  • branches/GNU/src/binutils/gprof/gen-c-prog.awk

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    44    printf "   from %s using the gen-c-prog.awk script.  <== */\n\n", FILE
    55    print "#include <stdio.h>"
     6    print "#include \"ansidecl.h\""
    67}
    78
     
    1314              curfun = FUNCTION
    1415              print ""
     16              print "void ", FUNCTION, "PARAMS ((FILE *));"
    1517              print "void";
    1618              printf "%s (file)\n", FUNCTION
  • branches/GNU/src/binutils/gprof/gmon.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /*-
    2  * Copyright (c) 1991, 2001 The Regents of the University of California.
    3  * All rights reserved.
     1/*
     2 * Copyright (c) 1983, 1991, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    17  * 4. Neither the name of the University nor the names of its contributors
     13 * 3. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
    1915 *    without specific prior written permission.
     
    3026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    3127 * SUCH DAMAGE.
    32  *
    33  *      @(#)gmon.h      5.2 (Berkeley) 5/6/91
    3428 */
    3529#ifndef gmon_h
    3630#define gmon_h
    3731
    38 struct raw_phdr
    39   {
    40     /* FIXME: Checking a host compiler define means that we can't use
    41        a cross gprof to the alpha.  */
    42     char low_pc[GMON_PTR_SIZE]; /* base pc address of sample buffer */
    43     char high_pc[GMON_PTR_SIZE];/* max pc address of sampled buffer */
    44     char ncnt[4];               /* size of sample buffer (plus this header) */
     32/* Size of the 4.4BSD gmon header */
     33#define GMON_HDRSIZE_BSD44_32 (4 + 4 + 4 + 4 + 4 + (3 * 4))
     34#define GMON_HDRSIZE_BSD44_64 (8 + 8 + 4 + 4 + 4 + (3 * 4))
    4535
    46     char version[4];            /* version number */
    47     char profrate[4];           /* profiling clock rate */
    48     char spare[3*4];            /* reserved */
    49   };
     36#if 0 /* For documentation purposes only.  */
     37  struct raw_phdr
     38    {
     39      char low_pc[sizeof(void *)]; /* base pc address of sample buffer */
     40      char high_pc[sizeof(void *)];/* max pc address of sampled buffer */
     41      char ncnt[4];                /* size of sample buffer (plus this
     42                                      header) */
     43
     44      char version[4];             /* version number */
     45      char profrate[4];            /* profiling clock rate */
     46      char spare[3*4];             /* reserved */
     47    };
     48#endif
    5049
    5150#define GMONVERSION     0x00051879
    5251
    53 struct old_raw_phdr
    54   {
    55     char low_pc[GMON_PTR_SIZE]; /* base pc address of sample buffer */
    56     char high_pc[GMON_PTR_SIZE];/* max pc address of sampled buffer */
    57     char ncnt[4];               /* size of sample buffer (plus this header) */
     52/* Size of the old BSD gmon header */
     53#define GMON_HDRSIZE_OLDBSD_32 (4 + 4 + 4)
    5854
    59     /* FIXME: Checking host compiler defines here means that we can't
    60        use a cross gprof alpha OSF.  */
     55/* FIXME: Checking host compiler defines here means that we can't
     56   use a cross gprof alpha OSF.  */
     57#if defined(__alpha__) && defined (__osf__)
     58#define GMON_HDRSIZE_OLDBSD_64 (8 + 8 + 4 + 4)
     59#else
     60#define GMON_HDRSIZE_OLDBSD_64 (8 + 8 + 4)
     61#endif
     62
     63#if 0 /* For documentation purposes only.  */
     64  struct old_raw_phdr
     65    {
     66      char low_pc[sizeof(void *)]; /* base pc address of sample buffer */
     67      char high_pc[sizeof(void *)];/* max pc address of sampled buffer */
     68      char ncnt[4];                /* size of sample buffer (plus this
     69                                      header) */
    6170#if defined (__alpha__) && defined (__osf__)
    62     /*
    63      * DEC's OSF v3.0 uses 4 bytes of padding to bring the header to
    64      * a size that is a multiple of 8.
    65      */
    66     char pad[4];
     71      /*
     72       * DEC's OSF v3.0 uses 4 bytes of padding to bring the header to
     73       * a size that is a multiple of 8.
     74       */
     75      char pad[4];
    6776#endif
    68   };
     77    };
     78#endif
    6979
    7080/*
     
    121131 * might introduce different padding):
    122132 */
    123 struct raw_arc
    124   {
    125     char from_pc[GMON_PTR_SIZE];
    126     char self_pc[GMON_PTR_SIZE];
    127     char count[4];
    128   };
     133#if 0 /* For documentation purposes only.  */
     134  struct raw_arc
     135    {
     136      char from_pc[sizeof(void *)];
     137      char self_pc[sizeof(void *)];
     138      char count[sizeof(long)];
     139    };
     140#endif
    129141
    130142/*
  • branches/GNU/src/binutils/gprof/gmon_io.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* gmon_io.c - Input and output from/to gmon.out files.
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2121
    2222
     23#include "gprof.h"
     24#include "search_list.h"
     25#include "source.h"
     26#include "symtab.h"
    2327#include "cg_arcs.h"
    2428#include "basic_blocks.h"
    25 #include "bfd.h"
    2629#include "corefile.h"
    2730#include "call_graph.h"
     
    2932#include "gmon_out.h"
    3033#include "gmon.h"               /* Fetch header for old format.  */
    31 #include "gprof.h"
    3234#include "hertz.h"
    3335#include "hist.h"
    3436#include "libiberty.h"
    3537
     38enum gmon_ptr_size {
     39  ptr_32bit,
     40  ptr_64bit
     41};
     42
     43enum gmon_ptr_signedness {
     44  ptr_signed,
     45  ptr_unsigned
     46};
     47
     48static enum gmon_ptr_size gmon_get_ptr_size PARAMS ((void));
     49static enum gmon_ptr_signedness gmon_get_ptr_signedness PARAMS ((void));
     50
     51#ifdef BFD_HOST_U_64_BIT
     52static int gmon_io_read_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT *));
     53static int gmon_io_write_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT));
     54#endif
     55static int gmon_read_raw_arc
     56  PARAMS ((FILE *, bfd_vma *, bfd_vma *, unsigned long *));
     57static int gmon_write_raw_arc
     58  PARAMS ((FILE *, bfd_vma, bfd_vma, unsigned long));
     59
    3660int gmon_input = 0;
    3761int gmon_file_version = 0;      /* 0 == old (non-versioned) file format.  */
    3862
     63static enum gmon_ptr_size
     64gmon_get_ptr_size ()
     65{
     66  int size;
     67
     68  /* Pick best size for pointers.  Start with the ELF size, and if not
     69     elf go with the architecture's address size.  */
     70  size = bfd_get_arch_size (core_bfd);
     71  if (size == -1)
     72    size = bfd_arch_bits_per_address (core_bfd);
     73
     74  switch (size)
     75    {
     76    case 32:
     77      return ptr_32bit;
     78
     79    case 64:
     80      return ptr_64bit;
     81
     82    default:
     83      fprintf (stderr, _("%s: address size has unexpected value of %u\n"),
     84               whoami, size);
     85      done (1);
     86    }
     87}
     88
     89static enum gmon_ptr_signedness
     90gmon_get_ptr_signedness ()
     91{
     92  int sext;
     93
     94  /* Figure out whether to sign extend.  If BFD doesn't know, assume no.  */
     95  sext = bfd_get_sign_extend_vma (core_bfd);
     96  if (sext == -1)
     97    return ptr_unsigned;
     98  return (sext ? ptr_signed : ptr_unsigned);
     99}
     100
    39101int
    40 DEFUN (gmon_io_read_vma, (ifp, valp), FILE * ifp AND bfd_vma *valp)
     102gmon_io_read_32 (ifp, valp)
     103     FILE *ifp;
     104     unsigned int *valp;
     105{
     106  char buf[4];
     107
     108  if (fread (buf, 1, 4, ifp) != 4)
     109    return 1;
     110  *valp = bfd_get_32 (core_bfd, buf);
     111  return 0;
     112}
     113
     114#ifdef BFD_HOST_U_64_BIT
     115static int
     116gmon_io_read_64 (ifp, valp)
     117     FILE *ifp;
     118     BFD_HOST_U_64_BIT *valp;
    41119{
    42120  char buf[8];
    43   bfd_vma val;
    44 
    45   switch (GMON_PTR_SIZE)
    46     {
    47     case 4:
    48       if (fread (buf, 1, 4, ifp) != 4)
     121
     122  if (fread (buf, 1, 8, ifp) != 8)
     123    return 1;
     124  *valp = bfd_get_64 (core_bfd, buf);
     125  return 0;
     126}
     127#endif
     128
     129int
     130gmon_io_read_vma (ifp, valp)
     131     FILE *ifp;
     132     bfd_vma *valp;
     133{
     134  unsigned int val32;
     135#ifdef BFD_HOST_U_64_BIT
     136  BFD_HOST_U_64_BIT val64;
     137#endif
     138
     139  switch (gmon_get_ptr_size ())
     140    {
     141    case ptr_32bit:
     142      if (gmon_io_read_32 (ifp, &val32))
    49143        return 1;
    50       val = bfd_get_32 (core_bfd, buf);
     144      if (gmon_get_ptr_signedness () == ptr_signed)
     145        *valp = (int) val32;
     146      else
     147        *valp = val32;
    51148      break;
    52149
    53     case 8:
    54       if (fread (buf, 1, 8, ifp) != 8)
     150#ifdef BFD_HOST_U_64_BIT
     151    case ptr_64bit:
     152      if (gmon_io_read_64 (ifp, &val64))
    55153        return 1;
    56       val = bfd_get_64 (core_bfd, buf);
     154#ifdef BFD_HOST_64_BIT
     155      if (gmon_get_ptr_signedness () == ptr_signed)
     156        *valp = (BFD_HOST_64_BIT) val64;
     157      else
     158#endif
     159        *valp = val64;
    57160      break;
    58 
    59     default:
    60       fprintf (stderr, _("%s: GMON_PTR_SIZE has unexpected value of %u\n"),
    61                whoami, GMON_PTR_SIZE);
    62       done (1);
    63     }
    64   *valp = val;
     161#endif
     162    }
    65163  return 0;
    66164}
    67165
    68166int
    69 DEFUN (gmon_io_read_32, (ifp, valp), FILE * ifp AND unsigned int *valp)
     167gmon_io_read (ifp, buf, n)
     168     FILE *ifp;
     169     char *buf;
     170     size_t n;
     171{
     172  if (fread (buf, 1, n, ifp) != n)
     173    return 1;
     174  return 0;
     175}
     176
     177int
     178gmon_io_write_32 (ofp, val)
     179     FILE *ofp;
     180     unsigned int val;
    70181{
    71182  char buf[4];
    72183
    73   if (fread (buf, 1, 4, ifp) != 4)
    74     return 1;
    75   *valp = bfd_get_32 (core_bfd, buf);
    76   return 0;
    77 }
     184  bfd_put_32 (core_bfd, (bfd_vma) val, buf);
     185  if (fwrite (buf, 1, 4, ofp) != 4)
     186    return 1;
     187  return 0;
     188}
     189
     190#ifdef BFD_HOST_U_64_BIT
     191static int
     192gmon_io_write_64 (ofp, val)
     193     FILE *ofp;
     194     BFD_HOST_U_64_BIT val;
     195{
     196  char buf[8];
     197
     198  bfd_put_64 (core_bfd, (bfd_vma) val, buf);
     199  if (fwrite (buf, 1, 8, ofp) != 8)
     200    return 1;
     201  return 0;
     202}
     203#endif
    78204
    79205int
    80 DEFUN (gmon_io_read, (ifp, buf, n), FILE * ifp AND char *buf AND size_t n)
    81 {
    82   if (fread (buf, 1, n, ifp) != n)
    83     return 1;
    84   return 0;
    85 }
    86 
    87 int
    88 DEFUN (gmon_io_write_vma, (ofp, val), FILE * ofp AND bfd_vma val)
    89 {
    90   char buf[8];
    91 
    92   switch (GMON_PTR_SIZE)
    93     {
    94     case 4:
    95       bfd_put_32 (core_bfd, val, buf);
    96       if (fwrite (buf, 1, 4, ofp) != 4)
     206gmon_io_write_vma (ofp, val)
     207     FILE *ofp;
     208     bfd_vma val;
     209{
     210
     211  switch (gmon_get_ptr_size ())
     212    {
     213    case ptr_32bit:
     214      if (gmon_io_write_32 (ofp, (unsigned int) val))
    97215        return 1;
    98216      break;
    99217
    100     case 8:
    101       bfd_put_64 (core_bfd, val, buf);
    102       if (fwrite (buf, 1, 8, ofp) != 8)
     218#ifdef BFD_HOST_U_64_BIT
     219    case ptr_64bit:
     220      if (gmon_io_write_64 (ofp, (BFD_HOST_U_64_BIT) val))
    103221        return 1;
    104222      break;
    105 
    106     default:
    107       fprintf (stderr, _("%s: GMON_PTR_SIZE has unexpected value of %u\n"),
    108                whoami, GMON_PTR_SIZE);
    109       done (1);
     223#endif
    110224    }
    111225  return 0;
     
    113227
    114228int
    115 DEFUN (gmon_io_write_32, (ofp, val), FILE * ofp AND unsigned int val)
    116 {
    117   char buf[4];
    118 
    119   bfd_put_32 (core_bfd, val, buf);
    120   if (fwrite (buf, 1, 4, ofp) != 4)
    121     return 1;
    122   return 0;
    123 }
    124 
    125 int
    126 DEFUN (gmon_io_write_8, (ofp, val), FILE * ofp AND unsigned char val)
     229gmon_io_write_8 (ofp, val)
     230     FILE *ofp;
     231     unsigned int val;
    127232{
    128233  char buf[1];
     
    135240
    136241int
    137 DEFUN (gmon_io_write, (ofp, buf, n), FILE * ofp AND char *buf AND size_t n)
     242gmon_io_write (ofp, buf, n)
     243     FILE *ofp;
     244     char *buf;
     245     size_t n;
    138246{
    139247  if (fwrite (buf, 1, n, ofp) != n)
     
    142250}
    143251
    144 /* get_vma and put_vma are for backwards compatibility only */
    145 static bfd_vma
    146 DEFUN (get_vma, (abfd, addr), bfd * abfd AND bfd_byte * addr)
    147 {
    148   switch (sizeof (char*))
    149     {
    150     case 4:
    151       return bfd_get_32 (abfd, addr);
    152     case 8:
    153       return bfd_get_64 (abfd, addr);
    154     default:
    155       fprintf (stderr, _("%s: bfd_vma has unexpected size of %ld bytes\n"),
    156                whoami, (long) sizeof (char*));
    157       done (1);
    158     }
    159 }
    160 
    161 static void
    162 DEFUN (put_vma, (abfd, val, addr), bfd * abfd AND bfd_vma val AND bfd_byte * addr)
    163 {
    164   switch (sizeof (char*))
    165     {
    166     case 4:
    167       bfd_put_32 (abfd, val, addr);
     252static int
     253gmon_read_raw_arc (ifp, fpc, spc, cnt)
     254     FILE *ifp;
     255     bfd_vma *fpc;
     256     bfd_vma *spc;
     257     unsigned long *cnt;
     258{
     259#ifdef BFD_HOST_U_64_BIT
     260  BFD_HOST_U_64_BIT cnt64;
     261#endif
     262  unsigned int cnt32;
     263
     264  if (gmon_io_read_vma (ifp, fpc)
     265      || gmon_io_read_vma (ifp, spc))
     266    return 1;
     267
     268  switch (gmon_get_ptr_size ())
     269    {
     270    case ptr_32bit:
     271      if (gmon_io_read_32 (ifp, &cnt32))
     272        return 1;
     273      *cnt = cnt32;
    168274      break;
    169     case 8:
    170       bfd_put_64 (abfd, val, addr);
     275
     276#ifdef BFD_HOST_U_64_BIT
     277    case ptr_64bit:
     278      if (gmon_io_read_64 (ifp, &cnt64))
     279        return 1;
     280      *cnt = cnt64;
    171281      break;
    172     default:
    173       fprintf (stderr, _("%s: bfd_vma has unexpected size of %ld bytes\n"),
    174                whoami, (long) sizeof (char*));
    175       done (1);
    176     }
     282#endif
     283    }
     284  return 0;
     285}
     286
     287static int
     288gmon_write_raw_arc (ofp, fpc, spc, cnt)
     289     FILE *ofp;
     290     bfd_vma fpc;
     291     bfd_vma spc;
     292     unsigned long cnt;
     293{
     294
     295  if (gmon_io_write_vma (ofp, fpc)
     296      || gmon_io_write_vma (ofp, spc))
     297    return 1;
     298
     299  switch (gmon_get_ptr_size ())
     300    {
     301    case ptr_32bit:
     302      if (gmon_io_write_32 (ofp, (unsigned int) cnt))
     303        return 1;
     304      break;
     305
     306#ifdef BFD_HOST_U_64_BIT
     307    case ptr_64bit:
     308      if (gmon_io_write_64 (ofp, (BFD_HOST_U_64_BIT) cnt))
     309        return 1;
     310      break;
     311#endif
     312    }
     313  return 0;
    177314}
    178315
    179316void
    180 DEFUN (gmon_out_read, (filename), const char *filename)
     317gmon_out_read (filename)
     318     const char *filename;
    181319{
    182320  FILE *ifp;
     
    273411        int ncnt;
    274412      };
    275       int i, samp_bytes, header_size;
     413      int i, samp_bytes, header_size = 0;
    276414      unsigned long count;
    277415      bfd_vma from_pc, self_pc;
    278       struct raw_arc raw_arc;
    279       struct raw_phdr raw;
    280416      static struct hdr h;
    281417      UNIT raw_bin_count;
    282418      struct hdr tmp;
     419      int version;
    283420
    284421      /* Information from a gmon.out file is in two parts: an array of
     
    295432        }
    296433
    297       if (fread (&raw, 1, sizeof (struct raw_phdr), ifp)
    298           != sizeof (struct raw_phdr))
    299         {
    300           fprintf (stderr, _("%s: file too short to be a gmon file\n"),
     434      /* The beginning of the old BSD header and the 4.4BSD header
     435         are the same: lowpc, highpc, ncnt  */
     436      if (gmon_io_read_vma (ifp, &tmp.low_pc)
     437          || gmon_io_read_vma (ifp, &tmp.high_pc)
     438          || gmon_io_read_32 (ifp, &tmp.ncnt))
     439        {
     440 bad_gmon_file:
     441          fprintf (stderr, _("%s: file too short to be a gmon file\n"),
    301442                   filename);
    302443          done (1);
    303444        }
    304445
    305       tmp.low_pc = get_vma (core_bfd, (bfd_byte *) &raw.low_pc[0]);
    306       tmp.high_pc = get_vma (core_bfd, (bfd_byte *) &raw.high_pc[0]);
    307       tmp.ncnt = bfd_get_32 (core_bfd, (bfd_byte *) &raw.ncnt[0]);
    308 
    309       if (bfd_get_32 (core_bfd, (bfd_byte *) &raw.version[0])
    310           == GMONVERSION)
     446      /* Check to see if this a 4.4BSD-style header.  */
     447      if (gmon_io_read_32 (ifp, &version))
     448        goto bad_gmon_file;
     449
     450      if (version == GMONVERSION)
    311451        {
    312452          int profrate;
    313453
    314454          /* 4.4BSD format header.  */
    315           profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.profrate[0]);
     455          if (gmon_io_read_32 (ifp, &profrate))
     456            goto bad_gmon_file;
    316457
    317458          if (!s_highpc)
     
    325466            }
    326467
    327           header_size = sizeof (struct raw_phdr);
     468          switch (gmon_get_ptr_size ())
     469            {
     470            case ptr_32bit:
     471              header_size = GMON_HDRSIZE_BSD44_32;
     472              break;
     473
     474            case ptr_64bit:
     475              header_size = GMON_HDRSIZE_BSD44_64;
     476              break;
     477            }
    328478        }
    329479      else
     
    337487            }
    338488
    339           if (fseek (ifp, sizeof (struct old_raw_phdr), SEEK_SET) < 0)
    340             {
    341               perror (filename);
    342               done (1);
    343             }
    344 
    345           header_size = sizeof (struct old_raw_phdr);
     489          switch (gmon_get_ptr_size ())
     490            {
     491            case ptr_32bit:
     492              header_size = GMON_HDRSIZE_OLDBSD_32;
     493              break;
     494
     495            case ptr_64bit:
     496              header_size = GMON_HDRSIZE_OLDBSD_64;
     497              break;
     498            }
     499        }
     500
     501      /* Position the file to after the header.  */
     502      if (fseek (ifp, header_size, SEEK_SET) < 0)
     503        {
     504          perror (filename);
     505          done (1);
    346506        }
    347507
     
    408568      /* The rest of the file consists of a bunch of
    409569         <from,self,count> tuples.  */
    410       while (fread (&raw_arc, sizeof (raw_arc), 1, ifp) == 1)
     570      while (gmon_read_raw_arc (ifp, &from_pc, &self_pc, &count) == 0)
    411571        {
    412572          ++narcs;
    413           from_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.from_pc);
    414           self_pc = get_vma (core_bfd, (bfd_byte *) raw_arc.self_pc);
    415           count = bfd_get_32 (core_bfd, (bfd_byte *) raw_arc.count);
    416573
    417574          DBG (SAMPLEDEBUG,
     
    449606      printf (_("File `%s' (version %d) contains:\n"),
    450607              filename, gmon_file_version);
    451       printf (_("\t%d histogram record%s\n"),
    452               nhist, nhist == 1 ? "" : "s");
    453       printf (_("\t%d call-graph record%s\n"),
    454               narcs, narcs == 1 ? "" : "s");
    455       printf (_("\t%d basic-block count record%s\n"),
    456               nbbs, nbbs == 1 ? "" : "s");
     608      printf (nhist == 1 ?
     609              _("\t%d histogram record\n") :
     610              _("\t%d histogram records\n"), nhist);
     611      printf (narcs == 1 ?
     612              _("\t%d call-graph record\n") :
     613              _("\t%d call-graph records\n"), narcs);
     614      printf (nbbs == 1 ?
     615              _("\t%d basic-block count record\n") :
     616              _("\t%d basic-block count records\n"), nbbs);
    457617      first_output = FALSE;
    458618    }
     
    461621
    462622void
    463 DEFUN (gmon_out_write, (filename), const char *filename)
     623gmon_out_write (filename)
     624     const char *filename;
    464625{
    465626  FILE *ofp;
     
    478639
    479640      memcpy (&ghdr.cookie[0], GMON_MAGIC, 4);
    480       bfd_put_32 (core_bfd, GMON_VERSION, (bfd_byte *) ghdr.version);
     641      bfd_put_32 (core_bfd, (bfd_vma) GMON_VERSION, (bfd_byte *) ghdr.version);
    481642
    482643      if (fwrite (&ghdr, sizeof (ghdr), 1, ofp) != 1)
     
    500661  else if (file_format == FF_BSD || file_format == FF_BSD44)
    501662    {
    502       struct raw_arc raw_arc;
    503663      UNIT raw_bin_count;
    504       struct raw_phdr h;
    505       int i;
     664      int i, hdrsize;
     665      unsigned padsize;
     666      char pad[3*4];
    506667      Arc *arc;
    507668      Sym *sym;
    508669
    509       memset (&h, 0, sizeof h);
    510       put_vma (core_bfd, s_lowpc, (bfd_byte *) &h.low_pc);
    511       put_vma (core_bfd, s_highpc, (bfd_byte *) &h.high_pc);
    512       bfd_put_32 (core_bfd,
    513                   hist_num_bins * sizeof (UNIT) + sizeof (struct raw_phdr),
    514                   (bfd_byte *) &h.ncnt);
    515 
    516       /* Write header.  Use new style BSD format is explicitly
    517          specified, or if the profiling rate is non-standard;
    518          otherwise, use the old BSD format.  */
     670      memset (pad, 0, sizeof (pad));
     671
     672      hdrsize = 0;
     673      /* Decide how large the header will be.  Use the 4.4BSD format
     674         header if explicitly specified, or if the profiling rate is
     675         non-standard.  Otherwise, use the old BSD format.  */
    519676      if (file_format == FF_BSD44
    520           || hz != hertz ())
    521         {
    522           bfd_put_32 (core_bfd, GMONVERSION, (bfd_byte *) &h.version);
    523           bfd_put_32 (core_bfd, hz, (bfd_byte *) &h.profrate);
    524           if (fwrite (&h, sizeof (struct raw_phdr), 1, ofp) != 1)
     677          || hz != hertz())
     678        {
     679          padsize = 3*4;
     680          switch (gmon_get_ptr_size ())
     681            {
     682            case ptr_32bit:
     683              hdrsize = GMON_HDRSIZE_BSD44_32;
     684              break;
     685
     686            case ptr_64bit:
     687              hdrsize = GMON_HDRSIZE_BSD44_64;
     688              break;
     689            }
     690        }
     691      else
     692        {
     693          padsize = 0;
     694          switch (gmon_get_ptr_size ())
     695            {
     696            case ptr_32bit:
     697              hdrsize = GMON_HDRSIZE_OLDBSD_32;
     698              break;
     699
     700            case ptr_64bit:
     701              hdrsize = GMON_HDRSIZE_OLDBSD_64;
     702              /* FIXME: Checking host compiler defines here means that we can't
     703                 use a cross gprof alpha OSF.  */
     704#if defined(__alpha__) && defined (__osf__)
     705              padsize = 4;
     706#endif
     707              break;
     708            }
     709        }
     710
     711      /* Write the parts of the headers that are common to both the
     712         old BSD and 4.4BSD formats.  */
     713      if (gmon_io_write_vma (ofp, s_lowpc)
     714          || gmon_io_write_vma (ofp, s_highpc)
     715          || gmon_io_write_32 (ofp, hist_num_bins * sizeof (UNIT) + hdrsize))
     716        {
     717          perror (filename);
     718          done (1);
     719        }
     720
     721      /* Write out the 4.4BSD header bits, if that's what we're using.  */
     722      if (file_format == FF_BSD44
     723          || hz != hertz())
     724        {
     725          if (gmon_io_write_32 (ofp, GMONVERSION)
     726              || gmon_io_write_32 (ofp, (unsigned int) hz))
    525727            {
    526728              perror (filename);
     
    528730            }
    529731        }
    530       else
    531         {
    532           if (fwrite (&h, sizeof (struct old_raw_phdr), 1, ofp) != 1)
     732
     733      /* Now write out any necessary padding after the meaningful
     734         header bits.  */
     735      if (padsize != 0
     736          && fwrite (pad, 1, padsize, ofp) != padsize)
     737        {
     738          perror (filename);
     739          done (1);
     740        }
     741
     742      /* Dump the samples.  */
     743      for (i = 0; i < hist_num_bins; ++i)
     744        {
     745          bfd_put_16 (core_bfd, (bfd_vma) hist_sample[i],
     746                      (bfd_byte *) &raw_bin_count[0]);
     747          if (fwrite (&raw_bin_count[0], sizeof (raw_bin_count), 1, ofp) != 1)
    533748            {
    534749              perror (filename);
     
    537752        }
    538753
    539       /* Dump the samples.  */
    540       for (i = 0; i < hist_num_bins; ++i)
    541         {
    542           bfd_put_16 (core_bfd, hist_sample[i], (bfd_byte *) & raw_bin_count[0]);
    543           if (fwrite (&raw_bin_count[0], sizeof (raw_bin_count), 1, ofp) != 1)
    544             {
    545               perror (filename);
    546               done (1);
    547             }
    548         }
    549 
    550754      /* Dump the normalized raw arc information.  */
    551755      for (sym = symtab.base; sym < symtab.limit; ++sym)
     
    553757          for (arc = sym->cg.children; arc; arc = arc->next_child)
    554758            {
    555               put_vma (core_bfd, arc->parent->addr,
    556                        (bfd_byte *) raw_arc.from_pc);
    557               put_vma (core_bfd, arc->child->addr,
    558                        (bfd_byte *) raw_arc.self_pc);
    559               bfd_put_32 (core_bfd, arc->count, (bfd_byte *) raw_arc.count);
    560               if (fwrite (&raw_arc, sizeof (raw_arc), 1, ofp) != 1)
     759              if (gmon_write_raw_arc (ofp, arc->parent->addr,
     760                                      arc->child->addr, arc->count))
    561761                {
    562762                  perror (filename);
  • branches/GNU/src/binutils/gprof/gmon_io.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* gmon_io.h
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55This file is part of GNU Binutils.
     
    2222#ifndef gmon_io_h
    2323#define gmon_io_h
    24 
    25 #include "bfd.h"
    26 #include "gmon.h"
    2724
    2825/* Some platforms need to put stdin into binary mode, to read
     
    5653extern int gmon_io_write_vma PARAMS ((FILE *ifp, bfd_vma val));
    5754extern int gmon_io_write_32 PARAMS ((FILE *ifp, unsigned int val));
    58 extern int gmon_io_write_8 PARAMS ((FILE *ifp, unsigned char val));
     55extern int gmon_io_write_8 PARAMS ((FILE *ifp, unsigned int val));
    5956extern int gmon_io_write PARAMS ((FILE *ifp, char *buf, size_t n));
    6057
  • branches/GNU/src/binutils/gprof/gmon_out.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2626#define gmon_out_h
    2727
    28 #include <gconfig.h>
    29 
    3028#define GMON_MAGIC      "gmon"  /* magic cookie */
    3129#define GMON_VERSION    1       /* version number */
  • branches/GNU/src/binutils/gprof/gprof.1

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 .\" Copyright (c) 1983, 1990 The Regents of the University of California.
    2 .\" All rights reserved.
     1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
    32.\"
    4 .\" Redistribution and use in source and binary forms are permitted provided
    5 .\" that: (1) source distributions retain this entire copyright notice and
    6 .\" comment, and (2) distributions including binaries display the following
    7 .\" acknowledgement:  ``This product includes software developed by the
    8 .\" University of California, Berkeley and its contributors'' in the
    9 .\" documentation or other materials provided with the distribution and in
    10 .\" all advertising materials mentioning features or use of this software.
    11 .\" Neither the name of the University nor the names of its contributors may
    12 .\" be used to endorse or promote products derived from this software without
    13 .\" specific prior written permission.
    14 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
    15 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
    16 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     3.\" Standard preamble:
     4.\" ========================================================================
     5.de Sh \" Subsection heading
     6.br
     7.if t .Sp
     8.ne 5
     9.PP
     10\fB\\$1\fR
     11.PP
     12..
     13.de Sp \" Vertical space (when we can't use .PP)
     14.if t .sp .5v
     15.if n .sp
     16..
     17.de Vb \" Begin verbatim text
     18.ft CW
     19.nf
     20.ne \\$1
     21..
     22.de Ve \" End verbatim text
     23.ft R
     24.fi
     25..
     26.\" Set up some character translations and predefined strings.  \*(-- will
     27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
     28.\" double quote, and \*(R" will give a right double quote.  | will give a
     29.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
     30.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
     31.\" expand to `' in nroff, nothing in troff, for use with C<>.
     32.tr \(*W-|\(bv\*(Tr
     33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
     34.ie n \{\
     35.    ds -- \(*W-
     36.    ds PI pi
     37.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
     38.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
     39.    ds L" ""
     40.    ds R" ""
     41.    ds C` ""
     42.    ds C' ""
     43'br\}
     44.el\{\
     45.    ds -- \|\(em\|
     46.    ds PI \(*p
     47.    ds L" ``
     48.    ds R" ''
     49'br\}
    1750.\"
    18 .\"     @(#)gprof.1     6.6 (Berkeley) 7/24/90
     51.\" If the F register is turned on, we'll generate index entries on stderr for
     52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
     53.\" entries marked with X<> in POD.  Of course, you'll have to process the
     54.\" output yourself in some meaningful fashion.
     55.if \nF \{\
     56.    de IX
     57.    tm Index:\\$1\t\\n%\t"\\$2"
     58..
     59.    nr % 0
     60.    rr F
     61.\}
    1962.\"
    20 .TH GPROF 1 "January 29, 1993"
    21 .SH NAME
     63.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
     64.\" way too many mistakes in technical documents.
     65.hy 0
     66.\"
     67.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
     68.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
     69.    \" fudge factors for nroff and troff
     70.if n \{\
     71.    ds #H 0
     72.    ds #V .8m
     73.    ds #F .3m
     74.    ds #[ \f1
     75.    ds #] \fP
     76.\}
     77.if t \{\
     78.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
     79.    ds #V .6m
     80.    ds #F 0
     81.    ds #[ \&
     82.    ds #] \&
     83.\}
     84.    \" simple accents for nroff and troff
     85.if n \{\
     86.    ds ' \&
     87.    ds ` \&
     88.    ds ^ \&
     89.    ds , \&
     90.    ds ~ ~
     91.    ds /
     92.\}
     93.if t \{\
     94.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
     95.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
     96.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
     97.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
     98.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
     99.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
     100.\}
     101.    \" troff and (daisy-wheel) nroff accents
     102.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
     103.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
     104.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
     105.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
     106.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
     107.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
     108.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
     109.ds ae a\h'-(\w'a'u*4/10)'e
     110.ds Ae A\h'-(\w'A'u*4/10)'E
     111.    \" corrections for vroff
     112.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
     113.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
     114.    \" for low resolution devices (crt and lpr)
     115.if \n(.H>23 .if \n(.V>19 \
     116\{\
     117.    ds : e
     118.    ds 8 ss
     119.    ds o a
     120.    ds d- d\h'-1'\(ga
     121.    ds D- D\h'-1'\(hy
     122.    ds th \o'bp'
     123.    ds Th \o'LP'
     124.    ds ae ae
     125.    ds Ae AE
     126.\}
     127.rm #[ #] #H #V #F C
     128.\" ========================================================================
     129.\"
     130.IX Title "GPROF 1"
     131.TH GPROF 1 "2003-04-27" "binutils-2.13.90" "GNU"
     132.SH "NAME"
    22133gprof \- display call graph profile data
    23 .SH SYNOPSIS
    24 .B gprof [ \-abcsz ] [ \-e|\-E
    25 .I name
    26 .B ] [ \-f|\-F
    27 .I name
    28 .B ]
    29 .B [ \-k
    30 .I fromname toname
    31 .B ] [
    32 .I objfile
    33 .B [
    34 .I gmon.out
    35 .B ]
    36 .B ]
    37 .SH DESCRIPTION
    38 .B gprof
    39 produces an execution profile of C, Pascal, or Fortran77 programs.
    40 The effect of called routines is incorporated in the profile of each caller.
    41 The profile data is taken from the call graph profile file
    42 \&(`gmon.out' default) which is created by programs
    43 that are compiled with the
    44 .B \-pg
    45 option of
    46 .BR cc ( 1 ) ,
    47 .BR pc ( 1 ) ,
    48 and
    49 .BR f77 ( 1 ) .
    50 The
    51 .B \-pg
    52 option also links in versions of the library routines
    53 that are compiled for profiling.
    54 .B Gprof
    55 reads the given object file (the default is `a.out')
    56 and establishes the relation between its symbol table
    57 and the call graph profile from `gmon.out'.
    58 If more than one profile file is specified,
    59 the
    60 .B gprof
     134.SH "SYNOPSIS"
     135.IX Header "SYNOPSIS"
     136gprof [ \-[abcDhilLsTvwxyz] ] [ \-[ACeEfFJnNOpPqQZ][\fIname\fR] ]
     137 [ \-I \fIdirs\fR ] [ \-d[\fInum\fR] ] [ \-k \fIfrom/to\fR ]
     138 [ \-m \fImin-count\fR ] [ \-t \fItable-length\fR ]
     139 [ \-\-[no\-]annotated\-source[=\fIname\fR] ]
     140 [ \-\-[no\-]exec\-counts[=\fIname\fR] ]
     141 [ \-\-[no\-]flat\-profile[=\fIname\fR] ] [ \-\-[no\-]graph[=\fIname\fR] ]
     142 [ \-\-[no\-]time=\fIname\fR] [ \-\-all\-lines ] [ \-\-brief ]
     143 [ \-\-debug[=\fIlevel\fR] ] [ \-\-function\-ordering ]
     144 [ \-\-file\-ordering ] [ \-\-directory\-path=\fIdirs\fR ]
     145 [ \-\-display\-unused\-functions ] [ \-\-file\-format=\fIname\fR ]
     146 [ \-\-file\-info ] [ \-\-help ] [ \-\-line ] [ \-\-min\-count=\fIn\fR ]
     147 [ \-\-no\-static ] [ \-\-print\-path ] [ \-\-separate\-files ]
     148 [ \-\-static\-call\-graph ] [ \-\-sum ] [ \-\-table\-length=\fIlen\fR ]
     149 [ \-\-traditional ] [ \-\-version ] [ \-\-width=\fIn\fR ]
     150 [ \-\-ignore\-non\-functions ] [ \-\-demangle[=\fI\s-1STYLE\s0\fR] ]
     151 [ \-\-no\-demangle ] [ \fIimage-file\fR ] [ \fIprofile-file\fR ... ]
     152.SH "DESCRIPTION"
     153.IX Header "DESCRIPTION"
     154\&\f(CW\*(C`gprof\*(C'\fR produces an execution profile of C, Pascal, or Fortran77
     155programs.  The effect of called routines is incorporated in the profile
     156of each caller.  The profile data is taken from the call graph profile file
     157(\fIgmon.out\fR default) which is created by programs
     158that are compiled with the \fB\-pg\fR option of
     159\&\f(CW\*(C`cc\*(C'\fR, \f(CW\*(C`pc\*(C'\fR, and \f(CW\*(C`f77\*(C'\fR.
     160The \fB\-pg\fR option also links in versions of the library routines
     161that are compiled for profiling.  \f(CW\*(C`Gprof\*(C'\fR reads the given object
     162file (the default is \f(CW\*(C`a.out\*(C'\fR) and establishes the relation between
     163its symbol table and the call graph profile from \fIgmon.out\fR.
     164If more than one profile file is specified, the \f(CW\*(C`gprof\*(C'\fR
    61165output shows the sum of the profile information in the given profile files.
    62166.PP
    63 .B Gprof
    64 calculates the amount of time spent in each routine.
     167\&\f(CW\*(C`Gprof\*(C'\fR calculates the amount of time spent in each routine.
    65168Next, these times are propagated along the edges of the call graph.
    66169Cycles are discovered, and calls into a cycle are made to share the time
    67170of the cycle.
    68 The first listing shows the functions
    69 sorted according to the time they represent
    70 including the time of their call graph descendants.
    71 Below each function entry is shown its (direct) call graph children,
    72 and how their times are propagated to this function.
    73 A similar display above the function shows how this function's time and the
    74 time of its descendants is propagated to its (direct) call graph parents.
    75 .PP
    76 Cycles are also shown, with an entry for the cycle as a whole and
    77 a listing of the members of the cycle and their contributions to the
    78 time and call counts of the cycle.
    79 .PP
    80 Second, a flat profile is given,
    81 similar to that provided by
    82 .BR prof ( 1 )  .
    83 This listing gives the total execution times, the call counts,
    84 the time in milliseconds the call spent in the routine itself, and
    85 the time in milliseconds the call spent in the routine itself including
    86 its descendants.
    87 .PP
    88 Finally, an index of the function names is provided.
    89 .SH OPTIONS
    90 The following options are available:
    91 .TP
    92 .B \-a
    93 suppresses the printing of statically declared functions.
    94 If this option is given, all relevant information about the static function
    95 (e.g., time samples, calls to other functions, calls from other functions)
    96 belongs to the function loaded just before the static function in the
    97 \&`objfile' file.
    98 .TP
    99 .B \-b
    100 suppresses the printing of a description of each field in the profile.
    101 .TP
    102 .B \-c
    103 the static call graph of the program is discovered by a heuristic
    104 that examines the text space of the object file.
    105 Static-only parents or children are shown
    106 with call counts of 0.
    107 .TP
    108 .BI "\-e " name
    109 suppresses the printing of the graph profile entry for routine
    110 .I name
    111 and all its descendants
    112 (unless they have other ancestors that aren't suppressed).
    113 More than one
    114 .B \-e
    115 option may be given.
    116 Only one
    117 .I name
    118 may be given with each
    119 .B \-e
    120 option.
    121 .TP
    122 .BI "\-E " name
    123 suppresses the printing of the graph profile entry for routine
    124 .I name
    125 (and its descendants) as
    126 .B \-e  ,
    127 above, and also excludes the time spent in
    128 .I name
    129 (and its descendants) from the total and percentage time computations.
    130 (For example,
    131 .BI "\-E " mcount
    132 .BI "\-E " mcleanup
    133 is the default.)
    134 .TP
    135 .BI "\-f " name
    136 prints the graph profile entry of only the specified routine
    137 .I name
    138 and its descendants.
    139 More than one
    140 .B \-f
    141 option may be given.
    142 Only one
    143 .I name
    144 may be given with each
    145 .B \-f
    146 option.
    147 .TP
    148 .BI "\-F " name
    149 prints the graph profile entry of only the routine
    150 .I name
    151 and its descendants (as
    152 .B \-f ,
    153 above) and also uses only the times of the printed routines
    154 in total time and percentage computations.
    155 More than one
    156 .B \-F
    157 option may be given.
    158 Only one
    159 .I name
    160 may be given with each
    161 .B \-F
    162 option.
    163 The
    164 .B \-F
    165 option
    166 overrides
    167 the
    168 .B \-E
    169 option.
    170 .TP
    171 .BI "\-k " "fromname toname"
    172 will delete any arcs from routine
    173 .I fromname
    174 to routine
    175 .IR toname  .
    176 This can be used to break undesired cycles.
    177 More than one
    178 .B \-k
    179 option may be given.
    180 Only one pair of routine names may be given with each
    181 .B \-k
    182 option.
    183 .TP
    184 .B \-s
    185 a profile file `gmon.sum' is produced that represents
    186 the sum of the profile information in all the specified profile files.
    187 This summary profile file may be given to later
    188 executions of gprof (probably also with a
    189 .BR \-s  )
    190 to accumulate profile data across several runs of an `objfile' file.
    191 .TP
    192 .B -v
    193 prints the version number for gprof, and then exits.
    194 .TP
    195 .B -z
    196 displays routines that have zero usage (as shown by call counts
    197 and accumulated time).
    198 This is useful with the
    199 .B \-c
    200 option for discovering which routines were never called.
    201 .PP
    202 .SH FILES
    203 .ta \w'gmon.sum 'u
    204 a.out   the namelist and text space.
    205 .br
    206 gmon.out        dynamic call graph and profile.
    207 .br
    208 gmon.sum summarized dynamic call graph and profile.
    209 .SH SEE ALSO
    210 .BR monitor ( 3 ) ,
    211 .BR profil ( 2 ) ,
    212 .BR cc ( 1 ) ,
    213 .BR prof ( 1 )
    214 .sp
    215 ``An Execution Profiler for Modular Programs'',
    216 by S. Graham, P. Kessler, M. McKusick;
    217 .I
    218 Software \- Practice and Experience,
    219 Vol. 13, pp. 671-685, 1983.
    220 .sp
    221 ``gprof: A Call Graph Execution Profiler'',
    222 by S. Graham, P. Kessler, M. McKusick;
    223 .I
    224 Proceedings of the SIGPLAN '82 Symposium on Compiler Construction,
    225 SIGPLAN Notices, Vol. 17, No  6, pp. 120-126, June 1982.
    226 .SH HISTORY
    227 .B Gprof
    228 appeared in 4.2 BSD.
    229 .SH BUGS
     171.PP
     172Several forms of output are available from the analysis.
     173.PP
     174The \fIflat profile\fR shows how much time your program spent in each function,
     175and how many times that function was called.  If you simply want to know
     176which functions burn most of the cycles, it is stated concisely here.
     177.PP
     178The \fIcall graph\fR shows, for each function, which functions called it, which
     179other functions it called, and how many times.  There is also an estimate
     180of how much time was spent in the subroutines of each function.  This can
     181suggest places where you might try to eliminate function calls that use a
     182lot of time. 
     183.PP
     184The \fIannotated source\fR listing is a copy of the program's
     185source code, labeled with the number of times each line of the
     186program was executed. 
     187.SH "OPTIONS"
     188.IX Header "OPTIONS"
     189These options specify which of several output formats
     190\&\f(CW\*(C`gprof\*(C'\fR should produce.
     191.PP
     192Many of these options take an optional \fIsymspec\fR to specify
     193functions to be included or excluded.  These options can be
     194specified multiple times, with different symspecs, to include
     195or exclude sets of symbols. 
     196.PP
     197Specifying any of these options overrides the default (\fB\-p \-q\fR),
     198which prints a flat profile and call graph analysis
     199for all functions.
     200.ie n .IP """\-A[\f(CIsymspec\f(CW]""" 4
     201.el .IP "\f(CW\-A[\f(CIsymspec\f(CW]\fR" 4
     202.IX Item "-A[symspec]"
     203.PD 0
     204.ie n .IP """\-\-annotated\-source[=\f(CIsymspec\f(CW]""" 4
     205.el .IP "\f(CW\-\-annotated\-source[=\f(CIsymspec\f(CW]\fR" 4
     206.IX Item "--annotated-source[=symspec]"
     207.PD
     208The \fB\-A\fR option causes \f(CW\*(C`gprof\*(C'\fR to print annotated source code.
     209If \fIsymspec\fR is specified, print output only for matching symbols.
     210.ie n .IP """\-b""" 4
     211.el .IP "\f(CW\-b\fR" 4
     212.IX Item "-b"
     213.PD 0
     214.ie n .IP """\-\-brief""" 4
     215.el .IP "\f(CW\-\-brief\fR" 4
     216.IX Item "--brief"
     217.PD
     218If the \fB\-b\fR option is given, \f(CW\*(C`gprof\*(C'\fR doesn't print the
     219verbose blurbs that try to explain the meaning of all of the fields in
     220the tables.  This is useful if you intend to print out the output, or
     221are tired of seeing the blurbs.
     222.ie n .IP """\-C[\f(CIsymspec\f(CW]""" 4
     223.el .IP "\f(CW\-C[\f(CIsymspec\f(CW]\fR" 4
     224.IX Item "-C[symspec]"
     225.PD 0
     226.ie n .IP """\-\-exec\-counts[=\f(CIsymspec\f(CW]""" 4
     227.el .IP "\f(CW\-\-exec\-counts[=\f(CIsymspec\f(CW]\fR" 4
     228.IX Item "--exec-counts[=symspec]"
     229.PD
     230The \fB\-C\fR option causes \f(CW\*(C`gprof\*(C'\fR to
     231print a tally of functions and the number of times each was called.
     232If \fIsymspec\fR is specified, print tally only for matching symbols.
     233.Sp
     234If the profile data file contains basic-block count records, specifying
     235the \fB\-l\fR option, along with \fB\-C\fR, will cause basic-block
     236execution counts to be tallied and displayed.
     237.ie n .IP """\-i""" 4
     238.el .IP "\f(CW\-i\fR" 4
     239.IX Item "-i"
     240.PD 0
     241.ie n .IP """\-\-file\-info""" 4
     242.el .IP "\f(CW\-\-file\-info\fR" 4
     243.IX Item "--file-info"
     244.PD
     245The \fB\-i\fR option causes \f(CW\*(C`gprof\*(C'\fR to display summary information
     246about the profile data file(s) and then exit.  The number of histogram,
     247call graph, and basic-block count records is displayed.
     248.ie n .IP """\-I \f(CIdirs\f(CW""" 4
     249.el .IP "\f(CW\-I \f(CIdirs\f(CW\fR" 4
     250.IX Item "-I dirs"
     251.PD 0
     252.ie n .IP """\-\-directory\-path=\f(CIdirs\f(CW""" 4
     253.el .IP "\f(CW\-\-directory\-path=\f(CIdirs\f(CW\fR" 4
     254.IX Item "--directory-path=dirs"
     255.PD
     256The \fB\-I\fR option specifies a list of search directories in
     257which to find source files.  Environment variable \fI\s-1GPROF_PATH\s0\fR
     258can also be used to convey this information.
     259Used mostly for annotated source output.
     260.ie n .IP """\-J[\f(CIsymspec\f(CW]""" 4
     261.el .IP "\f(CW\-J[\f(CIsymspec\f(CW]\fR" 4
     262.IX Item "-J[symspec]"
     263.PD 0
     264.ie n .IP """\-\-no\-annotated\-source[=\f(CIsymspec\f(CW]""" 4
     265.el .IP "\f(CW\-\-no\-annotated\-source[=\f(CIsymspec\f(CW]\fR" 4
     266.IX Item "--no-annotated-source[=symspec]"
     267.PD
     268The \fB\-J\fR option causes \f(CW\*(C`gprof\*(C'\fR not to
     269print annotated source code.
     270If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints annotated source,
     271but excludes matching symbols.
     272.ie n .IP """\-L""" 4
     273.el .IP "\f(CW\-L\fR" 4
     274.IX Item "-L"
     275.PD 0
     276.ie n .IP """\-\-print\-path""" 4
     277.el .IP "\f(CW\-\-print\-path\fR" 4
     278.IX Item "--print-path"
     279.PD
     280Normally, source filenames are printed with the path
     281component suppressed.  The \fB\-L\fR option causes \f(CW\*(C`gprof\*(C'\fR
     282to print the full pathname of
     283source filenames, which is determined
     284from symbolic debugging information in the image file
     285and is relative to the directory in which the compiler
     286was invoked.
     287.ie n .IP """\-p[\f(CIsymspec\f(CW]""" 4
     288.el .IP "\f(CW\-p[\f(CIsymspec\f(CW]\fR" 4
     289.IX Item "-p[symspec]"
     290.PD 0
     291.ie n .IP """\-\-flat\-profile[=\f(CIsymspec\f(CW]""" 4
     292.el .IP "\f(CW\-\-flat\-profile[=\f(CIsymspec\f(CW]\fR" 4
     293.IX Item "--flat-profile[=symspec]"
     294.PD
     295The \fB\-p\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a flat profile.
     296If \fIsymspec\fR is specified, print flat profile only for matching symbols.
     297.ie n .IP """\-P[\f(CIsymspec\f(CW]""" 4
     298.el .IP "\f(CW\-P[\f(CIsymspec\f(CW]\fR" 4
     299.IX Item "-P[symspec]"
     300.PD 0
     301.ie n .IP """\-\-no\-flat\-profile[=\f(CIsymspec\f(CW]""" 4
     302.el .IP "\f(CW\-\-no\-flat\-profile[=\f(CIsymspec\f(CW]\fR" 4
     303.IX Item "--no-flat-profile[=symspec]"
     304.PD
     305The \fB\-P\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress printing a flat profile.
     306If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints a flat profile,
     307but excludes matching symbols.
     308.ie n .IP """\-q[\f(CIsymspec\f(CW]""" 4
     309.el .IP "\f(CW\-q[\f(CIsymspec\f(CW]\fR" 4
     310.IX Item "-q[symspec]"
     311.PD 0
     312.ie n .IP """\-\-graph[=\f(CIsymspec\f(CW]""" 4
     313.el .IP "\f(CW\-\-graph[=\f(CIsymspec\f(CW]\fR" 4
     314.IX Item "--graph[=symspec]"
     315.PD
     316The \fB\-q\fR option causes \f(CW\*(C`gprof\*(C'\fR to print the call graph analysis.
     317If \fIsymspec\fR is specified, print call graph only for matching symbols
     318and their children.
     319.ie n .IP """\-Q[\f(CIsymspec\f(CW]""" 4
     320.el .IP "\f(CW\-Q[\f(CIsymspec\f(CW]\fR" 4
     321.IX Item "-Q[symspec]"
     322.PD 0
     323.ie n .IP """\-\-no\-graph[=\f(CIsymspec\f(CW]""" 4
     324.el .IP "\f(CW\-\-no\-graph[=\f(CIsymspec\f(CW]\fR" 4
     325.IX Item "--no-graph[=symspec]"
     326.PD
     327The \fB\-Q\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress printing the
     328call graph.
     329If \fIsymspec\fR is specified, \f(CW\*(C`gprof\*(C'\fR prints a call graph,
     330but excludes matching symbols.
     331.ie n .IP """\-y""" 4
     332.el .IP "\f(CW\-y\fR" 4
     333.IX Item "-y"
     334.PD 0
     335.ie n .IP """\-\-separate\-files""" 4
     336.el .IP "\f(CW\-\-separate\-files\fR" 4
     337.IX Item "--separate-files"
     338.PD
     339This option affects annotated source output only.
     340Normally, \f(CW\*(C`gprof\*(C'\fR prints annotated source files
     341to standard\-output.  If this option is specified,
     342annotated source for a file named \fIpath/\fIfilename\fI\fR
     343is generated in the file \fI\fIfilename\fI\-ann\fR.  If the underlying
     344filesystem would truncate \fI\fIfilename\fI\-ann\fR so that it
     345overwrites the original \fI\fIfilename\fI\fR, \f(CW\*(C`gprof\*(C'\fR generates
     346annotated source in the file \fI\fIfilename\fI.ann\fR instead (if the
     347original file name has an extension, that extension is \fIreplaced\fR
     348with \fI.ann\fR).
     349.ie n .IP """\-Z[\f(CIsymspec\f(CW]""" 4
     350.el .IP "\f(CW\-Z[\f(CIsymspec\f(CW]\fR" 4
     351.IX Item "-Z[symspec]"
     352.PD 0
     353.ie n .IP """\-\-no\-exec\-counts[=\f(CIsymspec\f(CW]""" 4
     354.el .IP "\f(CW\-\-no\-exec\-counts[=\f(CIsymspec\f(CW]\fR" 4
     355.IX Item "--no-exec-counts[=symspec]"
     356.PD
     357The \fB\-Z\fR option causes \f(CW\*(C`gprof\*(C'\fR not to
     358print a tally of functions and the number of times each was called.
     359If \fIsymspec\fR is specified, print tally, but exclude matching symbols.
     360.ie n .IP """\-\-function\-ordering""" 4
     361.el .IP "\f(CW\-\-function\-ordering\fR" 4
     362.IX Item "--function-ordering"
     363The \fB\-\-function\-ordering\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a
     364suggested function ordering for the program based on profiling data.
     365This option suggests an ordering which may improve paging, tlb and
     366cache behavior for the program on systems which support arbitrary
     367ordering of functions in an executable.
     368.Sp
     369The exact details of how to force the linker to place functions
     370in a particular order is system dependent and out of the scope of this
     371manual.
     372.ie n .IP """\-\-file\-ordering \f(CImap_file\f(CW""" 4
     373.el .IP "\f(CW\-\-file\-ordering \f(CImap_file\f(CW\fR" 4
     374.IX Item "--file-ordering map_file"
     375The \fB\-\-file\-ordering\fR option causes \f(CW\*(C`gprof\*(C'\fR to print a
     376suggested .o link line ordering for the program based on profiling data.
     377This option suggests an ordering which may improve paging, tlb and
     378cache behavior for the program on systems which do not support arbitrary
     379ordering of functions in an executable.
     380.Sp
     381Use of the \fB\-a\fR argument is highly recommended with this option.
     382.Sp
     383The \fImap_file\fR argument is a pathname to a file which provides
     384function name to object file mappings.  The format of the file is similar to
     385the output of the program \f(CW\*(C`nm\*(C'\fR.
     386.Sp
     387.Vb 8
     388\&        c-parse.o:00000000 T yyparse
     389\&        c-parse.o:00000004 C yyerrflag
     390\&        c-lang.o:00000000 T maybe_objc_method_name
     391\&        c-lang.o:00000000 T print_lang_statistics
     392\&        c-lang.o:00000000 T recognize_objc_keyword
     393\&        c-decl.o:00000000 T print_lang_identifier
     394\&        c-decl.o:00000000 T print_lang_type
     395\&        ...
     396.Ve
     397.Sp
     398To create a \fImap_file\fR with \s-1GNU\s0 \f(CW\*(C`nm\*(C'\fR, type a command like
     399\&\f(CW\*(C`nm \-\-extern\-only \-\-defined\-only \-v \-\-print\-file\-name program\-name\*(C'\fR.
     400.ie n .IP """\-T""" 4
     401.el .IP "\f(CW\-T\fR" 4
     402.IX Item "-T"
     403.PD 0
     404.ie n .IP """\-\-traditional""" 4
     405.el .IP "\f(CW\-\-traditional\fR" 4
     406.IX Item "--traditional"
     407.PD
     408The \fB\-T\fR option causes \f(CW\*(C`gprof\*(C'\fR to print its output in
     409``traditional'' \s-1BSD\s0 style.
     410.ie n .IP """\-w \f(CIwidth\f(CW""" 4
     411.el .IP "\f(CW\-w \f(CIwidth\f(CW\fR" 4
     412.IX Item "-w width"
     413.PD 0
     414.ie n .IP """\-\-width=\f(CIwidth\f(CW""" 4
     415.el .IP "\f(CW\-\-width=\f(CIwidth\f(CW\fR" 4
     416.IX Item "--width=width"
     417.PD
     418Sets width of output lines to \fIwidth\fR.
     419Currently only used when printing the function index at the bottom
     420of the call graph.
     421.ie n .IP """\-x""" 4
     422.el .IP "\f(CW\-x\fR" 4
     423.IX Item "-x"
     424.PD 0
     425.ie n .IP """\-\-all\-lines""" 4
     426.el .IP "\f(CW\-\-all\-lines\fR" 4
     427.IX Item "--all-lines"
     428.PD
     429This option affects annotated source output only.
     430By default, only the lines at the beginning of a basic-block
     431are annotated.  If this option is specified, every line in
     432a basic-block is annotated by repeating the annotation for the
     433first line.  This behavior is similar to \f(CW\*(C`tcov\*(C'\fR's \fB\-a\fR.
     434.ie n .IP """\-\-demangle[=\f(CIstyle\f(CW]""" 4
     435.el .IP "\f(CW\-\-demangle[=\f(CIstyle\f(CW]\fR" 4
     436.IX Item "--demangle[=style]"
     437.PD 0
     438.ie n .IP """\-\-no\-demangle""" 4
     439.el .IP "\f(CW\-\-no\-demangle\fR" 4
     440.IX Item "--no-demangle"
     441.PD
     442These options control whether \*(C+ symbol names should be demangled when
     443printing output.  The default is to demangle symbols.  The
     444\&\f(CW\*(C`\-\-no\-demangle\*(C'\fR option may be used to turn off demangling. Different
     445compilers have different mangling styles.  The optional demangling style
     446argument can be used to choose an appropriate demangling style for your
     447compiler.
     448.Sh "Analysis Options"
     449.IX Subsection "Analysis Options"
     450.ie n .IP """\-a""" 4
     451.el .IP "\f(CW\-a\fR" 4
     452.IX Item "-a"
     453.PD 0
     454.ie n .IP """\-\-no\-static""" 4
     455.el .IP "\f(CW\-\-no\-static\fR" 4
     456.IX Item "--no-static"
     457.PD
     458The \fB\-a\fR option causes \f(CW\*(C`gprof\*(C'\fR to suppress the printing of
     459statically declared (private) functions.  (These are functions whose
     460names are not listed as global, and which are not visible outside the
     461file/function/block where they were defined.)  Time spent in these
     462functions, calls to/from them, etc, will all be attributed to the
     463function that was loaded directly before it in the executable file.
     464This option affects both the flat profile and the call graph.
     465.ie n .IP """\-c""" 4
     466.el .IP "\f(CW\-c\fR" 4
     467.IX Item "-c"
     468.PD 0
     469.ie n .IP """\-\-static\-call\-graph""" 4
     470.el .IP "\f(CW\-\-static\-call\-graph\fR" 4
     471.IX Item "--static-call-graph"
     472.PD
     473The \fB\-c\fR option causes the call graph of the program to be
     474augmented by a heuristic which examines the text space of the object
     475file and identifies function calls in the binary machine code.
     476Since normal call graph records are only generated when functions are
     477entered, this option identifies children that could have been called,
     478but never were.  Calls to functions that were not compiled with
     479profiling enabled are also identified, but only if symbol table
     480entries are present for them.
     481Calls to dynamic library routines are typically \fInot\fR found
     482by this option.
     483Parents or children identified via this heuristic
     484are indicated in the call graph with call counts of \fB0\fR.
     485.ie n .IP """\-D""" 4
     486.el .IP "\f(CW\-D\fR" 4
     487.IX Item "-D"
     488.PD 0
     489.ie n .IP """\-\-ignore\-non\-functions""" 4
     490.el .IP "\f(CW\-\-ignore\-non\-functions\fR" 4
     491.IX Item "--ignore-non-functions"
     492.PD
     493The \fB\-D\fR option causes \f(CW\*(C`gprof\*(C'\fR to ignore symbols which
     494are not known to be functions.  This option will give more accurate
     495profile data on systems where it is supported (Solaris and \s-1HPUX\s0 for
     496example).
     497.ie n .IP """\-k \f(CIfrom\f(CW/\f(CIto\f(CW""" 4
     498.el .IP "\f(CW\-k \f(CIfrom\f(CW/\f(CIto\f(CW\fR" 4
     499.IX Item "-k from/to"
     500The \fB\-k\fR option allows you to delete from the call graph any arcs from
     501symbols matching symspec \fIfrom\fR to those matching symspec \fIto\fR.
     502.ie n .IP """\-l""" 4
     503.el .IP "\f(CW\-l\fR" 4
     504.IX Item "-l"
     505.PD 0
     506.ie n .IP """\-\-line""" 4
     507.el .IP "\f(CW\-\-line\fR" 4
     508.IX Item "--line"
     509.PD
     510The \fB\-l\fR option enables line-by-line profiling, which causes
     511histogram hits to be charged to individual source code lines,
     512instead of functions.
     513If the program was compiled with basic-block counting enabled,
     514this option will also identify how many times each line of
     515code was executed.
     516While line-by-line profiling can help isolate where in a large function
     517a program is spending its time, it also significantly increases
     518the running time of \f(CW\*(C`gprof\*(C'\fR, and magnifies statistical
     519inaccuracies.
     520.ie n .IP """\-m \f(CInum\f(CW""" 4
     521.el .IP "\f(CW\-m \f(CInum\f(CW\fR" 4
     522.IX Item "-m num"
     523.PD 0
     524.ie n .IP """\-\-min\-count=\f(CInum\f(CW""" 4
     525.el .IP "\f(CW\-\-min\-count=\f(CInum\f(CW\fR" 4
     526.IX Item "--min-count=num"
     527.PD
     528This option affects execution count output only.
     529Symbols that are executed less than \fInum\fR times are suppressed.
     530.ie n .IP """\-n[\f(CIsymspec\f(CW]""" 4
     531.el .IP "\f(CW\-n[\f(CIsymspec\f(CW]\fR" 4
     532.IX Item "-n[symspec]"
     533.PD 0
     534.ie n .IP """\-\-time[=\f(CIsymspec\f(CW]""" 4
     535.el .IP "\f(CW\-\-time[=\f(CIsymspec\f(CW]\fR" 4
     536.IX Item "--time[=symspec]"
     537.PD
     538The \fB\-n\fR option causes \f(CW\*(C`gprof\*(C'\fR, in its call graph analysis,
     539to only propagate times for symbols matching \fIsymspec\fR.
     540.ie n .IP """\-N[\f(CIsymspec\f(CW]""" 4
     541.el .IP "\f(CW\-N[\f(CIsymspec\f(CW]\fR" 4
     542.IX Item "-N[symspec]"
     543.PD 0
     544.ie n .IP """\-\-no\-time[=\f(CIsymspec\f(CW]""" 4
     545.el .IP "\f(CW\-\-no\-time[=\f(CIsymspec\f(CW]\fR" 4
     546.IX Item "--no-time[=symspec]"
     547.PD
     548The \fB\-n\fR option causes \f(CW\*(C`gprof\*(C'\fR, in its call graph analysis,
     549not to propagate times for symbols matching \fIsymspec\fR.
     550.ie n .IP """\-z""" 4
     551.el .IP "\f(CW\-z\fR" 4
     552.IX Item "-z"
     553.PD 0
     554.ie n .IP """\-\-display\-unused\-functions""" 4
     555.el .IP "\f(CW\-\-display\-unused\-functions\fR" 4
     556.IX Item "--display-unused-functions"
     557.PD
     558If you give the \fB\-z\fR option, \f(CW\*(C`gprof\*(C'\fR will mention all
     559functions in the flat profile, even those that were never called, and
     560that had no time spent in them.  This is useful in conjunction with the
     561\&\fB\-c\fR option for discovering which routines were never called.
     562.Sh "Miscellaneous Options"
     563.IX Subsection "Miscellaneous Options"
     564.ie n .IP """\-d[\f(CInum\f(CW]""" 4
     565.el .IP "\f(CW\-d[\f(CInum\f(CW]\fR" 4
     566.IX Item "-d[num]"
     567.PD 0
     568.ie n .IP """\-\-debug[=\f(CInum\f(CW]""" 4
     569.el .IP "\f(CW\-\-debug[=\f(CInum\f(CW]\fR" 4
     570.IX Item "--debug[=num]"
     571.PD
     572The \fB\-d\fR \fInum\fR option specifies debugging options.
     573If \fInum\fR is not specified, enable all debugging.
     574.ie n .IP """\-O\f(CIname\f(CW""" 4
     575.el .IP "\f(CW\-O\f(CIname\f(CW\fR" 4
     576.IX Item "-Oname"
     577.PD 0
     578.ie n .IP """\-\-file\-format=\f(CIname\f(CW""" 4
     579.el .IP "\f(CW\-\-file\-format=\f(CIname\f(CW\fR" 4
     580.IX Item "--file-format=name"
     581.PD
     582Selects the format of the profile data files.  Recognized formats are
     583\&\fBauto\fR (the default), \fBbsd\fR, \fB4.4bsd\fR, \fBmagic\fR, and
     584\&\fBprof\fR (not yet supported).
     585.ie n .IP """\-s""" 4
     586.el .IP "\f(CW\-s\fR" 4
     587.IX Item "-s"
     588.PD 0
     589.ie n .IP """\-\-sum""" 4
     590.el .IP "\f(CW\-\-sum\fR" 4
     591.IX Item "--sum"
     592.PD
     593The \fB\-s\fR option causes \f(CW\*(C`gprof\*(C'\fR to summarize the information
     594in the profile data files it read in, and write out a profile data
     595file called \fIgmon.sum\fR, which contains all the information from
     596the profile data files that \f(CW\*(C`gprof\*(C'\fR read in.  The file \fIgmon.sum\fR
     597may be one of the specified input files; the effect of this is to
     598merge the data in the other input files into \fIgmon.sum\fR.
     599.Sp
     600Eventually you can run \f(CW\*(C`gprof\*(C'\fR again without \fB\-s\fR to analyze the
     601cumulative data in the file \fIgmon.sum\fR.
     602.ie n .IP """\-v""" 4
     603.el .IP "\f(CW\-v\fR" 4
     604.IX Item "-v"
     605.PD 0
     606.ie n .IP """\-\-version""" 4
     607.el .IP "\f(CW\-\-version\fR" 4
     608.IX Item "--version"
     609.PD
     610The \fB\-v\fR flag causes \f(CW\*(C`gprof\*(C'\fR to print the current version
     611number, and then exit.
     612.Sh "Deprecated Options"
     613.IX Subsection "Deprecated Options"
     614.RS 4
     615These options have been replaced with newer versions that use symspecs.
     616.RE
     617.ie n .IP """\-e \f(CIfunction_name\f(CW""" 4
     618.el .IP "\f(CW\-e \f(CIfunction_name\f(CW\fR" 4
     619.IX Item "-e function_name"
     620The \fB\-e\fR \fIfunction\fR option tells \f(CW\*(C`gprof\*(C'\fR to not print
     621information about the function \fIfunction_name\fR (and its
     622children...) in the call graph.  The function will still be listed
     623as a child of any functions that call it, but its index number will be
     624shown as \fB[not printed]\fR.  More than one \fB\-e\fR option may be
     625given; only one \fIfunction_name\fR may be indicated with each \fB\-e\fR
     626option.
     627.ie n .IP """\-E \f(CIfunction_name\f(CW""" 4
     628.el .IP "\f(CW\-E \f(CIfunction_name\f(CW\fR" 4
     629.IX Item "-E function_name"
     630The \f(CW\*(C`\-E \f(CIfunction\f(CW\*(C'\fR option works like the \f(CW\*(C`\-e\*(C'\fR option, but
     631time spent in the function (and children who were not called from
     632anywhere else), will not be used to compute the percentages-of-time for
     633the call graph.  More than one \fB\-E\fR option may be given; only one
     634\&\fIfunction_name\fR may be indicated with each \fB\-E\fR option.
     635.ie n .IP """\-f \f(CIfunction_name\f(CW""" 4
     636.el .IP "\f(CW\-f \f(CIfunction_name\f(CW\fR" 4
     637.IX Item "-f function_name"
     638The \fB\-f\fR \fIfunction\fR option causes \f(CW\*(C`gprof\*(C'\fR to limit the
     639call graph to the function \fIfunction_name\fR and its children (and
     640their children...).  More than one \fB\-f\fR option may be given;
     641only one \fIfunction_name\fR may be indicated with each \fB\-f\fR
     642option. 
     643.ie n .IP """\-F \f(CIfunction_name\f(CW""" 4
     644.el .IP "\f(CW\-F \f(CIfunction_name\f(CW\fR" 4
     645.IX Item "-F function_name"
     646The \fB\-F\fR \fIfunction\fR option works like the \f(CW\*(C`\-f\*(C'\fR option, but
     647only time spent in the function and its children (and their
     648children...) will be used to determine total-time and
     649percentages-of-time for the call graph.  More than one \fB\-F\fR option
     650may be given; only one \fIfunction_name\fR may be indicated with each
     651\&\fB\-F\fR option.  The \fB\-F\fR option overrides the \fB\-E\fR option.
     652.SH "FILES"
     653.IX Header "FILES"
     654.ie n .IP """\f(CIa.out\f(CW""" 4
     655.el .IP "\f(CW\f(CIa.out\f(CW\fR" 4
     656.IX Item "a.out"
     657the namelist and text space.
     658.ie n .IP """\f(CIgmon.out\f(CW""" 4
     659.el .IP "\f(CW\f(CIgmon.out\f(CW\fR" 4
     660.IX Item "gmon.out"
     661dynamic call graph and profile.
     662.ie n .IP """\f(CIgmon.sum\f(CW""" 4
     663.el .IP "\f(CW\f(CIgmon.sum\f(CW\fR" 4
     664.IX Item "gmon.sum"
     665summarized dynamic call graph and profile. 
     666.SH "BUGS"
     667.IX Header "BUGS"
    230668The granularity of the sampling is shown, but remains
    231669statistical at best.
     
    247685the execution of the profiling routine, in which case all is lost.
    248686.PP
    249 The profiled program must call
    250 .BR exit ( 2 )
     687The profiled program must call \f(CW\*(C`exit\*(C'\fR(2)
    251688or return normally for the profiling information to be saved
    252 in the `gmon.out' file.
     689in the \fIgmon.out\fR file.
     690.SH "SEE ALSO"
     691.IX Header "SEE ALSO"
     692\&\fImonitor\fR\|(3), \fIprofil\fR\|(2), \fIcc\fR\|(1), \fIprof\fR\|(1), and the Info entry for \fIgprof\fR.
     693.PP
     694``An Execution Profiler for Modular Programs'',
     695by S. Graham, P. Kessler, M. McKusick;
     696Software \- Practice and Experience,
     697Vol. 13, pp. 671\-685, 1983.
     698.PP
     699``gprof: A Call Graph Execution Profiler'',
     700by S. Graham, P. Kessler, M. McKusick;
     701Proceedings of the \s-1SIGPLAN\s0 '82 Symposium on Compiler Construction,
     702\&\s-1SIGPLAN\s0 Notices, Vol. 17, No  6, pp. 120\-126, June 1982.
     703.SH "COPYRIGHT"
     704.IX Header "COPYRIGHT"
     705Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
     706.PP
     707Permission is granted to copy, distribute and/or modify this document
     708under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
     709or any later version published by the Free Software Foundation;
     710with no Invariant Sections, with no Front-Cover Texts, and with no
     711Back-Cover Texts.  A copy of the license is included in the
     712section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
  • branches/GNU/src/binutils/gprof/gprof.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 1998, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 1998, 2001, 2002
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    19 #include "getopt.h"
     29
    2030#include "libiberty.h"
    2131#include "gprof.h"
     32#include "search_list.h"
     33#include "source.h"
     34#include "symtab.h"
    2235#include "basic_blocks.h"
    2336#include "call_graph.h"
     
    2841#include "hertz.h"
    2942#include "hist.h"
    30 #include "source.h"
    3143#include "sym_ids.h"
    3244#include "demangle.h"
     45#include "getopt.h"
     46
     47static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
     48int main PARAMS ((int, char **));
    3349
    3450const char *whoami;
     
    4359int output_style = 0;
    4460int output_width = 80;
    45 bool bsd_style_output = FALSE;
    46 bool demangle = TRUE;
    47 bool discard_underscores = TRUE;
    48 bool ignore_direct_calls = FALSE;
    49 bool ignore_static_funcs = FALSE;
    50 bool ignore_zeros = TRUE;
    51 bool line_granularity = FALSE;
    52 bool print_descriptions = TRUE;
    53 bool print_path = FALSE;
    54 bool ignore_non_functions = FALSE;
     61bfd_boolean bsd_style_output = FALSE;
     62bfd_boolean demangle = TRUE;
     63bfd_boolean discard_underscores = TRUE;
     64bfd_boolean ignore_direct_calls = FALSE;
     65bfd_boolean ignore_static_funcs = FALSE;
     66bfd_boolean ignore_zeros = TRUE;
     67bfd_boolean line_granularity = FALSE;
     68bfd_boolean print_descriptions = TRUE;
     69bfd_boolean print_path = FALSE;
     70bfd_boolean ignore_non_functions = FALSE;
    5571File_Format file_format = FF_AUTO;
    5672
    57 bool first_output = TRUE;
     73bfd_boolean first_output = TRUE;
    5874
    5975char copyright[] =
     
    141157
    142158static void
    143 DEFUN (usage, (stream, status), FILE * stream AND int status)
     159usage (stream, status)
     160     FILE *stream;
     161     int status;
    144162{
    145163  fprintf (stream, _("\
     
    165183
    166184int
    167 DEFUN (main, (argc, argv), int argc AND char **argv)
     185main (argc, argv)
     186     int argc;
     187     char **argv;
    168188{
    169189  char **sp, *str;
     
    173193#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
    174194  setlocale (LC_MESSAGES, "");
     195#endif
     196#if defined (HAVE_SETLOCALE)
     197  setlocale (LC_CTYPE, "");
    175198#endif
    176199  bindtextdomain (PACKAGE, LOCALEDIR);
     
    490513      sym_id_add (*sp, EXCL_TIME);
    491514      sym_id_add (*sp, EXCL_GRAPH);
    492 #ifdef __alpha__
    493515      sym_id_add (*sp, EXCL_FLAT);
    494 #endif
    495516    }
    496517
  • branches/GNU/src/binutils/gprof/gprof.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
    1816 *
    19  *      @(#)gprof.h     5.9 (Berkeley) 6/1/90
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    2028 */
    2129#ifndef gprof_h
    2230#define gprof_h
    2331
    24 #include "ansidecl.h"
    25 
    2632/* Include the BFD sysdep.h file.  */
    2733#include "sysdep.h"
     34#include "bfd.h"
    2835
    2936/* Undefine the BFD PACKAGE and VERSION macros before including the
     
    6471#include "bin-bugs.h"
    6572
    66 /*
    67  * These may already be defined on some systems.  We could probably
    68  * just use the BFD versions of these, since BFD has already dealt
    69  * with this problem.
    70  */
    71 #undef FALSE
    72 #define FALSE   0
    73 #undef TRUE
    74 #define TRUE    1
    75 
    7673#define STYLE_FLAT_PROFILE      (1<<0)
    7774#define STYLE_CALL_GRAPH        (1<<1)
     
    110107File_Format;
    111108
    112 typedef int bool;
    113109typedef unsigned char UNIT[2];  /* unit of profiling */
    114110
     
    121117 * Command-line options:
    122118 */
    123 extern int debug_level;         /* debug level */
     119extern int debug_level;                 /* debug level */
    124120extern int output_style;
    125 extern int output_width;        /* controls column width in index */
    126 extern bool bsd_style_output;   /* as opposed to FSF style output */
    127 extern bool demangle;           /* demangle symbol names? */
    128 extern bool discard_underscores;        /* discard leading underscores? */
    129 extern bool ignore_direct_calls;        /* don't count direct calls */
    130 extern bool ignore_static_funcs;        /* suppress static functions */
    131 extern bool ignore_zeros;       /* ignore unused symbols/files */
    132 extern bool line_granularity;   /* function or line granularity? */
    133 extern bool print_descriptions; /* output profile description */
    134 extern bool print_path;         /* print path or just filename? */
    135 extern bool ignore_non_functions;/* Ignore non-function symbols.  */
     121extern int output_width;                /* controls column width in index */
     122extern bfd_boolean bsd_style_output;    /* as opposed to FSF style output */
     123extern bfd_boolean demangle;            /* demangle symbol names? */
     124extern bfd_boolean discard_underscores; /* discard leading underscores? */
     125extern bfd_boolean ignore_direct_calls; /* don't count direct calls */
     126extern bfd_boolean ignore_static_funcs; /* suppress static functions */
     127extern bfd_boolean ignore_zeros;        /* ignore unused symbols/files */
     128extern bfd_boolean line_granularity;    /* function or line granularity? */
     129extern bfd_boolean print_descriptions;  /* output profile description */
     130extern bfd_boolean print_path;          /* print path or just filename? */
     131extern bfd_boolean ignore_non_functions; /* Ignore non-function symbols.  */
    136132
    137 extern File_Format file_format; /* requested file format */
     133extern File_Format file_format;         /* requested file format */
    138134
    139 extern bool first_output;       /* no output so far? */
     135extern bfd_boolean first_output;        /* no output so far? */
    140136
    141 extern void done PARAMS ((int status));
     137extern void done PARAMS ((int status)) ATTRIBUTE_NORETURN;
    142138
    143139#endif /* gprof_h */
  • branches/GNU/src/binutils/gprof/gprof.info

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
     1This is gprof.info, produced by makeinfo version 4.3 from gprof.texi.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the gprof profiler of the GNU system.
    88
    9    Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
    10 Inc.
     9   Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software
     10Foundation, Inc.
    1111
    1212   Permission is granted to copy, distribute and/or modify this document
    13      under the terms of the GNU Free Documentation License, Version 1.1
    14      or any later version published by the Free Software Foundation;
    15    with no Invariant Sections, with no Front-Cover Texts, and with no
    16     Back-Cover Texts.  A copy of the license is included in the
    17 section entitled "GNU Free Documentation License".
     13under the terms of the GNU Free Documentation License, Version 1.1 or
     14any later version published by the Free Software Foundation; with no
     15Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     16Texts.  A copy of the license is included in the section entitled "GNU
     17Free Documentation License".
    1818
    1919
    2020Indirect:
    21 gprof.info-1: 718
    22 gprof.info-2: 48160
    23 gprof.info-3: 82294
     21gprof.info-1: 707
     22gprof.info-2: 48575
     23gprof.info-3: 82712
    2424
    2525Tag Table:
    2626(Indirect)
    27 Node: Top718
    28 Node: Introduction1960
    29 Node: Compiling4289
    30 Node: Executing6950
    31 Node: Invoking9314
    32 Node: Output Options10728
    33 Node: Analysis Options17540
    34 Node: Miscellaneous Options20733
    35 Node: Deprecated Options21894
    36 Node: Symspecs23964
    37 Node: Output25785
    38 Node: Flat Profile26810
    39 Node: Call Graph31740
    40 Node: Primary34955
    41 Node: Callers37487
    42 Node: Subroutines39595
    43 Node: Cycles41395
    44 Node: Line-by-line48160
    45 Node: Annotated Source51959
    46 Node: Inaccuracy54820
    47 Node: Sampling Error55074
    48 Node: Assumptions57639
    49 Node: How do I?59107
    50 Node: Incompatibilities60325
    51 Node: Details61792
    52 Node: Implementation62181
    53 Node: File Format68073
    54 Node: Internals72328
    55 Node: Debugging80698
    56 Node: GNU Free Documentation License82294
     27Node: Top707
     28Node: Introduction1949
     29Node: Compiling4278
     30Node: Executing6939
     31Node: Invoking9729
     32Node: Output Options11143
     33Node: Analysis Options17955
     34Node: Miscellaneous Options21148
     35Node: Deprecated Options22309
     36Node: Symspecs24379
     37Node: Output26200
     38Node: Flat Profile27225
     39Node: Call Graph32155
     40Node: Primary35370
     41Node: Callers37902
     42Node: Subroutines40010
     43Node: Cycles41810
     44Node: Line-by-line48575
     45Node: Annotated Source52374
     46Node: Inaccuracy55235
     47Node: Sampling Error55489
     48Node: Assumptions58054
     49Node: How do I?59522
     50Node: Incompatibilities60740
     51Node: Details62207
     52Node: Implementation62596
     53Node: File Format68488
     54Node: Internals72746
     55Node: Debugging81116
     56Node: GNU Free Documentation License82712
    5757
    5858End Tag Table
  • branches/GNU/src/binutils/gprof/gprof.info-1

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
     1This is gprof.info, produced by makeinfo version 4.3 from gprof.texi.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the gprof profiler of the GNU system.
    88
    9    Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
    10 Inc.
     9   Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software
     10Foundation, Inc.
    1111
    1212   Permission is granted to copy, distribute and/or modify this document
    13      under the terms of the GNU Free Documentation License, Version 1.1
    14      or any later version published by the Free Software Foundation;
    15    with no Invariant Sections, with no Front-Cover Texts, and with no
    16     Back-Cover Texts.  A copy of the license is included in the
    17 section entitled "GNU Free Documentation License".
     13under the terms of the GNU Free Documentation License, Version 1.1 or
     14any later version published by the Free Software Foundation; with no
     15Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     16Texts.  A copy of the license is included in the section entitled "GNU
     17Free Documentation License".
    1818
    1919
     
    206206didn't get written into `gmon.out'.  The Perl script `bbconv.pl',
    207207included with the `gprof' source distribution, will convert a `bb.out'
    208 file into a format readable by `gprof'.
     208file into a format readable by `gprof'.  Invoke it like this:
     209
     210     bbconv.pl < bb.out > BH-DATA
     211
     212   This translates the information in `bb.out' into a form that `gprof'
     213can understand.  But you still need to tell `gprof' about the existence
     214of this translated information.  To do that, include BB-DATA on the
     215`gprof' command line, _along with `gmon.out'_, like this:
     216
     217     gprof OPTIONS EXECUTABLE-FILE gmon.out BB-DATA [YET-MORE-PROFILE-DATA-FILES...] [> OUTFILE]
    209218
    210219
  • branches/GNU/src/binutils/gprof/gprof.info-2

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
     1This is gprof.info, produced by makeinfo version 4.3 from gprof.texi.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the gprof profiler of the GNU system.
    88
    9    Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
    10 Inc.
     9   Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software
     10Foundation, Inc.
    1111
    1212   Permission is granted to copy, distribute and/or modify this document
    13      under the terms of the GNU Free Documentation License, Version 1.1
    14      or any later version published by the Free Software Foundation;
    15    with no Invariant Sections, with no Front-Cover Texts, and with no
    16     Back-Cover Texts.  A copy of the license is included in the
    17 section entitled "GNU Free Documentation License".
     13under the terms of the GNU Free Documentation License, Version 1.1 or
     14any later version published by the Free Software Foundation; with no
     15Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     16Texts.  A copy of the license is included in the section entitled "GNU
     17Free Documentation License".
    1818
    1919
     
    487487consists of a header containing the magic cookie and a version number,
    488488as well as some spare bytes available for future extensions.  All data
    489 in a profile data file is in the native format of the host on which the
    490 profile was collected.  GNU `gprof' adapts automatically to the
     489in a profile data file is in the native format of the target for which
     490the profile was collected.  GNU `gprof' adapts automatically to the
    491491byte-order in use.
    492492
  • branches/GNU/src/binutils/gprof/gprof.info-3

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is gprof.info, produced by makeinfo version 4.0 from gprof.texi.
     1This is gprof.info, produced by makeinfo version 4.3 from gprof.texi.
    22
    33START-INFO-DIR-ENTRY
     
    77   This file documents the gprof profiler of the GNU system.
    88
    9    Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation,
    10 Inc.
     9   Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software
     10Foundation, Inc.
    1111
    1212   Permission is granted to copy, distribute and/or modify this document
    13      under the terms of the GNU Free Documentation License, Version 1.1
    14      or any later version published by the Free Software Foundation;
    15    with no Invariant Sections, with no Front-Cover Texts, and with no
    16     Back-Cover Texts.  A copy of the license is included in the
    17 section entitled "GNU Free Documentation License".
     13under the terms of the GNU Free Documentation License, Version 1.1 or
     14any later version published by the Free Software Foundation; with no
     15Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     16Texts.  A copy of the license is included in the section entitled "GNU
     17Free Documentation License".
    1818
    1919
  • branches/GNU/src/binutils/gprof/gprof.texi

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1919This file documents the gprof profiler of the GNU system.
    2020
    21 Copyright (C) 1988, 92, 97, 98, 99, 2000 Free Software Foundation, Inc.
     21@c man begin COPYRIGHT
     22Copyright (C) 1988, 92, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
     23
     24Permission is granted to copy, distribute and/or modify this document
     25under the terms of the GNU Free Documentation License, Version 1.1
     26or any later version published by the Free Software Foundation;
     27with no Invariant Sections, with no Front-Cover Texts, and with no
     28Back-Cover Texts.  A copy of the license is included in the
     29section entitled "GNU Free Documentation License".
     30
     31@c man end
     32
     33@ignore
     34Permission is granted to process this file through Tex and print the
     35results, provided the printed document carries copying permission
     36notice identical to this one except for the removal of this paragraph
     37(this paragraph not being relevant to the printed manual).
     38
     39@end ignore
     40@end ifinfo
     41
     42@finalout
     43@smallbook
     44
     45@titlepage
     46@title GNU gprof
     47@subtitle The @sc{gnu} Profiler
     48@author Jay Fenlason and Richard Stallman
     49
     50@page
     51
     52This manual describes the @sc{gnu} profiler, @code{gprof}, and how you
     53can use it to determine which parts of a program are taking most of the
     54execution time.  We assume that you know how to write, compile, and
     55execute programs.  @sc{gnu} @code{gprof} was written by Jay Fenlason.
     56
     57@vskip 0pt plus 1filll
     58Copyright @copyright{} 1988, 92, 97, 98, 99, 2000 Free Software Foundation, Inc.
    2259
    2360      Permission is granted to copy, distribute and/or modify this document
     
    2865      section entitled "GNU Free Documentation License".
    2966
    30 @ignore
    31 Permission is granted to process this file through Tex and print the
    32 results, provided the printed document carries copying permission
    33 notice identical to this one except for the removal of this paragraph
    34 (this paragraph not being relevant to the printed manual).
    35 
    36 @end ignore
    37 @end ifinfo
    38 
    39 @finalout
    40 @smallbook
    41 
    42 @titlepage
    43 @title GNU gprof
    44 @subtitle The @sc{gnu} Profiler
    45 @author Jay Fenlason and Richard Stallman
    46 
    47 @page
    48 
    49 This manual describes the @sc{gnu} profiler, @code{gprof}, and how you
    50 can use it to determine which parts of a program are taking most of the
    51 execution time.  We assume that you know how to write, compile, and
    52 execute programs.  @sc{gnu} @code{gprof} was written by Jay Fenlason.
    53 
    54 @vskip 0pt plus 1filll
    55 Copyright @copyright{} 1988, 92, 97, 98, 99, 2000 Free Software Foundation, Inc.
    56 
    57       Permission is granted to copy, distribute and/or modify this document
    58       under the terms of the GNU Free Documentation License, Version 1.1
    59       or any later version published by the Free Software Foundation;
    60       with no Invariant Sections, with no Front-Cover Texts, and with no
    61       Back-Cover Texts.  A copy of the license is included in the
    62       section entitled "GNU Free Documentation License".
    63 
    6467@end titlepage
    6568
    66 @ifinfo
     69@ifnottex
    6770@node Top
    6871@top Profiling a Program: Where Does It Spend Its Time?
     
    9295* GNU Free Documentation License::  GNU Free Documentation License
    9396@end menu
    94 @end ifinfo
     97@end ifnottex
    9598
    9699@node Introduction
    97100@chapter Introduction to Profiling
     101
     102@ifset man
     103@c man title gprof display call graph profile data
     104
     105@smallexample
     106@c man begin SYNOPSIS
     107gprof [ -[abcDhilLsTvwxyz] ] [ -[ACeEfFJnNOpPqQZ][@var{name}] ]
     108 [ -I @var{dirs} ] [ -d[@var{num}] ] [ -k @var{from/to} ]
     109 [ -m @var{min-count} ] [ -t @var{table-length} ]
     110 [ --[no-]annotated-source[=@var{name}] ]
     111 [ --[no-]exec-counts[=@var{name}] ]
     112 [ --[no-]flat-profile[=@var{name}] ] [ --[no-]graph[=@var{name}] ]
     113 [ --[no-]time=@var{name}] [ --all-lines ] [ --brief ]
     114 [ --debug[=@var{level}] ] [ --function-ordering ]
     115 [ --file-ordering ] [ --directory-path=@var{dirs} ]
     116 [ --display-unused-functions ] [ --file-format=@var{name} ]
     117 [ --file-info ] [ --help ] [ --line ] [ --min-count=@var{n} ]
     118 [ --no-static ] [ --print-path ] [ --separate-files ]
     119 [ --static-call-graph ] [ --sum ] [ --table-length=@var{len} ]
     120 [ --traditional ] [ --version ] [ --width=@var{n} ]
     121 [ --ignore-non-functions ] [ --demangle[=@var{STYLE}] ]
     122 [ --no-demangle ] [ @var{image-file} ] [ @var{profile-file} @dots{} ]
     123@c man end
     124@end smallexample
     125
     126@c man begin DESCRIPTION
     127@code{gprof} produces an execution profile of C, Pascal, or Fortran77
     128programs.  The effect of called routines is incorporated in the profile
     129of each caller.  The profile data is taken from the call graph profile file
     130(@file{gmon.out} default) which is created by programs
     131that are compiled with the @samp{-pg} option of
     132@code{cc}, @code{pc}, and @code{f77}.
     133The @samp{-pg} option also links in versions of the library routines
     134that are compiled for profiling.  @code{Gprof} reads the given object
     135file (the default is @code{a.out}) and establishes the relation between
     136its symbol table and the call graph profile from @file{gmon.out}.
     137If more than one profile file is specified, the @code{gprof}
     138output shows the sum of the profile information in the given profile files.
     139
     140@code{Gprof} calculates the amount of time spent in each routine.
     141Next, these times are propagated along the edges of the call graph.
     142Cycles are discovered, and calls into a cycle are made to share the time
     143of the cycle.
     144
     145@c man end
     146
     147@c man begin BUGS
     148The granularity of the sampling is shown, but remains
     149statistical at best.
     150We assume that the time for each execution of a function
     151can be expressed by the total time for the function divided
     152by the number of times the function is called.
     153Thus the time propagated along the call graph arcs to the function's
     154parents is directly proportional to the number of times that
     155arc is traversed.
     156
     157Parents that are not themselves profiled will have the time of
     158their profiled children propagated to them, but they will appear
     159to be spontaneously invoked in the call graph listing, and will
     160not have their time propagated further.
     161Similarly, signal catchers, even though profiled, will appear
     162to be spontaneous (although for more obscure reasons).
     163Any profiled children of signal catchers should have their times
     164propagated properly, unless the signal catcher was invoked during
     165the execution of the profiling routine, in which case all is lost.
     166
     167The profiled program must call @code{exit}(2)
     168or return normally for the profiling information to be saved
     169in the @file{gmon.out} file.
     170@c man end
     171
     172@c man begin FILES
     173@table @code
     174@item @file{a.out}
     175the namelist and text space.
     176@item @file{gmon.out}
     177dynamic call graph and profile.
     178@item @file{gmon.sum}
     179summarized dynamic call graph and profile. 
     180@end table
     181@c man end
     182
     183@c man begin SEEALSO
     184monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
     185
     186``An Execution Profiler for Modular Programs'',
     187by S. Graham, P. Kessler, M. McKusick;
     188Software - Practice and Experience,
     189Vol. 13, pp. 671-685, 1983.
     190
     191``gprof: A Call Graph Execution Profiler'',
     192by S. Graham, P. Kessler, M. McKusick;
     193Proceedings of the SIGPLAN '82 Symposium on Compiler Construction,
     194SIGPLAN Notices, Vol. 17, No  6, pp. 120-126, June 1982.
     195@c man end
     196@end ifset
    98197
    99198Profiling allows you to learn where your program spent its time and which
     
    130229The next three chapters explain these steps in greater detail.
    131230
     231@c man begin DESCRIPTION
     232
    132233Several forms of output are available from the analysis.
    133234
     
    146247source code, labeled with the number of times each line of the
    147248program was executed.  @xref{Annotated Source}.
     249@c man end
    148250
    149251To better understand how profiling works, you may wish to read
     
    256358The Perl script @code{bbconv.pl}, included with the @code{gprof}
    257359source distribution, will convert a @file{bb.out} file into
    258 a format readable by @code{gprof}.
     360a format readable by @code{gprof}.  Invoke it like this:
     361
     362@smallexample
     363bbconv.pl < bb.out > @var{bh-data}
     364@end smallexample
     365
     366This translates the information in @file{bb.out} into a form that
     367@code{gprof} can understand.  But you still need to tell @code{gprof}
     368about the existence of this translated information.  To do that, include
     369@var{bb-data} on the @code{gprof} command line, @emph{along with
     370@file{gmon.out}}, like this:
     371
     372@smallexample
     373gprof @var{options} @var{executable-file} gmon.out @var{bb-data} [@var{yet-more-profile-data-files}@dots{}] [> @var{outfile}]
     374@end smallexample
    259375
    260376@node Invoking
     
    298414@section Output Options
    299415
     416@c man begin OPTIONS
    300417These options specify which of several output formats
    301418@code{gprof} should produce.
     
    635752
    636753@end table
     754
     755@c man end
    637756
    638757Note that only one function can be specified with each @code{-e},
     
    17321851consists of a header containing the magic cookie and a version number,
    17331852as well as some spare bytes available for future extensions.  All data
    1734 in a profile data file is in the native format of the host on which
    1735 the profile was collected.  @sc{gnu} @code{gprof} adapts automatically to the
    1736 byte-order in use.
     1853in a profile data file is in the native format of the target for which
     1854the profile was collected.  @sc{gnu} @code{gprof} adapts automatically
     1855to the byte-order in use.
    17371856
    17381857In the new file format, the header is followed by a sequence of
  • branches/GNU/src/binutils/gprof/hertz.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
     29#include "gprof.h"
    1930#include "hertz.h"
    2031
  • branches/GNU/src/binutils/gprof/hertz.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#ifndef hertz_h
    22#define hertz_h
    3 
    4 #include "gprof.h"
    53
    64#define HZ_WRONG 0              /* impossible clock frequency */
  • branches/GNU/src/binutils/gprof/hist.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* hist.c  -  Histogram related operations.
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2121
    2222
    23 #include <stdio.h>
    2423#include "libiberty.h"
    2524#include "gprof.h"
     25#include "search_list.h"
     26#include "source.h"
     27#include "symtab.h"
    2628#include "corefile.h"
    2729#include "gmon_io.h"
    2830#include "gmon_out.h"
    2931#include "hist.h"
    30 #include "symtab.h"
    3132#include "sym_ids.h"
    3233#include "utils.h"
     
    3536
    3637static void scale_and_align_entries PARAMS ((void));
     38static void print_header PARAMS ((int));
     39static void print_line PARAMS ((Sym *, double));
     40static int cmp_time PARAMS ((const PTR, const PTR));
    3741
    3842/* Declarations of automatically generated functions to output blurbs.  */
     
    7882
    7983void
    80 DEFUN (hist_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
     84hist_read_rec (ifp, filename)
     85     FILE * ifp;
     86     const char *filename;
    8187{
    8288  bfd_vma n_lowpc, n_highpc;
     
    153159
    154160void
    155 DEFUN (hist_write_hist, (ofp, filename), FILE * ofp AND const char *filename)
     161hist_write_hist (ofp, filename)
     162     FILE * ofp;
     163     const char *filename;
    156164{
    157165  UNIT count;
     
    174182  for (i = 0; i < hist_num_bins; ++i)
    175183    {
    176       bfd_put_16 (core_bfd, hist_sample[i], (bfd_byte *) & count[0]);
     184      bfd_put_16 (core_bfd, (bfd_vma) hist_sample[i], (bfd_byte *) &count[0]);
    177185
    178186      if (fwrite (&count[0], sizeof (count), 1, ofp) != 1)
     
    256264
    257265void
    258 DEFUN_VOID (hist_assign_samples)
     266hist_assign_samples ()
    259267{
    260268  bfd_vma bin_low_pc, bin_high_pc;
     
    345353
    346354static void
    347 DEFUN (print_header, (prefix), const char prefix)
     355print_header (prefix)
     356     int prefix;
    348357{
    349358  char unit[64];
     
    384393
    385394static void
    386 DEFUN (print_line, (sym, scale), Sym * sym AND double scale)
     395print_line (sym, scale)
     396     Sym *sym;
     397     double scale;
    387398{
    388399  if (ignore_zeros && sym->ncalls == 0 && sym->hist.time == 0)
     
    421432
    422433static int
    423 DEFUN (cmp_time, (lp, rp), const PTR lp AND const PTR rp)
     434cmp_time (lp, rp)
     435     const PTR lp;
     436     const PTR rp;
    424437{
    425438  const Sym *left = *(const Sym **) lp;
     
    448461
    449462void
    450 DEFUN_VOID (hist_print)
     463hist_print ()
    451464{
    452465  Sym **time_sorted_syms, *top_dog, *sym;
    453466  unsigned int index;
    454   int log_scale;
     467  unsigned log_scale;
    455468  double top_time, time;
    456469  bfd_vma addr;
     
    517530          top_time /= hz;
    518531
    519           while (SItab[log_scale].scale * top_time < 1000.0
    520                  && ((size_t) log_scale
    521                      < sizeof (SItab) / sizeof (SItab[0]) - 1))
     532          for (log_scale = 0; log_scale < ARRAY_SIZE (SItab); log_scale ++)
    522533            {
    523               ++log_scale;
     534              double scaled_value = SItab[log_scale].scale * top_time;
     535
     536              if (scaled_value >= 1.0 && scaled_value < 1000.0)
     537                break;
    524538            }
    525539        }
  • branches/GNU/src/binutils/gprof/hist.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323#define hist_h
    2424
    25 #include "bfd.h"
    26 
    2725extern bfd_vma s_lowpc;         /* Lowpc from the profile file.  */
    2826extern bfd_vma s_highpc;        /* Highpc from the profile file.  */
  • branches/GNU/src/binutils/gprof/i386.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "gprof.h"
     30#include "search_list.h"
     31#include "source.h"
     32#include "symtab.h"
    2033#include "cg_arcs.h"
    2134#include "corefile.h"
    2235#include "hist.h"
    23 #include "symtab.h"
    2436
     37static int i386_iscall PARAMS ((unsigned char *));
     38void i386_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
    2539
    26 int
    27 DEFUN (i386_iscall, (ip), unsigned char *ip)
     40static int
     41i386_iscall (ip)
     42     unsigned char *ip;
    2843{
    2944  if (*ip == 0xe8)
     
    4156  unsigned char *instructp;
    4257  Sym *child;
    43   bfd_vma destpc, delta;
     58  bfd_vma pc, destpc;
    4459
    4560  if (core_text_space == 0)
     
    5974                          (unsigned long) p_highpc));
    6075
    61   delta = (bfd_vma) core_text_space - core_text_sect->vma;
    62 
    63   for (instructp = (unsigned char *) (p_lowpc + delta);
    64        instructp < (unsigned char *) (p_highpc + delta);
    65        instructp ++)
     76  for (pc = p_lowpc; pc < p_highpc; ++pc)
    6677    {
     78      instructp = (unsigned char *) core_text_space + pc - core_text_sect->vma;
    6779      if (i386_iscall (instructp))
    6880        {
    6981          DBG (CALLDEBUG,
    70                printf ("[findcall]\t0x%lx:call",
    71                        (unsigned long) (instructp - (unsigned char *) delta)));
     82               printf ("[findcall]\t0x%lx:call", (unsigned long) pc));
    7283          /*
    7384           *  regular pc relative addressing
     
    7687           */
    7788
    78           destpc = ((bfd_vma) bfd_get_32 (core_bfd, instructp + 1)
    79                     + (bfd_vma) instructp - (bfd_vma) delta + 5);
     89          destpc = bfd_get_32 (core_bfd, instructp + 1) + pc + 5;
    8090          if (destpc >= s_lowpc && destpc <= s_highpc)
    8191            {
  • branches/GNU/src/binutils/gprof/po/Make-in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    7171.po.gmo:
    7272        file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
    73           && rm -f $$file && $(GMSGFMT) -o $$file $<
     73          && test -w $$file \
     74          && (rm -f $$file && $(GMSGFMT) -o $$file $< ) \
     75          || echo "$$file is not writable"
    7476
    7577.po.cat:
  • branches/GNU/src/binutils/gprof/po/POTFILES.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323hist.h
    2424i386.c
     25mips.c
    2526search_list.c
    2627search_list.h
  • branches/GNU/src/binutils/gprof/po/gprof.pot

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    77msgstr ""
    88"Project-Id-Version: PACKAGE VERSION\n"
    9 "POT-Creation-Date: 2000-07-27 16:32-0700\n"
     9"POT-Creation-Date: 2002-01-31 18:32+0000\n"
    1010"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1111"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1313"MIME-Version: 1.0\n"
    1414"Content-Type: text/plain; charset=CHARSET\n"
    15 "Content-Transfer-Encoding: ENCODING\n"
    16 
    17 #: alpha.c:89
     15"Content-Transfer-Encoding: 8bit\n"
     16
     17#: alpha.c:93 mips.c:47
    1818msgid "<indirect child>"
    1919msgstr ""
    2020
    21 #: alpha.c:106
     21#: alpha.c:110 mips.c:64
    2222#, c-format
    2323msgid "[find_call] %s: 0x%lx to 0x%lx\n"
    2424msgstr ""
    2525
    26 #: alpha.c:128
     26#: alpha.c:132
    2727#, c-format
    2828msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
    2929msgstr ""
    3030
    31 #: alpha.c:137
     31#: alpha.c:142
    3232#, c-format
    3333msgid "[find_call] 0x%lx: bsr"
    3434msgstr ""
    3535
    36 #: basic_blocks.c:123 call_graph.c:86 hist.c:122
     36#: basic_blocks.c:122 call_graph.c:90 hist.c:93
    3737#, c-format
    3838msgid "%s: %s: unexpected end of file\n"
    3939msgstr ""
    4040
    41 #: basic_blocks.c:198
     41#: basic_blocks.c:190
    4242#, c-format
    4343msgid "%s: warning: ignoring basic-block exec counts (use -l or --line)\n"
     
    4545
    4646#. FIXME: This only works if bfd_vma is unsigned long.
    47 #: basic_blocks.c:296 basic_blocks.c:306
     47#: basic_blocks.c:281 basic_blocks.c:291
    4848#, c-format
    4949msgid "%s:%d: (%s:0x%lx) %lu executions\n"
    5050msgstr ""
    5151
    52 #: basic_blocks.c:297 basic_blocks.c:307
     52#: basic_blocks.c:282 basic_blocks.c:292
    5353msgid "<unknown>"
    5454msgstr ""
    5555
    56 #: basic_blocks.c:551
     56#: basic_blocks.c:536
    5757#, c-format
    5858msgid ""
     
    6565msgstr ""
    6666
    67 #: basic_blocks.c:575
     67#: basic_blocks.c:560
    6868msgid ""
    6969"\n"
     
    7272msgstr ""
    7373
    74 #: basic_blocks.c:576
     74#: basic_blocks.c:561
    7575#, c-format
    7676msgid "%9ld   Executable lines in this file\n"
    7777msgstr ""
    7878
    79 #: basic_blocks.c:578
     79#: basic_blocks.c:563
    8080#, c-format
    8181msgid "%9ld   Lines executed\n"
    8282msgstr ""
    8383
    84 #: basic_blocks.c:579
     84#: basic_blocks.c:564
    8585#, c-format
    8686msgid "%9.2f   Percent of the file executed\n"
    8787msgstr ""
    8888
    89 #: basic_blocks.c:583
     89#: basic_blocks.c:568
    9090#, c-format
    9191msgid ""
     
    9494msgstr ""
    9595
    96 #: basic_blocks.c:585
     96#: basic_blocks.c:570
    9797#, c-format
    9898msgid "%9.2f   Average executions per line\n"
    9999msgstr ""
    100100
    101 #: call_graph.c:66
     101#: call_graph.c:69
    102102#, c-format
    103103msgid "[cg_tally] arc from %s to %s traversed %lu times\n"
    104104msgstr ""
    105105
    106 #: cg_print.c:54
     106#: cg_print.c:58
    107107msgid ""
    108108"\t\t     Call graph (explanation follows)\n"
     
    110110msgstr ""
    111111
    112 #: cg_print.c:56
     112#: cg_print.c:60
    113113msgid ""
    114114"\t\t\tCall graph\n"
     
    116116msgstr ""
    117117
    118 #: cg_print.c:59 hist.c:391
     118#: cg_print.c:63 hist.c:355
    119119#, c-format
    120120msgid ""
     
    123123msgstr ""
    124124
    125 #: cg_print.c:63
     125#: cg_print.c:67
     126#, c-format
    126127msgid ""
    127128" for %.2f%% of %.2f seconds\n"
     
    129130msgstr ""
    130131
    131 #: cg_print.c:67
     132#: cg_print.c:71
    132133msgid ""
    133134" no time propagated\n"
     
    135136msgstr ""
    136137
    137 #: cg_print.c:76 cg_print.c:79 cg_print.c:81
     138#: cg_print.c:80 cg_print.c:83 cg_print.c:85
    138139msgid "called"
    139140msgstr ""
    140141
    141 #: cg_print.c:76 cg_print.c:81
     142#: cg_print.c:80 cg_print.c:85
    142143msgid "total"
    143144msgstr ""
    144145
    145 #: cg_print.c:76
     146#: cg_print.c:80
    146147msgid "parents"
    147148msgstr ""
    148149
    149 #: cg_print.c:78 cg_print.c:79
     150#: cg_print.c:82 cg_print.c:83
    150151msgid "index"
    151152msgstr ""
    152153
    153 #: cg_print.c:78
     154#: cg_print.c:82
    154155msgid "%time"
    155156msgstr ""
    156157
    157 #: cg_print.c:78 cg_print.c:79
     158#: cg_print.c:82 cg_print.c:83
    158159msgid "self"
    159160msgstr ""
    160161
    161 #: cg_print.c:78
    162 msgid "descendents"
    163 msgstr ""
    164 
    165 #: cg_print.c:79 hist.c:416
     162#: cg_print.c:82
     163msgid "descendants"
     164msgstr ""
     165
     166#: cg_print.c:83 hist.c:381
    166167msgid "name"
    167168msgstr ""
    168169
    169 #: cg_print.c:81
     170#: cg_print.c:85
    170171msgid "children"
    171172msgstr ""
    172173
    173 #: cg_print.c:86
     174#: cg_print.c:90
     175#, c-format
    174176msgid "index %% time    self  children    called     name\n"
    175177msgstr ""
    176178
    177 #: cg_print.c:109
     179#: cg_print.c:113
    178180#, c-format
    179181msgid " <cycle %d as a whole> [%d]\n"
    180182msgstr ""
    181183
    182 #: cg_print.c:335
     184#: cg_print.c:339
    183185#, c-format
    184186msgid "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s     <spontaneous>\n"
    185187msgstr ""
    186188
    187 #: cg_print.c:336
     189#: cg_print.c:340
    188190#, c-format
    189191msgid "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s     <spontaneous>\n"
    190192msgstr ""
    191193
    192 #: cg_print.c:570
     194#: cg_print.c:574
    193195msgid ""
    194196"Index by function name\n"
     
    196198msgstr ""
    197199
    198 #: cg_print.c:627 cg_print.c:636
     200#: cg_print.c:631 cg_print.c:640
    199201#, c-format
    200202msgid "<cycle %d>"
    201203msgstr ""
    202204
    203 #: corefile.c:61
     205#: corefile.c:64
    204206#, c-format
    205207msgid "%s: could not open %s.\n"
    206208msgstr ""
    207209
    208 #: corefile.c:75 corefile.c:109
     210#: corefile.c:78 corefile.c:112
    209211#, c-format
    210212msgid "%s: unable to parse mapping file %s.\n"
    211213msgstr ""
    212214
    213 #: corefile.c:151
     215#: corefile.c:154
    214216#, c-format
    215217msgid "%s: %s: not in a.out format\n"
    216218msgstr ""
    217219
    218 #: corefile.c:162
     220#: corefile.c:165
    219221#, c-format
    220222msgid "%s: can't find .text section in %s\n"
    221223msgstr ""
    222224
    223 #: corefile.c:220
     225#: corefile.c:223
    224226#, c-format
    225227msgid "%s: ran out room for %lu bytes of text space\n"
    226228msgstr ""
    227229
    228 #: corefile.c:234
     230#: corefile.c:237
    229231#, c-format
    230232msgid "%s: can't do -c\n"
    231233msgstr ""
    232234
    233 #: corefile.c:265
     235#: corefile.c:272
    234236#, c-format
    235237msgid "%s: -c not supported on architecture %s\n"
    236238msgstr ""
    237239
    238 #: corefile.c:432
     240#: corefile.c:439
    239241#, c-format
    240242msgid "%s: file `%s' has no symbols\n"
    241243msgstr ""
    242244
    243 #: corefile.c:732
     245#: corefile.c:739
    244246#, c-format
    245247msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
    246248msgstr ""
    247249
    248 #: gmon_io.c:50 gmon_io.c:71
    249 #, c-format
    250 msgid "%s: bfd_vma has unexpected size of %ld bytes\n"
    251 msgstr ""
    252 
    253 #: gmon_io.c:107 gmon_io.c:199
     250#: gmon_io.c:83 gmon_io.c:137 gmon_io.c:188 gmon_io.c:216 gmon_io.c:386
     251#: gmon_io.c:413 gmon_io.c:609 gmon_io.c:634
     252#, c-format
     253msgid "%s: bits per address has unexpected value of %u\n"
     254msgstr ""
     255
     256#: gmon_io.c:252 gmon_io.c:347
    254257#, c-format
    255258msgid "%s: file too short to be a gmon file\n"
    256259msgstr ""
    257260
    258 #: gmon_io.c:117 gmon_io.c:233
     261#: gmon_io.c:262 gmon_io.c:396
    259262#, c-format
    260263msgid "%s: file `%s' has bad magic cookie\n"
    261264msgstr ""
    262265
    263 #: gmon_io.c:128
     266#: gmon_io.c:273
    264267#, c-format
    265268msgid "%s: file `%s' has unsupported version %d\n"
    266269msgstr ""
    267270
    268 #: gmon_io.c:158
     271#: gmon_io.c:303
    269272#, c-format
    270273msgid "%s: %s: found bad tag %d (file corrupted?)\n"
    271274msgstr ""
    272275
    273 #: gmon_io.c:221
     276#: gmon_io.c:369
    274277#, c-format
    275278msgid "%s: profiling rate incompatible with first gmon file\n"
    276279msgstr ""
    277280
    278 #: gmon_io.c:250
     281#: gmon_io.c:429
    279282#, c-format
    280283msgid "%s: incompatible with first gmon file\n"
    281284msgstr ""
    282285
    283 #: gmon_io.c:278
     286#: gmon_io.c:457
    284287#, c-format
    285288msgid "%s: file '%s' does not appear to be in gmon.out format\n"
    286289msgstr ""
    287290
    288 #: gmon_io.c:299
     291#: gmon_io.c:478
    289292#, c-format
    290293msgid "%s: unexpected EOF after reading %d/%d bins\n"
    291294msgstr ""
    292295
    293 #: gmon_io.c:335
     296#: gmon_io.c:511
    294297msgid "time is in ticks, not seconds\n"
    295298msgstr ""
    296299
    297 #: gmon_io.c:341 gmon_io.c:475
     300#: gmon_io.c:517 gmon_io.c:704
    298301#, c-format
    299302msgid "%s: don't know how to deal with file format %d\n"
    300303msgstr ""
    301304
    302 #: gmon_io.c:348
     305#: gmon_io.c:524
    303306#, c-format
    304307msgid "File `%s' (version %d) contains:\n"
    305308msgstr ""
    306309
    307 #: gmon_io.c:350
    308 #, c-format
    309 msgid "\t%d histogram record%s\n"
    310 msgstr ""
    311 
    312 #: gmon_io.c:352
    313 #, c-format
    314 msgid "\t%d call-graph record%s\n"
    315 msgstr ""
    316 
    317 #: gmon_io.c:354
    318 #, c-format
    319 msgid "\t%d basic-block count record%s\n"
    320 msgstr ""
    321 
    322 #: gprof.c:145
     310#: gmon_io.c:527
     311#, c-format
     312msgid "\t%d histogram record\n"
     313msgstr ""
     314
     315#: gmon_io.c:528
     316#, c-format
     317msgid "\t%d histogram records\n"
     318msgstr ""
     319
     320#: gmon_io.c:530
     321#, c-format
     322msgid "\t%d call-graph record\n"
     323msgstr ""
     324
     325#: gmon_io.c:531
     326#, c-format
     327msgid "\t%d call-graph records\n"
     328msgstr ""
     329
     330#: gmon_io.c:533
     331#, c-format
     332msgid "\t%d basic-block count record\n"
     333msgstr ""
     334
     335#: gmon_io.c:534
     336#, c-format
     337msgid "\t%d basic-block count records\n"
     338msgstr ""
     339
     340#: gprof.c:147
    323341#, c-format
    324342msgid ""
     
    338356msgstr ""
    339357
    340 #: gprof.c:161
     358#: gprof.c:163
    341359#, c-format
    342360msgid "Report bugs to %s\n"
    343361msgstr ""
    344362
    345 #: gprof.c:230
     363#: gprof.c:235
    346364#, c-format
    347365msgid "%s: debugging not supported; -d ignored\n"
    348366msgstr ""
    349367
    350 #: gprof.c:310
     368#: gprof.c:315
    351369#, c-format
    352370msgid "%s: unknown file format %s\n"
     
    354372
    355373#. This output is intended to follow the GNU standards document.
    356 #: gprof.c:394
     374#: gprof.c:399
    357375#, c-format
    358376msgid "GNU gprof %s\n"
    359377msgstr ""
    360378
    361 #: gprof.c:395
     379#: gprof.c:400
    362380msgid ""
    363381"Based on BSD gprof, copyright 1983 Regents of the University of California.\n"
    364382msgstr ""
    365383
    366 #: gprof.c:396
     384#: gprof.c:401
    367385msgid ""
    368386"This program is free software.  This program has absolutely no warranty.\n"
    369387msgstr ""
    370388
    371 #: gprof.c:437
     389#: gprof.c:442
    372390#, c-format
    373391msgid "%s: unknown demangling style `%s'\n"
    374392msgstr ""
    375393
    376 #: gprof.c:457
     394#: gprof.c:462
    377395#, c-format
    378396msgid ""
     
    380398msgstr ""
    381399
    382 #: gprof.c:557
     400#: gprof.c:562
    383401#, c-format
    384402msgid "%s: sorry, file format `prof' is not yet supported\n"
    385403msgstr ""
    386404
    387 #: gprof.c:618
     405#: gprof.c:623
    388406#, c-format
    389407msgid "%s: gmon.out file is missing histogram\n"
    390408msgstr ""
    391409
    392 #: gprof.c:625
     410#: gprof.c:630
    393411#, c-format
    394412msgid "%s: gmon.out file is missing call-graph data\n"
    395413msgstr ""
    396414
    397 #: hist.c:158
     415#: hist.c:122
    398416#, c-format
    399417msgid "%s: `%s' is incompatible with first gmon file\n"
    400418msgstr ""
    401419
    402 #: hist.c:174
     420#: hist.c:138
    403421#, c-format
    404422msgid "%s: %s: unexpected EOF after reading %d of %d samples\n"
    405423msgstr ""
    406424
    407 #: hist.c:387
     425#: hist.c:351
    408426#, c-format
    409427msgid "%c%c/call"
    410428msgstr ""
    411429
    412 #: hist.c:395
     430#: hist.c:359
     431#, c-format
    413432msgid ""
    414433" for %.2f%% of %.2f %s\n"
     
    416435msgstr ""
    417436
    418 #: hist.c:401
     437#: hist.c:365
    419438#, c-format
    420439msgid ""
     
    423442msgstr ""
    424443
    425 #: hist.c:406
     444#: hist.c:370
    426445msgid ""
    427446" no time accumulated\n"
     
    429448msgstr ""
    430449
    431 #: hist.c:413
     450#: hist.c:377
    432451msgid "cumulative"
    433452msgstr ""
    434453
    435 #: hist.c:413
     454#: hist.c:377
    436455msgid "self  "
    437456msgstr ""
    438457
    439 #: hist.c:413
     458#: hist.c:377
    440459msgid "total "
    441460msgstr ""
    442461
    443 #: hist.c:415
     462#: hist.c:380
    444463msgid "time"
    445464msgstr ""
    446465
    447 #: hist.c:415
     466#: hist.c:380
    448467msgid "calls"
    449468msgstr ""
    450469
    451 #: hist.c:504
     470#: hist.c:469
    452471msgid ""
    453472"\n"
     
    457476msgstr ""
    458477
    459 #: hist.c:510
     478#: hist.c:475
    460479msgid "Flat profile:\n"
    461480msgstr ""
    462481
     482#: mips.c:75
     483#, c-format
     484msgid "[find_call] 0x%lx: jal"
     485msgstr ""
     486
     487#: mips.c:100
     488#, c-format
     489msgid "[find_call] 0x%lx: jalr\n"
     490msgstr ""
     491
    463492#: source.c:163
    464493#, c-format
     
    471500msgstr ""
    472501
    473 #: utils.c:93
     502#: utils.c:96
    474503#, c-format
    475504msgid " <cycle %d>"
  • branches/GNU/src/binutils/gprof/search_list.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* search-list.c
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2727
    2828void
    29 DEFUN (search_list_append, (list, paths),
    30        Search_List * list AND const char *paths)
     29search_list_append (list, paths)
     30     Search_List *list;
     31     const char *paths;
    3132{
    3233  Search_List_Elem *new_el;
    3334  const char *beg, *colon;
    34   int len;
     35  unsigned int len;
    3536
    3637  colon = paths - 1;
  • branches/GNU/src/binutils/gprof/source.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* source.c - Keep track of source files.
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    3030
    3131/* Default option values.  */
    32 bool create_annotation_files = FALSE;
     32bfd_boolean create_annotation_files = FALSE;
    3333
    3434Search_List src_search_list = {0, 0};
     
    3737
    3838Source_File *
    39 DEFUN (source_file_lookup_path, (path), const char *path)
     39source_file_lookup_path (path)
     40     const char *path;
    4041{
    4142  Source_File *sf;
     
    6465
    6566Source_File *
    66 DEFUN (source_file_lookup_name, (filename), const char *filename)
     67source_file_lookup_name (filename)
     68     const char *filename;
    6769{
    6870  const char *fname;
     
    9193
    9294FILE *
    93 DEFUN (annotate_source, (sf, max_width, annote, arg),
    94        Source_File * sf AND int max_width
    95        AND void (*annote) PARAMS ((char *buf, int w, int l, void *arg))
    96        AND void *arg)
     95annotate_source (sf, max_width, annote, arg)
     96     Source_File *sf;
     97     unsigned int max_width;
     98     void (*annote) PARAMS ((char *, unsigned int, int, void *));
     99     void *arg;
    97100{
    98   static bool first_file = TRUE;
     101  static bfd_boolean first_file = TRUE;
    99102  int i, line_num, nread;
    100   bool new_line;
     103  bfd_boolean new_line;
    101104  char buf[8192];
    102105  char fname[PATH_MAX];
  • branches/GNU/src/binutils/gprof/source.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* source.h
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55This file is part of GNU Binutils.
     
    2323#define source_h
    2424
    25 #include <stdio.h>
    26 #include "gprof.h"
    27 #include "search_list.h"
    28 
    2925typedef struct source_file
    3026  {
     
    3935
    4036/* Options.  */
    41 extern bool create_annotation_files;    /* Create annotated output files?  */
     37
     38/* Create annotated output files?  */
     39extern bfd_boolean create_annotation_files;
    4240
    4341/* List of directories to search for source files.  */
     
    5957   that summary statistics can be printed.  If the returned file
    6058   is not stdout, it should be closed when done with it.  */
    61 extern FILE *annotate_source PARAMS ((Source_File * sf, int max_width,
    62                                       void (*annote) (char *b, int w, int l,
    63                                                       void *arg),
    64                                       void *arg));
     59extern FILE *annotate_source
     60  PARAMS ((Source_File *sf, unsigned int max_width,
     61           void (*annote) (char *, unsigned int, int, PTR arg),
     62           PTR arg));
    6563#endif /* source_h */
  • branches/GNU/src/binutils/gprof/sparc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "gprof.h"
     30#include "search_list.h"
     31#include "source.h"
     32#include "symtab.h"
    2033#include "cg_arcs.h"
    2134#include "corefile.h"
    2235#include "hist.h"
    23 #include "symtab.h"
    2436
    2537    /*
     
    2739     */
    2840#define CALL    (0xc0000000)
     41
     42void sparc_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
    2943
    3044void
     
    3448     bfd_vma p_highpc;
    3549{
    36   bfd_vma dest_pc, delta;
    37   unsigned int *instr;
     50  bfd_vma pc, dest_pc;
     51  unsigned int insn;
    3852  Sym *child;
    39 
    40   delta = (bfd_vma) core_text_space - core_text_sect->vma;
    4153
    4254  if (core_text_space == 0)
     
    5567                          parent->name, (unsigned long) p_lowpc,
    5668                          (unsigned long) p_highpc));
    57   for (instr = (unsigned int *) (((p_lowpc + delta) + 3) &~ 3);
    58        instr < (unsigned int *) (p_highpc + delta);
    59        ++instr)
     69  for (pc = (p_lowpc + 3) & ~(bfd_vma) 3; pc < p_highpc; pc += 4)
    6070    {
    61       if ((*instr & CALL))
     71      insn = bfd_get_32 (core_bfd, ((unsigned char *) core_text_space
     72                                    + pc - core_text_sect->vma));
     73      if (insn & CALL)
    6274        {
    6375          DBG (CALLDEBUG,
    64                printf ("[find_call] 0x%lx: callf",
    65                        (unsigned long) instr - delta));
     76               printf ("[find_call] 0x%lx: callf", (unsigned long) pc));
    6677          /*
    6778           * Regular pc relative addressing check that this is the
    6879           * address of a function.
    6980           */
    70           dest_pc = ((bfd_vma) (instr + (*instr & ~CALL))) - delta;
     81          dest_pc = pc + (((bfd_signed_vma) (insn & 0x3fffffff)
     82                           ^ 0x20000000) - 0x20000000);
    7183          if (dest_pc >= s_lowpc && dest_pc <= s_highpc)
    7284            {
  • branches/GNU/src/binutils/gprof/sym_ids.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* sym_ids.c
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2121
    2222
    23 #include <ctype.h>
    24 
    2523#include "libiberty.h"
     24#include "safe-ctype.h"
     25#include "gprof.h"
     26#include "search_list.h"
     27#include "source.h"
     28#include "symtab.h"
    2629#include "cg_arcs.h"
    2730#include "sym_ids.h"
     
    3235    char *spec;                 /* Parsing modifies this.  */
    3336    Table_Id which_table;
    34     bool has_right;
     37    bfd_boolean has_right;
    3538
    3639    struct match
     
    4548 *id_list;
    4649
     50static void parse_spec
     51  PARAMS ((char *, Sym *));
     52static void parse_id
     53  PARAMS ((struct sym_id *));
     54static bfd_boolean match
     55  PARAMS ((Sym *, Sym *));
     56static void extend_match
     57  PARAMS ((struct match *, Sym *, Sym_Table *, bfd_boolean));
     58
     59
    4760Sym_Table syms[NUM_TABLES];
    4861
     
    7386
    7487void
    75 DEFUN (sym_id_add, (spec, which_table),
    76        const char *spec AND Table_Id which_table)
     88sym_id_add (spec, which_table)
     89     const char *spec;
     90     Table_Id which_table;
    7791{
    7892  struct sym_id *id;
     
    102116
    103117static void
    104 DEFUN (parse_spec, (spec, sym), char *spec AND Sym * sym)
     118parse_spec (spec, sym)
     119     char *spec;
     120     Sym *sym;
    105121{
    106122  char *colon;
     
    125141      if (strlen (spec))
    126142        {
    127           if (isdigit ((unsigned char) spec[0]))
     143          if (ISDIGIT (spec[0]))
    128144            sym->line_num = atoi (spec);
    129145          else
     
    141157            sym->file = &non_existent_file;
    142158        }
    143       else if (isdigit ((unsigned char) *spec))
     159      else if (ISDIGIT (*spec))
    144160        {
    145161          sym->line_num = atoi (spec);
     
    157173
    158174static void
    159 DEFUN (parse_id, (id), struct sym_id *id)
     175parse_id (id)
     176     struct sym_id *id;
    160177{
    161178  char *slash;
     
    205222/* Return TRUE iff PATTERN matches SYM.  */
    206223
    207 static bool
    208 DEFUN (match, (pattern, sym), Sym * pattern AND Sym * sym)
     224static bfd_boolean
     225match (pattern, sym)
     226     Sym *pattern;
     227     Sym *sym;
    209228{
    210229  return (pattern->file ? pattern->file == sym->file : TRUE)
     
    218237
    219238static void
    220 DEFUN (extend_match, (m, sym, tab, second_pass),
    221      struct match *m AND Sym * sym AND Sym_Table * tab AND bool second_pass)
     239extend_match (m, sym, tab, second_pass)
     240     struct match *m;
     241     Sym *sym;
     242     Sym_Table *tab;
     243     bfd_boolean second_pass;
    222244{
    223245  if (m->prev_match != sym - 1)
     
    254276
    255277void
    256 DEFUN_VOID (sym_id_parse)
     278sym_id_parse ()
    257279{
    258280  Sym *sym, *left, *right;
     
    352374   very big (the user has to type them!), so a linear search is probably
    353375   tolerable.  */
    354 bool
    355 DEFUN (sym_id_arc_is_present, (symtab, from, to),
    356        Sym_Table * symtab AND Sym * from AND Sym * to)
     376bfd_boolean
     377sym_id_arc_is_present (sym_tab, from, to)
     378     Sym_Table *sym_tab;
     379     Sym *from;
     380     Sym *to;
    357381{
    358382  Sym *sym;
    359383
    360   for (sym = symtab->base; sym < symtab->limit; ++sym)
     384  for (sym = sym_tab->base; sym < sym_tab->limit; ++sym)
    361385    {
    362386      if (from->addr >= sym->addr && from->addr <= sym->end_addr
  • branches/GNU/src/binutils/gprof/sym_ids.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* sym_ids.h
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55This file is part of GNU Binutils.
     
    2323#define sym_ids_h
    2424
    25 #include "symtab.h"
    26 
    2725typedef enum
    2826  {
     
    3937extern Sym_Table syms[NUM_TABLES];
    4038
    41 extern void sym_id_add             PARAMS ((const char *, Table_Id));
    42 extern void sym_id_parse           PARAMS ((void));
    43 extern bool sym_id_arc_is_present PARAMS ((Sym_Table *, Sym *, Sym *));
     39extern void sym_id_add PARAMS ((const char *, Table_Id));
     40extern void sym_id_parse PARAMS ((void));
     41extern bfd_boolean sym_id_arc_is_present PARAMS ((Sym_Table *, Sym *, Sym *));
    4442
    4543#endif /* sym_ids_h */
  • branches/GNU/src/binutils/gprof/symtab.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* symtab.c
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55   This file is part of GNU Binutils.
     
    2222
    2323#include "gprof.h"
     24#include "search_list.h"
     25#include "source.h"
     26#include "symtab.h"
    2427#include "cg_arcs.h"
    2528#include "corefile.h"
    26 #include "symtab.h"
     29
     30static int cmp_addr PARAMS ((const PTR, const PTR));
    2731
    2832Sym_Table symtab;
     
    3236
    3337void
    34 DEFUN (sym_init, (sym), Sym * sym)
     38sym_init (sym)
     39     Sym *sym;
    3540{
    3641  memset (sym, 0, sizeof (*sym));
     
    5661
    5762static int
    58 DEFUN (cmp_addr, (lp, rp), const PTR lp AND const PTR rp)
    59 {
    60   Sym *left = (Sym *) lp;
    61   Sym *right = (Sym *) rp;
     63cmp_addr (lp, rp)
     64     const PTR lp;
     65     const PTR rp;
     66{
     67  const Sym *left = (const Sym *) lp;
     68  const Sym *right = (const Sym *) rp;
    6269
    6370  if (left->addr > right->addr)
     
    7481
    7582void
    76 DEFUN (symtab_finalize, (tab), Sym_Table * tab)
     83symtab_finalize (tab)
     84     Sym_Table *tab;
    7785{
    7886  Sym *src, *dst;
     
    171179
    172180Sym *
    173 DEFUN (dbg_sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
     181dbg_sym_lookup (sym_tab, address)
     182     Sym_Table *sym_tab;
     183     bfd_vma address;
    174184{
    175185  long low, mid, high;
     
    179189           (unsigned long) address);
    180190
    181   sym = symtab->base;
    182   for (low = 0, high = symtab->len - 1; low != high;)
     191  sym = sym_tab->base;
     192  for (low = 0, high = sym_tab->len - 1; low != high;)
    183193    {
    184194      mid = (high + low) >> 1;
     
    210220   If address does not hit any symbol, 0 is returned.  */
    211221Sym *
    212 DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address)
     222sym_lookup (sym_tab, address)
     223     Sym_Table *sym_tab;
     224     bfd_vma address;
    213225{
    214226  long low, high;
     
    219231#endif /* DEBUG */
    220232
    221   if (!symtab->len)
     233  if (!sym_tab->len)
    222234    return 0;
    223235
    224   sym = symtab->base;
    225   for (low = 0, high = symtab->len - 1; low != high;)
     236  sym = sym_tab->base;
     237  for (low = 0, high = sym_tab->len - 1; low != high;)
    226238    {
    227239      DBG (LOOKUPDEBUG, ++probes);
     
    240252              DBG (LOOKUPDEBUG,
    241253                   printf ("[sym_lookup] %d probes (symtab->len=%u)\n",
    242                            probes, symtab->len - 1));
     254                           probes, sym_tab->len - 1));
    243255              return &sym[mid];
    244256            }
     
    261273        {
    262274          DBG (LOOKUPDEBUG, printf ("[sym_lookup] %d (%u) probes, fall off\n",
    263                                     probes, symtab->len - 1));
     275                                    probes, sym_tab->len - 1));
    264276          return &sym[mid + 1];
    265277        }
  • branches/GNU/src/binutils/gprof/symtab.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* symtab.h
    22
    3    Copyright 2000, 2001 Free Software Foundation, Inc.
     3   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
    44
    55This file is part of GNU Binutils.
     
    2323#define symtab_h
    2424
    25 #include "bfd.h"
    26 #include "gprof.h"
    27 
    2825/* For a profile to be intelligible to a human user, it is necessary
    2926   to map code-addresses into source-code information.  Source-code
     
    3330   The symbol table is used to map addresses into source-code
    3431   information.  */
    35 
    36 #include "source.h"
    3732
    3833#define NBBS 10
     
    8479        int index;              /* Index in the graph list.  */
    8580        int top_order;          /* Graph call chain top-sort order.  */
    86         bool print_flag;        /* Should this be printed?  */
     81        bfd_boolean print_flag; /* Should this be printed?  */
    8782        struct
    8883          {
     
    120115extern void sym_init        PARAMS ((Sym *));
    121116extern void symtab_finalize PARAMS ((Sym_Table *));
     117#ifdef DEBUG
     118extern Sym *dbg_sym_lookup  PARAMS ((Sym_Table *, bfd_vma));
     119#endif
    122120extern Sym *sym_lookup      PARAMS ((Sym_Table *, bfd_vma));
    123121extern void find_call       PARAMS ((Sym *, bfd_vma, bfd_vma));
  • branches/GNU/src/binutils/gprof/tahoe.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "gprof.h"
     30#include "search_list.h"
     31#include "source.h"
     32#include "symtab.h"
    2033#include "cg_arcs.h"
    2134#include "corefile.h"
    2235#include "hist.h"
    23 #include "symtab.h"
    2436
    2537    /*
     
    4557 * A symbol to be the child of indirect callf:
    4658 */
    47 Sym indirectchild;
    48 
    49 
    50 tahoe_operandenum
     59static Sym indirectchild;
     60
     61static tahoe_operandenum tahoe_operandmode PARAMS ((unsigned char *));
     62static char *tahoe_operandname PARAMS ((tahoe_operandenum));
     63static long tahoe_operandlength PARAMS ((unsigned char *));
     64static bfd_signed_vma tahoe_offset PARAMS ((unsigned char *));
     65void tahoe_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
     66
     67static tahoe_operandenum
    5168tahoe_operandmode (modep)
    5269     unsigned char *modep;
    5370{
    54   long usesreg = ((long) *modep) & 0xf;
    55 
    56   switch (((long) *modep) >> 4)
     71  long usesreg = *modep & 0xf;
     72
     73  switch ((*modep >> 4) & 0xf)
    5774    {
    5875    case 0:
     
    90107}
    91108
    92 char *
     109static char *
    93110tahoe_operandname (mode)
    94111     tahoe_operandenum mode;
     
    144161}
    145162
    146 long
     163static long
    147164tahoe_operandlength (modep)
    148165     unsigned char *modep;
     
    182199}
    183200
    184 bfd_vma
    185 tahoe_reladdr (modep)
    186      char *modep;
     201static bfd_signed_vma
     202tahoe_offset (modep)
     203     unsigned char *modep;
    187204{
    188205  tahoe_operandenum mode = tahoe_operandmode (modep);
    189   char *cp;
    190   short *sp;
    191   long *lp;
    192   int i;
    193   long value = 0;
    194 
    195   cp = modep;
    196   ++cp;                         /* skip over the mode */
     206
     207  ++modep;                              /* skip over the mode */
    197208  switch (mode)
    198209    {
    199210    default:
    200211      fprintf (stderr, "[reladdr] not relative address\n");
    201       return (bfd_vma) modep;
     212      return 0;
    202213    case byterel:
    203       return (bfd_vma) (cp + sizeof *cp + *cp);
     214      return 1 + bfd_get_signed_8 (core_bfd, modep);
    204215    case wordrel:
    205       for (i = 0; (size_t) i < sizeof *sp; i++)
    206         value = (value << 8) + (cp[i] & 0xff);
    207       return (bfd_vma) (cp + sizeof *sp + value);
     216      return 2 + bfd_get_signed_16 (core_bfd, modep);
    208217    case longrel:
    209       for (i = 0; (size_t) i < sizeof *lp; i++)
    210         value = (value << 8) + (cp[i] & 0xff);
    211       return (bfd_vma) (cp + sizeof *lp + value);
     218      return 4 + bfd_get_signed_32 (core_bfd, modep);
    212219    }
    213220}
     
    224231  tahoe_operandenum mode;
    225232  tahoe_operandenum firstmode;
    226   bfd_vma destpc;
    227   static bool inited = FALSE;
     233  bfd_vma pc, destpc;
     234  static bfd_boolean inited = FALSE;
    228235
    229236  if (!inited)
     
    250257                          parent->name, (unsigned long) p_lowpc,
    251258                          (unsigned long) p_highpc));
    252   for (instructp = (unsigned char *) core_text_space + p_lowpc;
    253        instructp < (unsigned char *) core_text_space + p_highpc;
    254        instructp += length)
     259  for (pc = p_lowpc; pc < p_highpc; pc += length)
    255260    {
    256261      length = 1;
    257       if (*instructp == CALLF)
     262      instructp = ((unsigned char *) core_text_space
     263                   + pc - core_text_sect->vma);
     264      if ((*instructp & 0xff) == CALLF)
    258265        {
    259266          /*
     
    262269           */
    263270          DBG (CALLDEBUG, printf ("[findcall]\t0x%lx:callf",
    264                                   ((unsigned long)
    265                                    (instructp
    266                                     - (unsigned char *) core_text_space))));
     271                                  (unsigned long) pc));
    267272          firstmode = tahoe_operandmode (instructp + length);
    268273          switch (firstmode)
     
    308313               *      a function.
    309314               */
    310               destpc = tahoe_reladdr (instructp + length)
    311                 - (bfd_vma) core_text_space;
     315              destpc = pc + tahoe_offset (instructp + length);
    312316              if (destpc >= s_lowpc && destpc <= s_highpc)
    313317                {
  • branches/GNU/src/binutils/gprof/utils.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 1998, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    19 #include <demangle.h>
     29#include "demangle.h"
    2030#include "gprof.h"
     31#include "search_list.h"
     32#include "source.h"
     33#include "symtab.h"
    2134#include "cg_arcs.h"
    22 #include "symtab.h"
     35#include "utils.h"
    2336
    2437
     
    2740 */
    2841int
    29 DEFUN (print_name_only, (self), Sym * self)
     42print_name_only (self)
     43     Sym *self;
    3044{
    3145  const char *name = self->name;
     
    86100
    87101void
    88 DEFUN (print_name, (self), Sym * self)
     102print_name (self)
     103     Sym *self;
    89104{
    90105  print_name_only (self);
  • branches/GNU/src/binutils/gprof/vax.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/*
    2  * Copyright (c) 1983, 2001 Regents of the University of California.
    3  * All rights reserved.
     2 * Copyright (c) 1983, 1993, 2001
     3 *      The Regents of the University of California.  All rights reserved.
    44 *
    5  * Redistribution and use in source and binary forms are permitted
    6  * provided that: (1) source distributions retain this entire copyright
    7  * notice and comment, and (2) distributions including binaries display
    8  * the following acknowledgement:  ``This product includes software
    9  * developed by the University of California, Berkeley and its contributors''
    10  * in the documentation or other materials provided with the distribution
    11  * and in all advertising materials mentioning features or use of this
    12  * software. Neither the name of the University nor the names of its
    13  * contributors may be used to endorse or promote products derived
    14  * from this software without specific prior written permission.
    15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
    16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. Neither the name of the University nor the names of its contributors
     14 *    may be used to endorse or promote products derived from this software
     15 *    without specific prior written permission.
     16 *
     17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27 * SUCH DAMAGE.
    1828 */
    1929#include "gprof.h"
     30#include "search_list.h"
     31#include "source.h"
     32#include "symtab.h"
    2033#include "cg_arcs.h"
    2134#include "corefile.h"
    2235#include "hist.h"
    23 #include "symtab.h"
    2436
    2537    /*
     
    4254typedef enum opermodes operandenum;
    4355
     56#if 0
     57/* Here to document only.  We can't use this when cross compiling as
     58   the bitfield layout might not be the same as native.  */
    4459struct modebyte
    4560  {
     
    4762    unsigned int modefield:4;
    4863  };
     64#endif
    4965
    5066/*
    5167 * A symbol to be the child of indirect calls:
    5268 */
    53 Sym indirectchild;
    54 
     69static Sym indirectchild;
     70
     71static operandenum vax_operandmode PARAMS ((unsigned char *));
     72static char *vax_operandname PARAMS ((operandenum));
     73static long vax_operandlength PARAMS ((unsigned char *));
     74static bfd_signed_vma vax_offset PARAMS ((unsigned char *));
     75void vax_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
    5576
    5677static operandenum
    5778vax_operandmode (modep)
    58      struct modebyte *modep;
    59 {
    60   long usesreg = modep->regfield;
    61 
    62   switch (modep->modefield)
     79     unsigned char *modep;
     80{
     81  int usesreg = *modep & 0xf;
     82
     83  switch ((*modep >> 4) & 0xf)
    6384    {
    6485    case 0:
     
    152173static long
    153174vax_operandlength (modep)
    154      struct modebyte *modep;
     175     unsigned char *modep;
    155176{
    156177
     
    182203      return 5;
    183204    case indexed:
    184       return 1 + vax_operandlength ((struct modebyte *) ((char *) modep) + 1);
     205      return 1 + vax_operandlength (modep + 1);
    185206    }
    186207  /* NOTREACHED */
     
    188209}
    189210
    190 static bfd_vma
    191 vax_reladdr (modep)
    192      struct modebyte *modep;
     211static bfd_signed_vma
     212vax_offset (modep)
     213     unsigned char *modep;
    193214{
    194215  operandenum mode = vax_operandmode (modep);
    195   char *cp;
    196   short *sp;
    197   long *lp;
    198 
    199   cp = (char *) modep;
    200   ++cp;                         /* skip over the mode */
     216
     217  ++modep;                              /* skip over the mode */
    201218  switch (mode)
    202219    {
    203220    default:
    204221      fprintf (stderr, "[reladdr] not relative address\n");
    205       return (bfd_vma) modep;
     222      return 0;
    206223    case byterel:
    207       return (bfd_vma) (cp + sizeof *cp + *cp);
     224      return 1 + bfd_get_signed_8 (core_bfd, modep);
    208225    case wordrel:
    209       sp = (short *) cp;
    210       return (bfd_vma) (cp + sizeof *sp + *sp);
     226      return 2 + bfd_get_signed_16 (core_bfd, modep);
    211227    case longrel:
    212       lp = (long *) cp;
    213       return (bfd_vma) (cp + sizeof *lp + *lp);
     228      return 4 + bfd_get_signed_32 (core_bfd, modep);
    214229    }
    215230}
     
    227242  operandenum mode;
    228243  operandenum firstmode;
    229   bfd_vma destpc;
    230   static bool inited = FALSE;
     244  bfd_vma pc, destpc;
     245  static bfd_boolean inited = FALSE;
    231246
    232247  if (!inited)
     
    253268                          parent->name, (unsigned long) p_lowpc,
    254269                          (unsigned long) p_highpc));
    255   for (instructp = (unsigned char *) core_text_space + p_lowpc;
    256        instructp < (unsigned char *) core_text_space + p_highpc;
    257        instructp += length)
     270  for (pc = p_lowpc; pc < p_highpc; pc += length)
    258271    {
    259272      length = 1;
    260       if (*instructp == CALLS)
     273      instructp = ((unsigned char *) core_text_space
     274                   + pc - core_text_sect->vma);
     275      if ((*instructp & 0xff) == CALLS)
    261276        {
    262277          /*
     
    265280           */
    266281          DBG (CALLDEBUG,
    267                printf ("[findcall]\t0x%lx:calls",
    268                        ((unsigned long)
    269                         (instructp - (unsigned char *) core_text_space))));
    270           firstmode = vax_operandmode ((struct modebyte *) (instructp + length));
     282               printf ("[findcall]\t0x%lx:calls", (unsigned long) pc));
     283          firstmode = vax_operandmode (instructp + length);
    271284          switch (firstmode)
    272285            {
     
    277290              goto botched;
    278291            }
    279           length += vax_operandlength ((struct modebyte *) (instructp + length));
    280           mode = vax_operandmode ((struct modebyte *) (instructp + length));
     292          length += vax_operandlength (instructp + length);
     293          mode = vax_operandmode (instructp + length);
    281294          DBG (CALLDEBUG,
    282295               printf ("\tfirst operand is %s", vax_operandname (firstmode));
     
    300313               */
    301314              arc_add (parent, &indirectchild, (unsigned long) 0);
    302               length += vax_operandlength (
    303                                   (struct modebyte *) (instructp + length));
     315              length += vax_operandlength (instructp + length);
    304316              continue;
    305317            case byterel:
     
    311323               *      a function.
    312324               */
    313               destpc = vax_reladdr ((struct modebyte *) (instructp + length))
    314                 - (bfd_vma) core_text_space;
     325              destpc = pc + vax_offset (instructp + length);
    315326              if (destpc >= s_lowpc && destpc <= s_highpc)
    316327                {
     
    329340                       */
    330341                      arc_add (parent, child, (unsigned long) 0);
    331                       length += vax_operandlength ((struct modebyte *)
    332                                                    (instructp + length));
     342                      length += vax_operandlength (instructp + length);
    333343                      continue;
    334344                    }
Note: See TracChangeset for help on using the changeset viewer.