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

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: rebaseline 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
« no previous file with comments | « 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..b9865976bf860840920865070a5325aa1d54d926 100644
--- a/src/log-inl.h
+++ b/src/log-inl.h
@@ -13,25 +13,24 @@
namespace v8 {
namespace internal {
-Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
- Script* script) {
- if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) &&
- script->type() == Script::TYPE_NATIVE) {
- switch (tag) {
- case FUNCTION_TAG: return NATIVE_FUNCTION_TAG;
- case LAZY_COMPILE_TAG: return NATIVE_LAZY_COMPILE_TAG;
- case SCRIPT_TAG: return NATIVE_SCRIPT_TAG;
- default: return tag;
- }
- } else {
- return tag;
+CodeEventListener::LogEventsAndTags Logger::ToNativeByScript(
+ CodeEventListener::LogEventsAndTags tag, Script* script) {
+ if (script->type() != Script::TYPE_NATIVE) return tag;
+ switch (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;
}
}
-
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 +38,7 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
}
}
}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698