summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof
Commit message (Collapse)AuthorAgeFilesLines
* clone i386.h for powerpcgrehan2005-12-291-0/+44
|
* Catch up with increasing the resolution suitable for high-res kernelbde2005-10-071-3/+13
| | | | | | | profiling from microseconds to nanoseconds in 1996. Picoseconds are already needed. Describe the choice of units for the per-call times in detail.
* Improve printing of self times in the flat profile for functions thatbde2005-10-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appear to be never called: (1) If a function is never called according to its call count but it must have been called because its child time is nonzero, then print it in the flat profile. Previously, if its call count was zero then we only printed it in the flat profile if its self time was nonzero. (2) If a function has a zero call count but has a nonzero self or child time, then print its total self time in the self time per call column as a percentage of the total (self + child) time. It is not possible to print the times per call in this case because the call count is zero. Previously, this was handled by leaving both per-call columns blank. The self time is printed in another column but there was no way to recover the total time. (1) partially fixes the case of the "never called" function main() and prepares for (2) to apply to main() and other functions. Profiling of main() was lost in the conversion from a.out to ELF, so main()'s call count has always been zero for many years; then in the common case where main() is a tiny function, it gets no profiling ticks, so main() was completely lost in the flat profile. (2) improves mainly cases like kernel threads. Most kernel threads appear to be never called because they are always started before userland can run to turn on profiling. As for main(), the fact that they are called is not very interesting and their callers are uninteresting, but their relative self time is interesting since they are long-running. Almost always printing percentages in the per-call columns would be more useful than almost always printing 0.0ms. 0.1ms is now a long time, so only very large functions take that long per call. The accuracy per call can approach 1-10 nsec provided programs are run for about 100000 times as long as is necessary to get this accuracy with high resolution kernel profiling.
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Make sure to return 0 from kernel_getnfile() since if there were angreen2004-10-051-0/+1
| | | | error, it would exit() (and it needs to return a value).
* Use a proper prototype for hertz().stefanf2004-10-032-1/+3
|
* Fix a few cases that relied on 'implicit int' (constraint violation in C99).stefanf2004-07-111-1/+1
|
* Deal with double whitespace.ru2004-07-031-3/+3
|
* Fix after rev. 1.24 changes: bump document date, and remove -cru2004-07-021-2/+2
| | | | from SYNOPSIS.
* Mechanically kill hard sentence breaks.ru2004-07-021-3/+5
|
* Retire support for gprof's -c option. All our currently supportedstefanf2004-06-2012-111/+1
| | | | | | architectures only provide a dummy implementation. Silence on: current@
* Include <string.h> for prototypes of various string functions.stefanf2004-05-244-0/+7
| | | | Approved by: das (mentor)
* Include <netinet/in.h> for ntoh*() and hton*() prototypes.stefanf2004-05-241-0/+2
| | | | Approved by: das (mentor)
* Build/install gprof on amd64 as well, after repocopying the MD bits.peter2004-05-181-0/+3
| | | | Not that it has anything to process yet, but that comes next.
* Fixed total disorder of MD includes.bde2004-05-141-10/+10
| | | | Disorder buffer overflowed by: arm commit
* Some arm bits for gprof.cognet2004-05-143-0/+62
|
* Remove MD bits for unsupported architectures.tjr2003-10-3012-1238/+1
|
* Remove 2 more unused doc Makefiles.trhodes2003-02-041-12/+0
|
* Add powerpc.h. Still missing powerpc.[ch] in gprof, but this getsgrehan2002-12-101-0/+3
| | | | | | the MI stuff out of the way. Approved: re (rwatson)
* mdoc(7) police: back out unproved changes in previous revision;ru2002-11-261-4/+4
| | | | | | | descriptions in the FILES section should be full sentences, as demonstrated in mdoc(7) and /usr/share/examples/mdoc/. Approved by: re
* Remove done() which was just exit() so use of warn()/err() can be made. Abortcharnier2002-10-1620-198/+238
| | | | | | | 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-309-13/+20
|
* Fix preprocessor directive syntax (text after #endif).wollman2002-05-306-53/+61
| | | | The style of this program is still atrocious (not fixed).
* Check for defined(__i386__) instead of just defined(i386) since the compileralfred2002-05-301-1/+1
| | | | will be updated to only define(__i386__) for ANSI cleanliness.
* Use `The .Nm utility'charnier2002-04-201-6/+7
|
* Include <stdint.h> for definition of intmax_t and/or uintmax_t.mike2002-03-251-0/+1
|
* Make this build on sparc64.jake2002-03-103-0/+60
|
* Support runtime specification of the history counter type by whateverbde2002-03-062-18/+51
| | | | | | | | | | | | | 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-063-13/+19
| | | | | | | | | | | | | | | | | 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-214-39/+39
| | | | | | 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.
* Added missing copyright. Obtain one and a vendor id from gprof.c. aout.cbde2002-02-212-2/+83
| | | | | | | was split off from gprof.c in rev.1.7 of the latter. elf.c is mostly new, but the old copyright sort of applies to it and is better than none. Use __FBSDID() for the FreeBSD id.
* Fixed a missing variable declaration so that gprof compiles with -DDEBUG.bde2002-02-211-0/+3
|
* Moved the definition of the machine-independent macro UNITS_TO_CODEbde2002-02-2111-9/+12
| | | | | | | | | | 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.
* Oops, forgot to remove the `beforeinstall' block.ru2001-12-171-5/+0
|
* Install files via FILES.ru2001-12-171-0/+2
|
* mdoc(7) police: kill whitespace at EOL.ru2001-11-201-1/+1
|
* Add -K support to gprof(1), which enables dynamic symbol resolution fromgreen2001-10-305-3/+87
| | | | | | | | | 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
* Add ia64 support (stubs, just like i386, alpha)peter2001-10-233-0/+61
|
* Add hint about how we name profiled libraries (append _p at the right place).schweikh2001-08-141-0/+11
| | | | | | | PR: 8061 Submitted by: Brandon Gillespie <brandon@ice.cold.org> Reviewed by: joerg, ru MFC after: 5 weeks
* Remove whitespace at EOL.dd2001-07-151-7/+7
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* * include/elf.h has been repo copied to include/elf-hints.h, and it noobrien2001-05-021-1/+6
| | | | | | | | longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
* Grammar police: "its", not "it's", is the possessive form of "it".dd2001-04-151-1/+1
|
* Prepare for mdoc(7)NG.ru2000-12-191-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-4/+4
|
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-1/+2
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* $Id$ -> $FreeBSD$peter1999-08-285-5/+5
|
* Enable gprof on alpha.simokawa1999-07-164-4/+62
| | | | | | * 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).
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Don't ignore weak symbols.dt1999-07-031-1/+0
| | | | | | | | | | EGCS assign weak symbols to inline functions it couldn't inline (e.g. virtual inline functions), template functions, etc. Omitting them result in quite bogus profile. Weak symbols created by __weak_reference are not really problem. Caught by: Ilya Segalovich <iseg@comptek.ru>
OpenPOWER on IntegriCloud