| 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 | 5 |
| 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
| 7 #define BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 7 #define BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
| 8 | 8 |
| 9 #include <stack> | 9 #include <stack> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 void Initialize( | 111 void Initialize( |
| 112 int thread_id, | 112 int thread_id, |
| 113 TraceTicks timestamp, | 113 TraceTicks timestamp, |
| 114 ThreadTicks thread_timestamp, | 114 ThreadTicks thread_timestamp, |
| 115 char phase, | 115 char phase, |
| 116 const unsigned char* category_group_enabled, | 116 const unsigned char* category_group_enabled, |
| 117 const char* name, | 117 const char* name, |
| 118 unsigned long long id, | 118 unsigned long long id, |
| 119 unsigned long long context_id, | 119 unsigned long long context_id, |
| 120 unsigned long long bind_id, |
| 120 int num_args, | 121 int num_args, |
| 121 const char** arg_names, | 122 const char** arg_names, |
| 122 const unsigned char* arg_types, | 123 const unsigned char* arg_types, |
| 123 const unsigned long long* arg_values, | 124 const unsigned long long* arg_values, |
| 124 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, | 125 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| 125 unsigned int flags); | 126 unsigned int flags); |
| 126 | 127 |
| 127 void Reset(); | 128 void Reset(); |
| 128 | 129 |
| 129 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now); | 130 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 unsigned long long context_id_; | 182 unsigned long long context_id_; |
| 182 TraceValue arg_values_[kTraceMaxNumArgs]; | 183 TraceValue arg_values_[kTraceMaxNumArgs]; |
| 183 const char* arg_names_[kTraceMaxNumArgs]; | 184 const char* arg_names_[kTraceMaxNumArgs]; |
| 184 scoped_refptr<ConvertableToTraceFormat> convertable_values_[kTraceMaxNumArgs]; | 185 scoped_refptr<ConvertableToTraceFormat> convertable_values_[kTraceMaxNumArgs]; |
| 185 const unsigned char* category_group_enabled_; | 186 const unsigned char* category_group_enabled_; |
| 186 const char* name_; | 187 const char* name_; |
| 187 scoped_refptr<base::RefCountedString> parameter_copy_storage_; | 188 scoped_refptr<base::RefCountedString> parameter_copy_storage_; |
| 188 int thread_id_; | 189 int thread_id_; |
| 189 char phase_; | 190 char phase_; |
| 190 unsigned int flags_; | 191 unsigned int flags_; |
| 192 unsigned long long bind_id_; |
| 191 unsigned char arg_types_[kTraceMaxNumArgs]; | 193 unsigned char arg_types_[kTraceMaxNumArgs]; |
| 192 | 194 |
| 193 DISALLOW_COPY_AND_ASSIGN(TraceEvent); | 195 DISALLOW_COPY_AND_ASSIGN(TraceEvent); |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 // TraceBufferChunk is the basic unit of TraceBuffer. | 198 // TraceBufferChunk is the basic unit of TraceBuffer. |
| 197 class BASE_EXPORT TraceBufferChunk { | 199 class BASE_EXPORT TraceBufferChunk { |
| 198 public: | 200 public: |
| 199 explicit TraceBufferChunk(uint32 seq); | 201 explicit TraceBufferChunk(uint32 seq); |
| 200 ~TraceBufferChunk(); | 202 ~TraceBufferChunk(); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 unsigned long long id, | 479 unsigned long long id, |
| 478 unsigned long long context_id, | 480 unsigned long long context_id, |
| 479 int thread_id, | 481 int thread_id, |
| 480 const TraceTicks& timestamp, | 482 const TraceTicks& timestamp, |
| 481 int num_args, | 483 int num_args, |
| 482 const char** arg_names, | 484 const char** arg_names, |
| 483 const unsigned char* arg_types, | 485 const unsigned char* arg_types, |
| 484 const unsigned long long* arg_values, | 486 const unsigned long long* arg_values, |
| 485 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, | 487 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| 486 unsigned int flags); | 488 unsigned int flags); |
| 489 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp( |
| 490 char phase, |
| 491 const unsigned char* category_group_enabled, |
| 492 const char* name, |
| 493 unsigned long long id, |
| 494 unsigned long long context_id, |
| 495 unsigned long long bind_id, |
| 496 int thread_id, |
| 497 const TraceTicks& timestamp, |
| 498 int num_args, |
| 499 const char** arg_names, |
| 500 const unsigned char* arg_types, |
| 501 const unsigned long long* arg_values, |
| 502 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| 503 unsigned int flags); |
| 487 static void AddTraceEventEtw(char phase, | 504 static void AddTraceEventEtw(char phase, |
| 488 const char* category_group, | 505 const char* category_group, |
| 489 const void* id, | 506 const void* id, |
| 490 const char* extra); | 507 const char* extra); |
| 491 static void AddTraceEventEtw(char phase, | 508 static void AddTraceEventEtw(char phase, |
| 492 const char* category_group, | 509 const char* category_group, |
| 493 const void* id, | 510 const void* id, |
| 494 const std::string& extra); | 511 const std::string& extra); |
| 495 | 512 |
| 496 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, | 513 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 subtle::AtomicWord generation_; | 742 subtle::AtomicWord generation_; |
| 726 bool use_worker_thread_; | 743 bool use_worker_thread_; |
| 727 | 744 |
| 728 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 745 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 729 }; | 746 }; |
| 730 | 747 |
| 731 } // namespace trace_event | 748 } // namespace trace_event |
| 732 } // namespace base | 749 } // namespace base |
| 733 | 750 |
| 734 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 751 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
| OLD | NEW |