Index: src/compiler/arm64/code-generator-arm64.cc |
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
index 4b7c85de56b7af2cff2fe45f63f54dabdc2dc6f7..2f8a74c00c4ab8098e6203d68642f8f4e65fed92 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -1850,7 +1850,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; |
} |