Commit b509f21e authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Be consistent about printing ObjectRefs

We were sometimes printing the data pointer, and sometimes the handle
location. This CL always uses the existing operator<< overload to print
ObjectRefs, which currently means printing the data pointer.

Bug: v8:7790
Change-Id: Ic5e2dad075678d2250bc0bcb170046d055680572
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1625989Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61777}
parent e1933eb6
......@@ -1413,7 +1413,7 @@ SharedFunctionInfoData::SharedFunctionInfoData(
void SharedFunctionInfoData::SetSerializedForCompilation(
JSHeapBroker* broker, FeedbackVectorRef feedback) {
CHECK(serialized_for_compilation_.insert(feedback.object()).second);
TRACE(broker, "Set function " << object() << " with " << feedback.object()
TRACE(broker, "Set function " << this << " with " << feedback
<< " as serialized for compilation");
}
......@@ -2849,7 +2849,7 @@ base::Optional<ObjectRef> JSArrayRef::GetOwnCowElement(uint32_t index,
if (serialize) {
data()->AsJSObject()->SerializeElements(broker());
} else if (!data()->AsJSObject()->serialized_elements()) {
TRACE(broker(), "'elements' on data " << this);
TRACE(broker(), "'elements' on " << this);
return base::nullopt;
}
if (!elements().map().IsFixedCowArrayMap()) return base::nullopt;
......
......@@ -118,13 +118,13 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
// continue the inlining checks. Log a warning and continue.
if (candidate.functions[i].has_value()) {
TRACE_BROKER(broker(),
"Missing bytecode array trying to inline function "
<< candidate.functions[i].value().object().address());
"Missing bytecode array trying to inline JSFunction "
<< *candidate.functions[i]);
} else {
TRACE_BROKER(
broker(),
"Missing bytecode array trying to inline function with SFI "
<< candidate.shared_info.value().object().address());
"Missing bytecode array trying to inline SharedFunctionInfo "
<< *candidate.shared_info);
}
// Those functions that don't have their bytecode serialized probably
// don't have the SFI either, so we exit the loop early.
......
......@@ -368,13 +368,12 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
base::Optional<SharedFunctionInfoRef> shared_info(DetermineCallTarget(node));
if (!shared_info.has_value()) return NoChange();
DCHECK(shared_info.value().IsInlineable());
DCHECK(shared_info->IsInlineable());
// Constructor must be constructable.
if (node->opcode() == IrOpcode::kJSConstruct &&
!IsConstructable(shared_info->kind())) {
TRACE("Not inlining " << shared_info->object().address() << " into "
<< info_->shared_info().address()
TRACE("Not inlining " << *shared_info << " into " << info_->shared_info()
<< " because constructor is not constructable.");
return NoChange();
}
......@@ -383,8 +382,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
// See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList ).
if (node->opcode() == IrOpcode::kJSCall &&
IsClassConstructor(shared_info->kind())) {
TRACE("Not inlining " << shared_info->object().address() << " into "
<< info_->shared_info().address()
TRACE("Not inlining " << *shared_info << " into " << info_->shared_info()
<< " because callee is a class constructor.");
return NoChange();
}
......@@ -398,8 +396,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
nesting_level++;
if (nesting_level > kMaxDepthForInlining) {
TRACE("Not inlining "
<< shared_info->object().address() << " into "
<< info_->shared_info().address()
<< *shared_info << " into " << info_->shared_info()
<< " because call has exceeded the maximum depth for function "
"inlining.");
return NoChange();
......@@ -415,8 +412,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
TRACE("Try block surrounds #"
<< exception_target->id() << ":" << exception_target->op()->mnemonic()
<< " and --no-inline-into-try active, so not inlining "
<< shared_info->object().address() << " into "
<< info_->shared_info().address());
<< *shared_info << " into " << info_->shared_info());
return NoChange();
}
......@@ -432,8 +428,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
shared_info->object());
}
TRACE("Inlining " << shared_info->object().address() << " into "
<< info_->shared_info().address()
TRACE("Inlining " << *shared_info << " into " << info_->shared_info()
<< ((exception_target != nullptr) ? " (inside try-block)"
: ""));
// Determine the targets feedback vector and its context.
......@@ -443,8 +438,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
if (FLAG_concurrent_inlining) {
if (!shared_info.value().IsSerializedForCompilation(feedback_vector)) {
TRACE("Missed opportunity to inline a function ("
<< shared_info->object().address() << " with "
<< feedback_vector.object().address() << ")");
<< *shared_info << " with " << feedback_vector << ")");
return NoChange();
}
}
......
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