Commit Graph

9 Commits

Author SHA1 Message Date
Hidetoshi Shimokawa
13a29a8a17 Enable gprof on alpha.
* alpha.{c,h} are same as i386.{c,h}.
* Force address calculation to be done in long precision(64bit on alpha)
  rather than double precision(52bit).
1999-07-16 07:22:10 +00:00
Jean-Marc Zucconi
7e74cac42e Construct the profile file name from the name of the executable. A program
compiled with -pg and run will generate a file <executable-filename>.gmon,
not gmon.out.

PR:		bin/8426
1999-05-23 00:37:56 +00:00
John Polstra
5584f22bb3 Make profiling work for ELF. gprof now autodetects the format of
the executable file, so it will work for both a.out and ELF format
files.  I have split the object format specific code into separate
source files.  It's cleaner than it was before, but it's still
pretty crufty.

Don't cheat on your make world for this update.  A lot of things
have to be rebuilt for it to work, including the compiler and all
of the profiled libraries.
1998-09-07 23:32:00 +00:00
Bruce Evans
ffbce11fea 32-bit counters aren't large enough for 100+MHz clocks. Use 64-bit
counters.  `4' in GPROF4 and gprof4 now means 8.  gprof4 needs to be
recompiled to match the kernel.
1997-07-13 16:38:39 +00:00
Philippe Charnier
b34f7debd8 Use err(3). 1997-07-10 06:45:02 +00:00
Bruce Evans
db6a4b8826 Use a (signed) int32_t counter instead of an `unsigned int' counter
for the GPROF4 case.  This allows a simpler method to be used for
non-statistical profiling (it allows overhead adjustments to be
subtracted from one counter without harm if that counter goes
negative; otherwise the adjustment would have to be distributed).

32 bit counters were already too small for GPROF4 with a 200MHz
clock.  int64_t counters should be used.
1996-10-16 21:02:49 +00:00
Bruce Evans
e6c645fad2 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:46:59 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00