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 |
599 // Records a single ASYNC_STEP_PAST event for |step| immediately. If the | 608 // Records a single ASYNC_STEP_PAST event for |step| immediately. If the |
600 // category is not enabled, then this does nothing. The |name| and |id| must | 609 // category is not enabled, then this does nothing. The |name| and |id| must |
601 // match the ASYNC_BEGIN event above. The |step| param identifies this step | 610 // match the ASYNC_BEGIN event above. The |step| param identifies this step |
602 // within the async event. This should be called at the beginning of the next | 611 // within the async event. This should be called at the beginning of the next |
603 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any | 612 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any |
604 // ASYNC_STEP_INTO events. | 613 // ASYNC_STEP_INTO events. |
605 #define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \ | 614 #define TRACE_EVENT_ASYNC_STEP_PAST0(category_group, name, id, step) \ |
606 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \ | 615 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, \ |
607 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) | 616 category_group, name, id, TRACE_EVENT_FLAG_NONE, "step", step) |
608 #define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \ | 617 #define TRACE_EVENT_ASYNC_STEP_PAST1(category_group, name, id, step, \ |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 const char* name_; | 1597 const char* name_; |
1589 IDType id_; | 1598 IDType id_; |
1590 | 1599 |
1591 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1600 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1592 }; | 1601 }; |
1593 | 1602 |
1594 } // namespace trace_event | 1603 } // namespace trace_event |
1595 } // namespace base | 1604 } // namespace base |
1596 | 1605 |
1597 #endif /* BASE_TRACE_EVENT_TRACE_EVENT_H_ */ | 1606 #endif /* BASE_TRACE_EVENT_TRACE_EVENT_H_ */ |
OLD | NEW |