Commit 0d8d0864 authored by Mythri's avatar Mythri Committed by Commit Bot

[Interpreter] Reset profiler ticks on feedback changes in Call / Construct

We reset profiler ticks when the feedback changes so that we could tier
up functions with more stable feedback. We missed resetting these ticks
for call / construct bytecodes. This cl fixes it.

Bug: 
Change-Id: Ia912dfee0495c776d9fc517a887a2fdd999773ab
Reviewed-on: https://chromium-review.googlesource.com/635846Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47673}
parent 425ede39
......@@ -640,6 +640,10 @@ void InterpreterAssembler::CollectCallFeedback(Node* target, Node* context,
&mark_megamorphic);
CreateWeakCellInFeedbackVector(feedback_vector, SmiTag(slot_id), target);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&done);
}
......@@ -653,6 +657,10 @@ void InterpreterAssembler::CollectCallFeedback(Node* target, Node* context,
feedback_vector, slot_id,
HeapConstant(FeedbackVector::MegamorphicSentinel(isolate())),
SKIP_WRITE_BARRIER);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&done);
}
}
......@@ -826,6 +834,10 @@ Node* InterpreterAssembler::Construct(Node* target, Node* context,
{
var_site.Bind(CreateAllocationSiteInFeedbackVector(feedback_vector,
SmiTag(slot_id)));
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&construct_array);
}
......@@ -833,6 +845,10 @@ Node* InterpreterAssembler::Construct(Node* target, Node* context,
{
CreateWeakCellInFeedbackVector(feedback_vector, SmiTag(slot_id),
new_target);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&construct);
}
}
......@@ -847,6 +863,10 @@ Node* InterpreterAssembler::Construct(Node* target, Node* context,
feedback_vector, slot_id,
HeapConstant(FeedbackVector::MegamorphicSentinel(isolate())),
SKIP_WRITE_BARRIER);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&construct);
}
}
......@@ -948,6 +968,10 @@ Node* InterpreterAssembler::ConstructWithSpread(Node* target, Node* context,
CreateWeakCellInFeedbackVector(feedback_vector, SmiTag(slot_id),
new_target);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&construct);
}
......@@ -961,6 +985,10 @@ Node* InterpreterAssembler::ConstructWithSpread(Node* target, Node* context,
feedback_vector, slot_id,
HeapConstant(FeedbackVector::MegamorphicSentinel(isolate())),
SKIP_WRITE_BARRIER);
// Reset profiler ticks.
StoreObjectFieldNoWriteBarrier(feedback_vector,
FeedbackVector::kProfilerTicksOffset,
SmiConstant(0));
Goto(&construct);
}
}
......
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