Fix deopt reason printing to print stub failure reason with --trace-stub-failures --code-comments
R=jarin@chromium.org Review URL: https://codereview.chromium.org/369843002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6574f33d2a
commit
dfa8df2fdd
@ -758,7 +758,8 @@ void Deoptimizer::DoComputeOutputFrames() {
|
|||||||
input_data->OptimizationId()->value(),
|
input_data->OptimizationId()->value(),
|
||||||
bailout_id_,
|
bailout_id_,
|
||||||
fp_to_sp_delta_);
|
fp_to_sp_delta_);
|
||||||
if (bailout_type_ == EAGER || bailout_type_ == SOFT) {
|
if (bailout_type_ == EAGER || bailout_type_ == SOFT ||
|
||||||
|
(compiled_code_->is_hydrogen_stub())) {
|
||||||
compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
|
compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1548,8 +1549,7 @@ void Deoptimizer::DoComputeCompiledStubFrame(TranslationIterator* iterator,
|
|||||||
// reg = JSFunction context
|
// reg = JSFunction context
|
||||||
//
|
//
|
||||||
|
|
||||||
CHECK(compiled_code_->is_crankshafted() &&
|
CHECK(compiled_code_->is_hydrogen_stub());
|
||||||
compiled_code_->kind() != Code::OPTIMIZED_FUNCTION);
|
|
||||||
int major_key = compiled_code_->major_key();
|
int major_key = compiled_code_->major_key();
|
||||||
CodeStubInterfaceDescriptor* descriptor =
|
CodeStubInterfaceDescriptor* descriptor =
|
||||||
isolate_->code_stub_interface_descriptor(major_key);
|
isolate_->code_stub_interface_descriptor(major_key);
|
||||||
|
@ -4571,6 +4571,11 @@ inline bool Code::is_crankshafted() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Code::is_hydrogen_stub() {
|
||||||
|
return is_crankshafted() && kind() != OPTIMIZED_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Code::set_is_crankshafted(bool value) {
|
inline void Code::set_is_crankshafted(bool value) {
|
||||||
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
|
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
|
||||||
int updated = IsCrankshaftedField::update(previous, value);
|
int updated = IsCrankshaftedField::update(previous, value);
|
||||||
|
@ -11163,7 +11163,9 @@ void Code::PrintDeoptLocation(FILE* out, int bailout_id) {
|
|||||||
if ((bailout_id == Deoptimizer::GetDeoptimizationId(
|
if ((bailout_id == Deoptimizer::GetDeoptimizationId(
|
||||||
GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
|
GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
|
||||||
(bailout_id == Deoptimizer::GetDeoptimizationId(
|
(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()));
|
CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
|
||||||
PrintF(out, " %s\n", last_comment);
|
PrintF(out, " %s\n", last_comment);
|
||||||
return;
|
return;
|
||||||
|
@ -5557,6 +5557,7 @@ class Code: public HeapObject {
|
|||||||
// For kind STUB or ICs, tells whether or not a code object was generated by
|
// For kind STUB or ICs, tells whether or not a code object was generated by
|
||||||
// the optimizing compiler (but it may not be an optimized function).
|
// the optimizing compiler (but it may not be an optimized function).
|
||||||
bool is_crankshafted();
|
bool is_crankshafted();
|
||||||
|
bool is_hydrogen_stub(); // Crankshafted, but not a function.
|
||||||
inline void set_is_crankshafted(bool value);
|
inline void set_is_crankshafted(bool value);
|
||||||
|
|
||||||
// [optimizable]: For FUNCTION kind, tells if it is optimizable.
|
// [optimizable]: For FUNCTION kind, tells if it is optimizable.
|
||||||
|
Loading…
Reference in New Issue
Block a user