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

Unified Diff: src/log-inl.h

Issue 988893003: Implement tracing interface for v8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make sure old embedders still work Created 5 years, 9 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/log-inl.h
diff --git a/src/log-inl.h b/src/log-inl.h
index a96631d059d1a5dd0dffb7d3ebd9ec9d2cd64584..9fd18ec4314351560e14a0785695dde3fe222be3 100644
--- a/src/log-inl.h
+++ b/src/log-inl.h
@@ -7,6 +7,7 @@
#include "src/log.h"
#include "src/isolate.h"
+#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
@@ -33,7 +34,11 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
if (isolate->event_logger() == DefaultEventLoggerSentinel) {
LOG(isolate, TimerEvent(se, name));
} else if (expose_to_api) {
- isolate->event_logger()(name, se);
+ if (se == START) {
+ TRACE_EVENT_BEGIN0("v8", name);
+ } else {
+ TRACE_EVENT_END0("v8", name);
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698