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