Commit 36cb5f4b authored by Mythri A's avatar Mythri A Committed by Commit Bot

[turbofan] Allow handle deferences when compiling non concurrently

When FLAG_noconcurrent_recompilation is turned on we always run on main
thread. So it is safe to derefernce handles when printing the turbofan
graph. We should only add a DCHECK when dereferencing read-only heap
objects when optimizing concurrently.

Bug: chromium:1040444,chromium:1040403
Change-Id: I6bde966690458b1d122611b02e713c581c87f534
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1992433Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65659}
parent 600db596
......@@ -5057,6 +5057,10 @@ std::ostream& operator<<(std::ostream& os, const ObjectRef& ref) {
if (ref.data_->kind() == ObjectDataKind::kUnserializedHeapObject ||
!FLAG_concurrent_recompilation) {
// We cannot be in a background thread so it's safe to read the heap.
AllowHandleDereference allow_handle_dereference;
return os << ref.data() << " {" << ref.object() << "}";
} else if (ref.data_->kind() ==
ObjectDataKind::kUnserializedReadOnlyHeapObject) {
AllowHandleDereferenceIf allow_handle_dereference(ref.data()->kind(),
ref.broker()->mode());
return os << ref.data() << " {" << ref.object() << "}";
......
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --allow-natives-syntax --trace-turbo-graph --noconcurrent-recompilation
function bytes() {
}
function __f_4622() {
var __v_22507 = {
};
}
%PrepareFunctionForOptimization(__f_4622);
%OptimizeFunctionOnNextCall(__f_4622);
42 | __f_4622();
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