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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x87/builtins-x87.cc
diff --git a/src/builtins/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc
index 9f85a37314a3e25309d74a713fc04f76fd6990ce..4a15f5d0fbcf93505c69699c24b877a1bb02fe2b 100644
--- a/src/builtins/x87/builtins-x87.cc
+++ b/src/builtins/x87/builtins-x87.cc
@@ -591,6 +591,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset));
__ j(not_equal, &switch_to_different_code_kind);
+ // Increment invocation count for the function.
+ __ EmitLoadTypeFeedbackVector(ecx);
+ __ add(FieldOperand(ecx,
+ TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
+ TypeFeedbackVector::kHeaderSize),
+ Immediate(Smi::FromInt(1)));
+
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
__ AssertNotSmi(kInterpreterBytecodeArrayRegister);
« 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