| Index: src/log-inl.h
|
| diff --git a/src/log-inl.h b/src/log-inl.h
|
| index a96631d059d1a5dd0dffb7d3ebd9ec9d2cd64584..ac8903054f07f91f532a249442459af026257609 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 {
|
| @@ -28,12 +29,24 @@ 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() == DefaultEventLoggerSentinel) {
|
| - LOG(isolate, TimerEvent(se, name));
|
| - } else if (expose_to_api) {
|
| - isolate->event_logger()(name, se);
|
| + Overhead overhead) {
|
| + if (overhead == Overhead::NORMAL) {
|
| + if (se == START) {
|
| + TRACE_EVENT_BEGIN0("V8", name);
|
| + } else {
|
| + TRACE_EVENT_END0("V8", name);
|
| + }
|
| + } else if (overhead == Overhead::LOW) {
|
| + if (se == START) {
|
| + TRACE_EVENT_BEGIN0("benchmark", name);
|
| + } else {
|
| + TRACE_EVENT_END0("benchmark", name);
|
| + }
|
| + } else {
|
| + if (se == START) {
|
| + TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("V8Disabled"), name);
|
| + } else {
|
| + TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("V8Disabled"), name);
|
| }
|
| }
|
| }
|
|
|