Commit d48e4a50 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[oilpan] Introduce incremental marking stress flag

This frees up the regular HeapIncrementalMarking flag for implementing an
initial incremental marking strategy.

Bug: chromium:757440
Change-Id: Iee924ef718f450b4d1e865ef6880242f501376fb
Reviewed-on: https://chromium-review.googlesource.com/1028273Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKeishi Hattori <keishi@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553935}
parent 3e3ab788
......@@ -8322,7 +8322,7 @@
{
"args": [
"--debug",
"--additional-driver-flag=--enable-blink-features=HeapIncrementalMarking"
"--additional-driver-flag=--enable-blink-features=HeapIncrementalMarkingStress"
],
"isolate_name": "webkit_layout_tests_exparchive",
"merge": {
......
......@@ -3339,7 +3339,7 @@
'linux-blink-heap-incremental-marking': {
'args': [
'--debug',
'--additional-driver-flag=--enable-blink-features=HeapIncrementalMarking',
'--additional-driver-flag=--enable-blink-features=HeapIncrementalMarkingStress',
],
},
'WebKit Linux layout_ng Dummy Builder': {
......
......@@ -426,10 +426,10 @@ bool ThreadState::JudgeGCThreshold(size_t allocated_object_size_threshold,
bool ThreadState::ShouldScheduleIncrementalMarking() const {
#if BUILDFLAG(BLINK_HEAP_INCREMENTAL_MARKING)
// TODO(mlippautz): For now immediately schedule incremental marking if
// the runtime flag is provided, basically exercising a stress test.
// TODO(mlippautz): For now only schedule incremental marking if
// the runtime stress flag is provided.
return GcState() == kNoGCScheduled &&
RuntimeEnabledFeatures::HeapIncrementalMarkingEnabled();
RuntimeEnabledFeatures::HeapIncrementalMarkingStressEnabled();
#else
return false;
#endif // BUILDFLAG(BLINK_HEAP_INCREMENTAL_MARKING)
......@@ -1465,6 +1465,15 @@ bool ThreadState::MarkPhaseAdvanceMarking(double deadline_seconds) {
return complete;
}
bool ThreadState::ShouldVerifyMarking() const {
bool should_verify_marking =
RuntimeEnabledFeatures::HeapIncrementalMarkingStressEnabled();
#if BUILDFLAG(BLINK_HEAP_VERIFICATION)
should_verify_marking = true;
#endif // BLINK_HEAP_VERIFICATION
return should_verify_marking;
}
void ThreadState::MarkPhaseEpilogue(BlinkGC::MarkingType marking_type) {
Visitor* visitor = current_gc_data_.visitor.get();
// Finish marking of not-fully-constructed objects.
......@@ -1483,9 +1492,8 @@ void ThreadState::MarkPhaseEpilogue(BlinkGC::MarkingType marking_type) {
current_gc_data_.visitor.reset();
#if BUILDFLAG(BLINK_HEAP_VERIFICATION)
VerifyMarking(marking_type);
#endif // BLINK_HEAP_VERIFICATION
if (ShouldVerifyMarking())
VerifyMarking(marking_type);
Heap().HeapStats().SetEstimatedMarkingTimePerByte(
current_gc_data_.marked_object_size
......
......@@ -613,6 +613,8 @@ class PLATFORM_EXPORT ThreadState {
safe_point_scope_marker_ = nullptr;
}
bool ShouldVerifyMarking() const;
// shouldScheduleIdleGC and shouldForceConservativeGC
// implement the heuristics that are used to determine when to collect
// garbage.
......
......@@ -542,6 +542,9 @@
{
name: "HeapIncrementalMarking",
},
{
name: "HeapIncrementalMarkingStress"
},
// https://crbug.com/766694 for testing disabling the feature.
{
name: "HTMLImports",
......
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