1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

Remove whiteminalign handling code which was used to calculate a mask for scanning in tracescanareatagged. for now we use sizeof(word)-1, which will work for dylan and configura.

Copied from Perforce
 Change: 179393
 ServerID: perforce.ravenbrook.com
This commit is contained in:
David Lovemore 2012-09-10 15:17:38 +01:00
parent 77ecf56fc2
commit 1ece8c4ccb
2 changed files with 10 additions and 27 deletions

View file

@ -155,7 +155,6 @@ Bool TraceCheck(Trace trace)
CHECKL(TraceIdCheck(trace->ti));
CHECKL(trace == &trace->arena->trace[trace->ti]);
CHECKL(TraceSetIsMember(trace->arena->busyTraces, trace));
CHECKL(AlignCheck(trace->whiteMinAlign));
CHECKL(ZoneSetSub(trace->mayMove, trace->white));
/* Use trace->state to check more invariants. */
switch(trace->state) {
@ -369,10 +368,6 @@ Res TraceAddWhite(Trace trace, Seg seg)
trace->mayMove = ZoneSetUnion(trace->mayMove,
ZoneSetOfSeg(trace->arena, seg));
}
/* This is used to eliminate unaligned references in TraceScanAreaTagged */
if(pool->alignment < trace->whiteMinAlign) {
trace->whiteMinAlign = pool->alignment;
}
}
return ResOK;
@ -694,7 +689,6 @@ found:
trace->arena = arena;
trace->why = why;
trace->whiteMinAlign = (Align)1 << (MPS_WORD_WIDTH - 1);
trace->white = ZoneSetEMPTY;
trace->mayMove = ZoneSetEMPTY;
trace->ti = ti;
@ -1494,36 +1488,26 @@ Res TraceScanArea(ScanState ss, Addr *base, Addr *limit)
/* TraceScanAreaTagged -- scan contiguous area of tagged references
*
* This is as TraceScanArea except words are only fixed they are tagged
* as zero according to the minimum alignment of the condemned set.
*/
* .tagging: This is as TraceScanArea except words are only fixed they are
* tagged as zero according to the alignment of a Word.
*
* See also PoolSingleAccess <code/poolabs.c#.tagging>.
*
* TODO: Generalise the handling of tags so that pools can decide how
* their objects are tagged. This may use the user defined format
* to describe how tags are done */
Res TraceScanAreaTagged(ScanState ss, Addr *base, Addr *limit)
{
TraceSet ts;
TraceId ti;
Trace trace;
Arena arena;
Word mask;
AVERT(ScanState, ss);
/* This calculation of the mask could be moved to ScanStateInit
* but there is little point as we probably only do a couple of ambiguous
* scan per thread per flip. */
/* NOTE: An optimisation that maybe worth considering is setting some of the
* top bits in the mask as an early catch of addresses outside the arena.
* This might help slightly on 64-bit windows. However these are picked up
* soon afterwards by later checks. The bottom bits are more important
* to check as we ignore them in AMCFix, so the non-reference could
* otherwise end up pinning an object. */
mask = (Word)-1;
ts = ss->traces;
arena = ss->arena;
TRACE_SET_ITER(ti, trace, ts, arena)
AVER(WordIsP2(trace->whiteMinAlign));
mask = mask & (trace->whiteMinAlign - 1);
TRACE_SET_ITER_END(ti, trace, ts, arena);
mask = sizeof(Word) - 1;
AVER(WordIsP2(mask + 1));
return TraceScanAreaMasked(ss, base, limit, mask);
}