Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: src/ic/ic.cc

Issue 1923893002: [counters] Annotate v8 with more runtime call counters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: directly return slow_stub Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index bd5338a694e34e563269d2a1072eec6544471420..c176015d3e95c02482c89229516b64c7f871362a 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1067,8 +1067,10 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
if (call_optimization.is_simple_api_call()) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadCallback);
int index = lookup->GetAccessorIndex();
- return compiler.CompileLoadCallback(lookup->name(),
- call_optimization, index);
+ Handle<Code> code = compiler.CompileLoadCallback(
+ lookup->name(), call_optimization, index);
+ if (FLAG_runtime_call_stats) return slow_stub();
+ return code;
}
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadViaGetter);
int expected_arguments = Handle<JSFunction>::cast(getter)
@@ -1095,7 +1097,10 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadCallback);
NamedLoadHandlerCompiler compiler(isolate(), map, holder,
cache_holder);
- return compiler.CompileLoadCallback(lookup->name(), info);
+ Handle<Code> code =
+ compiler.CompileLoadCallback(lookup->name(), info);
+ if (FLAG_runtime_call_stats) return slow_stub();
+ return code;
}
}
break;
@@ -1583,8 +1588,10 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup,
if (info->is_sloppy() && !receiver->IsJSReceiver()) break;
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreCallback);
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder);
- return compiler.CompileStoreCallback(receiver, lookup->name(), info,
- language_mode());
+ Handle<Code> code = compiler.CompileStoreCallback(
+ receiver, lookup->name(), info, language_mode());
+ if (FLAG_runtime_call_stats) return slow_stub();
+ return code;
} else if (accessors->IsAccessorPair()) {
Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(),
isolate());
@@ -1597,9 +1604,11 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup,
if (call_optimization.is_simple_api_call()) {
if (call_optimization.IsCompatibleReceiver(receiver, holder)) {
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreCallback);
- return compiler.CompileStoreCallback(receiver, lookup->name(),
- call_optimization,
- lookup->GetAccessorIndex());
+ Handle<Code> code = compiler.CompileStoreCallback(
+ receiver, lookup->name(), call_optimization,
+ lookup->GetAccessorIndex());
+ if (FLAG_runtime_call_stats) return slow_stub();
+ return code;
}
TRACE_GENERIC_IC(isolate(), "StoreIC", "incompatible receiver");
break;

Powered by Google App Engine
This is Rietveld 408576698