Commit eaf35808 authored by Suraj Sharma's avatar Suraj Sharma Committed by Commit Bot

[ic] Improve Tracing for No Feedback Vector Case.

--trace-ic now logs transitions X -> X

Bug: v8:9761
Change-Id: I594236a88d4b5a441442b7bab99b126d85043d0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893552Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Suraj Sharma <surshar@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#64712}
parent aeda4157
......@@ -427,7 +427,13 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name,
if (it.IsFound() || !ShouldThrowReferenceError()) {
// Update inline cache and stub cache.
if (use_ic) UpdateCaches(&it);
if (use_ic) {
UpdateCaches(&it);
} else if (state() == NO_FEEDBACK) {
// Tracing IC stats
IsLoadGlobalIC() ? TraceIC("LoadGlobalIC", name)
: TraceIC("LoadIC", name);
}
if (IsAnyHas()) {
// Named lookup in the object.
......@@ -489,6 +495,8 @@ MaybeHandle<Object> LoadGlobalIC::Load(Handle<Name> name,
SetCache(name, LoadHandler::LoadSlow(isolate()));
}
TraceIC("LoadGlobalIC", name);
} else if (state() == NO_FEEDBACK) {
TraceIC("LoadGlobalIC", name);
}
return result;
}
......@@ -1415,8 +1423,9 @@ MaybeHandle<Object> StoreGlobalIC::Store(Handle<Name> name,
SetCache(name, StoreHandler::StoreSlow(isolate()));
}
TraceIC("StoreGlobalIC", name);
} else if (state() == NO_FEEDBACK) {
TraceIC("StoreGlobalIC", name);
}
script_context->set(lookup_result.slot_index, *value);
return value;
}
......@@ -1471,7 +1480,13 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
use_ic = false;
}
}
if (use_ic) UpdateCaches(&it, value, store_origin);
if (use_ic) {
UpdateCaches(&it, value, store_origin);
} else if (state() == NO_FEEDBACK) {
// Tracing IC Stats for No Feedback State.
IsStoreGlobalIC() ? TraceIC("StoreGlobalIC", name)
: TraceIC("StoreIC", name);
}
MAYBE_RETURN_NULL(Object::SetProperty(
&it, value, store_origin, Nothing<ShouldThrow>(), IsStoreGlobalIC()));
......
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