OLD | NEW |
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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 // ASYNC_STEP_PAST events. | 589 // ASYNC_STEP_PAST events. |
590 #define TRACE_EVENT_ASYNC_STEP_INTO0(category_group, name, id, step) \ | 590 #define TRACE_EVENT_ASYNC_STEP_INTO0(category_group, name, id, step) \ |
591 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \ | 591 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \ |
592 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) | 592 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) |
593 #define TRACE_EVENT_ASYNC_STEP_INTO1(category_group, name, id, step, \ | 593 #define TRACE_EVENT_ASYNC_STEP_INTO1(category_group, name, id, step, \ |
594 arg1_name, arg1_val) \ | 594 arg1_name, arg1_val) \ |
595 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \ | 595 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, \ |
596 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \ | 596 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \ |
597 arg1_name, arg1_val) | 597 arg1_name, arg1_val) |
598 | 598 |
599 // Similar to TRACE_EVENT_ASYNC_STEP_INTOx but with a custom |at| timestamp | |
600 // provided. | |
601 #define TRACE_EVENT_ASYNC_STEP_INTO_WITH_TIMESTAMP0(category_group, name, \ | |
602 id, step, timestamp) \ | |
603 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | |
604 TRACE_EVENT_PHASE_ASYNC_STEP_INTO, category_group, name, id, \ | |
605 static_cast<int>(base::PlatformThread::CurrentId()), \ | |
606 timestamp, TRACE_EVENT_FLAG_NONE, "step", step) | |
607 | |
608 // Records a single ASYNC_STEP_PAST event for |step| immediately. If the | 599 // Records a single ASYNC_STEP_PAST event for |step| immediately. If the |
609 // category is not enabled, then this does nothing. The |name| and |id| must | 600 // category is not enabled, then this does nothing. The |name| and |id| must |
610 // match the ASYNC_BEGIN event above. The |step| param identifies this step | 601 // match the ASYNC_BEGIN event above. The |step| param identifies this step |
611 // within the async event. This should be called at the beginning of the next | 602 // within the async event. This should be called at the beginning of the next |
612 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any | 603 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any |
613 // ASYNC_STEP_INTO events. | 604 // ASYNC_STEP_INTO events. |
614 #define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \ | 605 #define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \ |
615 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \ | 606 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \ |
616 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) | 607 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) |
617 #define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \ | 608 #define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \ |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 const char* name_; | 1580 const char* name_; |
1590 IDType id_; | 1581 IDType id_; |
1591 | 1582 |
1592 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1583 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1593 }; | 1584 }; |
1594 | 1585 |
1595 } // namespace debug | 1586 } // namespace debug |
1596 } // namespace base | 1587 } // namespace base |
1597 | 1588 |
1598 #endif /* BASE_TRACE_EVENT_TRACE_EVENT_H_ */ | 1589 #endif /* BASE_TRACE_EVENT_TRACE_EVENT_H_ */ |
OLD | NEW |