Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index fc21ad3e279d6f2dbdd23cfe5d5bbedcd00045c5..afcdbd540f8185e4e61a7b16e20c6acb17fef48e 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -2003,7 +2003,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( |
Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( |
isolate(), deoptimization_id, bailout_type); |
if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; |
- __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
+ if (isolate()->NeedsSourcePositionsForProfiling()) { |
+ __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); |
+ } |
__ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
return kSuccess; |
} |