mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Catch-up merge from masters sources @186519 to branch/2014-04-17/describe.
Copied from Perforce Change: 186526 ServerID: perforce.ravenbrook.com
This commit is contained in:
commit
cb629746ea
321 changed files with 15540 additions and 5134 deletions
101
mps/code/trace.c
101
mps/code/trace.c
|
|
@ -634,33 +634,6 @@ failRootFlip:
|
|||
return res;
|
||||
}
|
||||
|
||||
/* traceCopySizes -- preserve size information for later use
|
||||
*
|
||||
* A PoolGen's newSize is important information that we want to emit in
|
||||
* a diagnostic message at TraceStart. In order to do that we must copy
|
||||
* the information before Whiten changes it. This function does that.
|
||||
*/
|
||||
|
||||
static void traceCopySizes(Trace trace)
|
||||
{
|
||||
Ring node, nextNode;
|
||||
Index i;
|
||||
Arena arena = trace->arena;
|
||||
|
||||
RING_FOR(node, &arena->chainRing, nextNode) {
|
||||
Chain chain = RING_ELT(Chain, chainRing, node);
|
||||
|
||||
for(i = 0; i < chain->genCount; ++i) {
|
||||
Ring n, nn;
|
||||
GenDesc desc = &chain->gens[i];
|
||||
RING_FOR(n, &desc->locusRing, nn) {
|
||||
PoolGen gen = RING_ELT(PoolGen, genRing, n);
|
||||
gen->newSizeAtCreate = gen->newSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* TraceCreate -- create a Trace object
|
||||
*
|
||||
|
|
@ -677,6 +650,17 @@ static void traceCopySizes(Trace trace)
|
|||
* This code is written to be adaptable to allocating Trace objects
|
||||
* dynamically. */
|
||||
|
||||
static void TraceCreatePoolGen(GenDesc gen)
|
||||
{
|
||||
Ring n, nn;
|
||||
RING_FOR(n, &gen->locusRing, nn) {
|
||||
PoolGen pgen = RING_ELT(PoolGen, genRing, n);
|
||||
EVENT11(TraceCreatePoolGen, gen, gen->capacity, gen->mortality, gen->zones,
|
||||
pgen->pool, pgen->totalSize, pgen->freeSize, pgen->newSize,
|
||||
pgen->oldSize, pgen->newDeferredSize, pgen->oldDeferredSize);
|
||||
}
|
||||
}
|
||||
|
||||
Res TraceCreate(Trace *traceReturn, Arena arena, int why)
|
||||
{
|
||||
TraceId ti;
|
||||
|
|
@ -747,7 +731,24 @@ found:
|
|||
/* .. _request.dylan.160098: https://info.ravenbrook.com/project/mps/import/2001-11-05/mmprevol/request/dylan/160098 */
|
||||
ShieldSuspend(arena);
|
||||
|
||||
traceCopySizes(trace);
|
||||
STATISTIC_STAT ({
|
||||
/* Iterate over all chains, all GenDescs within a chain, and all
|
||||
* PoolGens within a GenDesc. */
|
||||
Ring node;
|
||||
Ring nextNode;
|
||||
|
||||
RING_FOR(node, &arena->chainRing, nextNode) {
|
||||
Chain chain = RING_ELT(Chain, chainRing, node);
|
||||
Index i;
|
||||
for (i = 0; i < chain->genCount; ++i) {
|
||||
GenDesc gen = &chain->gens[i];
|
||||
TraceCreatePoolGen(gen);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do topgen GenDesc, and all PoolGens within it. */
|
||||
TraceCreatePoolGen(&arena->topGen);
|
||||
});
|
||||
|
||||
*traceReturn = trace;
|
||||
return ResOK;
|
||||
|
|
@ -1564,9 +1565,9 @@ double TraceWorkFactor = 0.25;
|
|||
*
|
||||
* TraceStart should be passed a trace with state TraceINIT, i.e.,
|
||||
* recently returned from TraceCreate, with some condemned segments
|
||||
* added. mortality is the fraction of the condemned set expected to
|
||||
* survive. finishingTime is relative to the current polling clock, see
|
||||
* <design/arena/#poll.clock>.
|
||||
* added. mortality is the fraction of the condemned set expected not
|
||||
* to survive. finishingTime is relative to the current polling clock,
|
||||
* see <design/arena/#poll.clock>.
|
||||
*
|
||||
* .start.black: All segments are black w.r.t. a newly allocated trace.
|
||||
* However, if TraceStart initialized segments to black when it
|
||||
|
|
@ -1588,19 +1589,6 @@ static Res rootGrey(Root root, void *p)
|
|||
}
|
||||
|
||||
|
||||
static void TraceStartPoolGen(Chain chain, GenDesc desc, Bool top, Index i)
|
||||
{
|
||||
Ring n, nn;
|
||||
RING_FOR(n, &desc->locusRing, nn) {
|
||||
PoolGen gen = RING_ELT(PoolGen, genRing, n);
|
||||
EVENT11(TraceStartPoolGen, chain, BOOLOF(top), i, desc,
|
||||
desc->capacity, desc->mortality, desc->zones,
|
||||
gen->pool, gen->nr, gen->totalSize,
|
||||
gen->newSizeAtCreate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TraceStart -- start a trace whose white set has been established
|
||||
*
|
||||
* The main job of TraceStart is to set up the grey list for a trace. The
|
||||
|
|
@ -1665,26 +1653,6 @@ Res TraceStart(Trace trace, double mortality, double finishingTime)
|
|||
} while (SegNext(&seg, arena, seg));
|
||||
}
|
||||
|
||||
STATISTIC_STAT ({
|
||||
/* @@ */
|
||||
/* Iterate over all chains, all GenDescs within a chain, */
|
||||
/* (and all PoolGens within a GenDesc). */
|
||||
Ring node;
|
||||
Ring nextNode;
|
||||
Index i;
|
||||
|
||||
RING_FOR(node, &arena->chainRing, nextNode) {
|
||||
Chain chain = RING_ELT(Chain, chainRing, node);
|
||||
for(i = 0; i < chain->genCount; ++i) {
|
||||
GenDesc desc = &chain->gens[i];
|
||||
TraceStartPoolGen(chain, desc, FALSE, i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do topgen GenDesc (and all PoolGens within it). */
|
||||
TraceStartPoolGen(NULL, &arena->topGen, TRUE, 0);
|
||||
});
|
||||
|
||||
res = RootsIterate(ArenaGlobals(arena), rootGrey, (void *)trace);
|
||||
AVER(res == ResOK);
|
||||
|
||||
|
|
@ -1738,7 +1706,10 @@ Res TraceStart(Trace trace, double mortality, double finishingTime)
|
|||
void TraceQuantum(Trace trace)
|
||||
{
|
||||
Size pollEnd;
|
||||
Arena arena = trace->arena;
|
||||
Arena arena;
|
||||
|
||||
AVERT(Trace, trace);
|
||||
arena = trace->arena;
|
||||
|
||||
pollEnd = traceWorkClock(trace) + trace->rate;
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue