| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, \ | 388 #define TRACE_EVENT_BEGIN_WITH_ID_TID_AND_TIMESTAMP0(category_group, \ |
| 389 name, id, thread_id, timestamp) \ | 389 name, id, thread_id, timestamp) \ |
| 390 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 390 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 391 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ | 391 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ |
| 392 timestamp, TRACE_EVENT_FLAG_NONE) | 392 timestamp, TRACE_EVENT_FLAG_NONE) |
| 393 #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \ | 393 #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP0( \ |
| 394 category_group, name, id, thread_id, timestamp) \ | 394 category_group, name, id, thread_id, timestamp) \ |
| 395 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 395 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 396 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ | 396 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ |
| 397 timestamp, TRACE_EVENT_FLAG_COPY) | 397 timestamp, TRACE_EVENT_FLAG_COPY) |
| 398 #define TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( \ |
| 399 category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ |
| 400 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 401 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, thread_id, \ |
| 402 timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) |
| 398 | 403 |
| 399 // Records a single END event for "name" immediately. If the category | 404 // Records a single END event for "name" immediately. If the category |
| 400 // is not enabled, then this does nothing. | 405 // is not enabled, then this does nothing. |
| 401 // - category and name strings must have application lifetime (statics or | 406 // - category and name strings must have application lifetime (statics or |
| 402 // literals). They may not include " chars. | 407 // literals). They may not include " chars. |
| 403 #define TRACE_EVENT_END0(category_group, name) \ | 408 #define TRACE_EVENT_END0(category_group, name) \ |
| 404 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ | 409 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ |
| 405 category_group, name, TRACE_EVENT_FLAG_NONE) | 410 category_group, name, TRACE_EVENT_FLAG_NONE) |
| 406 #define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val) \ | 411 #define TRACE_EVENT_END1(category_group, name, arg1_name, arg1_val) \ |
| 407 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ | 412 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, \ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 432 #define TRACE_EVENT_END_WITH_ID_TID_AND_TIMESTAMP0(category_group, \ | 437 #define TRACE_EVENT_END_WITH_ID_TID_AND_TIMESTAMP0(category_group, \ |
| 433 name, id, thread_id, timestamp) \ | 438 name, id, thread_id, timestamp) \ |
| 434 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 439 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 435 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ | 440 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ |
| 436 timestamp, TRACE_EVENT_FLAG_NONE) | 441 timestamp, TRACE_EVENT_FLAG_NONE) |
| 437 #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \ | 442 #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP0( \ |
| 438 category_group, name, id, thread_id, timestamp) \ | 443 category_group, name, id, thread_id, timestamp) \ |
| 439 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 444 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 440 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ | 445 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ |
| 441 timestamp, TRACE_EVENT_FLAG_COPY) | 446 timestamp, TRACE_EVENT_FLAG_COPY) |
| 447 #define TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1( \ |
| 448 category_group, name, id, thread_id, timestamp, arg1_name, arg1_val) \ |
| 449 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 450 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, thread_id, \ |
| 451 timestamp, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) |
| 442 | 452 |
| 443 // Records the value of a counter called "name" immediately. Value | 453 // Records the value of a counter called "name" immediately. Value |
| 444 // must be representable as a 32 bit integer. | 454 // must be representable as a 32 bit integer. |
| 445 // - category and name strings must have application lifetime (statics or | 455 // - category and name strings must have application lifetime (statics or |
| 446 // literals). They may not include " chars. | 456 // literals). They may not include " chars. |
| 447 #define TRACE_COUNTER1(category_group, name, value) \ | 457 #define TRACE_COUNTER1(category_group, name, value) \ |
| 448 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ | 458 INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_COUNTER, \ |
| 449 category_group, name, TRACE_EVENT_FLAG_NONE, \ | 459 category_group, name, TRACE_EVENT_FLAG_NONE, \ |
| 450 "value", static_cast<int>(value)) | 460 "value", static_cast<int>(value)) |
| 451 #define TRACE_COPY_COUNTER1(category_group, name, value) \ | 461 #define TRACE_COPY_COUNTER1(category_group, name, value) \ |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 const char* name_; | 1580 const char* name_; |
| 1571 IDType id_; | 1581 IDType id_; |
| 1572 | 1582 |
| 1573 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1583 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1574 }; | 1584 }; |
| 1575 | 1585 |
| 1576 } // namespace debug | 1586 } // namespace debug |
| 1577 } // namespace base | 1587 } // namespace base |
| 1578 | 1588 |
| 1579 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ | 1589 #endif /* BASE_DEBUG_TRACE_EVENT_H_ */ |
| OLD | NEW |