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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_S390 5 #if V8_TARGET_ARCH_S390
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Open a frame scope to indicate that there is a frame on the stack. The 127 // Open a frame scope to indicate that there is a frame on the stack. The
128 // MANUAL indicates that the scope shouldn't actually generate code to set up 128 // MANUAL indicates that the scope shouldn't actually generate code to set up
129 // the frame (that is done below). 129 // the frame (that is done below).
130 FrameScope frame_scope(masm_, StackFrame::MANUAL); 130 FrameScope frame_scope(masm_, StackFrame::MANUAL);
131 int prologue_offset = masm_->pc_offset(); 131 int prologue_offset = masm_->pc_offset();
132 132
133 info->set_prologue_offset(prologue_offset); 133 info->set_prologue_offset(prologue_offset);
134 __ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset); 134 __ Prologue(info->GeneratePreagedPrologue(), ip, prologue_offset);
135 135
136 // Increment invocation count for the function.
137 {
138 Comment cmnt(masm_, "[ Increment invocation count");
139 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
140 __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset));
141 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex *
142 kPointerSize +
143 TypeFeedbackVector::kHeaderSize));
144 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0);
145 __ StoreP(r1,
146 FieldMemOperand(
147 r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
148 TypeFeedbackVector::kHeaderSize));
149 }
150
136 { 151 {
137 Comment cmnt(masm_, "[ Allocate locals"); 152 Comment cmnt(masm_, "[ Allocate locals");
138 int locals_count = info->scope()->num_stack_slots(); 153 int locals_count = info->scope()->num_stack_slots();
139 // Generators allocate locals, if any, in context slots. 154 // Generators allocate locals, if any, in context slots.
140 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 155 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
141 OperandStackDepthIncrement(locals_count); 156 OperandStackDepthIncrement(locals_count);
142 if (locals_count > 0) { 157 if (locals_count > 0) {
143 if (locals_count >= 128) { 158 if (locals_count >= 128) {
144 Label ok; 159 Label ok;
145 __ AddP(ip, sp, Operand(-(locals_count * kPointerSize))); 160 __ AddP(ip, sp, Operand(-(locals_count * kPointerSize)));
(...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 DCHECK(kOSRBranchInstruction == br_instr); 3624 DCHECK(kOSRBranchInstruction == br_instr);
3610 3625
3611 DCHECK(interrupt_address == 3626 DCHECK(interrupt_address ==
3612 isolate->builtins()->OnStackReplacement()->entry()); 3627 isolate->builtins()->OnStackReplacement()->entry());
3613 return ON_STACK_REPLACEMENT; 3628 return ON_STACK_REPLACEMENT;
3614 } 3629 }
3615 3630
3616 } // namespace internal 3631 } // namespace internal
3617 } // namespace v8 3632 } // namespace v8
3618 #endif // V8_TARGET_ARCH_S390 3633 #endif // V8_TARGET_ARCH_S390
OLDNEW
« 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