Commit 598ddd95 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

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

  port 2b63d6b0 (r32693)

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32697}
parent e56fe846
...@@ -1792,10 +1792,6 @@ void CallICStub::Generate(MacroAssembler* masm) { ...@@ -1792,10 +1792,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
// edx - slot id // edx - slot id
// ebx - vector // ebx - vector
Isolate* isolate = masm->isolate(); Isolate* isolate = masm->isolate();
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; Label extra_checks_or_miss, call, call_function;
int argc = arg_count(); int argc = arg_count();
ParameterCount actual(argc); ParameterCount actual(argc);
...@@ -1868,9 +1864,6 @@ void CallICStub::Generate(MacroAssembler* masm) { ...@@ -1868,9 +1864,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ mov( __ mov(
FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize),
Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate)));
// We have to update statistics for runtime profiling.
__ sub(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1)));
__ add(FieldOperand(ebx, generic_offset), Immediate(Smi::FromInt(1)));
__ bind(&call); __ bind(&call);
__ Set(eax, argc); __ Set(eax, argc);
...@@ -1898,9 +1891,6 @@ void CallICStub::Generate(MacroAssembler* masm) { ...@@ -1898,9 +1891,6 @@ void CallICStub::Generate(MacroAssembler* masm) {
__ cmp(ecx, NativeContextOperand()); __ cmp(ecx, NativeContextOperand());
__ j(not_equal, &miss); __ j(not_equal, &miss);
// Update stats.
__ add(FieldOperand(ebx, with_types_offset), Immediate(Smi::FromInt(1)));
// Initialize the call counter. // Initialize the call counter.
__ mov(FieldOperand(ebx, edx, times_half_pointer_size, __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
FixedArray::kHeaderSize + kPointerSize), FixedArray::kHeaderSize + kPointerSize),
......
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