Commit Graph

10 Commits

Author SHA1 Message Date
cgd ef8dc9789a don't actually compile any code if building in a _STANDALONE environment
(e.g. libkern for boot blocks), since profiling support doesn't make
sense there.
1998-03-26 23:52:38 +00:00
perry 4146d58604 remove obsolete register declarations 1998-02-03 18:23:37 +00:00
christos 47cb5f1603 Fix RCSID's
Add unused attribute to _mcount, since it might be called from assembly.
1997-07-13 19:53:56 +00:00
cgd 362c499969 prototype mcount (or, whatever function is declared by _MCOUNT_DECL;
typically mcount()) before it is defined or used.
1997-01-03 07:40:41 +00:00
abrown 347a3b2582 Copy over from libkern:
> Prevent recursive invocation of mcount() while in kernel by setting profiling
> state to BUSY while in mcount(). This allows profiling to work when mcount()
> calls a profiled routine (for example, udiv on the SPARC).
1996-06-29 14:32:58 +00:00
cgd 0396d19a02 use p->hashfraction when doing non-time-critical calculations, rather than
using HASHFRACTION directly.  in time-critical calculations, if HASHFRACTION
is a power of two, check that p->hashfraction == HASHFRACTION and if so do
the calculation with the compiled-in value so that the compiler can optimize
out (potentially) expensive divisions.  if p->hashfraction != HASHFRACTION,
actually do the division.  This has the result that on machines with slow
division, the division can be optimized out of the common case, but that
if HASHFRACTION changes from the compiled-in value (for whatever reason),
profiling will still work.  Changes suggested by Chris Torek.
1996-06-12 04:15:34 +00:00
cgd 88fce69ea9 s/KERNEL/_KERNEL/ to match libkern version. 1996-06-12 04:03:33 +00:00
cgd 693e99f736 clean up Ids 1995-02-27 12:54:33 +00:00
cgd 41006bd47b rcsids. also, avoid floating point when picking scale value. doesn't
cost much, only done once.
1994-05-14 06:31:10 +00:00
cgd da60d30fb3 user-land profiling code. 1994-05-14 06:02:57 +00:00