aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/trace.c
diff options
context:
space:
mode:
authorNick Barnes2002-05-24 13:17:21 +0100
committerNick Barnes2002-05-24 13:17:21 +0100
commit2efb9f1f4c77887a0e1f508e301cf6522c2f8245 (patch)
treebb213d9996612e5445dda0ca468a61bd7a559352 /mps/code/trace.c
parent78e24d1d3341f06a5da4ee6af7f46de2cc19ff5c (diff)
parentff00a6f767a31d3167a66d7b0bbf27f5d359c3a7 (diff)
downloademacs-2efb9f1f4c77887a0e1f508e301cf6522c2f8245.tar.gz
emacs-2efb9f1f4c77887a0e1f508e301cf6522c2f8245.zip
Mps_arena_step() on masters.
Copied from Perforce Change: 29464 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/trace.c')
-rw-r--r--mps/code/trace.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c
index 5b118e87bb6..44acc32b0df 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -712,7 +712,7 @@ void TraceDestroy(Trace trace)
712 /* Notify all the chains. */ 712 /* Notify all the chains. */
713 RING_FOR(chainNode, &trace->arena->chainRing, nextChainNode) { 713 RING_FOR(chainNode, &trace->arena->chainRing, nextChainNode) {
714 Chain chain = RING_ELT(Chain, chainRing, chainNode); 714 Chain chain = RING_ELT(Chain, chainRing, chainNode);
715 715
716 ChainEndGC(chain, trace); 716 ChainEndGC(chain, trace);
717 } 717 }
718 } else { 718 } else {
@@ -1422,7 +1422,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
1422 if (TraceSetIsMember(SegGrey(seg), trace)) 1422 if (TraceSetIsMember(SegGrey(seg), trace))
1423 trace->foundation += size; 1423 trace->foundation += size;
1424 } 1424 }
1425 1425
1426 if ((SegPool(seg)->class->attr & AttrGC) 1426 if ((SegPool(seg)->class->attr & AttrGC)
1427 && !TraceSetIsMember(SegWhite(seg), trace)) 1427 && !TraceSetIsMember(SegWhite(seg), trace))
1428 trace->notCondemned += size; 1428 trace->notCondemned += size;
@@ -1509,11 +1509,12 @@ static void traceQuantum(Trace trace)
1509 1509
1510/* TracePoll -- Check if there's any tracing work to be done */ 1510/* TracePoll -- Check if there's any tracing work to be done */
1511 1511
1512void TracePoll(Globals globals) 1512Bool TracePoll(Globals globals)
1513{ 1513{
1514 Trace trace; 1514 Trace trace;
1515 Res res; 1515 Res res;
1516 Arena arena; 1516 Arena arena;
1517 Bool done = FALSE;
1517 1518
1518 AVERT(Globals, globals); 1519 AVERT(Globals, globals);
1519 arena = GlobalsArena(globals); 1520 arena = GlobalsArena(globals);
@@ -1549,6 +1550,7 @@ void TracePoll(Globals globals)
1549 /* Run out of time, should really try a smaller collection. @@@@ */ 1550 /* Run out of time, should really try a smaller collection. @@@@ */
1550 finishingTime = 0.0; 1551 finishingTime = 0.0;
1551 TraceStart(trace, TraceTopGenMortality, finishingTime); 1552 TraceStart(trace, TraceTopGenMortality, finishingTime);
1553 done = TRUE;
1552 } else { /* Find the nursery most over its capacity. */ 1554 } else { /* Find the nursery most over its capacity. */
1553 Ring node, nextNode; 1555 Ring node, nextNode;
1554 double firstTime = 0.0; 1556 double firstTime = 0.0;
@@ -1577,6 +1579,7 @@ void TracePoll(Globals globals)
1577 trace->chain = firstChain; 1579 trace->chain = firstChain;
1578 ChainStartGC(firstChain, trace); 1580 ChainStartGC(firstChain, trace);
1579 TraceStart(trace, mortality, trace->condemned * TraceWorkFactor); 1581 TraceStart(trace, mortality, trace->condemned * TraceWorkFactor);
1582 done = TRUE;
1580 } 1583 }
1581 } /* (dynamicDeferral > 0.0) */ 1584 } /* (dynamicDeferral > 0.0) */
1582 } /* (arena->busyTraces == TraceSetEMPTY) */ 1585 } /* (arena->busyTraces == TraceSetEMPTY) */
@@ -1588,11 +1591,13 @@ void TracePoll(Globals globals)
1588 traceQuantum(trace); 1591 traceQuantum(trace);
1589 if (trace->state == TraceFINISHED) 1592 if (trace->state == TraceFINISHED)
1590 TraceDestroy(trace); 1593 TraceDestroy(trace);
1594 done = TRUE;
1591 } 1595 }
1592 return; 1596 return done;
1593 1597
1594failCondemn: 1598failCondemn:
1595 TraceDestroy(trace); 1599 TraceDestroy(trace);
1600 return FALSE;
1596} 1601}
1597 1602
1598 1603
@@ -1611,7 +1616,7 @@ void ArenaRelease(Globals globals)
1611{ 1616{
1612 AVERT(Globals, globals); 1617 AVERT(Globals, globals);
1613 globals->clamped = FALSE; 1618 globals->clamped = FALSE;
1614 TracePoll(globals); 1619 (void)TracePoll(globals);
1615} 1620}
1616 1621
1617 1622