History log of /freebsd-current/usr.bin/gprof/gprof.h
Revision Date Author Comments
# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 42b38843 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# 9bc6c721 26-Dec-2020 Ed Maste <emaste@FreeBSD.org>

gprof: Retire a.out support

FreeBSD has used ELF binaries/libraries for decades, but still has some
support for legacy a.out binaries. Portions of this have been retired
over time, but support remained in ldd, ldconfig, and gprof.

Retire gprof support; if anyone needs to do development on a.out
binaries still they will be best served by installing a full FreeBSD 2.x
or other obsolete version in a jail.

Kernel support for executing a.out binaries is unchnaged.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27480


# e7b841ae 14-Sep-2020 Andrew Turner <andrew@FreeBSD.org>

Cleanups for gprof:

* Remove identical or almost identical headers
* Only build aout.c on amd64 and i386. None of the the other current
architectures ever supported running a.out binaries
* Enable on all architectures

Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D26369


# a86ddfe8 06-Apr-2020 Kyle Evans <kevans@FreeBSD.org>

mail/gprof/tip: tap with the ugly stick

The ugly stick here is this bit in the respective headers:

#ifndef EXTERN
#define EXTERN extern
#endif

with a follow-up #define EXTERN in a single .c file to push all of their
definitions into one spot. A pass should be made over these three later to
push these definitions into the correct files instead, but this will suffice
for now and at a more leisurely pace.

MFC after: 3 days


# 467d9484 13-Jan-2020 Kristof Provost <kp@FreeBSD.org>

gprof: Enable riscv

Add a missing riscv.h header file, and fix the check for riscv (must test
MACHINE_CPUARCH, not MACHINE_ARCH, if we want to use 'riscv').

Sponsored by: Axiado


# 6d7adeba 21-Aug-2019 Bjoern A. Zeeb <bz@FreeBSD.org>

gprof: disable building of a.out components

On arm64, riscv, and s390x disable building of aout components.
This allows gprof to build on these architectures which never supported
the legacy a.out binary format.

Obtained from: s390x branch
MFC after: 3 months


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# e7d939bd 06-Jul-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Remove ia64.

This includes:
o All directories named *ia64*
o All files named *ia64*
o All ia64-specific code guarded by __ia64__
o All ia64-specific makefile logic
o Mention of ia64 in comments and documentation

This excludes:
o Everything under contrib/
o Everything under crypto/
o sys/xen/interface
o sys/sys/elf_common.h

Discussed at: BSDcan


# af2637db 14-Feb-2013 Philippe Charnier <charnier@FreeBSD.org>

rework old-style functions prototypes
reduce WARNS=6 output


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 268f9be7 04-Apr-2008 Warner Losh <imp@FreeBSD.org>

Add mips support.


# 2d05c776 22-Aug-2006 Ruslan Ermilov <ru@FreeBSD.org>

Remove alpha-specific stuff.


# bd6da6a5 03-Oct-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Use a proper prototype for hertz().


# 8eece1e6 20-Jun-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

Retire support for gprof's -c option. All our currently supported
architectures only provide a dummy implementation.

Silence on: current@


# f7dd47a8 18-May-2004 Peter Wemm <peter@FreeBSD.org>

Build/install gprof on amd64 as well, after repocopying the MD bits.
Not that it has anything to process yet, but that comes next.


# 6ff9ebfd 14-May-2004 Bruce Evans <bde@FreeBSD.org>

Fixed total disorder of MD includes.

Disorder buffer overflowed by: arm commit


# 361af5b5 14-May-2004 Olivier Houchard <cognet@FreeBSD.org>

Some arm bits for gprof.


# e4b4ed07 29-Oct-2003 Tim J. Robbins <tjr@FreeBSD.org>

Remove MD bits for unsupported architectures.


# bdaf0d3b 09-Dec-2002 Peter Grehan <grehan@FreeBSD.org>

Add powerpc.h. Still missing powerpc.[ch] in gprof, but this gets
the MI stuff out of the way.

Approved: re (rwatson)


# 97fa9b77 16-Oct-2002 Philippe Charnier <charnier@FreeBSD.org>

Remove done() which was just exit() so use of warn()/err() can be made. Abort
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.


# e043516d 30-May-2002 Alfred Perlstein <alfred@FreeBSD.org>

Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.


# 9f5bcb63 09-Mar-2002 Jake Burkholder <jake@FreeBSD.org>

Make this build on sparc64.


# 275ffbc6 06-Mar-2002 Bruce Evans <bde@FreeBSD.org>

Support runtime specification of the history counter type by whatever
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.


# 8109a9af 06-Mar-2002 Bruce Evans <bde@FreeBSD.org>

Fixed some misspellings of 2 as sizeof(UNIT) so that they won't break
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.


# 4cd016e8 21-Feb-2002 Bruce Evans <bde@FreeBSD.org>

Moved the definition of the machine-independent macro UNITS_TO_CODE
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.


# 3fc980b1 30-Oct-2001 Brian Feldman <green@FreeBSD.org>

Add -K support to gprof(1), which enables dynamic symbol resolution from
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


# 5b29dc6b 23-Oct-2001 Peter Wemm <peter@FreeBSD.org>

Add ia64 support (stubs, just like i386, alpha)


# 13a29a8a 16-Jul-1999 Hidetoshi Shimokawa <simokawa@FreeBSD.org>

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).


# 7e74cac4 22-May-1999 Jean-Marc Zucconi <jmz@FreeBSD.org>

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


# 5584f22b 07-Sep-1998 John Polstra <jdp@FreeBSD.org>

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.


# ffbce11f 13-Jul-1997 Bruce Evans <bde@FreeBSD.org>

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.


# b34f7deb 10-Jul-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3).


# db6a4b88 16-Oct-1996 Bruce Evans <bde@FreeBSD.org>

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.


# e6c645fa 29-Dec-1995 Bruce Evans <bde@FreeBSD.org>

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.


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources