Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index 9808608ea4d6d943f4f4a2800be94e3172910ac4..f4dcfda7b8cd29722096ab78977e704d0bc9aacd 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -2348,7 +2348,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; |
} |