Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 15909984b9f247921f4f06399b78e3f8c573cc1c..af826f0cb71453b2dd7a37d23c1bd6bbb29146e0 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -10549,6 +10549,7 @@ void Code::CopyFrom(const CodeDesc& desc) { |
| // unbox handles and relocate |
| intptr_t delta = instruction_start() - desc.buffer; |
| int mode_mask = RelocInfo::kCodeTargetMask | |
| + RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | |
|
Michael Starzinger
2015/02/04 11:30:51
This mode doesn't seem to be handled below explici
loislo
2015/02/04 14:38:50
done
|
| RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
| RelocInfo::ModeMask(RelocInfo::CELL) | |
| RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | |
| @@ -11002,14 +11003,18 @@ Code* Code::GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity parity) { |
| void Code::PrintDeoptLocation(FILE* out, int bailout_id) { |
| - const char* last_comment = NULL; |
| - int mask = RelocInfo::ModeMask(RelocInfo::COMMENT) |
| - | RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); |
| + int last_position = 0; |
| + Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason; |
| + int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) | |
| + RelocInfo::ModeMask(RelocInfo::POSITION) | |
| + RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); |
| for (RelocIterator it(this, mask); !it.done(); it.next()) { |
| RelocInfo* info = it.rinfo(); |
| - if (info->rmode() == RelocInfo::COMMENT) { |
| - last_comment = reinterpret_cast<const char*>(info->data()); |
| - } else if (last_comment != NULL) { |
| + if (info->rmode() == RelocInfo::POSITION) { |
| + last_position = static_cast<int>(info->data()); |
| + } else if (info->rmode() == RelocInfo::DEOPT_REASON) { |
| + last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); |
| + } else if (last_reason != Deoptimizer::kNoReason) { |
| if ((bailout_id == Deoptimizer::GetDeoptimizationId( |
| GetIsolate(), info->target_address(), Deoptimizer::EAGER)) || |
| (bailout_id == Deoptimizer::GetDeoptimizationId( |
| @@ -11017,7 +11022,8 @@ void Code::PrintDeoptLocation(FILE* out, int bailout_id) { |
| (bailout_id == Deoptimizer::GetDeoptimizationId( |
| GetIsolate(), info->target_address(), Deoptimizer::LAZY))) { |
| CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); |
| - PrintF(out, " %s\n", last_comment); |
| + PrintF(out, " ;;; deoptimize at %d: %s\n", last_position, |
| + Deoptimizer::GetDeoptReason(last_reason)); |
| return; |
| } |
| } |