From 851e35bcff4db18993ddd9e8a7ed5eba3d627861 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Thu, 3 Sep 2015 15:39:39 +0100 Subject: [PATCH] Move the arenaemergency test up to policypollagain. Copied from Perforce Change: 188217 ServerID: perforce.ravenbrook.com --- mps/code/policy.c | 2 +- mps/code/trace.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mps/code/policy.c b/mps/code/policy.c index 3cba467a2c7..e3c09c8d6d7 100644 --- a/mps/code/policy.c +++ b/mps/code/policy.c @@ -333,7 +333,7 @@ Bool PolicyPollAgain(Arena arena, Clock start, Work tracedWork) AVER(nextPollThreshold > globals->pollThreshold); globals->pollThreshold = nextPollThreshold; - return PolicyPoll(arena); + return ArenaEmergency(arena) || PolicyPoll(arena); } diff --git a/mps/code/trace.c b/mps/code/trace.c index 5786c677a51..378b6bed9a1 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c @@ -1871,8 +1871,7 @@ Work TracePoll(Globals globals) endWork = oldWork + trace->quantumWork; do { TraceAdvance(trace); - } while (trace->state != TraceFINISHED - && (ArenaEmergency(arena) || traceWork(trace) < endWork)); + } while (trace->state != TraceFINISHED && traceWork(trace) < endWork); newWork = traceWork(trace); AVER(newWork >= oldWork); work = newWork - oldWork;