Cleaned up deopt output a bit.

Be a bit more consistent it what is printed. Removed the now superfluous
"*** DEOPT"-like output.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/14612012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 03671ae9
......@@ -276,7 +276,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
if (FLAG_trace_osr) {
PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => node=%u, frame=%d->%d]\n",
ast_id,
input_frame_size,
......@@ -370,7 +370,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
ok ? "finished" : "aborted",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => pc=0x%0x]\n", output_[0]->GetPc());
}
}
......
......@@ -505,14 +505,11 @@ bool Deoptimizer::TraceEnabledFor(BailoutType deopt_type,
const char* Deoptimizer::MessageFor(BailoutType type) {
switch (type) {
case EAGER:
case SOFT:
case LAZY:
return "DEOPT";
case DEBUGGER:
return "DEOPT FOR DEBUGGER";
case OSR:
return "OSR";
case EAGER: return "eager";
case SOFT: return "soft";
case LAZY: return "lazy";
case DEBUGGER: return "debugger";
case OSR: return "OSR";
}
UNREACHABLE();
return NULL;
......@@ -561,7 +558,6 @@ Deoptimizer::Deoptimizer(Isolate* isolate,
? StackFrame::STUB
: StackFrame::JAVA_SCRIPT;
trace_ = TraceEnabledFor(type, frame_type);
if (trace_) Trace();
ASSERT(HEAP->allow_allocation(false));
unsigned size = ComputeInputFrameSize();
input_ = new(size) FrameDescription(size, function);
......@@ -601,19 +597,6 @@ Code* Deoptimizer::FindOptimizedCode(JSFunction* function,
}
void Deoptimizer::Trace() {
PrintF("**** %s: ", Deoptimizer::MessageFor(bailout_type_));
PrintFunctionName();
PrintF(" at id #%u, address 0x%" V8PRIxPTR ", frame size %d\n",
bailout_id_,
reinterpret_cast<intptr_t>(from_),
fp_to_sp_delta_ - (2 * kPointerSize));
if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
compiled_code_->PrintDeoptLocation(bailout_id_);
}
}
void Deoptimizer::PrintFunctionName() {
if (function_->IsJSFunction()) {
function_->PrintName();
......@@ -723,11 +706,14 @@ void Deoptimizer::DoComputeOutputFrames() {
// Print some helpful diagnostic information.
int64_t start = OS::Ticks();
if (trace_) {
PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ",
(bailout_type_ == LAZY ? " (lazy)" : ""),
PrintF("[deoptimizing (DEOPT %s): begin 0x%08" V8PRIxPTR " ",
MessageFor(bailout_type_),
reinterpret_cast<intptr_t>(function_));
PrintFunctionName();
PrintF(" @%d]\n", bailout_id_);
PrintF(" @%d, FP to SP delta: %d]\n", bailout_id_, fp_to_sp_delta_);
if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
compiled_code_->PrintDeoptLocation(bailout_id_);
}
}
// Determine basic deoptimization information. The optimized frame is
......@@ -804,11 +790,13 @@ void Deoptimizer::DoComputeOutputFrames() {
double ms = static_cast<double>(OS::Ticks() - start) / 1000;
int index = output_count_ - 1; // Index of the topmost frame.
JSFunction* function = output_[index]->GetFunction();
PrintF("[deoptimizing: end 0x%08" V8PRIxPTR " ",
PrintF("[deoptimizing (%s): end 0x%08" V8PRIxPTR " ",
MessageFor(bailout_type_),
reinterpret_cast<intptr_t>(function));
if (function != NULL) function->PrintName();
PrintF(" => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s,"
PrintFunctionName();
PrintF(" @%d => node=%d, pc=0x%08" V8PRIxPTR ", state=%s, alignment=%s,"
" took %0.3f ms]\n",
bailout_id_,
node_id.ToInt(),
output_[index]->GetPc(),
FullCodeGenerator::State2String(
......
......@@ -335,7 +335,6 @@ class Deoptimizer : public Malloced {
int fp_to_sp_delta,
Code* optimized_code);
Code* FindOptimizedCode(JSFunction* function, Code* optimized_code);
void Trace();
void PrintFunctionName();
void DeleteFrameDescriptions();
......
......@@ -362,7 +362,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
if (FLAG_trace_osr) {
PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => node=%u, frame=%d->%d, ebp:esp=0x%08x:0x%08x]\n",
ast_id,
input_frame_size,
......@@ -476,7 +476,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
ok ? "finished" : "aborted",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => pc=0x%0x]\n", output_[0]->GetPc());
}
}
......
......@@ -266,7 +266,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
if (FLAG_trace_osr) {
PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => node=%u, frame=%d->%d]\n",
ast_id,
input_frame_size,
......@@ -360,7 +360,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
ok ? "finished" : "aborted",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => pc=0x%0x]\n", output_[0]->GetPc());
}
}
......
......@@ -267,7 +267,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
if (FLAG_trace_osr) {
PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => node=%u, frame=%d->%d]\n",
ast_id,
input_frame_size,
......@@ -362,7 +362,7 @@ void Deoptimizer::DoComputeOsrOutputFrame() {
PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
ok ? "finished" : "aborted",
reinterpret_cast<intptr_t>(function_));
function_->PrintName();
PrintFunctionName();
PrintF(" => pc=0x%0" V8PRIxPTR "]\n", output_[0]->GetPc());
}
}
......
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