Commit 81fa51c0 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Make OutOfMemoryIneffectiveGC test more robust.

The checked condition now more precisely corresponds to the actual
ineffective GC detection heuristic.

Change-Id: I727932c76ff3183e7b038437eefba564c9778ff7
Reviewed-on: https://chromium-review.googlesource.com/997634Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52509}
parent 75e04cd2
......@@ -5923,11 +5923,18 @@ UNINITIALIZED_TEST(OutOfMemoryIneffectiveGC) {
}
{
int initial_ms_count = heap->ms_count();
int ineffective_ms_start = initial_ms_count;
while (heap->ms_count() < initial_ms_count + 10) {
HandleScope inner_scope(i_isolate);
factory->NewFixedArray(30000, TENURED);
if (heap->tracer()->CurrentMarkCompactMutatorUtilization() >= 0.3) {
ineffective_ms_start = heap->ms_count() + 1;
}
}
CHECK_GE(heap->tracer()->AverageMarkCompactMutatorUtilization(), 0.09);
int consecutive_ineffective_ms = heap->ms_count() - ineffective_ms_start;
CHECK_IMPLIES(
consecutive_ineffective_ms >= 4,
heap->tracer()->AverageMarkCompactMutatorUtilization() >= 0.3);
}
}
isolate->Dispose();
......
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