| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual ~ConvertableToTraceFormat() {} | 59 virtual ~ConvertableToTraceFormat() {} |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 friend class RefCounted<ConvertableToTraceFormat>; | 62 friend class RefCounted<ConvertableToTraceFormat>; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 const int kTraceMaxNumArgs = 2; | 65 const int kTraceMaxNumArgs = 2; |
| 66 | 66 |
| 67 struct TraceEventHandle { | 67 struct TraceEventHandle { |
| 68 uint32 chunk_seq; | 68 uint32 chunk_seq; |
| 69 uint16 chunk_index; | 69 // These numbers of bits must be kept consistent with |
| 70 uint16 event_index; | 70 // TraceBufferChunk::kMaxTrunkIndex and |
| 71 // TraceBufferChunk::kTraceBufferChunkSize (in trace_buffer.h). |
| 72 unsigned chunk_index : 26; |
| 73 unsigned event_index : 6; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 class BASE_EXPORT TraceEvent { | 76 class BASE_EXPORT TraceEvent { |
| 74 public: | 77 public: |
| 75 union TraceValue { | 78 union TraceValue { |
| 76 bool as_bool; | 79 bool as_bool; |
| 77 unsigned long long as_uint; | 80 unsigned long long as_uint; |
| 78 long long as_int; | 81 long long as_int; |
| 79 double as_double; | 82 double as_double; |
| 80 const void* as_pointer; | 83 const void* as_pointer; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 unsigned long long bind_id_; | 172 unsigned long long bind_id_; |
| 170 unsigned char arg_types_[kTraceMaxNumArgs]; | 173 unsigned char arg_types_[kTraceMaxNumArgs]; |
| 171 | 174 |
| 172 DISALLOW_COPY_AND_ASSIGN(TraceEvent); | 175 DISALLOW_COPY_AND_ASSIGN(TraceEvent); |
| 173 }; | 176 }; |
| 174 | 177 |
| 175 } // namespace trace_event | 178 } // namespace trace_event |
| 176 } // namespace base | 179 } // namespace base |
| 177 | 180 |
| 178 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ | 181 #endif // BASE_TRACE_EVENT_TRACE_EVENT_IMPL_H_ |
| OLD | NEW |