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

Side by Side Diff: src/builtins/arm/builtins-arm.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 | « no previous file | src/builtins/arm64/builtins-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset), eq); 1053 FieldMemOperand(r0, SharedFunctionInfo::kFunctionDataOffset), eq);
1054 __ ldr(kInterpreterBytecodeArrayRegister, 1054 __ ldr(kInterpreterBytecodeArrayRegister,
1055 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex), ne); 1055 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex), ne);
1056 1056
1057 // Check whether we should continue to use the interpreter. 1057 // Check whether we should continue to use the interpreter.
1058 Label switch_to_different_code_kind; 1058 Label switch_to_different_code_kind;
1059 __ ldr(r0, FieldMemOperand(r0, SharedFunctionInfo::kCodeOffset)); 1059 __ ldr(r0, FieldMemOperand(r0, SharedFunctionInfo::kCodeOffset));
1060 __ cmp(r0, Operand(masm->CodeObject())); // Self-reference to this code. 1060 __ cmp(r0, Operand(masm->CodeObject())); // Self-reference to this code.
1061 __ b(ne, &switch_to_different_code_kind); 1061 __ b(ne, &switch_to_different_code_kind);
1062 1062
1063 // Increment invocation count for the function.
1064 __ ldr(r2, FieldMemOperand(r1, JSFunction::kLiteralsOffset));
1065 __ ldr(r2, FieldMemOperand(r2, LiteralsArray::kFeedbackVectorOffset));
1066 __ ldr(r9, FieldMemOperand(
1067 r2, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
1068 TypeFeedbackVector::kHeaderSize));
1069 __ add(r9, r9, Operand(Smi::FromInt(1)));
1070 __ str(r9, FieldMemOperand(
1071 r2, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
1072 TypeFeedbackVector::kHeaderSize));
1073
1063 // Check function data field is actually a BytecodeArray object. 1074 // Check function data field is actually a BytecodeArray object.
1064 if (FLAG_debug_code) { 1075 if (FLAG_debug_code) {
1065 __ SmiTst(kInterpreterBytecodeArrayRegister); 1076 __ SmiTst(kInterpreterBytecodeArrayRegister);
1066 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); 1077 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry);
1067 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r0, no_reg, 1078 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r0, no_reg,
1068 BYTECODE_ARRAY_TYPE); 1079 BYTECODE_ARRAY_TYPE);
1069 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); 1080 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry);
1070 } 1081 }
1071 1082
1072 // Load the initial bytecode offset. 1083 // Load the initial bytecode offset.
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
2958 __ bkpt(0); 2969 __ bkpt(0);
2959 } 2970 }
2960 } 2971 }
2961 2972
2962 #undef __ 2973 #undef __
2963 2974
2964 } // namespace internal 2975 } // namespace internal
2965 } // namespace v8 2976 } // namespace v8
2966 2977
2967 #endif // V8_TARGET_ARCH_ARM 2978 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698