3 * core.c (core_init): Adding missing "break".
7 * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
11 * bbconv.pl: New file.
12 * Makefile.am (EXTRA_DIST): Add bbconv.pl.
13 * Makefile.in: Rebuild.
15 * gprof.texi: Extensive additions to document all arguments and
18 * symtab.c (symtab_finalize): Prefer function symbols over line
20 (dbg_sym_lookup): Correct debugging messages.
22 * gprof.c (main): --sum implies --line.
24 * cg_print.c (cg_print): When doing line by line profiling, don't
25 use a non-function as a main listing item.
27 * call_graph.c (cg_tally): When using line by line profiling, use
28 the function symbol as the child.
30 * symtab.h (NBBS): Define.
31 (Sym): Add bb_addr and bb_calls fields.
32 * basic_blocks.c (bb_read_rec): Save multiple basic blocks per
34 (bb_write_blocks): Adjust for multiple basic blocks per symbol.
35 (print_exec_counts): Don't check whether a symbol is the start of
36 a basic block. Print all basic blocks for a symbol.
37 (annotate_with_count): Rewrite to print all basic block counts and
38 to pay attention to width argument.
39 (print_annotated_source): Don't check whether symbol is the start
42 Make it possible to build a cross gprof, although a few cases are
44 * configure.in: Don't set MY_TARGET.
45 * gprof.h: Don't include MACHINE_H. Don't define FOPEN_RB or
46 FOPEN_WB; just get them from sysdep.h.
47 * core.h (min_insn_size, offset_to_code): Declare.
48 * core.c (MIN_INSN_SIZE): Don't define.
49 (min_insn_size, offset_to_code): New variables.
50 (core_init): Initialize min_insn_size and offset_to_code.
51 (find_call): New function.
52 (core_create_line_syms): Don't use min_dist. Set is_static in
54 * hist.c (UNITS_TO_CODE): Define.
55 * gprof.c (default_excluded_list): Add "__mcount_internal".
56 * gmon.h: Change TARGET_alpha to __alpha__.
57 * hertz.h: Ifdef MACH, define hertz as HZ.
58 * alpha.c (alpha_Instruction): Rename from Instruction. Change
60 (alpha_find_call): Rename from find_call.
62 * dummy.c, dummy.h: Remove.
63 * i386.c (i386_iscall): Rename from iscall. Change all
64 references. Check for call instruction, not jump or lcall.
65 (i386_find_call): Rename from find_call. Correct for VMA.
66 Correct call destination computation. Don't dereference symbol if
69 * ns532.c, ns532.h: Remove.
70 * sparc.c (CALL): Define.
71 (sparc_find_call): Rename from find_call.
73 * tahoe.c: Include cg_arcs.h, core.h, hist.h, and symtab.h. Don't
76 (enum tahoe_opermodes, tahoe_operandenum): Define. Rename all
77 references to opermodes or operandenum to these.
78 (tahoe_operandmode): Rename from operandmode. Call abort if
79 switch does not return.
80 (tahoe_operandname): Rename from operandname. Call abort if
81 switch does not return.
82 (tahoe_operandlength): Rename from operandlength. Call abort if
83 switch does not return.
84 (tahoe_reladdr): Rename from reladdr.
85 (tahoe_find_call): Rename from find_call. Use core_text_space
86 rather than textspace.
88 * vax.c (CALLS, PC): Define.
89 (enum opermodes, operandenum, struct modebyte): Define.
90 (vax_operandmode): Rename from operandmode. Call abort if switch
92 (vax_operandname): Rename from operandname. Call abort if switch
94 (vax_operandlength): Rename from operandlength. Call abort if
95 switch does not return.
96 (vax_reladdr): Rename from reladdr.
97 (vax_find_call): Rename from find_call.
99 * Makefile.am (AUTOMAKE_OPTIONS): Set to cygnus.
101 (INCLUDES): Remove -DTARGET_$(MY_TARGET) and -DMACHINE_H=
103 (gprof_SOURCES): Add i386.c, alpha.c, vax.c, tahoe.c, sparc.c.
104 (gprof_DEPENDENCIES): Remove $(MY_TARGET).o.
105 (gprof_LDADD): Likewise.
106 (noinst_HEADERS): Remove alpha.h, i386.h, ns532.h, sparc.h,
107 tahoe.h, vax.h, dummy.h.
108 (EXTRA_DIST): Remove alpha.c, i386.c, ns532.c, sparc.c, tahoe.c,
110 ($(OBJECTS)): Don't depend upon $(MY_TARGET).h.
111 ($(MY_TARGET).o): Remove target.
112 (i386.o, alpha.o, vax.o, tahoe.o, sparc.o): New targets.
113 * configure, Makefile.in, aclocal.m4: Rebuild.
117 * core.c (core_sym_class): Treat weak symbols as text symbols.
122 * aclocal.m4: Rebuild with new libtool.
123 * Makefile.in: Rebuild with current automake.
124 * configure: Rebuild.
128 * configure.in: Change version number to 2.8.2. Call
129 AM_PROG_LIBTOOL. Remove shared library handling; now handled by
130 libtool. Add AM_CONFIG_HEADER. Change AC_PROG_INSTALL to
131 AM_PROG_INSTALL. Add AM_EXEEXT.
132 * Makefile.am (LINK): Remove.
133 (gprof_LDFLAGS): Remove
134 (gprof_DEPENDENCIES): Change libbfd.a to libbfd.la.
135 (gprof_LDADD): Likewise.
136 ($(OBJECTS)): Depend upon gconfig.h and ../bfd/config.h.
137 * gprof.h: Undefine PACKAGE and VERSION after including BFD
138 sysdep.h file, then include new gconfig.h file.
139 * gprof.c (VERSION): Don't define.
140 * acconfig.h: New file.
141 * stamp-h.in: New file.
142 * gconfig.in: New file, created by autoheader.
143 * Makefile.in, configure, aclocal.m4: Rebuild.
147 * aclocal.m4, configure, Makefile.in: Rebuild with automake 1.2.
151 * Makefile.am (INCLUDES): Add -DDEBUG.
152 * Makefile.in: Rebuild.
156 Change to use automake:
157 * Makefile.am: New file.
158 * configure.in: Run AM_INIT_AUTOMAKE, AM_MAINTAINER_MODE, and
160 * aclocal.m4: New file, created by aclocal.
161 * Makefile.in: Replace with file created by automake --cygnus.
162 * configure: Rebuild.
166 * gprof.c (VERSION): Define as "2.8.1".
168 * Branched binutils 2.8.
172 * gprof.c (main): Correct copyright message.
176 * Makefile.in (.c.o): Define TARGET_$(MY_TARGET) when compiling.
177 * gmon.h: Use bytes counts rather than sizeof in struct raw_phdr
182 * cg_arcs.c (arc_add): memset() newly alloced arc to ensure
183 all fields are initialized with 0.
187 * symtab.h (find_call): Declare.
188 * cg_arcs.c (cg_assemble): Don't declare find_call.
189 * hist.c (scale_and_align_entries): Declare.
193 * configure.in: Define BSD44_FORMAT if the target looks like a
194 BSD4.4 derived system.
195 * configure: Rebuild.
196 * Makefile.in (.c.o): Add @DEFS@.
197 * gmon_io.c (gmon_out_read): In BSD44_FORMAT code, get profrate
198 from profrate field, not version field.
202 * dummy.c (find_call): Clear ignore_direct_calls.
206 * Makefile.in (.c.o): Add -D_GNU_SOURCE. Put $(CFLAGS) at the
208 (gprof): Put $(CFLAGS) after the other options.
212 * configure: Rebuild with autoconf 2.12.
216 * sparc.c (find_call): Align p_lowpc to avoid bus error.
220 * gprof.c (usage): Print bug report address.
221 (main): Change version printing to match current GNU standards.
225 * gmon.h: Replace #elif with #else/#endif.
229 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
230 * configure: Regenerate.
234 * configure.in: Set and substitute HLDENV.
235 * configure: Rebuild.
236 * Makefile.in (HLDENV): New variable.
237 (gprof): Use $(HLDENV).
241 * core.c (read_function_mappings): Cast xmalloc return.
245 * gprof.c (VERSION): Define as "2.7.1".
247 * Released binutils 2.7.
249 * bb_exit_func.c: Rename from __bb_exit_func.c, so that it can be
250 stored on a System V file system.
254 * configure.in: Call AC_ISC_POSIX.
255 * configure: Rebuild.
256 * Makefile.in (gprof): Pass $(CFLAGS) during link.
257 * hertz.c: Don't include <sys/time.h>; let sysdep.h handle that.
258 If HAVE_SETITIMER is not defined, try using sysconf.
262 * Makefile.in (exec_prefix, bindir, libdir, mandir, infodir, datadir,
263 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
264 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
265 (AC_PROG_INSTALL): added.
266 * configure: Rebuilt.
270 * configure.in: On alpha*-*-osf*, link against libbfd.a if not
271 using shared libraries.
272 * configure: Rebuild with autoconf 2.10.
276 * core.c (core_create_line_syms): Use xstrdup rather than strdup.
277 * source.c (source_file_lookup_path): Likewise.
281 * configure.in: Permit --enable-shared to specify a list of
283 * configure: Rebuild.
287 * core.c (core_create_function_syms): Move filename and func_name
288 inside ifdef where they are used.
290 * core.c (core_sym_class): Parenthesize && within ||.
291 * symtab.c (symtab_finalize): Correct parenthesization.
293 * cg_print.h (cg_print_file_ordering): Declare.
294 (cg_print_function_ordering): Declare.
296 * __bb_exit_func.c (__bb_exit_func): Replace bcopy with memcpy.
297 * cg_arcs.c (arc_add): Likewise.
298 * cg_print.c (cg_print_function_ordering): Likewise.
302 * gprof.c (default_excluded_list): Add "__mcount".
304 * gprof.c (main): Change ifdef __osf__ to __alpha__.
306 * gmon_io.c (gmon_out_read): If BSD44_FORMAT is defined, get the
307 profiling rate from the header.
309 * gmon.h (struct raw_phdr): Only include pad if both __alpha__ and
310 __osf__ are defined. Add new fields if BSD44_FORMAT is defined.
312 * alpha.h (MIN_INSN_SIZE): Define.
313 * core.c (MIN_INSN_SIZE): If not defined, define as 1.
314 (core_sym_class): Ignore debugging symbols.
315 (core_create_line_syms): Use MIN_INSN_SIZE when gathering line
320 * cg_print.c (cg_print_function_ordering): Fix __GNUC__ misspelled
322 (order_and_dump_functions_by_arcs): Likewise.
326 * configure: Rebuild with autoconf 2.8.
330 * configure.in: Check for 'do not mix' from native linker before
331 trying to use -rpath.
332 * configure: Rebuild.
336 * configure.in: Set HDLFLAGS for *-*-hpux with --enable-shared.
337 * configure: Rebuild.
341 * configure.in: Don't set CC. Look for --enable-shared. Set
342 BFDLIB and HLDFLAGS and substitute them.
343 * configure: Rebuild.
344 * Makefile.in (LIBS): Use @BFDLIB@.
345 (HLDFLAGS): New variable.
346 (gprof): Use $(HLDFLAGS).
350 Support for building bfd and opcodes as shared libraries, based on
352 * Makefile.in (LIBDEPS): New variable.
353 (LIBS): Use -L../bfd -lbfd.
354 (gprof): Depend upon $(LIBDEPS) rather than $(LIBS).
358 * gprof.c (long_options): Add "--function-ordering" and
359 "--file-ordering" options.
360 (usage): Add new options to usage message.
361 (main): Handle new options.
362 * gprof.h (STYLE_FUNCTION_ORDER): Define.
363 (STYLE_FILE_ORDER): Define.
364 (function_mapping_file): Declare.
365 * cg_arcs.c (arcs, numarcs): New globals.
366 (arc_add): Put new arcs into the arc array so the function/file
367 ordering code can examine them.
368 * cg_arcs.h (struct arc): New field "has_been_placed".
369 (arcs, numarcs): Declare new globals.
370 * core.c (symbol_map, symbol_map_count): New globals.
371 (read_function_mappings): New function to read in a function
373 (core_init): Call read_function_mappings if a function mapping
375 (core_create_function_syms): Handle function to object file
377 * symtab.h (struct sym): New fields "mapped", "has_been_placed",
379 * cg_print.c (cmp_arc_count): New function for sorting arcs.
380 (cmp_fun_nuses): Likewise for functions.
381 (cg_print_function_ordering): New function to print a suggested
383 (cg_print_file_ordering): Likewise for ordering .o files.
384 (order_and_dump_functions_by_arcs): Helper function for function
385 and object file ordering code.
389 * core.c (core_sym_class): Ignore symbols without BSF_FUNCTION
390 set if ignore_non_function is set.
391 * gprof.h (ignore_non_functions): Declare.
392 * gprof.c (ignore_non_functions): Define.
393 (long_options): Add "ignore-non-functions".
394 (usage): Add new options.
395 (main): Recognize "-D" and "--ignore-non-functions" option.
399 * Makefile.in (.m.c): Strip out directory name from function
402 * hist.c (scale_and_align_entries): Don't use DEFUN_VOID. Do
403 UNITS_TO_CODE adjustment unconditionally; compiler can optimize
404 away zero-offset case. Refer to scaled_addr, not aligned_addr.
406 * vax.c: Don't include vax.h here.
410 Version 2.6 released.
414 * gprof.c (main): Cast getenv return value.
418 * Makefile.in (TAGS): New target.
422 * Makefile.in (DISTSTUFF): Rename to GEN_FILES, to avoid confusion.
423 (all): Depend on $(GEN_FILES), not diststuff (which also depends
428 * sym_ids.c: Include <ctype.h>.
432 * Makefile.in (diststuff): Also make info.
433 (mostlyclean): Don't remove gprof.info*.
434 (maintainer-clean realclean): Also remove *.info*.
440 * Makefile.in: Add dependecies for $(OBJS) on header files.
442 * cg_print.c (print_cycle, print_members, cg_print_index): Fix new
443 style output format to make it consistent.
444 * dummy.c (find_call): Fix typo in error message.
448 * Makefile.in (maintainer-clean): New target, synonym for
453 * Makefile.in (install): Don't install in $(tooldir).
457 NS32K changes from Ian Dall:
458 * configure.in: Use ns32k, not ns532.
459 * ns532.c: Include symtab.h.
460 (find_call): Renamed from findcall. Print a message.
461 * ns532.h: Remove dummy.h comments.
465 * Makefile.in (install): Remove "brokensed" hack, unnecessary now
466 that we're using autoconf.
470 * core.c (get_src_info): Cast arg 7 of bfd_find_nearest_line
471 to proper type of "unsigned int *".
475 * configure.in: Use changequote around use of [].
479 * Makefile.in (distclean, realclean): Remove config.cache and
484 * Makefile.in (Makefile): Added config.status to dependency list.
485 (config.status): New target.
486 (SHELL): New definition.
490 * Makefile.in (install): Depend on "all".
494 * Makefile.in: Change all references to MY_MACHINE to MY_TARGET,
495 to match configure script.
499 * gen-c-prog.awk: Changed reference to "make-c-prog.awk" in
500 comment emitted by this script to gen-c-prog.awk.
502 * Makefile.in, configure.in: Converted to use autoconf.
503 * configure: New file, generated with autoconf 2.3.
504 * config/{mt-alpha, mt-dummy, mt-i386, mt-ns532, mt-sparc,
505 mt-tahoe, mt-vax}: Removed.
509 * __bb_exit_func.c: New file, from David Mosberger-Tang.
513 * All *.c: More cleanup towards GNU format.
515 * gmon_out.h (struct gmon_hist_hdr, struct gmon_cg_arc_record):
516 replaced sizeof (bfd_vma) by size (char*) because Ken tells me
517 that bfd_vma is only guaranteed to be at least as big as a pointer.
519 (GMON_Record_tag): added explicit enumeration values to ensure
520 compatibility across compilers.
522 * gmon_io.c (get_vma, put_vma): replaced sizeof(bfd_vma) by
527 * All *.c and *.h files: Ran "indent -gnu". Cleaned up a couple
528 of constructs GNU indent couldn't handle. Block comments not yet
529 rewritten in GNU format.
531 * gprof.c (VERSION): Changed to 2.6, to get in sync for next
536 * symtab.c (symtab_finalize): ensure globals symbols really
537 are favored over static ones---even if their name looks less
538 preferable; this is important for HP-UX; for example, there
539 is a static label Ltext_something that aliases the global
542 * hist.c (hist_print): auto-scaling is now in effect for FSF-style
543 output only; also, auto-scaling is now performed based on
544 per-call, rather than total execution time, which is what it was
547 * gprof.h (File_Format): new type.
549 * gprof.c (VERSION): upped to 2.7---seems to be completely out of
550 sync with Cygnus version numbers though...
552 (long_options): renamed --gmon-info to --file-info, --width added,
553 renamed --old-file-format to --file-format
554 (main): dito; also added support to read prof files, but as
555 mon_out_read() is not implemented, it's #ifdef'd out for now
557 (usage): update to reflect new options.
559 * gmon_io.c: replaced "old_file_format" by more general
562 * gmon.h (struct raw_phdr): fixed declaration for OSF/1.
564 * core.c (core_sym_class): added back check for __gnu_compiled and
565 ___gnu_compiled for the benefit of systems without
566 bfd_find_nearest_line() support
568 (get_src_info): now the libbfd is fixed, invoke bfd_find_nearest_line()
569 with section-relative addresses
571 (core_create_function_syms): get_src_info() calls are currently
572 enabled for OSF/1 only. It appears to work allright for SunOS
573 4.1.x as well, but on SPARCs it gets painfully slow with the
574 current implementation of aout_32_find_nearest_line();
575 unfortunately, this means that static functions will not have their
576 filename printed in the call-graph function index; line-level
577 profiling should still work, but requires some patience
579 * cg_print.c (cg_print_index): sanitised printing of index when
580 using FSF-style output; in particular, output width is now controlled
581 via option --width and the function tries hard to keep columns
582 aligned even in the presence of (occasional) long names
584 * NOTES: a first shot at updating the documentation.
588 * core.c (core_create_function_syms): fixed computation of min_vma
591 * *.c: removed rcsid.
595 * Lots of changes from David Mosberger-Tang:
599 * gprof.c (main): put parentheses around & within &&.
601 * basic_blocks.c (bb_read_rec): print warning message (once) when
602 ignoring basic-block execution counts.
604 * source.c (source_file_lookup_name): corrected second argument to
607 * hist.c (print_header): merged Fri Oct 21 18:58:02 1994 change by
610 * gmon_io.c (gmon_out_read): the output stule STYLE_GMON_INFO is now
611 supported both for old and new (versioned) gmon.out files. Old
612 files are identified as version 0.
614 * gmon.h (struct raw_arc): count field is now sizeof(long) bytes
615 long (instead of 4) because that is what OSF/1 v3.0 uses.
617 * core.c: minor fixes and debugging info changes.
621 * core.c (core_init): if .text cannot be found, try $CODE$ (the
622 name of the text-section under HP-UX).
624 * hist.c (hist_assign_samples): fixed off-by-one bug: highpc
625 points one past the last sampling bin, so hist_scale should be
626 computed as "hist_scale /= hist_num_bins", not "hist_scale /=
629 * gmon_io.c, hist.c, hist.h: renamed hist_num_samples to
632 * configure.in: added alpha-*-*) for per-target config.
634 * alpha.c, alpha.h: created.
636 * gprof.c (default_excluded_list): <locore>, <hicore> added.
638 * core.c (core_create_function_syms, core_create_line_syms):
639 explicitly keep two sentinels "<locore>" and "<hicore>" that catch
640 all addresses outside the text-space. Thus, sym_lookup(&symtab,
641 addr) continues to guarantee not to return 0 on any address. It
642 also avoids incorrectly crediting the first/last symbol in the
645 * core.c (core_create_line_syms): always create function symbols
646 first, then merge in line symbols; this is so that if parts of the
647 program were compiled without -g, function-level symbols are
650 * utils.c (print_name_only): support for print_path added.
652 * symtab.c (cmp_addr): also use is_func flag in comparison.
653 (symtab_finalize): return immediately when table empty; now
654 more careful about getting rid of the right duplicate symbol.
656 * sparc.c (find_call): many fixes---this function was rather
657 botched in binutils-2.4 already; it should work again.
659 * source.c (source_file_lookup_path): PATH is now strdup'ed (it is
660 not good to rely on get_src_info() to return distinct string
663 * search_list.c (search_list_append): added cast for xmalloc().
665 * hist.c: added explicit initialization to some of the global
666 variables; fixed SItab (scales were off by a factor of 10).
668 * hist.h: include of bfd.h added.
670 * gprof.c, gprof.h (print_path): added.
672 * gprof.h (MAX): fixed.
674 * gmon_out.h: renamed gmon_time_hist_hdr to gmon_hist_hdr.
676 * gmon_io.c: added some casts to (long) so we can always print as %lx
678 * core.c (core_get_text_space): fixed to make it work.
680 * cg_print.c (cg_print_index): added support for print_path option.
682 * cg_dfn.h (cg_dfn): wrap prototype in PARAMS().
684 * call_graph.c, gmon_io.c, hist.c: avoid taking address of array
685 as some compilers complain (e.g., DEC's OSF/1 compiler)
687 * basic_blocks.c, gmon_io.c, hist.c, source.c, sym_ids.c,
688 symtab.c: calls to memset() had 2nd and 3rd args reversed.
692 * gprof.c: added "_mcount" to default_excluded_list.
693 (main): if output_style==0 and there is either a histogram or a
694 call-graph, always generate flat and call-graph, no matter what
695 line_granularity is set to.
697 * source.c (source_file_lookup_name): if searching for sf->name
698 fails, try again with filename obtained after stripping off any
699 partial path from sf->name.
701 * gprof.h (SRCDEBUG): added.
703 * search_list.c (search_list_append): directories were added in wrong
706 * reimplemented selection mechanism from ground up; it is now possible
707 to accurately control what gets included/excluded in each of the
708 output styles; a "symbol-specification" (spec) is the basic means
709 to select a set of symbols; a spec has the syntax:
711 spec == (FILENAME:(FUNCNAME|LINE_NUM) | NAME).
714 any of the terminal symbols can be empty, in which case they
715 match anything (wildcards). NAME is interpreted as a FILENAME
716 if it contains a dot (e.g., foo.c), as LINE_NUM if it starts
717 with a digit, and as FUNCNAME otherwise.
719 For example, to get a call-graph display that ignores arcs
720 from foo() to bar(), you'd say "--no-graph=foo/bar"; to
721 show only arcs into bar() (no matter what the caller),
722 you'd say "--graph=/bar"; and to get a call-graph without
723 any arc info, you'd say "--graph=/"; similarly, to
724 get a flat profile without mcount, you'd say "--no-flat=mcount"
725 and to get a flat profile that shows includes all functions
726 you'd say "--flat=""" (i.e., an empty spec)
728 * hist.c (hist_print): top_time wasn't initialized to 0.0.
732 * gmon_out.h: all headers now declared in terms of characters
733 to avoid getting into trouble with different compilers introducing
734 different amount of padding; the code already accessed the fields
735 through bfd functions, so that didn't have to change.
737 * hist.c (hist_read_rec, hist_write_rec): added support for
738 collection pc histograms measuring quantities other than time;
739 the histogram header now includes a field that specifies the
740 dimension of the quantity measured by the histogram bins
741 (normally, this is "seconds", but other meaningful dimensions
742 include such things as "I-cache misses", "instruction issue stalls"
743 etc.); there is also a field to specify a one-character
744 abbreviation for the dimension; in the case of time, this would
745 be 's'; in most other cases it probably would be '1' (not a physical
750 * gprof.c, gmon_io.[ch]: BSD_COMPATIBLE is gone and new_file_version
751 has become old_file_version; gmon_io.c now always supports old-style
752 gmon.out files; it first tries to read gmon.out as a new version
753 file, if that fails, it tries to read it in the old format;
754 although not very likely, it is possible for gprof to mistake an
755 old-style file as a new one (the first 4 bytes would have to
756 be "gmon"---including the trailing '\0'); in that case, it is
757 necessary to specify --old-file-version
759 * gprof.h: removed dependency on SYSV; the code now always uses
760 strrchr(), memset(), and memcpy() and does not include either
761 of string.h or strings.h; this should make gprof compile on
762 any (Unix) system without configuration (per suggestion of
765 * gprof.c (usage): fixed location of --new-file-format option.
767 * cg_arcs.c (propagate_flags): fixed typo in declaration.
769 * flat_bl.m: removed formfeed at end of file; the form-feed
770 is now printed cg_print.c only when necessary.
772 * major rewrite of gprof---too many changes to mention all of
775 + -l now requests profiling at the line level (as opposed
776 to function level); in this mode, gprof creates a "symbol"
777 (aka name-list entry) for each line of source code, instead
780 + support for a new gmon.out file format; the new format
781 consists of a header with a magic and a version number,
782 followed by a sequence of profile data; profile data
783 can any of: (a) PC histogram, (b) call-graph arcs, or
784 (c) basic-block execution counts; the version number makes
785 it possible to extend gmon.out in a backwards compatible
788 + support for tcov style annotated output: if the gmon.out file
789 contains basic-block execution counts, the user can request
790 the generation of annotated source files, much like Sun's
795 + new scheme to suppress symbols that aren't function names
796 (e.g., avoids mistaking a goto label as a function)
798 + reorganized source code to make it more managable; as a
799 side effect, gprof now compiles cleanly with "gcc -Wall"
803 * gprof.c (funcsymbol): bfd_find_nearest_line() is now used as a
804 final cross-check to determine whether a static symbol should be
805 considered as a function-name.
809 * gmon_io.c (gmon_out_read): recognize "-" as the filename for
810 stdin; this is useful if you wanna keep gmon.out files compressed;
811 this way you can "gzcat" the compressed file into gprof.
813 * gprof.c: flag_min_count now initialized with 1 instead of 0.
815 * basic_blocks.c (bb_annotate_source): added support for creating
816 .tcov files when option flag_annotate_make_files is TRUE.
817 (annotate_with_count): all counts less than the minimum count
818 specified by -m are now annotated with hash-marks.
820 * gprof.c (main): -A is now followed by a string of option chars.
822 * basic_blocks.c (annotate_with_count): replaced b->count with
825 * source.c: flag_annotate_source replaced by source_lock_map.
827 * source.h: source_lock_map added.
829 * gprof.c (main): new command-line syntax: -S simply specifies
830 which source-files user is interested in; -A requests annotated
831 source files and -AA requests that all lines in a source file
836 * basic_blocks.c (PATH_MAX): if undefined, define as 1024.
838 * sparc.c, i386.c, tahoe.c, vax.c: added include of "time_hist.h"
839 so s_lowpc etc. get declared.
841 * arcs.h (doarcs): created.
843 * arcs.c: reordered static functions such that they get defined
846 * gprof.c (main): added options:
847 -A: request annotation of all source lines (with -S)
848 -m: minimum execution count (with default basic-block display)
849 -N: force new file format (only if BSD_COMPATIBLE is defined)
850 -S: annotate source file
851 -t: set table length (with -S)
853 * Makefile (OBJS): added basic_blocks.o call_graph.o gmon_io.o
858 * gprof.c (asgnsamples): computation of "pcl" and "pch" depended
859 on the fact being able to store a long in a double without loss of
860 precision; this does not hold on machines with 64 bit longs and 64
865 * printgprof.c (flatprofheader): Always set totime to 1.0 if not
866 greater than 0.0. Suggested by Harold Assink
871 * printgprof.c (printprof): Use free, not cfree.
872 (printgprof, printindex): Ditto.
876 * gprof.h (kfromlist, ktolist, flist, Flist, elist, Elist): Make
877 decls extern to keep native HP compiler quiet.
881 * gprof.c (funcsymbol): Ignore ___gnu_compiled as well as
882 __gnu_compiled, for the benefit of systems which add a leading
887 * configure.in: Change i386-*-* to i[345]86-*-*.
891 * ns532.c, ns532.h: New Files. ns532 support.
893 * config/mt-ns532: New File. ns532 support.
895 * gprof.c: user register int i instead of defaulting the int.
896 Allows compilation with -Dregister= for debugging.
898 * configure.in: Add ns532 support.
902 * Makefile.in (gprof): Depend on $(LIBS).
906 From binutils-2.4 release:
910 * configure.bat: [new] build makefile from makefile.in (dos)
911 * hertz.c: allow static HERTZ (msdos needs it)
912 * gprof.c: allow target to select "r" or "rb" for fopen
913 * gprof.c: ignore __gnu_compiled symbols
914 * i386.h: dfine FOPEN_RB to "rb" for dos.
918 * Makefile.in (.m.c:): Added .SUFFIXES : .m
919 so flat_bl.c would make from flat_bl.m file.
923 * Makefile.in (install-info): Check for gprof.info in build dir,
924 fall back to srcdir. Depend on it.
926 * gprof.h (TRUE, FALSE): Always use undef before defining them.
930 * Makefile.in (MY_MACHINE): Renamed from MACHINE to avoid losing
931 makes (osf1) in which the value of MACHINE can not be changed.
932 * config/*.mt: Changed appropriately.
936 * gprof.c (getsymtab): Change nosyms to long. Rename
937 get_symtab_upper_bound to bfd_get_symtab_upper_bound. Check for
938 errors from bfd_get_symtab_upper_bound and
939 bfd_canonicalize_symtab.
943 * gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
948 * Makefile.in: Avoid bug in hpux sed.
952 * gprof.texi (Invoking): add text about -v flag
954 * gprof.1: add text about -v flag
958 * gprof.c (VERSION): defined a version macro, print the value
959 when the -v option is used
963 * Makefile.in: Install correctly.
967 * gprof.c (main): Get whoami from argv, instead of hardcoding.
968 Use it in usage message. Split usage message to fit in 80 cols.
972 * Makefile.in: Undo 15 June change.
976 * gmon.h, gprof.h: structs of chars used to hold external
978 * gprof.c (getpfile, openpfile, readsamples): Swap data in using
983 * Makefile.in (.c.o): Look in ../include, not ../bfd, for bfd.h.
985 Mon Jun 14 16:22:59 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
987 * Makefile.in: remove parentdir support
991 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
992 * configure.in: No longer need to configure to get sysdep.h.
994 Tue May 18 21:44:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
996 * Makefile.in (install): should not depend on install-info
1000 * gprof.h: Include ansidecl.h before sysdep.h. Undefine hz.
1004 * M Makefile.in: Add -g to CFLAGS.
1005 Ads LDFLAGS and use in place of CFLAGS where appropriate.
1006 * configure.in: Make a sysdep.hlink in the same way other
1007 bfd-based directories do.
1008 * gprof.h (UNIT): Replace non-standard 'u_short' by 'unsigned
1010 * gprof.h: #include sysdep.h instead of a bunch of stuff.
1011 * gprof.c (main): Fix typo gproff->gprof.
1013 Thu Mar 25 19:00:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1015 * gprof.texi: add INFO-DIR-ENTRY
1017 Tue Mar 23 00:03:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1019 * Makefile.in: add installcheck target
1023 * gprof.c (funcsymbol): Invert test for aflag.
1027 * printgprof (xmalloc, xrealloc): Cast results of malloc
1032 * Makefile.in: created info, install-info, dvi
1034 Wed Jan 6 00:58:09 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1036 * Makefile.in: fix install rule for $(PROG)
1040 * gprof.1: updated SYNOPSIS to match actual behavior.
1044 * gen-c-prog.awk: New awk script, lightly changed from
1045 previously deleted make-c-prog.awk. Converts a text file
1046 to a c function that prints that text.
1047 * flat_bl.m, fsf_callg_bl.m, bsd_callg_bl.m: New files.
1048 Inputs to gen-c-prog.awk, containing text describing
1050 * blurbs.c: Removed. Use *_bl.c instead.
1051 * Makefile.in: Use gen-cprog.awk to generate *_bl.c files
1052 from *_bl.m files. Also, improve *clean rules.
1053 * printgprof.c (printgprof): Usw new function names from *_bl.c.
1058 * gprof.h, gprof.c, printfgprof.c: Add support for two
1059 output styles: The default is similar to the old FSF gprof,
1060 while -T sets the variable bsd_style_output, which causes
1061 output matching Berkeley's gprof. The biggest differences
1062 are that with the FSF style output, the flat profile comes
1063 before the call graph; numbers come before explanations;
1064 and there is less gratuitous white space.
1065 * gprof.h, gprof.c, printfgprof.c: New discard_underscores
1066 variable causes discarding of initial underscores when
1067 printing symbol names. It is set unless there is a "main"
1068 symbol (without an underscore).
1069 * printfgprof.c: New function printnameonly(), called
1070 by printname(). It handles stripping of initial '_',
1071 as well as C++ name-demangling.
1072 * gprof.callg, gprof.flat, make-c-prog.awk: Removed.
1073 It is just as convenient to edit blurbs.c directly.
1074 * Makefile.in: Removed rule for making blurbs.c.
1075 * blurbs.c: This is now a true source file (as opposed
1076 to being generated from gprof.callg and gprof.flat).
1077 Change style to use one long string literal, instead of
1078 one literal per output line. Add FSF-style blurb for call graph.
1082 * Makefile.in: always create installation directories.
1086 * Makefile.in: change ${MACHINE} to $(MACHINE).
1088 Sun Jul 19 17:34:01 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1090 * Makefile.in: removed installation of the now useless
1091 call.{flag,callg} files.
1093 * gprof.1: now uses the standard man macros instead of the new BSD
1096 Sun Jul 12 19:06:00 1992 John Gilmore (gnu at cygnus.com)
1098 * configure.in: Remove host section, expand target section.
1099 * config/mt-{tahoe,vax}: Add, to match existing support files.
1100 * config/tmake-*: Remove leftover crud.
1102 * blurbs.c: New file, created from gprof.flat and gprof.callg by
1103 * make-c-prog.awk: which processes text files into C programs.
1104 * printgprof.c (flatprofheader, gprofheader): Call new functions
1106 (printblurb): Remove.
1107 * Makefile.in: Infrastructure to build blurbs.
1108 * pathnames.h: has been removed. Gprof now has no filename
1112 Sat Jul 11 18:07:21 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
1114 * Makefile.in: define man1dir and install the man page
1118 * Makefile.in: added dummy info and install-info targets
1120 Thu Jun 4 11:34:02 1992 Mark Eichin (eichin at cygnus.com)
1122 * lookup.c: fixed fencepost in nllookup and added dbg_nllookup for
1123 help in debugging the problem (with -DDEBUG)
1124 * gprof.c: symbol values are now real values, don't add the vma
1125 anymore. (done for solaris; should verify this on other platforms)
1126 * ChangeLog: created.