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

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

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mainly incorporates context_id into the new flow event APIs. 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 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
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
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 const char** arg_names, 470 const char** arg_names,
469 const unsigned char* arg_types, 471 const unsigned char* arg_types,
470 const unsigned long long* arg_values, 472 const unsigned long long* arg_values,
471 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 473 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
472 unsigned int flags); 474 unsigned int flags);
473 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp( 475 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp(
474 char phase, 476 char phase,
475 const unsigned char* category_group_enabled, 477 const unsigned char* category_group_enabled,
476 const char* name, 478 const char* name,
477 unsigned long long id, 479 unsigned long long id,
480 int thread_id,
481 const TraceTicks& timestamp,
482 int num_args,
483 const char** arg_names,
484 const unsigned char* arg_types,
485 const unsigned long long* arg_values,
486 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
487 unsigned int flags);
488 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp(
489 char phase,
490 const unsigned char* category_group_enabled,
491 const char* name,
492 unsigned long long id,
478 unsigned long long context_id, 493 unsigned long long context_id,
494 unsigned long long bind_id,
479 int thread_id, 495 int thread_id,
480 const TraceTicks& timestamp, 496 const TraceTicks& timestamp,
481 int num_args, 497 int num_args,
482 const char** arg_names, 498 const char** arg_names,
483 const unsigned char* arg_types, 499 const unsigned char* arg_types,
484 const unsigned long long* arg_values, 500 const unsigned long long* arg_values,
485 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 501 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
486 unsigned int flags); 502 unsigned int flags);
487 static void AddTraceEventEtw(char phase, 503 static void AddTraceEventEtw(char phase,
488 const char* category_group, 504 const char* category_group,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 subtle::AtomicWord generation_; 741 subtle::AtomicWord generation_;
726 bool use_worker_thread_; 742 bool use_worker_thread_;
727 743
728 DISALLOW_COPY_AND_ASSIGN(TraceLog); 744 DISALLOW_COPY_AND_ASSIGN(TraceLog);
729 }; 745 };
730 746
731 } // namespace trace_event 747 } // namespace trace_event
732 } // namespace base 748 } // namespace base
733 749
734 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ 750 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698