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 #include "ppapi/shared_impl/ppb_trace_event_impl.h" | 5 #include "ppapi/shared_impl/ppb_trace_event_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "ppapi/thunk/thunk.h" | 10 #include "ppapi/thunk/thunk.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 void TraceEventImpl::AddTraceEvent(int8_t phase, | 32 void TraceEventImpl::AddTraceEvent(int8_t phase, |
33 const void* category_enabled, | 33 const void* category_enabled, |
34 const char* name, | 34 const char* name, |
35 uint64_t id, | 35 uint64_t id, |
36 uint32_t num_args, | 36 uint32_t num_args, |
37 const char* arg_names[], | 37 const char* arg_names[], |
38 const uint8_t arg_types[], | 38 const uint8_t arg_types[], |
39 const uint64_t arg_values[], | 39 const uint64_t arg_values[], |
40 uint8_t flags) { | 40 uint8_t flags) { |
41 | 41 |
42 COMPILE_ASSERT(sizeof(unsigned long long) == sizeof(uint64_t), msg); | 42 static_assert(sizeof(unsigned long long) == sizeof(uint64_t), |
| 43 "unexpected data type sizes"); |
43 | 44 |
44 base::debug::TraceLog::GetInstance()->AddTraceEvent( | 45 base::debug::TraceLog::GetInstance()->AddTraceEvent( |
45 phase, | 46 phase, |
46 static_cast<const unsigned char*>(category_enabled), | 47 static_cast<const unsigned char*>(category_enabled), |
47 name, | 48 name, |
48 id, | 49 id, |
49 num_args, | 50 num_args, |
50 arg_names, | 51 arg_names, |
51 arg_types, | 52 arg_types, |
52 // This cast is necessary for LP64 systems, where uint64_t is defined as | 53 // This cast is necessary for LP64 systems, where uint64_t is defined as |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() { | 124 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() { |
124 return &g_ppb_trace_event_thunk_0_1; | 125 return &g_ppb_trace_event_thunk_0_1; |
125 } | 126 } |
126 | 127 |
127 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() { | 128 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() { |
128 return &g_ppb_trace_event_thunk_0_2; | 129 return &g_ppb_trace_event_thunk_0_2; |
129 } | 130 } |
130 | 131 |
131 } // namespace thunk | 132 } // namespace thunk |
132 } // namespace ppapi | 133 } // namespace ppapi |
OLD | NEW |