1 Tue Feb 7 17:24:12 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
3 * All *.c and *.h files: Ran "indent -gnu". Cleaned up a couple
4 of constructs GNU indent couldn't handle. Block comments not yet
5 rewritten in GNU format.
7 * gprof.c (VERSION): Changed to 2.6, to get in sync for next
10 Sun Feb 5 16:19:46 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
12 * symtab.c (symtab_finalize): ensure globals symbols really
13 are favored over static ones---even if their name looks less
14 preferable; this is important for HP-UX; for example, there
15 is a static label Ltext_something that aliases the global
18 * hist.c (hist_print): auto-scaling is now in effect for FSF-style
19 output only; also, auto-scaling is now performed based on
20 per-call, rather than total execution time, which is what it was
23 * gprof.h (File_Format): new type.
25 * gprof.c (VERSION): upped to 2.7---seems to be completely out of
26 sync with Cygnus version numbers though...
28 (long_options): renamed --gmon-info to --file-info, --width added,
29 renamed --old-file-format to --file-format
30 (main): dito; also added support to read prof files, but as
31 mon_out_read() is not implemented, it's #ifdef'd out for now
33 (usage): update to reflect new options.
35 * gmon_io.c: replaced "old_file_format" by more general
38 * gmon.h (struct raw_phdr): fixed declaration for OSF/1.
40 * core.c (core_sym_class): added back check for __gnu_compiled and
41 ___gnu_compiled for the benefit of systems without
42 bfd_find_nearest_line() support
44 (get_src_info): now the libbfd is fixed, invoke bfd_find_nearest_line()
45 with section-relative addresses
47 (core_create_function_syms): get_src_info() calls are currently
48 enabled for OSF/1 only. It appears to work allright for SunOS
49 4.1.x as well, but on SPARCs it gets painfully slow with the
50 current implementation of aout_32_find_nearest_line();
51 unfortunately, this means that static functions will not have their
52 filename printed in the call-graph function index; line-level
53 profiling should still work, but requires some patience
55 * cg_print.c (cg_print_index): sanitized printing of index when
56 using FSF-style output; in particular, output width is now controlled
57 via option --width and the function tries hard to keep columns
58 aligned even in the presence of (occasional) long names
60 * NOTES: a first shot at updating the documentation.
62 Wed Feb 1 19:07:44 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
64 * core.c (core_create_function_syms): fixed computation of min_vma
69 Tue Jan 31 16:18:18 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
71 * Lots of changes from David Mosberger-Tang:
73 Tue Oct 25 19:20:14 1994 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
75 * gprof.c (main): put parentheses around & within &&.
77 * basic_blocks.c (bb_read_rec): print warning message (once) when
78 ignoring basic-block execution counts.
80 * source.c (source_file_lookup_name): corrected second argument to
83 * hist.c (print_header): merged Fri Oct 21 18:58:02 1994 change by
84 Ken Raeburn <raeburn@cujo.cygnus.com> from binutils-2.5.1.
86 * gmon_io.c (gmon_out_read): the output stule STYLE_GMON_INFO is now
87 supported both for old and new (versioned) gmon.out files. Old
88 files are identified as version 0.
90 * gmon.h (struct raw_arc): count field is now sizeof(long) bytes
91 long (instead of 4) because that is what OSF/1 v3.0 uses.
93 * core.c: minor fixes and debugging info changes.
95 Sun Sep 11 18:47:47 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
97 * core.c (core_init): if .text cannot be found, try $CODE$ (the
98 name of the text-section under HP-UX).
100 * hist.c (hist_assign_samples): fixed off-by-one bug: highpc
101 points one past the last sampling bin, so hist_scale should be
102 computed as "hist_scale /= hist_num_bins", not "hist_scale /=
105 * gmon_io.c, hist.c, hist.h: renamed hist_num_samples to
108 * configure.in: added alpha-*-*) for per-target config.
110 * alpha.c, alpha.h: created.
112 * gprof.c (default_excluded_list): <locore>, <hicore> added.
114 * core.c (core_create_function_syms, core_create_line_syms):
115 explicitly keep two sentinels "<locore>" and "<hicore>" that catch
116 all addresses outside the text-space. Thus, sym_lookup(&symtab,
117 addr) continues to guarantee not to return 0 on any address. It
118 also avoids incorrectly crediting the first/last symbol in the
121 * core.c (core_create_line_syms): always create function symbols
122 first, then merge in line symbols; this is so that if parts of the
123 program were compiled without -g, function-level symbols are
126 * utils.c (print_name_only): support for print_path added.
128 * symtab.c (cmp_addr): also use is_func flag in comparison.
129 (symtab_finalize): return immediately when table empty; now
130 more careful about getting rid of the right duplicate symbol.
132 * sparc.c (find_call): many fixes---this function was rather
133 botched in binutils-2.4 already; it should work again.
135 * source.c (source_file_lookup_path): PATH is now strdup'ed (it is
136 not good to rely on get_src_info() to return distinct string
139 * search_list.c (search_list_append): added cast for xmalloc().
141 * hist.c: added explicit initialization to some of the global
142 variables; fixed SItab (scales were off by a factor of 10).
144 * hist.h: include of bfd.h added.
146 * gprof.c, gprof.h (print_path): added.
148 * gprof.h (MAX): fixed.
150 * gmon_out.h: renamed gmon_time_hist_hdr to gmon_hist_hdr.
152 * gmon_io.c: added some casts to (long) so we can always print as %lx
154 * core.c (core_get_text_space): fixed to make it work.
156 * cg_print.c (cg_print_index): added support for print_path option.
158 * cg_dfn.h (cg_dfn): wrap prototype in PARAMS().
160 * call_graph.c, gmon_io.c, hist.c: avoid taking address of array
161 as some compilers complain (e.g., DEC's OSF/1 compiler)
163 * basic_blocks.c, gmon_io.c, hist.c, source.c, sym_ids.c,
164 symtab.c: calls to memset() had 2nd and 3rd args reversed.
166 Sat Sep 10 21:53:13 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
168 * gprof.c: added "_mcount" to default_excluded_list.
169 (main): if output_style==0 and there is either a histogram or a
170 call-graph, always generate flat and call-graph, no matter what
171 line_granularity is set to.
173 * source.c (source_file_lookup_name): if searching for sf->name
174 fails, try again with filename obtained after stripping off any
175 partial path from sf->name.
177 * gprof.h (SRCDEBUG): added.
179 * search_list.c (search_list_append): directories were added in wrong
182 * reimplemented selection mechanism from ground up; it is now possible
183 to accurately control what gets included/excluded in each of the
184 output styles; a "symbol-specification" (spec) is the basic means
185 to select a set of symbols; a spec has the syntax:
187 spec == (FILENAME:(FUNCNAME|LINE_NUM) | NAME).
190 any of the terminal symbols can be empty, in which case they
191 match anything (wildcards). NAME is interpreted as a FILENAME
192 if it contains a dot (e.g., foo.c), as LINE_NUM if it starts
193 with a digit, and as FUNCNAME otherwise.
195 For example, to get a call-graph display that ignores arcs
196 from foo() to bar(), you'd say "--no-graph=foo/bar"; to
197 show only arcs into bar() (no matter what the caller),
198 you'd say "--graph=/bar"; and to get a call-graph without
199 any arc info, you'd say "--graph=/"; similarly, to
200 get a flat profile without mcount, you'd say "--no-flat=mcount"
201 and to get a flat profile that shows includes all functions
202 you'd say "--flat=""" (i.e., an empty spec)
204 * hist.c (hist_print): top_time wasn't initialized to 0.0.
206 Fri Sep 9 01:10:21 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
208 * gmon_out.h: all headers now declared in terms of characters
209 to avoid getting into trouble with different compilers introducing
210 different amount of padding; the code already accessed the fields
211 through bfd functions, so that didn't have to change.
213 * hist.c (hist_read_rec, hist_write_rec): added support for
214 collection pc histograms measuring quantities other than time;
215 the histogram header now includes a field that specifies the
216 dimension of the quantity measured by the histogram bins
217 (normally, this is "seconds", but other meaningful dimensions
218 include such things as "I-cache misses", "instruction issue stalls"
219 etc.); there is also a field to specify a one-character
220 abbreviation for the dimension; in the case of time, this would
221 be 's'; in most other cases it probably would be '1' (not a physical
224 Thu Sep 8 16:05:08 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
226 * gprof.c, gmon_io.[ch]: BSD_COMPATIBLE is gone and new_file_version
227 has become old_file_version; gmon_io.c now always supports old-style
228 gmon.out files; it first tries to read gmon.out as a new version
229 file, if that fails, it tries to read it in the old format;
230 although not very likely, it is possible for gprof to mistake an
231 old-style file as a new one (the first 4 bytes would have to
232 be "gmon"---including the trailing '\0'); in that case, it is
233 necessary to specify --old-file-version
235 * gprof.h: removed dependency on SYSV; the code now always uses
236 strrchr(), memset(), and memcpy() and does not include either
237 of string.h or strings.h; this should make gprof compile on
238 any (Unix) system without configuration (per suggestion of
241 * gprof.c (usage): fixed location of --new-file-format option.
243 * cg_arcs.c (propagate_flags): fixed typo in declaration.
245 * flat_bl.m: removed formfeed at end of file; the form-feed
246 is now printed cg_print.c only when necessary.
248 * major rewrite of gprof---too many changes to mention all of
251 + -l now requests profiling at the line level (as opposed
252 to function level); in this mode, gprof creates a "symbol"
253 (aka name-list entry) for each line of source code, instead
256 + support for a new gmon.out file format; the new format
257 consists of a header with a magic and a version number,
258 followed by a sequence of profile data; profile data
259 can any of: (a) PC histogram, (b) call-graph arcs, or
260 (c) basic-block execution counts; the version number makes
261 it possible to extend gmon.out in a backwards compatible
264 + support for tcov style annotated output: if the gmon.out file
265 contains basic-block execution counts, the user can request
266 the generation of annotated source files, much like Sun's
271 + new scheme to suppress symbols that aren't function names
272 (e.g., avoids mistaking a goto label as a function)
274 + reorganized source code to make it more managable; as a
275 side effect, gprof now compiles cleanly with "gcc -Wall"
277 Thu Sep 1 15:46:49 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
279 * gprof.c (funcsymbol): bfd_find_nearest_line() is now used as a
280 final cross-check to determine whether a static symbol should be
281 considered as a function-name.
283 Fri Aug 5 19:32:36 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
285 * gmon_io.c (gmon_out_read): recognize "-" as the filename for
286 stdin; this is useful if you wanna keep gmon.out files compressed;
287 this way you can "gzcat" the compressed file into gprof.
289 * gprof.c: flag_min_count now initialized with 1 instead of 0.
291 * basic_blocks.c (bb_annotate_source): added support for creating
292 .tcov files when option flag_annotate_make_files is TRUE.
293 (annotate_with_count): all counts less than the minimum count
294 specified by -m are now annotated with hash-marks.
296 * gprof.c (main): -A is now followed by a string of option chars.
298 * basic_blocks.c (annotate_with_count): replaced b->count with
301 * source.c: flag_annotate_source replaced by source_lock_map.
303 * source.h: source_lock_map added.
305 * gprof.c (main): new command-line syntax: -S simply specifies
306 which source-files user is interested in; -A requests annotated
307 source files and -AA requests that all lines in a source file
310 Thu Aug 4 23:27:03 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
312 * basic_blocks.c (PATH_MAX): if undefined, define as 1024.
314 * sparc.c, i386.c, tahoe.c, vax.c: added include of "time_hist.h"
315 so s_lowpc etc. get declared.
317 * arcs.h (doarcs): created.
319 * arcs.c: reordered static functions such that they get defined
322 * gprof.c (main): added options:
323 -A: request annotation of all source lines (with -S)
324 -m: minimum execution count (with default basic-block display)
325 -N: force new file format (only if BSD_COMPATIBLE is defined)
326 -S: annotate source file
327 -t: set table length (with -S)
329 * Makefile (OBJS): added basic_blocks.o call_graph.o gmon_io.o
332 Fri Jul 1 15:23:50 1994 David Mosberger-Tang (davidm@piston.cs.arizona.edu)
334 * gprof.c (asgnsamples): computation of "pcl" and "pch" depended
335 on the fact being able to store a long in a double without loss of
336 precision; this does not hold on machines with 64 bit longs and 64
339 Fri Oct 21 18:58:02 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
341 * printgprof.c (flatprofheader): Always set totime to 1.0 if not
342 greater than 0.0. Suggested by Harold Assink
343 <carlo@sg.tn.tudelft.nl>.
345 Fri Sep 23 15:06:45 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
347 * printgprof.c (printprof): Use free, not cfree.
348 (printgprof, printindex): Ditto.
350 Thu Sep 1 10:40:45 1994 Jeff Law (law@snake.cs.utah.edu)
352 * gprof.h (kfromlist, ktolist, flist, Flist, elist, Elist): Make
353 decls extern to keep native HP compiler quiet.
355 Tue Aug 30 11:12:13 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
357 * gprof.c (funcsymbol): Ignore ___gnu_compiled as well as
358 __gnu_compiled, for the benefit of systems which add a leading
361 Wed Aug 24 12:49:13 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
363 * configure.in: Change i386-*-* to i[345]86-*-*.
365 Sun Jul 10 00:35:31 1994 Ian Dall (dall@hfrd.dsto.gov.au)
367 * ns532.c, ns532.h: New Files. ns532 support.
369 * config/mt-ns532: New File. ns532 support.
371 * gprof.c: user register int i instead of defaulting the int.
372 Allows compilation with -Dregister= for debugging.
374 * configure.in: Add ns532 support.
376 Thu Jun 23 11:22:41 1994 Jeff Law (law@snake.cs.utah.edu)
378 * Makefile.in (gprof): Depend on $(LIBS).
380 Fri May 27 12:24:57 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
382 From binutils-2.4 release:
384 Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
386 * configure.bat: [new] build makefile from makefile.in (dos)
387 * hertz.c: allow static HERTZ (msdos needs it)
388 * gprof.c: allow target to select "r" or "rb" for fopen
389 * gprof.c: ignore __gnu_compiled symbols
390 * i386.h: dfine FOPEN_RB to "rb" for dos.
392 Tue May 17 15:30:22 1994 E. Michael Smith (ems@cygnus.com)
394 * Makefile.in (.m.c:): Added .SUFFIXES : .m
395 so flat_bl.c would make from flat_bl.m file.
397 Thu May 5 19:23:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
399 * Makefile.in (install-info): Check for gprof.info in build dir,
400 fall back to srcdir. Depend on it.
402 * gprof.h (TRUE, FALSE): Always use undef before defining them.
404 Mon Apr 4 23:47:30 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
406 * Makefile.in (MY_MACHINE): Renamed from MACHINE to avoid losing
407 makes (osf1) in which the value of MACHINE can not be changed.
408 * config/*.mt: Changed appropriately.
410 Wed Mar 30 16:12:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
412 * gprof.c (getsymtab): Change nosyms to long. Rename
413 get_symtab_upper_bound to bfd_get_symtab_upper_bound. Check for
414 errors from bfd_get_symtab_upper_bound and
415 bfd_canonicalize_symtab.
417 Tue Mar 22 10:50:52 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
419 * gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
422 Sun Mar 20 15:40:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
424 * Makefile.in: Avoid bug in hpux sed.
426 Wed Dec 15 20:16:40 1993 david d `zoo' zuhn (zoo@andros.cygnus.com)
428 * gprof.texi (Invoking): add text about -v flag
430 * gprof.1: add text about -v flag
432 Wed Dec 8 16:55:06 1993 david d `zoo' zuhn (zoo@andros.cygnus.com)
434 * gprof.c (VERSION): defined a version macro, print the value
435 when the -v option is used
437 Tue Jul 6 10:11:56 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
439 * Makefile.in: Install correctly.
441 Thu Jun 24 14:43:22 1993 David J. Mackenzie (djm@thepub.cygnus.com)
443 * gprof.c (main): Get whoami from argv, instead of hardcoding.
444 Use it in usage message. Split usage message to fit in 80 cols.
446 Sun Jun 20 20:58:02 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
448 * Makefile.in: Undo 15 June change.
450 Wed Jun 16 12:54:53 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
452 * gmon.h, gprof.h: structs of chars used to hold external
454 * gprof.c (getpfile, openpfile, readsamples): Swap data in using
457 Tue Jun 15 23:09:17 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
459 * Makefile.in (.c.o): Look in ../include, not ../bfd, for bfd.h.
461 Mon Jun 14 16:22:59 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
463 * Makefile.in: remove parentdir support
465 Mon Jun 7 12:56:17 1993 Per Bothner (bothner@rtl.cygnus.com)
467 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
468 * configure.in: No longer need to configure to get sysdep.h.
470 Tue May 18 21:44:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
472 * Makefile.in (install): should not depend on install-info
474 Mon Apr 26 12:37:46 1993 Ian Lance Taylor (ian@cygnus.com)
476 * gprof.h: Include ansidecl.h before sysdep.h. Undefine hz.
478 Tue Apr 13 16:14:03 1993 Per Bothner (bothner@cygnus.com)
480 * M Makefile.in: Add -g to CFLAGS.
481 Ads LDFLAGS and use in place of CFLAGS where appropriate.
482 * configure.in: Make a sysdep.hlink in the same way other
483 bfd-based directories do.
484 * gprof.h (UNIT): Replace non-standard 'u_short' by 'unsigned
486 * gprof.h: #include sysdep.h instead of a bunch of stuff.
487 * gprof.c (main): Fix typo gproff->gprof.
489 Thu Mar 25 19:00:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
491 * gprof.texi: add INFO-DIR-ENTRY
493 Tue Mar 23 00:03:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
495 * Makefile.in: add installcheck target
497 Sat Feb 27 18:17:10 1993 Per Bothner (bothner@rtl.cygnus.com)
499 * gprof.c (funcsymbol): Invert test for aflag.
501 Thu Feb 25 16:01:50 1993 Per Bothner (bothner@rtl.cygnus.com)
503 * printgprof (xmalloc, xrealloc): Cast results of malloc
506 Wed Feb 3 13:55:33 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
508 * Makefile.in: created info, install-info, dvi
510 Wed Jan 6 00:58:09 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
512 * Makefile.in: fix install rule for $(PROG)
514 Fri Oct 9 11:25:41 1992 Mark Eichin (eichin@cygnus.com)
516 * gprof.1: updated SYNOPSIS to match actual behavior.
518 Mon Oct 5 17:50:16 1992 Per Bothner (bothner@cygnus.com)
520 * gen-c-prog.awk: New awk script, lightly changed from
521 previously deleted make-c-prog.awk. Converts a text file
522 to a c function that prints that text.
523 * flat_bl.m, fsf_callg_bl.m, bsd_callg_bl.m: New files.
524 Inputs to gen-c-prog.awk, containing text describing
526 * blurbs.c: Removed. Use *_bl.c instead.
527 * Makefile.in: Use gen-cprog.awk to generate *_bl.c files
528 from *_bl.m files. Also, improve *clean rules.
529 * printgprof.c (printgprof): Usw new function names from *_bl.c.
532 Sun Aug 30 19:54:53 1992 Per Bothner (bothner@rtl.cygnus.com)
534 * gprof.h, gprof.c, printfgprof.c: Add support for two
535 output styles: The default is similar to the old FSF gprof,
536 while -T sets the variable bsd_style_output, which causes
537 output matching Berkeley's gprof. The biggest differences
538 are that with the FSF style output, the flat profile comes
539 before the call graph; numbers come before explanations;
540 and there is less gratuitous white space.
541 * gprof.h, gprof.c, printfgprof.c: New discard_underscores
542 variable causes discarding of initial underscores when
543 printing symbol names. It is set unless there is a "main"
544 symbol (without an underscore).
545 * printfgprof.c: New function printnameonly(), called
546 by printname(). It handles stripping of initial '_',
547 as well as C++ name-demangling.
548 * gprof.callg, gprof.flat, make-c-prog.awk: Removed.
549 It is just as convenient to edit blurbs.c directly.
550 * Makefile.in: Removed rule for making blurbs.c.
551 * blurbs.c: This is now a true source file (as opposed
552 to being generated from gprof.callg and gprof.flat).
553 Change style to use one long string literal, instead of
554 one literal per output line. Add FSF-style blurb for call graph.
556 Wed Aug 19 14:36:39 1992 Ian Lance Taylor (ian@cygnus.com)
558 * Makefile.in: always create installation directories.
560 Wed Aug 12 15:14:14 1992 Mark Eichin (eichin@cygnus.com)
562 * Makefile.in: change ${MACHINE} to $(MACHINE).
564 Sun Jul 19 17:34:01 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
566 * Makefile.in: removed installation of the now useless
567 call.{flag,callg} files.
569 * gprof.1: now uses the standard man macros instead of the new BSD
572 Sun Jul 12 19:06:00 1992 John Gilmore (gnu at cygnus.com)
574 * configure.in: Remove host section, expand target section.
575 * config/mt-{tahoe,vax}: Add, to match existing support files.
576 * config/tmake-*: Remove leftover crud.
578 * blurbs.c: New file, created from gprof.flat and gprof.callg by
579 * make-c-prog.awk: which processes text files into C programs.
580 * printgprof.c (flatprofheader, gprofheader): Call new functions
582 (printblurb): Remove.
583 * Makefile.in: Infrastructure to build blurbs.
584 * pathnames.h: has been removed. Gprof now has no filename
588 Sat Jul 11 18:07:21 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
590 * Makefile.in: define man1dir and install the man page
592 Fri Jul 10 21:14:08 1992 david d `zoo' zuhn (zoo@cygnus.com)
594 * Makefile.in: added dummy info and install-info targets
596 Thu Jun 4 11:34:02 1992 Mark Eichin (eichin at cygnus.com)
598 * lookup.c: fixed fencepost in nllookup and added dbg_nllookup for
599 help in debugging the problem (with -DDEBUG)
600 * gprof.c: symbol values are now real values, don't add the vma
601 anymore. (done for solaris; should verify this on other platforms)
602 * ChangeLog: created.