Home | History | Annotate | Download | only in include
History log of /src/sys/arch/i386/include/profile.h
RevisionDateAuthorComments
 1.38  02-Nov-2021  ryo In order to prevent _mcount() from being recursively called when built with COPTS=-O0,
sprinkle `__always_inline' to make _mcount() be generated as a single function.
 1.37  08-Jun-2017  christos use compiler builtins to compute addresses instead %ebp assembly arithmetic.
(from joerg)
 1.36  04-Jun-2017  christos - prevent optimization from omitting the frame pointer (and re-using it);
we use it in our inline assembly.
- convert to c a little assembly to make the code more understandable.
 1.35  31-May-2017  christos branches: 1.35.2;
prevent coredumps by skipping everything early if we are not counting.
 1.34  10-Jan-2016  ryo __mcount_lock is moved to MI from MD.
because it is needed for all MULTIPROCESSOR arch, but it is exists only in i386 and amd64.

ok christos@, on tech-kern@
 1.33  20-Dec-2007  ad branches: 1.33.54; 1.33.74;
- Make __cpu_simple_lock and similar real functions and patch at runtime.
- Remove old x86 atomic ops.
- Drop text alignment back to 16 on i386 (really, this time).
- Minor cleanup.
 1.32  17-Oct-2007  garbled branches: 1.32.4; 1.32.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.31  26-Sep-2007  ad Inline interrupt disable for _mcount, so the real function calls don't
screw with profiling.
 1.30  26-Sep-2007  ad Make build in userspace again.
 1.29  26-Sep-2007  xtraeme Fix profiling kernels:

read_psl -> x86_read_psl
write_psl -> x86_write_psl
disable_intr -> x86_disable_intr
 1.28  16-Apr-2007  christos branches: 1.28.2; 1.28.10; 1.28.12; 1.28.14;
As noted by uwe, we need to also save %edx because it can be used with
the regparm calling convention.
XXX: The c stub should be replaced with an assembly one.
 1.27  16-Apr-2007  christos save and restore %eax, %ecx, otherwise profiling does not work properly.
From Anon Ymous. Example program that fails:

int
main(int argc, char *argv[])
{
return argc;
}
 1.26  09-Feb-2007  ad branches: 1.26.2; 1.26.6; 1.26.8; 1.26.12;
Merge newlock2 to head.
 1.25  16-Feb-2006  perry branches: 1.25.14; 1.25.18;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.24  24-Dec-2005  perry branches: 1.24.2; 1.24.4; 1.24.6;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.23  24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.22  02-Oct-2005  chs put mcount.c in the normal object list, so that "make depend" works.
use a gcc attribute to prevent it from being instrumented.
 1.21  25-Feb-2005  chs branches: 1.21.4;
fix a typoe in previous.
 1.20  21-Feb-2005  chs allow profiling of MP kernels, add a spinlock around the body of mcount().
 1.19  24-May-2004  yamt branches: 1.19.4; 1.19.6;
instead of blindly set IF in MCOUNT_EXIT,
save eflags in MCOUNT_ENTER and restore it.
 1.18  27-Oct-2003  junyoung Nuke __P().
 1.17  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16  30-Nov-2001  enami branches: 1.16.2; 1.16.18;
Declare some asm statement with output as volatile. Without this,
gcc with -march=pentiumpro produce bad code.
 1.15  23-Aug-2001  chs use cli/sti instead of splhigh/splx for MCOUNT_ENTER/MCOUNT_EXIT.
this makes clearer how much time mcount() is really taking.
 1.14  22-Jan-2000  mycroft branches: 1.14.8; 1.14.10;
Delint.
 1.13  28-Sep-1999  enami branches: 1.13.2;
Add missing backslash.
 1.12  27-Sep-1999  kleink For ELF, rename the profiling entry from mcount to __mcount to avoid clashing
with the user's namespace, also within file scope; for binary compatibility,
define a weak alias for the previous name to cover our tracks.
 1.11  13-Nov-1998  christos cast _mcount args to u_long, to avoid lint warnings.
 1.10  05-Nov-1997  thorpej asm -> __asm__
 1.9  07-Dec-1996  fvdl branches: 1.9.14;
Remove _MCOUNT_DECL prototype once more.
 1.8  05-Dec-1996  fvdl Add _MCOUNT_DECL prototype.
 1.7  04-Dec-1996  fvdl Change asm.h to make it usable for kernel profiling as well.
Make mcount() a prototype in profile.h
 1.6  28-Mar-1995  jtc KERNEL -> _KERNEL
 1.5  27-Oct-1994  cgd new RCS ID format.
 1.4  13-May-1994  mycroft Duh.
 1.3  13-May-1994  mycroft Need some more macros not in the 4.4-Lite version.
 1.2  13-May-1994  mycroft Do this better.
 1.1  13-May-1994  mycroft Needed for new profiling code.
 1.9.14.1  05-Nov-1997  thorpej Pull up from trunk: asm -> __asm__
 1.13.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.14.10.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.10.1  25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.14.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.14.8.1  21-Sep-2001  nathanw Catch up to -current.
 1.16.18.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.18.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.16.18.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.18.2  18-Sep-2004  skrll Sync with HEAD.
 1.16.18.1  03-Aug-2004  skrll Sync with HEAD
 1.16.2.2  30-Nov-2001  enami Declare some asm statement with output as volatile. Without this,
gcc with -march=pentiumpro produce bad code.
 1.16.2.1  30-Nov-2001  enami file profile.h was added on branch sommerfeld_i386mp_1 on 2001-11-30 06:53:57 +0000
 1.19.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.4.1  29-Apr-2005  kent sync with -current
 1.21.4.5  21-Jan-2008  yamt sync with head
 1.21.4.4  27-Oct-2007  yamt sync with head.
 1.21.4.3  03-Sep-2007  yamt sync with head.
 1.21.4.2  26-Feb-2007  yamt sync with head.
 1.21.4.1  21-Jun-2006  yamt sync with head.
 1.24.6.1  22-Apr-2006  simonb Sync with head.
 1.24.4.1  09-Sep-2006  rpaulo sync with head
 1.24.2.1  18-Feb-2006  yamt sync with head.
 1.25.18.1  20-Apr-2007  bouyer Pull up following revision(s) (requested by christos in ticket #579):
sys/arch/i386/include/profile.h: revisions 1.27 - 1.28
save and restore %eax, %ecx, otherwise profiling does not work properly.
 1.25.14.1  06-Feb-2007  ad mcount(): fix entry so LOCKDEBUG+GPROF can be used together. Previously
it would recurse until eventually the machine triple faulted.
 1.26.12.1  18-Apr-2007  thorpej Convert i386 and amd64 to the new atomic ops API.
 1.26.8.1  11-Jul-2007  mjf Sync with head.
 1.26.6.2  09-Oct-2007  ad Sync with head.
 1.26.6.1  27-May-2007  ad Sync with head.
 1.26.2.1  07-May-2007  yamt sync with head.
 1.28.14.1  06-Oct-2007  yamt sync with head.
 1.28.12.2  09-Jan-2008  matt sync with HEAD
 1.28.12.1  06-Nov-2007  matt sync with HEAD
 1.28.10.1  02-Oct-2007  joerg Sync with HEAD.
 1.28.2.1  03-Oct-2007  garbled Sync with HEAD
 1.32.8.1  02-Jan-2008  bouyer Sync with HEAD
 1.32.4.1  26-Dec-2007  ad Sync with head.
 1.33.74.2  28-Aug-2017  skrll Sync with HEAD
 1.33.74.1  19-Mar-2016  skrll Sync with HEAD
 1.33.54.1  03-Dec-2017  jdolecek update from HEAD
 1.35.2.1  22-Mar-2018  martin Pull up following revision(s) (requested by christos in ticket #653):
sys/arch/i386/include/profile.h: revision 1.36
sys/arch/i386/include/profile.h: revision 1.37

- prevent optimization from omitting the frame pointer (and re-using it);
we use it in our inline assembly.
- convert to c a little assembly to make the code more understandable.

use compiler builtins to compute addresses instead %ebp assembly arithmetic.
(from joerg)

RSS XML Feed