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

Unified Diff: src/log.cc

Issue 827993003: Integrate Chrome tracing with V8 (WIP) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 11 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.h ('k') | src/log-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 3eede365b768ec51e42b1b5cf5180d3ea753265a..92cde1a8788fba0a8574b99ab065f5fc66806556 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -23,6 +23,7 @@
#include "src/runtime-profiler.h"
#include "src/serialize.h"
#include "src/string-stream.h"
+#include "src/tracing/trace-event.h"
#include "src/vm-state-inl.h"
namespace v8 {
@@ -942,6 +943,8 @@ void Logger::TimerEvent(Logger::StartEnd se, const char* name) {
void Logger::EnterExternal(Isolate* isolate) {
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("V8::External"),
+ TimerEventExternal::name());
LOG(isolate, TimerEvent(START, TimerEventExternal::name()));
DCHECK(isolate->current_vm_state() == JS);
isolate->set_current_vm_state(EXTERNAL);
@@ -949,6 +952,8 @@ void Logger::EnterExternal(Isolate* isolate) {
void Logger::LeaveExternal(Isolate* isolate) {
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("V8::External"),
+ TimerEventExternal::name());
LOG(isolate, TimerEvent(END, TimerEventExternal::name()));
DCHECK(isolate->current_vm_state() == EXTERNAL);
isolate->set_current_vm_state(JS);
@@ -958,12 +963,12 @@ void Logger::LeaveExternal(Isolate* isolate) {
template <class TimerEvent>
void TimerEventScope<TimerEvent>::LogTimerEvent(Logger::StartEnd se) {
Logger::CallEventLogger(isolate_, TimerEvent::name(), se,
- TimerEvent::expose_to_api());
+ TimerEvent::overhead());
}
// Instantiate template methods.
-#define V(TimerName, expose) \
+#define V(TimerName, overhead) \
template void TimerEventScope<TimerEvent##TimerName>::LogTimerEvent( \
Logger::StartEnd se);
TIMER_EVENTS_LIST(V)
« no previous file with comments | « src/log.h ('k') | src/log-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698