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

Side by Side Diff: base/debug/trace_event.h

Issue 792903003: V8 Sampling Profiler: Collect V8 JitCodeEvents in tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 // This header file defines the set of trace_event macros without specifying 5 // This header file defines the set of trace_event macros without specifying
6 // how the events actually get collected and stored. If you need to expose trace 6 // how the events actually get collected and stored. If you need to expose trace
7 // events to some other universe, you can copy-and-paste this file as well as 7 // events to some other universe, you can copy-and-paste this file as well as
8 // trace_event.h, modifying the macros contained there as necessary for the 8 // trace_event.h, modifying the macros contained there as necessary for the
9 // target platform. The end result is that multiple libraries can funnel events 9 // target platform. The end result is that multiple libraries can funnel events
10 // through to a shared trace event collector. 10 // through to a shared trace event collector.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 traceEventSamplingScope(category "\0" name); 343 traceEventSamplingScope(category "\0" name);
344 344
345 // Syntactic sugars for the sampling tracing in the main thread. 345 // Syntactic sugars for the sampling tracing in the main thread.
346 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ 346 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \
347 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) 347 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name)
348 #define TRACE_EVENT_GET_SAMPLING_STATE() \ 348 #define TRACE_EVENT_GET_SAMPLING_STATE() \
349 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) 349 TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0)
350 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ 350 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \
351 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) 351 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name)
352 352
353 #define TRACE_EVENT_SAMPLE_METADATA0(category, name) \
354 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category, name, \
355 TRACE_EVENT_FLAG_NONE | TRACE_EVENT_SCOPE_THREAD)
yurys 2015/01/14 13:41:36 TRACE_EVENT_SCOPE_THREAD here and below?
alph 2015/01/14 14:31:10 The flag and scope are different domains, so I spe
356
357 #define TRACE_EVENT_SAMPLE_METADATA1(category, name, arg1_name, arg1_val) \
358 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category, name, \
359 TRACE_EVENT_FLAG_NONE | TRACE_EVENT_SCOPE_THREAD, \
360 arg1_name, arg1_val)
361
362 #define TRACE_EVENT_SAMPLE_METADATA2(category, name, arg1_name, arg1_val, \
363 arg2_name, arg2_val) \
364 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category, name, \
365 TRACE_EVENT_FLAG_NONE | TRACE_EVENT_SCOPE_THREAD, \
366 arg1_name, arg1_val, arg2_name, arg2_val)
353 367
354 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 368 // Records a single BEGIN event called "name" immediately, with 0, 1 or 2
355 // associated arguments. If the category is not enabled, then this 369 // associated arguments. If the category is not enabled, then this
356 // does nothing. 370 // does nothing.
357 // - category and name strings must have application lifetime (statics or 371 // - category and name strings must have application lifetime (statics or
358 // literals). They may not include " chars. 372 // literals). They may not include " chars.
359 #define TRACE_EVENT_BEGIN0(category_group, name) \ 373 #define TRACE_EVENT_BEGIN0(category_group, name) \
360 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \ 374 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, \
361 category_group, name, TRACE_EVENT_FLAG_NONE) 375 category_group, name, TRACE_EVENT_FLAG_NONE)
362 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \ 376 #define TRACE_EVENT_BEGIN1(category_group, name, arg1_name, arg1_val) \
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 const char* name_; 1594 const char* name_;
1581 IDType id_; 1595 IDType id_;
1582 1596
1583 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1597 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1584 }; 1598 };
1585 1599
1586 } // namespace debug 1600 } // namespace debug
1587 } // namespace base 1601 } // namespace base
1588 1602
1589 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ 1603 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */
OLDNEW
« no previous file with comments | « no previous file | content/renderer/devtools/v8_sampling_profiler.h » ('j') | content/renderer/devtools/v8_sampling_profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698