Index: src/compiler/ia32/code-generator-ia32.cc |
diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc |
index 01a26c21ee9d6b55a56478172cc7e2105dd6c4a5..b49f614f33a92716a29d2684c9e7e3a5bc9434a1 100644 |
--- a/src/compiler/ia32/code-generator-ia32.cc |
+++ b/src/compiler/ia32/code-generator-ia32.cc |
@@ -2214,7 +2214,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; |
} |