summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof/gprof.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few cases that relied on 'implicit int' (constraint violation in C99).stefanf2004-07-111-1/+1
|
* Retire support for gprof's -c option. All our currently supportedstefanf2004-06-201-7/+0
| | | | | | architectures only provide a dummy implementation. Silence on: current@
* Include <string.h> for prototypes of various string functions.stefanf2004-05-241-0/+2
| | | | Approved by: das (mentor)
* Remove MD bits for unsupported architectures.tjr2003-10-301-1/+1
|
* Remove done() which was just exit() so use of warn()/err() can be made. Abortcharnier2002-10-161-49/+32
| | | | | | | on allocation failure instead of displaying a warning and deferencing NULL pointer after. Spelling. Add prototypes. Add list of option in synopsis section of man page, -d is not referenced because available as a compile option. It should be made a runtime option btw.
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Fix preprocessor directive syntax (text after #endif).wollman2002-05-301-10/+10
| | | | The style of this program is still atrocious (not fixed).
* Include <stdint.h> for definition of intmax_t and/or uintmax_t.mike2002-03-251-0/+1
|
* Support runtime specification of the history counter type by whateverbde2002-03-061-9/+45
| | | | | | | | | | | | | generated the gmon data. The support is currently limited to what is easy to implement and/or needed: signedess: signed or insigned size: 8, 16, 32 or 64 bits format: a binary integer in gprof's format (gprof is not a cross-tool). High-resolution kernel profiling uses signed 64-bit counters. Normal kernel profiling and user profiling use unsigned 16-bit counters but should use 32-bit ones.
* Fixed some misspellings of 2 as sizeof(UNIT) so that they won't breakbde2002-03-061-10/+10
| | | | | | | | | | | | | | | | | things when sizeof(UNIT) becomes a runtime parameter. The relevant 2 is the one in profil(2)'s scaling of pc's to bucket numbers: bucket = (pc - offset) / 2 * profil_scale / 65536 gprof(1) must duplicate this scaling, bug for bug compatibly, so it must first do an integer division by 2 although this mainly makes scales larger than 65536 useless. sizeof(UNIT) was already wrong in gprof4, but there were no problems because the fake profil scale is a multiple of 2. There are also some rounding bugs in the scaling, but these are only problems if profil(2) is used directly to create unusual (and not useful) scales.
* Fixed printf format errors. In printgprof.c, also convert the scalebde2002-02-211-11/+11
| | | | | | without possibly losing lots of precision, and print the scale using %g instead of %d in case it is non-integral. %g might not be the best format for this.
* Moved the definition of the machine-independent macro UNITS_TO_CODEbde2002-02-211-0/+2
| | | | | | | | | | from <number of machines> machine-dependent headers to the one non-header here it is used so that it is easier to fix. This macro just divides the machine-dependent offset OFFSET_OF_CODE by the machine-independent scale factor sizeof(UNIT), as required for bug for bug compatibility with the scaling of pc's in gprof.c. UNIT is the type of a profiling counter, and its size has nothing to do with the correct scale factor except both are usually 2.
* Add -K support to gprof(1), which enables dynamic symbol resolution fromgreen2001-10-301-2/+6
| | | | | | | | | the currently-running kernel (and supercedes an executable file argument given). With this change, properly-compiled KLD modules are now able to be profiled. Obtained from: NAI Labs CBOSS project Funded by: DARPA
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Enable gprof on alpha.simokawa1999-07-161-3/+3
| | | | | | * 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).
* Construct the profile file name from the name of the executable. A programjmz1999-05-231-2/+4
| | | | | | | compiled with -pg and run will generate a file <executable-filename>.gmon, not gmon.out. PR: bin/8426
* Make profiling work for ELF. gprof now autodetects the format ofjdp1998-09-071-195/+22
| | | | | | | | | | | 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.
* Don't ignore symbols containing "$". C++ destructors and otherjdp1998-08-081-4/+3
| | | | | | | | special functions have names containing dollar signs, and ignoring them causes gprof to produce incorrect and sometimes bizarre results. The comment in the original code said that dollar signs were excluded because they are used in Pascal labels. That's not much of an issue these days.
* Revert to original style.charnier1997-07-151-2/+3
|
* Use err(3).charnier1997-07-101-27/+19
|
* Remove trailing whitespace.rgrimes1995-05-301-6/+6
|
* Added much-needed new options -[lL], to suppress printing of either thewollman1994-12-221-3/+17
| | | | call-graph or the flat profile, since often you only want one of them.
* New flag -u to suppress functions whose name does not begin with anbde1994-09-051-2/+7
| | | | | | | | underscore. Use it to avoid seeing badsw when profiling the kernel. Print times more accurately (e.g. usec in %8.0f format instead of msec in %8.2f format for averages) if hz >= 10000. This should have no effect now since profhz is only 1024.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+749
OpenPOWER on IntegriCloud