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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 9460015: Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « runtime/vm/stub_code_ia32.cc ('k') | tests/corelib/src/CollectionToStringTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 4582)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -273,29 +273,6 @@
}
-// Called when number of invocations exceeds
-// --optimization_invocation_threshold.
-// RAX: target function.
-// R10: arguments descriptor array (num_args is first Smi element).
-void StubCode::GenerateOptimizeInvokedFunctionStub(Assembler* assembler) {
- __ Untested("OptimizeInvokedFunction stub");
- __ EnterFrame(0);
- __ pushq(R10); // Preserve arguments descriptor array.
- __ pushq(RAX); // Preserve target function.
- __ pushq(RAX); // Target function.
- __ CallRuntimeFromStub(kOptimizeInvokedFunctionRuntimeEntry);
- __ popq(RAX); // discard argument.
- __ popq(RAX); // Restore function.
- __ popq(R10); // Restore arguments descriptor array.
- __ movq(RAX, FieldAddress(RAX, Function::code_offset()));
- __ movq(RAX, FieldAddress(RAX, Code::instructions_offset()));
- __ addq(RAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
- __ LeaveFrame();
- __ jmp(RAX);
- __ int3();
-}
-
-
// Called from a static call only when an invalid code has been entered
// (invalid because its function was optimized or deoptimized).
// RBX: function object.
@@ -1547,6 +1524,7 @@
// - Match not found -> jump to IC miss.
void StubCode::GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
intptr_t num_args) {
+ // TODO(srdjan): Add usage counter increment and test (see ia32).
ASSERT(num_args > 0);
// Get receiver.
__ movq(RAX, FieldAddress(R10, Array::data_offset()));
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | tests/corelib/src/CollectionToStringTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698