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

Side by Side Diff: src/builtins/x87/builtins-x87.cc

Issue 2352493002: X87: [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 unified diff | Download patch
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 __ mov(kInterpreterBytecodeArrayRegister, 584 __ mov(kInterpreterBytecodeArrayRegister,
585 FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); 585 FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset));
586 __ bind(&bytecode_array_loaded); 586 __ bind(&bytecode_array_loaded);
587 587
588 // Check whether we should continue to use the interpreter. 588 // Check whether we should continue to use the interpreter.
589 Label switch_to_different_code_kind; 589 Label switch_to_different_code_kind;
590 __ Move(ecx, masm->CodeObject()); // Self-reference to this code. 590 __ Move(ecx, masm->CodeObject()); // Self-reference to this code.
591 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); 591 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset));
592 __ j(not_equal, &switch_to_different_code_kind); 592 __ j(not_equal, &switch_to_different_code_kind);
593 593
594 // Increment invocation count for the function.
595 __ EmitLoadTypeFeedbackVector(ecx);
596 __ add(FieldOperand(ecx,
597 TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
598 TypeFeedbackVector::kHeaderSize),
599 Immediate(Smi::FromInt(1)));
600
594 // Check function data field is actually a BytecodeArray object. 601 // Check function data field is actually a BytecodeArray object.
595 if (FLAG_debug_code) { 602 if (FLAG_debug_code) {
596 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); 603 __ AssertNotSmi(kInterpreterBytecodeArrayRegister);
597 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, 604 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE,
598 eax); 605 eax);
599 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); 606 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry);
600 } 607 }
601 608
602 // Push bytecode array. 609 // Push bytecode array.
603 __ push(kInterpreterBytecodeArrayRegister); 610 __ push(kInterpreterBytecodeArrayRegister);
(...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 3120
3114 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3121 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3115 Generate_OnStackReplacementHelper(masm, true); 3122 Generate_OnStackReplacementHelper(masm, true);
3116 } 3123 }
3117 3124
3118 #undef __ 3125 #undef __
3119 } // namespace internal 3126 } // namespace internal
3120 } // namespace v8 3127 } // namespace v8
3121 3128
3122 #endif // V8_TARGET_ARCH_X87 3129 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698