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

Unified Diff: src/stub-cache.cc

Issue 3417019: Provide more functions to CPU profiler (fix issue 858). (Closed)
Patch Set: Hooked on MC/MS also Created 10 years, 3 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
« src/log.cc ('K') | « src/profile-generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index af7c0bd8d996d09c4228409e6ab4fb6376b1aede..6b41577ea860cde740974881832d9e82e54ae4d6 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1186,25 +1186,43 @@ void StubCompiler::LookupPostInterceptor(JSObject* holder,
Object* LoadStubCompiler::GetCode(PropertyType type, String* name) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type);
- return GetCodeWithFlags(flags, name);
+ Object* result = GetCodeWithFlags(flags, name);
+ if (!result->IsFailure()) {
+ PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(result), name));
+ }
+ return result;
}
Object* KeyedLoadStubCompiler::GetCode(PropertyType type, String* name) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, type);
- return GetCodeWithFlags(flags, name);
+ Object* result = GetCodeWithFlags(flags, name);
+ if (!result->IsFailure()) {
+ PROFILE(
+ CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(result), name));
+ }
+ return result;
}
Object* StoreStubCompiler::GetCode(PropertyType type, String* name) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type);
- return GetCodeWithFlags(flags, name);
+ Object* result = GetCodeWithFlags(flags, name);
+ if (!result->IsFailure()) {
+ PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(result), name));
+ }
+ return result;
}
Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) {
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, type);
- return GetCodeWithFlags(flags, name);
+ Object* result = GetCodeWithFlags(flags, name);
+ if (!result->IsFailure()) {
+ PROFILE(
+ CodeCreateEvent(Logger::KEYED_STORE_IC_TAG, Code::cast(result), name));
+ }
+ return result;
}
« src/log.cc ('K') | « src/profile-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698