From 136b4edbea6d41ef8a972a10e1648a032d458049 Mon Sep 17 00:00:00 2001 From: jgruber Date: Tue, 21 Nov 2017 15:26:41 +0100 Subject: [PATCH] [coverage] Trigger deterministic GC in coverage tests A few coverage tests depend on a GC run that deterministically frees all dead objects, but Runtime::kCollectGarbage did not explicitly disable incremental marking. Incremental marking makes liveness detection timing-dependent and thus should be disabled here. NOTRY=true NOPRESUBMIT=true TBR=mlippautz@chromium.org Bug: v8:7108 Change-Id: I8bebe612bbc2126b8ad778af15f08442ccc91a35 Reviewed-on: https://chromium-review.googlesource.com/781865 Commit-Queue: Jakob Gruber Reviewed-by: Jakob Gruber Cr-Commit-Position: refs/heads/master@{#49544} --- src/runtime/runtime-debug.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc index 2f09d847ee..551db2c2a1 100644 --- a/src/runtime/runtime-debug.cc +++ b/src/runtime/runtime-debug.cc @@ -1480,7 +1480,7 @@ RUNTIME_FUNCTION(Runtime_GetDebugContext) { RUNTIME_FUNCTION(Runtime_CollectGarbage) { SealHandleScope shs(isolate); DCHECK_EQ(1, args.length()); - isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, + isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask, GarbageCollectionReason::kRuntime); return isolate->heap()->undefined_value(); }