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

Unified Diff: src/log-inl.h

Issue 2061623002: Introduce JIT code events dispatcher for the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/isolate.cc ('K') | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-inl.h
diff --git a/src/log-inl.h b/src/log-inl.h
index 765398fdd7c6a5e69e57fb2ec36457a013b91f7c..82d78605c92b9d125f12bd1b58e7511e626b9d26 100644
--- a/src/log-inl.h
+++ b/src/log-inl.h
@@ -13,14 +13,19 @@
namespace v8 {
namespace internal {
-Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
- Script* script) {
- if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) &&
+CodeEventListener::LogEventsAndTags Logger::ToNativeByScript(
+ CodeEventListener::LogEventsAndTags tag, Script* script) {
+ if ((tag == CodeEventListener::FUNCTION_TAG ||
+ tag == CodeEventListener::LAZY_COMPILE_TAG ||
+ tag == CodeEventListener::SCRIPT_TAG) &&
script->type() == Script::TYPE_NATIVE) {
switch (tag) {
Yang 2016/06/14 13:38:12 why don't we simplify this to if (script->type()
alph 2016/06/14 16:38:20 Done.
- case FUNCTION_TAG: return NATIVE_FUNCTION_TAG;
- case LAZY_COMPILE_TAG: return NATIVE_LAZY_COMPILE_TAG;
- case SCRIPT_TAG: return NATIVE_SCRIPT_TAG;
+ case CodeEventListener::FUNCTION_TAG:
+ return CodeEventListener::NATIVE_FUNCTION_TAG;
+ case CodeEventListener::LAZY_COMPILE_TAG:
+ return CodeEventListener::NATIVE_LAZY_COMPILE_TAG;
+ case CodeEventListener::SCRIPT_TAG:
+ return CodeEventListener::NATIVE_SCRIPT_TAG;
default: return tag;
}
} else {
@@ -28,10 +33,9 @@ Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
}
}
-
void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
bool expose_to_api) {
- if (isolate->event_logger() != NULL) {
+ if (isolate->event_logger()) {
if (isolate->event_logger() == DefaultEventLoggerSentinel) {
LOG(isolate, TimerEvent(se, name));
} else if (expose_to_api) {
@@ -39,6 +43,7 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
}
}
}
+
} // namespace internal
} // namespace v8
« src/isolate.cc ('K') | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698