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

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: Update BUILD.gn to include trace_event_common.h Created 5 years 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/libplatform/default-platform.cc ('k') | src/tracing/trace-event.h » ('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 70c74bc33f57f9a0e1c24078a7e3ba7292557b25..d47a24b96afae22190671099663fecb3607bae08 100644
--- a/src/log-inl.h
+++ b/src/log-inl.h
@@ -8,6 +8,7 @@
#include "src/log.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
+#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
@@ -37,6 +38,19 @@ void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
isolate->event_logger()(name, se);
}
}
+ if (expose_to_api) {
+ if (se == START) {
+ TRACE_EVENT_BEGIN0("v8", name);
+ } else {
+ TRACE_EVENT_END0("v8", name);
+ }
+ } else {
+ if (se == START) {
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), name);
+ } else {
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), name);
+ }
+ }
}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/libplatform/default-platform.cc ('k') | src/tracing/trace-event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698