Commit 780c8699 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Include dead serializer environments in trace

It's very helpful to know when they die.

Bug: v8:7790
Change-Id: I08a369da7eb19d46ecdc02b404b0085d6410ab4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1643168Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61978}
parent 021ce3b5
......@@ -234,36 +234,42 @@ std::ostream& operator<<(
const SerializerForBackgroundCompilation::Environment& env) {
std::ostringstream output_stream;
for (size_t i = 0; i << env.parameter_count(); ++i) {
Hints const& hints = env.environment_hints_[i];
if (!hints.IsEmpty()) {
output_stream << "Hints for a" << i << ":\n" << hints;
if (env.IsDead()) {
output_stream << "dead\n";
} else {
output_stream << "alive\n";
for (size_t i = 0; i << env.parameter_count(); ++i) {
Hints const& hints = env.environment_hints_[i];
if (!hints.IsEmpty()) {
output_stream << "Hints for a" << i << ":\n" << hints;
}
}
}
for (size_t i = 0; i << env.register_count(); ++i) {
Hints const& hints = env.environment_hints_[env.parameter_count() + i];
if (!hints.IsEmpty()) {
output_stream << "Hints for r" << i << ":\n" << hints;
for (size_t i = 0; i << env.register_count(); ++i) {
Hints const& hints = env.environment_hints_[env.parameter_count() + i];
if (!hints.IsEmpty()) {
output_stream << "Hints for r" << i << ":\n" << hints;
}
}
}
{
Hints const& hints = env.environment_hints_[env.accumulator_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <accumulator>:\n" << hints;
{
Hints const& hints = env.environment_hints_[env.accumulator_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <accumulator>:\n" << hints;
}
}
}
{
Hints const& hints = env.environment_hints_[env.function_closure_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <closure>:\n" << hints;
{
Hints const& hints = env.environment_hints_[env.function_closure_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <closure>:\n" << hints;
}
}
}
{
Hints const& hints = env.environment_hints_[env.current_context_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <context>:\n" << hints;
{
Hints const& hints = env.environment_hints_[env.current_context_index()];
if (!hints.IsEmpty()) {
output_stream << "Hints for <context>:\n" << hints;
}
}
}
{
Hints const& hints = env.return_value_hints_;
if (!hints.IsEmpty()) {
......@@ -414,6 +420,11 @@ void SerializerForBackgroundCompilation::TraverseBytecode() {
for (; !iterator.done(); iterator.Advance()) {
IncorporateJumpTargetEnvironment(iterator.current_offset());
TRACE_BROKER(broker(),
"Handling bytecode: " << iterator.current_offset() << " "
<< iterator.current_bytecode());
TRACE_BROKER(broker(), "Current environment: " << *environment());
if (environment()->IsDead()) {
if (iterator.current_bytecode() ==
interpreter::Bytecode::kResumeGenerator ||
......@@ -424,11 +435,6 @@ void SerializerForBackgroundCompilation::TraverseBytecode() {
}
}
TRACE_BROKER(broker(),
"Handling bytecode: " << iterator.current_offset() << " "
<< iterator.current_bytecode());
TRACE_BROKER(broker(), "Current environment:\n" << *environment());
switch (iterator.current_bytecode()) {
#define DEFINE_BYTECODE_CASE(name) \
case interpreter::Bytecode::k##name: \
......
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