Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2337123003: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/full-codegen/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
index c2ec9b6b27482a35ed5b63614ef695d2860aa479..3005c27012aa60b8927ea5f28d34b6196f2c12c9 100644
--- a/src/full-codegen/arm64/full-codegen-arm64.cc
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc
@@ -132,6 +132,17 @@ void FullCodeGenerator::Generate() {
info->set_prologue_offset(masm_->pc_offset());
__ Prologue(info->GeneratePreagedPrologue());
+ // 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));
+
// Reserve space on the stack for locals.
{ Comment cmnt(masm_, "[ Allocate locals");
int locals_count = info->scope()->num_stack_slots();

Powered by Google App Engine
This is Rietveld 408576698