[K/N] Fix SafePointSlowPath in STMS
^KT-48537 Merge-request: KT-MR-5257
This commit is contained in:
committed by
Space
parent
e36cc87b19
commit
7eb0798d64
@@ -103,12 +103,17 @@ ALWAYS_INLINE void gc::SameThreadMarkAndSweep::ThreadData::SafePointRegular(size
|
|||||||
}
|
}
|
||||||
|
|
||||||
NO_INLINE void gc::SameThreadMarkAndSweep::ThreadData::SafePointSlowPath(SafepointFlag flag) noexcept {
|
NO_INLINE void gc::SameThreadMarkAndSweep::ThreadData::SafePointSlowPath(SafepointFlag flag) noexcept {
|
||||||
RuntimeAssert(flag != SafepointFlag::kNone, "Must've been handled by the caller");
|
switch (flag) {
|
||||||
// No need to check for kNeedsSuspend, because `suspendIfRequested` checks for its own atomic.
|
case SafepointFlag::kNone:
|
||||||
threadData_.suspensionData().suspendIfRequested();
|
RuntimeAssert(false, "Must've been handled by the caller");
|
||||||
if (flag == SafepointFlag::kNeedsGC) {
|
return;
|
||||||
RuntimeLogDebug({kTagGC}, "Attempt to GC at SafePoint");
|
case SafepointFlag::kNeedsSuspend:
|
||||||
ScheduleAndWaitFullGC();
|
threadData_.suspensionData().suspendIfRequested();
|
||||||
|
return;
|
||||||
|
case SafepointFlag::kNeedsGC:
|
||||||
|
RuntimeLogDebug({kTagGC}, "Attempt to GC at SafePoint");
|
||||||
|
ScheduleAndWaitFullGC();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user