Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Unified Diff: src/deoptimizer.cc

Issue 14612012: Cleaned up deopt output a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added grep marker. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 1bf27f17b41bc972846eefce018180b2390e772e..50967ca7bb4da9d2f587c42a7242379e57756d28 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -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(
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698