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

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

Issue 1221873002: Change sampler code events phase from instant to meta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed scope Created 5 years, 5 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) 548 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
549 549
550 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \ 550 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \
551 thread_id, timestamp, \ 551 thread_id, timestamp, \
552 arg1_name, arg1_val, \ 552 arg1_name, arg1_val, \
553 arg2_name, arg2_val) \ 553 arg2_name, arg2_val) \
554 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ 554 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
555 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \ 555 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
556 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) 556 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
557 557
558 // TRACE_EVENT_METADATA* events are injected by the sampling profiler.
dsinclair 2015/07/02 14:17:05 nit: remove the bit about being injected by the pr
alph 2015/07/02 14:59:55 Done. Thanks.
559 #define TRACE_EVENT_METADATA0(category_group, name) \
560 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category_group, name, \
561 TRACE_EVENT_FLAG_NONE)
562 #define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \
563 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category_group, name, \
564 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
565 #define TRACE_EVENT_METADATA2(category_group, name, arg1_name, arg1_val, \
566 arg2_name, arg2_val) \
567 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_METADATA, category_group, name, \
568 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
569 arg2_name, arg2_val)
570
558 // ASYNC_STEP_* APIs should be only used by legacy code. New code should 571 // ASYNC_STEP_* APIs should be only used by legacy code. New code should
559 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async 572 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async
560 // event. 573 // event.
561 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 574 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
562 // associated arguments. If the category is not enabled, then this 575 // associated arguments. If the category is not enabled, then this
563 // does nothing. 576 // does nothing.
564 // - category and name strings must have application lifetime (statics or 577 // - category and name strings must have application lifetime (statics or
565 // literals). They may not include " chars. 578 // literals). They may not include " chars.
566 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC 579 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC
567 // events are considered to match if their category_group, name and id values 580 // events are considered to match if their category_group, name and id values
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 const char* name_; 1729 const char* name_;
1717 IDType id_; 1730 IDType id_;
1718 1731
1719 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1732 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1720 }; 1733 };
1721 1734
1722 } // namespace trace_event 1735 } // namespace trace_event
1723 } // namespace base 1736 } // namespace base
1724 1737
1725 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1738 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/devtools/v8_sampling_profiler.cc » ('j') | content/renderer/devtools/v8_sampling_profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698