1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 19:31:29 -07:00

mps br/padding (back out non-working changelist 169853 (attempt to clear up what "clamped" means))

Copied from Perforce
 Change: 169854
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Kistruck 2010-02-24 16:14:38 +00:00
parent 9c4e0d4265
commit 0540074ccb
2 changed files with 10 additions and 6 deletions

View file

@ -657,6 +657,8 @@ void ArenaPoll(Globals globals)
AVERT(Globals, globals);
if (globals->clamped)
return;
if (globals->insidePoll)
return;
if(globals->fillMutatorSize < globals->pollThreshold)
@ -713,9 +715,8 @@ static Bool arenaShouldCollectWorld(Arena arena,
/* don't collect the world if we're not given any time */
if ((interval > 0.0) && (multiplier > 0.0)) {
/* don't collect the world if we're clamped or busy. */
if (!ArenaGlobals(arena)->clamped
&& arena->busyTraces == TraceSetEMPTY) {
/* don't collect the world if we're already collecting. */
if (arena->busyTraces == TraceSetEMPTY) {
/* don't collect the world if it's very small */
arenaSize = ArenaCommitted(arena) - ArenaSpareCommitted(arena);
if (arenaSize > 1000000) {
@ -745,6 +746,7 @@ static Bool arenaShouldCollectWorld(Arena arena,
Bool ArenaStep(Globals globals, double interval, double multiplier)
{
double size;
Size scanned;
Bool stepped;
Clock start, end, now;
@ -786,6 +788,10 @@ Bool ArenaStep(Globals globals, double interval, double multiplier)
arena->tracedTime += (now - start) / (double) clocks_per_sec;
}
size = globals->fillMutatorSize;
globals->pollThreshold = size + ArenaPollALLOCTIME;
AVER(globals->pollThreshold > size); /* enough precision? */
return stepped;
}

View file

@ -531,8 +531,6 @@ static void traceFlip(Trace trace)
AVER(trace->state == TraceUNFLIPPED);
AVER(!TraceSetIsMember(arena->flippedTraces, trace));
AVER(ArenaGlobals(arena)->clamped == FALSE); /* clamped => no flip */
EVENT_PP(TraceFlipBegin, trace, arena);
traceFlipBuffers(ArenaGlobals(arena));
@ -1774,7 +1772,7 @@ Size TracePoll(Globals globals)
arena = GlobalsArena(globals);
scannedSize = (Size)0;
if(!globals->clamped && arena->busyTraces == TraceSetEMPTY) {
if(arena->busyTraces == TraceSetEMPTY) {
/* If no traces are going on, see if we need to start one. */
Size sFoundation, sCondemned, sSurvivors, sConsTrace;
double tTracePerScan; /* tTrace/cScan */