mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 04:30:45 -08:00
Mps br/unfixed-summary: if amcscannailed looped, ss.unfixedsummary is
not accurate, so move all of the ScanStateSummary into ss.fixedSumamry, so that <impl/trace/#verify.segsummary> does not erroneously fail. See also log file a2nNailedLoopReset.txt. Copied from Perforce Change: 162000 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
70eefd4387
commit
bfe1a99fcf
3 changed files with 14225 additions and 1 deletions
14170
mps/code/a2nNailedLoopReset.txt
Normal file
14170
mps/code/a2nNailedLoopReset.txt
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1325,7 +1325,7 @@ returnGood:
|
|||
static Res amcScanNailed(Bool *totalReturn, ScanState ss, Pool pool,
|
||||
Seg seg, AMC amc)
|
||||
{
|
||||
Bool total, moreScanning;
|
||||
Bool total, moreScanning, looped = FALSE;
|
||||
|
||||
do {
|
||||
Res res;
|
||||
|
|
@ -1334,8 +1334,59 @@ static Res amcScanNailed(Bool *totalReturn, ScanState ss, Pool pool,
|
|||
*totalReturn = FALSE;
|
||||
return res;
|
||||
}
|
||||
if (moreScanning) {
|
||||
TraceId ti;
|
||||
Trace trace;
|
||||
Bool emerg = FALSE;
|
||||
TraceSet ts = ss->traces;
|
||||
Arena arena = pool->arena;
|
||||
|
||||
TRACE_SET_ITER(ti, trace, ts, arena)
|
||||
if (trace->emergency) {
|
||||
emerg = TRUE;
|
||||
}
|
||||
TRACE_SET_ITER_END(ti, trace, ts, arena);
|
||||
AVER(emerg);
|
||||
|
||||
looped = TRUE;
|
||||
}
|
||||
} while(moreScanning);
|
||||
|
||||
if (looped) {
|
||||
/* looped: fixed refs (from 1st pass) were seen by MPS_FIX1
|
||||
* (in later passes), so the "ss.unfixedSummary" is _not_
|
||||
* purely unfixed. In this one case, unfixedSummary is not
|
||||
* accurate, and cannot be used to verify the SegSummary (see
|
||||
* impl/trace/#verify.segsummary). Use ScanStateSetSummary to
|
||||
* store ScanStateSummary in ss.fixedSummary and reset
|
||||
* ss.unfixedSummary.
|
||||
*/
|
||||
RefSet refset;
|
||||
mps_lib_FILE *stream = mps_lib_get_stdout();
|
||||
|
||||
refset = ScanStateSummary(ss);
|
||||
|
||||
SegDescribe(seg, stream);
|
||||
(void) WriteF(stream,
|
||||
"amcScanNailed completed, but had to loop:\n",
|
||||
" SegSummary: $W\n", (WriteFW)SegSummary(seg),
|
||||
" ss.unfixedSummary: $W\n", (WriteFW)ss->unfixedSummary,
|
||||
" ss.fixedSummary: $W\n", (WriteFW)ss->fixedSummary,
|
||||
"ScanStateSummary: $W\n", (WriteFW)refset,
|
||||
"MOVING ScanStateSummary TO fixedSummary, "
|
||||
"RESETTING unfixedSummary.\n", NULL
|
||||
);
|
||||
|
||||
ScanStateSetSummary(ss, refset);
|
||||
|
||||
(void) WriteF(stream,
|
||||
"now:\n",
|
||||
" ss.unfixedSummary: $W\n", (WriteFW)ss->unfixedSummary,
|
||||
" ss.fixedSummary: $W\n", (WriteFW)ss->fixedSummary,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
*totalReturn = total;
|
||||
return ResOK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1149,6 +1149,9 @@ static Res traceScanSegRes(TraceSet ts, Rank rank, Arena arena, Seg seg)
|
|||
TRACE_SET_ITER_END(ti, trace, ts, arena);
|
||||
}
|
||||
}
|
||||
/* .verify.segsummary: were the seg contents, as found by this
|
||||
* scan, consistent with the recorded SegSummary?
|
||||
*/
|
||||
AVER(RefSetSub(ss.unfixedSummary, SegSummary(seg)));
|
||||
|
||||
if (res != ResOK || !wasTotal) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue