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

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: Implement binding flow events to slices for PostTasks. 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 int num_args, 119 int num_args,
120 const char** arg_names, 120 const char** arg_names,
121 const unsigned char* arg_types, 121 const unsigned char* arg_types,
122 const unsigned long long* arg_values, 122 const unsigned long long* arg_values,
123 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 123 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
124 unsigned int flags); 124 unsigned int flags,
125 unsigned long long bind_id);
dsinclair 2015/07/17 13:39:41 Move up below id.
125 126
126 void Reset(); 127 void Reset();
127 128
128 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now); 129 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now);
129 130
130 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead*); 131 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead*);
131 132
132 // Serialize event data to JSON 133 // Serialize event data to JSON
133 typedef base::Callback<bool(const char* category_group_name, 134 typedef base::Callback<bool(const char* category_group_name,
134 const char* event_name)> ArgumentFilterPredicate; 135 const char* event_name)> ArgumentFilterPredicate;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 scoped_ptr<TraceEventMemoryOverhead> cached_memory_overhead_estimate_; 178 scoped_ptr<TraceEventMemoryOverhead> cached_memory_overhead_estimate_;
178 TraceValue arg_values_[kTraceMaxNumArgs]; 179 TraceValue arg_values_[kTraceMaxNumArgs];
179 const char* arg_names_[kTraceMaxNumArgs]; 180 const char* arg_names_[kTraceMaxNumArgs];
180 scoped_refptr<ConvertableToTraceFormat> convertable_values_[kTraceMaxNumArgs]; 181 scoped_refptr<ConvertableToTraceFormat> convertable_values_[kTraceMaxNumArgs];
181 const unsigned char* category_group_enabled_; 182 const unsigned char* category_group_enabled_;
182 const char* name_; 183 const char* name_;
183 scoped_refptr<base::RefCountedString> parameter_copy_storage_; 184 scoped_refptr<base::RefCountedString> parameter_copy_storage_;
184 int thread_id_; 185 int thread_id_;
185 char phase_; 186 char phase_;
186 unsigned int flags_; 187 unsigned int flags_;
188 unsigned long long bind_id_;
187 unsigned char arg_types_[kTraceMaxNumArgs]; 189 unsigned char arg_types_[kTraceMaxNumArgs];
188 190
189 DISALLOW_COPY_AND_ASSIGN(TraceEvent); 191 DISALLOW_COPY_AND_ASSIGN(TraceEvent);
190 }; 192 };
191 193
192 // TraceBufferChunk is the basic unit of TraceBuffer. 194 // TraceBufferChunk is the basic unit of TraceBuffer.
193 class BASE_EXPORT TraceBufferChunk { 195 class BASE_EXPORT TraceBufferChunk {
194 public: 196 public:
195 explicit TraceBufferChunk(uint32 seq); 197 explicit TraceBufferChunk(uint32 seq);
196 ~TraceBufferChunk(); 198 ~TraceBufferChunk();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 const unsigned char* category_group_enabled, 461 const unsigned char* category_group_enabled,
460 const char* name, 462 const char* name,
461 unsigned long long id, 463 unsigned long long id,
462 int thread_id, 464 int thread_id,
463 const TraceTicks& timestamp, 465 const TraceTicks& timestamp,
464 int num_args, 466 int num_args,
465 const char** arg_names, 467 const char** arg_names,
466 const unsigned char* arg_types, 468 const unsigned char* arg_types,
467 const unsigned long long* arg_values, 469 const unsigned long long* arg_values,
468 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 470 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
469 unsigned int flags); 471 unsigned int flags,
472 unsigned long long bind_id);
dsinclair 2015/07/17 13:39:41 Move up below thread_id
470 static void AddTraceEventEtw(char phase, 473 static void AddTraceEventEtw(char phase,
471 const char* category_group, 474 const char* category_group,
472 const void* id, 475 const void* id,
473 const char* extra); 476 const char* extra);
474 static void AddTraceEventEtw(char phase, 477 static void AddTraceEventEtw(char phase,
475 const char* category_group, 478 const char* category_group,
476 const void* id, 479 const void* id,
477 const std::string& extra); 480 const std::string& extra);
478 481
479 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, 482 void UpdateTraceEventDuration(const unsigned char* category_group_enabled,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 subtle::AtomicWord generation_; 711 subtle::AtomicWord generation_;
709 bool use_worker_thread_; 712 bool use_worker_thread_;
710 713
711 DISALLOW_COPY_AND_ASSIGN(TraceLog); 714 DISALLOW_COPY_AND_ASSIGN(TraceLog);
712 }; 715 };
713 716
714 } // namespace trace_event 717 } // namespace trace_event
715 } // namespace base 718 } // namespace base
716 719
717 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ 720 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698