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 <stdint.h> |
| 10 |
9 #include <stack> | 11 #include <stack> |
10 #include <string> | 12 #include <string> |
11 #include <vector> | 13 #include <vector> |
12 | 14 |
13 #include "base/atomicops.h" | 15 #include "base/atomicops.h" |
14 #include "base/base_export.h" | 16 #include "base/base_export.h" |
15 #include "base/callback.h" | 17 #include "base/callback.h" |
16 #include "base/containers/hash_tables.h" | 18 #include "base/containers/hash_tables.h" |
| 19 #include "base/macros.h" |
17 #include "base/memory/ref_counted_memory.h" | 20 #include "base/memory/ref_counted_memory.h" |
18 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
19 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
20 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
21 #include "base/synchronization/condition_variable.h" | 24 #include "base/synchronization/condition_variable.h" |
22 #include "base/synchronization/lock.h" | 25 #include "base/synchronization/lock.h" |
23 #include "base/threading/thread.h" | 26 #include "base/threading/thread.h" |
24 #include "base/threading/thread_local.h" | 27 #include "base/threading/thread_local.h" |
25 #include "base/trace_event/trace_event_memory_overhead.h" | 28 #include "base/trace_event/trace_event_memory_overhead.h" |
| 29 #include "build/build_config.h" |
26 | 30 |
27 namespace base { | 31 namespace base { |
28 | 32 |
29 class WaitableEvent; | 33 class WaitableEvent; |
30 class MessageLoop; | 34 class MessageLoop; |
31 | 35 |
32 namespace trace_event { | 36 namespace trace_event { |
33 | 37 |
34 typedef base::Callback<bool(const char* arg_name)> ArgumentNameFilterPredicate; | 38 typedef base::Callback<bool(const char* arg_name)> ArgumentNameFilterPredicate; |
35 | 39 |
(...skipping 24 matching lines...) Expand all Loading... |
60 protected: | 64 protected: |
61 virtual ~ConvertableToTraceFormat() {} | 65 virtual ~ConvertableToTraceFormat() {} |
62 | 66 |
63 private: | 67 private: |
64 friend class RefCounted<ConvertableToTraceFormat>; | 68 friend class RefCounted<ConvertableToTraceFormat>; |
65 }; | 69 }; |
66 | 70 |
67 const int kTraceMaxNumArgs = 2; | 71 const int kTraceMaxNumArgs = 2; |
68 | 72 |
69 struct TraceEventHandle { | 73 struct TraceEventHandle { |
70 uint32 chunk_seq; | 74 uint32_t chunk_seq; |
71 // These numbers of bits must be kept consistent with | 75 // These numbers of bits must be kept consistent with |
72 // TraceBufferChunk::kMaxTrunkIndex and | 76 // TraceBufferChunk::kMaxTrunkIndex and |
73 // TraceBufferChunk::kTraceBufferChunkSize (in trace_buffer.h). | 77 // TraceBufferChunk::kTraceBufferChunkSize (in trace_buffer.h). |
74 unsigned chunk_index : 26; | 78 unsigned chunk_index : 26; |
75 unsigned event_index : 6; | 79 unsigned event_index : 6; |
76 }; | 80 }; |
77 | 81 |
78 class BASE_EXPORT TraceEvent { | 82 class BASE_EXPORT TraceEvent { |
79 public: | 83 public: |
80 union TraceValue { | 84 union TraceValue { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 unsigned char arg_types_[kTraceMaxNumArgs]; | 180 unsigned char arg_types_[kTraceMaxNumArgs]; |
177 char phase_; | 181 char phase_; |
178 | 182 |
179 DISALLOW_COPY_AND_ASSIGN(TraceEvent); | 183 DISALLOW_COPY_AND_ASSIGN(TraceEvent); |
180 }; | 184 }; |
181 | 185 |
182 } // namespace trace_event | 186 } // namespace trace_event |
183 } // namespace base | 187 } // namespace base |
184 | 188 |
185 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 189 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
OLD | NEW |