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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2337123003: [turbofan] Collect invocation counts and compute relative call frequencies. (Closed)
Patch Set: Address feedback. 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // to set up the frame because we do it manually below. 125 // to set up the frame because we do it manually below.
126 FrameScope frame_scope(masm_, StackFrame::MANUAL); 126 FrameScope frame_scope(masm_, StackFrame::MANUAL);
127 127
128 // This call emits the following sequence in a way that can be patched for 128 // This call emits the following sequence in a way that can be patched for
129 // code ageing support: 129 // code ageing support:
130 // Push(lr, fp, cp, x1); 130 // Push(lr, fp, cp, x1);
131 // Add(fp, jssp, 2 * kPointerSize); 131 // Add(fp, jssp, 2 * kPointerSize);
132 info->set_prologue_offset(masm_->pc_offset()); 132 info->set_prologue_offset(masm_->pc_offset());
133 __ Prologue(info->GeneratePreagedPrologue()); 133 __ Prologue(info->GeneratePreagedPrologue());
134 134
135 // Increment invocation count for the function.
136 {
137 Comment cmnt(masm_, "[ Increment invocation count");
138 __ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset));
139 __ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset));
140 __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
141 kPointerSize +
142 TypeFeedbackVector::kHeaderSize));
143 __ Add(x10, x10, Operand(Smi::FromInt(1)));
144 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
145 kPointerSize +
146 TypeFeedbackVector::kHeaderSize));
147 }
148
135 // Reserve space on the stack for locals. 149 // Reserve space on the stack for locals.
136 { Comment cmnt(masm_, "[ Allocate locals"); 150 { Comment cmnt(masm_, "[ Allocate locals");
137 int locals_count = info->scope()->num_stack_slots(); 151 int locals_count = info->scope()->num_stack_slots();
138 // Generators allocate locals, if any, in context slots. 152 // Generators allocate locals, if any, in context slots.
139 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 153 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
140 OperandStackDepthIncrement(locals_count); 154 OperandStackDepthIncrement(locals_count);
141 if (locals_count > 0) { 155 if (locals_count > 0) {
142 if (locals_count >= 128) { 156 if (locals_count >= 128) {
143 Label ok; 157 Label ok;
144 DCHECK(jssp.Is(__ StackPointer())); 158 DCHECK(jssp.Is(__ StackPointer()));
(...skipping 3640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3785 } 3799 }
3786 3800
3787 return INTERRUPT; 3801 return INTERRUPT;
3788 } 3802 }
3789 3803
3790 3804
3791 } // namespace internal 3805 } // namespace internal
3792 } // namespace v8 3806 } // namespace v8
3793 3807
3794 #endif // V8_TARGET_ARCH_ARM64 3808 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698