summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lokesh Gidra <lokeshgidra@google.com> 2024-12-14 00:26:31 +0000
committer Lokesh Gidra <lokeshgidra@google.com> 2025-01-29 12:52:30 -0800
commit6b39013f1801140ff06e6323b5a7173a166d8df2 (patch)
tree8fc6541e5b35e3837e317a4cc8c38b17508a703d
parent22a222b0edc906d548192a72dcea7bf23818191f (diff)
Process mark-stack more frequently to avoid expanding it
It also helps in better pin-pointing the source of invalid references during marking when symbolizing stack-traces. Bug: 382077046 Test: art/test/testrunner/testrunner.py --host Change-Id: I4f78687bbd5a6c7fe288492574a935cab9c271df
-rw-r--r--runtime/gc/collector/mark_compact.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index ccc38bc64f..821281134e 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -1297,7 +1297,7 @@ void MarkCompact::ReMarkRoots(Runtime* runtime) {
| kVisitRootFlagStopLoggingNewRoots
| kVisitRootFlagClearRootLog),
runtime);
-
+ ProcessMarkStack();
if (kVerifyRootsMarked) {
TimingLogger::ScopedTiming t2("(Paused)VerifyRoots", GetTimings());
VerifyRootMarkedVisitor visitor(this);
@@ -4366,6 +4366,7 @@ void MarkCompact::MarkRoots(VisitRootFlags flags) {
MarkRootsCheckpoint(thread_running_gc_, runtime);
MarkNonThreadRoots(runtime);
MarkConcurrentRoots(flags, runtime);
+ ProcessMarkStack();
}
void MarkCompact::PreCleanCards() {