1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-27 01:01:52 -07:00

Removing white field from tracts.

Copied from Perforce
 Change: 190075
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Brooksby 2016-03-13 15:57:08 +00:00
parent e83b3602df
commit 735d099d31
4 changed files with 7 additions and 49 deletions

View file

@ -170,7 +170,6 @@ static Res SegInit(Seg seg, Pool pool, Addr base, Size size,
AVER(TractP(tract) == NULL);
AVER(!TractHasSeg(tract));
AVER(TractPool(tract) == pool);
AVER(TractWhite(tract) == TraceSetEMPTY);
TRACT_SET_SEG(tract, seg);
}
AVER(addr == SegLimit(seg));
@ -227,7 +226,6 @@ static void SegFinish(Seg seg)
limit = SegLimit(seg);
TRACT_FOR(tract, addr, arena, base, limit) {
AVERT(Tract, tract);
TractSetWhite(tract, TraceSetEMPTY);
TRACT_UNSET_SEG(tract);
}
AVER(addr == SegLimit(seg));
@ -686,27 +684,6 @@ Bool SegCheck(Seg seg)
CHECKL(AddrIsArenaGrain(SegBase(seg), arena));
CHECKL(AddrIsArenaGrain(SegLimit(seg), arena));
/* Each tract of the segment must agree about white traces. Note
* that even if the CHECKs are compiled away there is still a
* significant cost in looping over the tracts, hence the guard. See
* job003778. */
#if defined(AVER_AND_CHECK_ALL)
{
Tract tract;
Addr addr;
TRACT_FOR(tract, addr, arena, SegBase(seg), SegLimit(seg)) {
Seg trseg = NULL; /* suppress compiler warning */
CHECKD_NOSIG(Tract, tract);
CHECKL(TRACT_SEG(&trseg, tract));
CHECKL(trseg == seg);
CHECKL(TractWhite(tract) == seg->white);
CHECKL(TractPool(tract) == pool);
}
CHECKL(addr == SegLimit(seg));
}
#endif /* AVER_AND_CHECK_ALL */
/* The segment must belong to some pool, so it should be on a */
/* pool's segment ring. (Actually, this isn't true just after */
/* the segment is initialized.) */
@ -1248,9 +1225,6 @@ static void gcSegSetGrey(Seg seg, TraceSet grey)
static void gcSegSetWhite(Seg seg, TraceSet white)
{
GCSeg gcseg;
Tract tract;
Arena arena;
Addr addr, base, limit;
AVERT_CRITICAL(Seg, seg); /* .seg.method.check */
AVERT_CRITICAL(TraceSet, white); /* .seg.method.check */
@ -1258,20 +1232,6 @@ static void gcSegSetWhite(Seg seg, TraceSet white)
AVERT_CRITICAL(GCSeg, gcseg);
AVER_CRITICAL(&gcseg->segStruct == seg);
arena = PoolArena(SegPool(seg));
AVERT_CRITICAL(Arena, arena);
base = SegBase(seg);
limit = SegLimit(seg);
/* Each tract of the segment records white traces */
TRACT_FOR(tract, addr, arena, base, limit) {
Seg trseg = NULL; /* suppress compiler warning */
AVERT_CRITICAL(Tract, tract);
AVER_CRITICAL(TRACT_SEG(&trseg, tract));
AVER_CRITICAL(trseg == seg);
TractSetWhite(tract, BS_BITFIELD(Trace, white));
}
AVER(addr == limit);
seg->white = BS_BITFIELD(Trace, white);
}

View file

@ -1336,8 +1336,13 @@ mps_res_t _mps_fix2(mps_ss_t mps_ss, mps_addr_t *mps_ref_io)
}
tract = PageTract(&chunk->pageTable[i]);
if (TraceSetInter(TractWhite(tract), ss->traces) == TraceSetEMPTY) {
/* Reference points to a tract that is not white for any of the
if (!TRACT_SEG(&seg, tract)) {
/* Reference points to a tract but not a segment, so it can't be white. */
goto done;
}
if (TraceSetInter(SegWhite(seg), ss->traces) == TraceSetEMPTY) {
/* Reference points to a segment that is not white for any of the
* active traces. See <design/trace/#fix.tractofaddr> */
STATISTIC_STAT
({

View file

@ -47,10 +47,7 @@ Bool TractCheck(Tract tract)
CHECKL(AddrIsArenaGrain(TractBase(tract), TractArena(tract)));
}
if (TractHasSeg(tract)) {
CHECKL(TraceSetCheck(TractWhite(tract)));
CHECKU(Seg, (Seg)TractP(tract));
} else {
CHECKL(TractWhite(tract) == TraceSetEMPTY);
}
return TRUE;
}
@ -66,7 +63,6 @@ void TractInit(Tract tract, Pool pool, Addr base)
tract->pool.pool = pool;
tract->base = base;
tract->p = NULL;
tract->white = TraceSetEMPTY;
tract->hasSeg = FALSE;
AVERT(Tract, tract);

View file

@ -44,7 +44,6 @@ typedef struct TractStruct { /* Tract structure */
PagePoolUnion pool; /* MUST BE FIRST (<design/arena/#tract.field> pool) */
void *p; /* pointer for use of owning pool */
Addr base; /* Base address of the tract */
TraceSet white : TraceLIMIT; /* traces for which tract is white */
BOOLFIELD(hasSeg); /* does tract have a seg in p? */
} TractStruct;
@ -60,8 +59,6 @@ extern Addr TractLimit(Tract tract, Arena arena);
#define TractSetP(tract, pp) ((void)((tract)->p = (pp)))
#define TractHasSeg(tract) ((Bool)(tract)->hasSeg)
#define TractSetHasSeg(tract, b) ((void)((tract)->hasSeg = (b)))
#define TractWhite(tract) ((tract)->white)
#define TractSetWhite(tract, w) ((void)((tract)->white = (w)))
extern Bool TractCheck(Tract tract);
extern void TractInit(Tract tract, Pool pool, Addr base);