Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 81691a347f9b2fb2c6e380385f676c2b230b99b0..a3d740bea65ba57d03f47e8f89fe0309f0335a37 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4951,8 +4951,9 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { |
if (masm->isolate()->function_entry_hook() != NULL) { |
- PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); |
ProfileEntryHookStub stub; |
+ int code_size = masm->CallStubSize(&stub) + 2 * Assembler::kInstrSize; |
+ PredictableCodeSizeScope predictable(masm, code_size); |
__ push(lr); |
__ CallStub(&stub); |
__ pop(lr); |