Commit 77cd5d73 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: Minor marking tweaks

1) Traces show that it can take a relatively long time before Oilpan
   starts flushing v8 references (e.g. ~10 steps spent just on the
   bailout worklist). This CL moves v8 references flushing before
   processing of the bailout worklist.
2) Traces also show that a shorter duration for the first marking step
   can suffice.

Bug: 986235
Change-Id: If7bad026e91f1fdf1899035bda049834e7bffab5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339356
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: default avatarAnton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795059}
parent fcd510ba
...@@ -388,6 +388,15 @@ bool ThreadHeap::AdvanceMarking(MarkingVisitor* visitor, ...@@ -388,6 +388,15 @@ bool ThreadHeap::AdvanceMarking(MarkingVisitor* visitor,
// Start with mutator-thread-only worklists (not fully constructed). // Start with mutator-thread-only worklists (not fully constructed).
// If time runs out, concurrent markers can take care of the rest. // If time runs out, concurrent markers can take care of the rest.
{
ThreadHeapStatsCollector::EnabledScope inner_scope(
stats_collector(),
ThreadHeapStatsCollector::kMarkFlushV8References);
finished = FlushV8References(deadline);
if (!finished)
break;
}
{ {
ThreadHeapStatsCollector::EnabledScope inner_scope( ThreadHeapStatsCollector::EnabledScope inner_scope(
stats_collector(), ThreadHeapStatsCollector::kMarkBailOutObjects); stats_collector(), ThreadHeapStatsCollector::kMarkBailOutObjects);
...@@ -407,15 +416,6 @@ bool ThreadHeap::AdvanceMarking(MarkingVisitor* visitor, ...@@ -407,15 +416,6 @@ bool ThreadHeap::AdvanceMarking(MarkingVisitor* visitor,
break; break;
} }
{
ThreadHeapStatsCollector::EnabledScope inner_scope(
stats_collector(),
ThreadHeapStatsCollector::kMarkFlushV8References);
finished = FlushV8References(deadline);
if (!finished)
break;
}
{ {
ThreadHeapStatsCollector::EnabledScope inner_scope( ThreadHeapStatsCollector::EnabledScope inner_scope(
stats_collector(), stats_collector(),
......
...@@ -19,7 +19,7 @@ class PLATFORM_EXPORT MarkingSchedulingOracle { ...@@ -19,7 +19,7 @@ class PLATFORM_EXPORT MarkingSchedulingOracle {
// Duration of one incremental marking step. Should be short enough that it // Duration of one incremental marking step. Should be short enough that it
// doesn't cause jank even though it is scheduled as a normal task. // doesn't cause jank even though it is scheduled as a normal task.
static constexpr base::TimeDelta kDefaultIncrementalMarkingStepDuration = static constexpr base::TimeDelta kDefaultIncrementalMarkingStepDuration =
base::TimeDelta::FromMillisecondsD(0.5); base::TimeDelta::FromMillisecondsD(0.1);
// Minimum number of bytes that should be marked during an incremental // Minimum number of bytes that should be marked during an incremental
// marking step. // marking step.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment