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

Side by Side Diff: src/tracing/trace-event.h

Issue 2460973003: [Tracing] Use TracingCategoryObserver in runtime statistics (Closed)
Patch Set: update Created 4 years, 1 month 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/log.cc ('k') | src/tracing/trace-event.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 SRC_TRACING_TRACE_EVENT_H_ 5 #ifndef SRC_TRACING_TRACE_EVENT_H_
6 #define SRC_TRACING_TRACE_EVENT_H_ 6 #define SRC_TRACING_TRACE_EVENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 private: \ 242 private: \
243 /* Local class friendly DISALLOW_COPY_AND_ASSIGN */ \ 243 /* Local class friendly DISALLOW_COPY_AND_ASSIGN */ \
244 INTERNAL_TRACE_EVENT_UID(ScopedContext) \ 244 INTERNAL_TRACE_EVENT_UID(ScopedContext) \
245 (const INTERNAL_TRACE_EVENT_UID(ScopedContext)&) {} \ 245 (const INTERNAL_TRACE_EVENT_UID(ScopedContext)&) {} \
246 void operator=(const INTERNAL_TRACE_EVENT_UID(ScopedContext)&) {} \ 246 void operator=(const INTERNAL_TRACE_EVENT_UID(ScopedContext)&) {} \
247 uint64_t cid_; \ 247 uint64_t cid_; \
248 }; \ 248 }; \
249 INTERNAL_TRACE_EVENT_UID(ScopedContext) \ 249 INTERNAL_TRACE_EVENT_UID(ScopedContext) \
250 INTERNAL_TRACE_EVENT_UID(scoped_context)(context); 250 INTERNAL_TRACE_EVENT_UID(scoped_context)(context);
251 251
252 #define TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() \
253 base::NoBarrier_Load(&v8::internal::tracing::kRuntimeCallStatsTracingEnabled)
254
255 #define TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \ 252 #define TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \
256 INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) 253 INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name)
257 254
258 #define INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \ 255 #define INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \
259 { \
260 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO( \
261 TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats")); \
262 base::NoBarrier_Store( \
263 &v8::internal::tracing::kRuntimeCallStatsTracingEnabled, \
264 INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()); \
265 } \
266 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ 256 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
267 v8::internal::tracing::CallStatsScopedTracer INTERNAL_TRACE_EVENT_UID( \ 257 v8::internal::tracing::CallStatsScopedTracer INTERNAL_TRACE_EVENT_UID( \
268 tracer); \ 258 tracer); \
269 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \ 259 if (INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()) { \
270 INTERNAL_TRACE_EVENT_UID(tracer) \ 260 INTERNAL_TRACE_EVENT_UID(tracer) \
271 .Initialize(isolate, INTERNAL_TRACE_EVENT_UID(category_group_enabled), \ 261 .Initialize(isolate, INTERNAL_TRACE_EVENT_UID(category_group_enabled), \
272 name); \ 262 name); \
273 } 263 }
274 264
275 namespace v8 { 265 namespace v8 {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 bool has_parent_scope_; 593 bool has_parent_scope_;
604 Data* p_data_; 594 Data* p_data_;
605 Data data_; 595 Data data_;
606 }; 596 };
607 597
608 } // namespace tracing 598 } // namespace tracing
609 } // namespace internal 599 } // namespace internal
610 } // namespace v8 600 } // namespace v8
611 601
612 #endif // SRC_TRACING_TRACE_EVENT_H_ 602 #endif // SRC_TRACING_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/tracing/trace-event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698