[flags] Rename FLAG_max_polymorphic_map_count
This flag's name is slightly incorrect as it is possible to have more maps than this in the feecback vector. This flag doesn't account for deprecated maps in the feedback vector. To make this explicit, we change the flag to indicate that this only counts valid maps. Bug: v8:10582 Change-Id: Ib0cc425a03d590bb21184fc6b104d0ebee1d5b03 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2319992 Reviewed-by: Mythri Alle <mythria@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#69075}
This commit is contained in:
parent
ccd0bf3f6b
commit
926094db88
@ -1283,8 +1283,8 @@ DEFINE_BOOL_READONLY(fast_map_update, false,
|
||||
"enable fast map update by caching the migration target")
|
||||
DEFINE_BOOL(modify_field_representation_inplace, true,
|
||||
"enable in-place field representation updates")
|
||||
DEFINE_INT(max_polymorphic_map_count, 4,
|
||||
"maximum number of maps to track in POLYMORPHIC state")
|
||||
DEFINE_INT(max_valid_polymorphic_map_count, 4,
|
||||
"maximum number of valid maps to track in POLYMORPHIC state")
|
||||
|
||||
DEFINE_BOOL(native_code_counters, DEBUG_BOOL,
|
||||
"generate extra code for manipulating stats counters")
|
||||
|
@ -600,7 +600,8 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name,
|
||||
int number_of_valid_maps =
|
||||
number_of_maps - deprecated_maps - (handler_to_overwrite != -1);
|
||||
|
||||
if (number_of_valid_maps >= FLAG_max_polymorphic_map_count) return false;
|
||||
if (number_of_valid_maps >= FLAG_max_valid_polymorphic_map_count)
|
||||
return false;
|
||||
if (number_of_maps == 0 && state() != MONOMORPHIC && state() != POLYMORPHIC) {
|
||||
return false;
|
||||
}
|
||||
@ -1079,7 +1080,7 @@ void KeyedLoadIC::UpdateLoadElement(Handle<HeapObject> receiver,
|
||||
// If the maximum number of receiver maps has been exceeded, use the generic
|
||||
// version of the IC.
|
||||
if (static_cast<int>(target_receiver_maps.size()) >
|
||||
FLAG_max_polymorphic_map_count) {
|
||||
FLAG_max_valid_polymorphic_map_count) {
|
||||
set_slow_stub_reason("max polymorph exceeded");
|
||||
return;
|
||||
}
|
||||
@ -1900,7 +1901,7 @@ void KeyedStoreIC::UpdateStoreElement(Handle<Map> receiver_map,
|
||||
// If the maximum number of receiver maps has been exceeded, use the
|
||||
// megamorphic version of the IC.
|
||||
if (static_cast<int>(target_maps_and_handlers.size()) >
|
||||
FLAG_max_polymorphic_map_count) {
|
||||
FLAG_max_valid_polymorphic_map_count) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -835,8 +835,8 @@ void FeedbackNexus::ConfigureCloneObject(Handle<Map> source_map,
|
||||
}
|
||||
break;
|
||||
case POLYMORPHIC: {
|
||||
const int kMaxElements =
|
||||
FLAG_max_polymorphic_map_count * kCloneObjectPolymorphicEntrySize;
|
||||
const int kMaxElements = FLAG_max_valid_polymorphic_map_count *
|
||||
kCloneObjectPolymorphicEntrySize;
|
||||
Handle<WeakFixedArray> array = Handle<WeakFixedArray>::cast(feedback);
|
||||
int i = 0;
|
||||
for (; i < array->length(); i += kCloneObjectPolymorphicEntrySize) {
|
||||
|
Loading…
Reference in New Issue
Block a user