Index: src/builtins/arm64/builtins-arm64.cc |
diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc |
index c82b6f344cbb248b163248e1375acc99ef3b7524..130b0966255371fec2953a10a30a73663e282383 100644 |
--- a/src/builtins/arm64/builtins-arm64.cc |
+++ b/src/builtins/arm64/builtins-arm64.cc |
@@ -1065,6 +1065,17 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Cmp(x0, Operand(masm->CodeObject())); // Self-reference to this code. |
__ B(ne, &switch_to_different_code_kind); |
+ // Increment invocation count for the function. |
+ __ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset)); |
+ __ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset)); |
+ __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * |
+ kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ __ Add(x10, x10, Operand(Smi::FromInt(1))); |
+ __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * |
+ kPointerSize + |
+ TypeFeedbackVector::kHeaderSize)); |
+ |
// Check function data field is actually a BytecodeArray object. |
if (FLAG_debug_code) { |
__ AssertNotSmi(kInterpreterBytecodeArrayRegister, |