| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/atomicops.h" | 13 #include "base/atomicops.h" |
| 14 #include "base/base_export.h" | 14 #include "base/base_export.h" |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
| 17 #include "base/gtest_prod_util.h" | |
| 18 #include "base/memory/ref_counted_memory.h" | 17 #include "base/memory/ref_counted_memory.h" |
| 19 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 20 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
| 21 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 22 #include "base/synchronization/condition_variable.h" | 21 #include "base/synchronization/condition_variable.h" |
| 23 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
| 24 #include "base/threading/thread.h" | 23 #include "base/threading/thread.h" |
| 25 #include "base/threading/thread_local.h" | 24 #include "base/threading/thread_local.h" |
| 26 #include "base/trace_event/trace_event_memory_overhead.h" | 25 #include "base/trace_event/trace_event_memory_overhead.h" |
| 27 | 26 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 const char** arg_names, | 103 const char** arg_names, |
| 105 const unsigned char* arg_types, | 104 const unsigned char* arg_types, |
| 106 const unsigned long long* arg_values, | 105 const unsigned long long* arg_values, |
| 107 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, | 106 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| 108 unsigned int flags); | 107 unsigned int flags); |
| 109 | 108 |
| 110 void Reset(); | 109 void Reset(); |
| 111 | 110 |
| 112 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now); | 111 void UpdateDuration(const TraceTicks& now, const ThreadTicks& thread_now); |
| 113 | 112 |
| 114 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead*); | 113 void EstimateTraceMemoryOverhead(TraceEventMemoryOverhead* overhead); |
| 115 | 114 |
| 116 // Serialize event data to JSON | 115 // Serialize event data to JSON |
| 117 void AppendAsJSON( | 116 void AppendAsJSON( |
| 118 std::string* out, | 117 std::string* out, |
| 119 const ArgumentFilterPredicate& argument_filter_predicate) const; | 118 const ArgumentFilterPredicate& argument_filter_predicate) const; |
| 120 void AppendPrettyPrinted(std::ostringstream* out) const; | 119 void AppendPrettyPrinted(std::ostringstream* out) const; |
| 121 | 120 |
| 122 static void AppendValueAsJSON(unsigned char type, | 121 static void AppendValueAsJSON(unsigned char type, |
| 123 TraceValue value, | 122 TraceValue value, |
| 124 std::string* out); | 123 std::string* out); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 unsigned long long bind_id_; | 170 unsigned long long bind_id_; |
| 172 unsigned char arg_types_[kTraceMaxNumArgs]; | 171 unsigned char arg_types_[kTraceMaxNumArgs]; |
| 173 | 172 |
| 174 DISALLOW_COPY_AND_ASSIGN(TraceEvent); | 173 DISALLOW_COPY_AND_ASSIGN(TraceEvent); |
| 175 }; | 174 }; |
| 176 | 175 |
| 177 } // namespace trace_event | 176 } // namespace trace_event |
| 178 } // namespace base | 177 } // namespace base |
| 179 | 178 |
| 180 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 179 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
| OLD | NEW |