Commit 4fdafecf authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[deoptimizer] Make deopt stress more effective

This CL adds a forced GC point in Deoptimizer::MaterializeHeapObjects,
which will catch problems with deoptimized frames early and improve
reproducibility.

Bug: v8:7584
Change-Id: Idfad584e821b777542cf8fce673a9080c64d5d7b
Reviewed-on: https://chromium-review.googlesource.com/1002655Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52478}
parent fa7171c5
......@@ -1811,6 +1811,12 @@ void Deoptimizer::DoComputeBuiltinContinuation(
void Deoptimizer::MaterializeHeapObjects() {
translated_state_.Prepare(reinterpret_cast<Address>(stack_fp_));
if (FLAG_deopt_every_n_times > 0) {
// Doing a GC here will find problems with the deoptimized frames.
isolate_->heap()->CollectAllGarbage(
i::Heap::kFinalizeIncrementalMarkingMask,
i::GarbageCollectionReason::kTesting);
}
for (auto& materialization : values_to_materialize_) {
Handle<Object> value = materialization.value_->GetValue();
......
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