Commit 99689010 authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: Type Feedback Vector: Calculate profiler counts on the fly.

Port 2b63d6b0

Original commit message:
    It's cumbersome to maintain IC profiler statistics all the time.
    Let's just do it as needed.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1510273002

Cr-Commit-Position: refs/heads/master@{#32725}
parent b9f92c15
......@@ -2599,10 +2599,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
// r4 - function
// r6 - slot id (Smi)
// r5 - vector
const int with_types_offset =
FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex);
const int generic_offset =
FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex);
Label extra_checks_or_miss, call, call_function;
int argc = arg_count();
ParameterCount actual(argc);
......@@ -2677,13 +2673,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ bne(&miss);
__ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex);
__ StoreP(ip, FieldMemOperand(r9, FixedArray::kHeaderSize), r0);
// We have to update statistics for runtime profiling.
__ LoadP(r7, FieldMemOperand(r5, with_types_offset));
__ SubSmiLiteral(r7, r7, Smi::FromInt(1), r0);
__ StoreP(r7, FieldMemOperand(r5, with_types_offset), r0);
__ LoadP(r7, FieldMemOperand(r5, generic_offset));
__ AddSmiLiteral(r7, r7, Smi::FromInt(1), r0);
__ StoreP(r7, FieldMemOperand(r5, generic_offset), r0);
__ bind(&call);
__ mov(r3, Operand(argc));
......@@ -2712,11 +2701,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmp(r7, ip);
__ bne(&miss);
// Update stats.
__ LoadP(r7, FieldMemOperand(r5, with_types_offset));
__ AddSmiLiteral(r7, r7, Smi::FromInt(1), r0);
__ StoreP(r7, FieldMemOperand(r5, with_types_offset), r0);
// Initialize the call counter.
__ LoadSmiLiteral(r8, Smi::FromInt(CallICNexus::kCallCountIncrement));
__ StoreP(r8, FieldMemOperand(r9, count_offset), r0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment