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

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

Issue 2338413002: PPC/s390: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: fixed presubmit warnings 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
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/s390/full-codegen-s390.cc
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc
index ab10e01791ef0dc5eb704663d0180159b4743fe9..3b64f711e609f41225c99d9667cc3a6e2e8f4a46 100644
--- a/src/full-codegen/s390/full-codegen-s390.cc
+++ b/src/full-codegen/s390/full-codegen-s390.cc
@@ -133,6 +133,21 @@ void FullCodeGenerator::Generate() {
info->set_prologue_offset(prologue_offset);
__ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset);
+ // Increment invocation count for the function.
+ {
+ Comment cmnt(masm_, "[ Increment invocation count");
+ __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
+ __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset));
+ __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex *
+ kPointerSize +
+ TypeFeedbackVector::kHeaderSize));
+ __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0);
+ __ StoreP(r1,
+ FieldMemOperand(
+ r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
+ TypeFeedbackVector::kHeaderSize));
+ }
+
{
Comment cmnt(masm_, "[ Allocate locals");
int locals_count = info->scope()->num_stack_slots();
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698