Reviewers: jarin,

Message:
PTAL.

Description:
Fix deopt reason printing to print stub failure reason with
--trace-stub-failures --code-comments

Please review this at https://codereview.chromium.org/369843002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -2 lines):
  M src/deoptimizer.cc
  M src/objects.cc


Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 4c98b8473569ec20c6f255de1d587f0afaeee12a..85aa0029b61b3b043466896ffb73caa1435f4cf5 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -758,7 +758,9 @@ void Deoptimizer::DoComputeOutputFrames() {
            input_data->OptimizationId()->value(),
            bailout_id_,
            fp_to_sp_delta_);
-    if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
+    if (bailout_type_ == EAGER || bailout_type_ == SOFT ||
+        (compiled_code_->is_crankshafted() &&
+         compiled_code_->kind() != Code::OPTIMIZED_FUNCTION)) {
compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
     }
   }
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 7db464e8c901207c569be2ef6daf8929f924371b..8bf3651f811b8316de862cb00c8a8c9a02280b4e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11173,7 +11173,9 @@ void Code::PrintDeoptLocation(FILE* out, int bailout_id) {
       if ((bailout_id == Deoptimizer::GetDeoptimizationId(
               GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
           (bailout_id == Deoptimizer::GetDeoptimizationId(
-              GetIsolate(), info->target_address(), Deoptimizer::SOFT))) {
+              GetIsolate(), info->target_address(), Deoptimizer::SOFT)) ||
+          (bailout_id == Deoptimizer::GetDeoptimizationId(
+              GetIsolate(), info->target_address(), Deoptimizer::LAZY))) {
         CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
         PrintF(out, "            %s\n", last_comment);
         return;


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to