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

Side by Side Diff: src/log-inl.h

Issue 1686233002: Add Scoped Context Info (Isolate) to V8 Traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Simplify the test Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/libplatform/default-platform.cc ('k') | src/tracing/trace-event.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LOG_INL_H_ 5 #ifndef V8_LOG_INL_H_
6 #define V8_LOG_INL_H_ 6 #define V8_LOG_INL_H_
7 7
8 #include "src/log.h" 8 #include "src/log.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 20 matching lines...) Expand all
31 31
32 void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se, 32 void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
33 bool expose_to_api) { 33 bool expose_to_api) {
34 if (isolate->event_logger() != NULL) { 34 if (isolate->event_logger() != NULL) {
35 if (isolate->event_logger() == DefaultEventLoggerSentinel) { 35 if (isolate->event_logger() == DefaultEventLoggerSentinel) {
36 LOG(isolate, TimerEvent(se, name)); 36 LOG(isolate, TimerEvent(se, name));
37 } else if (expose_to_api) { 37 } else if (expose_to_api) {
38 isolate->event_logger()(name, se); 38 isolate->event_logger()(name, se);
39 } 39 }
40 } 40 }
41
42 // We make 2 different macro calls instead of precalculating the category
43 // name because the category enabled status is cached based on its line no.
41 if (expose_to_api) { 44 if (expose_to_api) {
42 if (se == START) { 45 if (se == START) {
43 TRACE_EVENT_BEGIN0("v8", name); 46 TRACE_EVENT_BEGIN0("v8", name);
44 } else { 47 } else {
45 TRACE_EVENT_END0("v8", name); 48 TRACE_EVENT_END0("v8", name);
46 } 49 }
47 } else { 50 } else {
48 if (se == START) { 51 if (se == START) {
49 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), name); 52 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), name);
50 } else { 53 } else {
51 TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), name); 54 TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), name);
52 } 55 }
53 } 56 }
54 } 57 }
55 } // namespace internal 58 } // namespace internal
56 } // namespace v8 59 } // namespace v8
57 60
58 #endif // V8_LOG_INL_H_ 61 #endif // V8_LOG_INL_H_
OLDNEW
« 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