Commit b636408f authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[ic] Reset profiler ticks in property adding N to N transitions

Not resetting the ticks regresses optimization time without substantial
performance benenfits on twitter, facebook, youtube, linkedin and wikipedia.

There was no net positive effect visible otherwise.

Bug: chromium:786908
Change-Id: I98237dee170e7a387f09ccfbad178793361d4a67
Reviewed-on: https://chromium-review.googlesource.com/779435Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49516}
parent 47383c20
...@@ -370,15 +370,15 @@ static bool MigrateDeprecated(Handle<Object> object) { ...@@ -370,15 +370,15 @@ static bool MigrateDeprecated(Handle<Object> object) {
} }
bool IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) { bool IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) {
bool changed = true;
if (new_state == PREMONOMORPHIC) { if (new_state == PREMONOMORPHIC) {
nexus()->ConfigurePremonomorphic(); nexus()->ConfigurePremonomorphic();
} else if (new_state == MEGAMORPHIC) { } else if (new_state == MEGAMORPHIC) {
DCHECK_IMPLIES(!is_keyed(), key->IsName()); DCHECK_IMPLIES(!is_keyed(), key->IsName());
IcCheckType property_type = key->IsName() ? PROPERTY : ELEMENT; // Even though we don't change the feedback data, we still want to reset the
if (!nexus()->ConfigureMegamorphic(property_type)) { // profiler ticks. Real-world observations suggest that optimizing these
vector_set_ = true; // functions doesn't improve performance.
return false; changed = nexus()->ConfigureMegamorphic(key->IsName() ? PROPERTY : ELEMENT);
}
} else { } else {
UNREACHABLE(); UNREACHABLE();
} }
...@@ -387,7 +387,7 @@ bool IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) { ...@@ -387,7 +387,7 @@ bool IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) {
OnFeedbackChanged( OnFeedbackChanged(
isolate(), *vector(), slot(), GetHostFunction(), isolate(), *vector(), slot(), GetHostFunction(),
new_state == PREMONOMORPHIC ? "Premonomorphic" : "Megamorphic"); new_state == PREMONOMORPHIC ? "Premonomorphic" : "Megamorphic");
return true; return changed;
} }
void IC::ConfigureVectorState(Handle<Name> name, Handle<Map> map, void IC::ConfigureVectorState(Handle<Name> name, Handle<Map> map,
......
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