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

Side by Side Diff: ppapi/shared_impl/ppb_trace_event_impl.cc

Issue 1424703003: Kills TraceTicks, which was functionally the same as TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed win compile error. Created 5 years, 1 month 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
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "ppapi/thunk/thunk.h" 10 #include "ppapi/thunk/thunk.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const uint64_t arg_values[], 73 const uint64_t arg_values[],
74 uint8_t flags) { 74 uint8_t flags) {
75 base::trace_event::TraceLog::GetInstance() 75 base::trace_event::TraceLog::GetInstance()
76 ->AddTraceEventWithThreadIdAndTimestamp( 76 ->AddTraceEventWithThreadIdAndTimestamp(
77 phase, 77 phase,
78 static_cast<const unsigned char*>(category_enabled), 78 static_cast<const unsigned char*>(category_enabled),
79 name, 79 name,
80 id, 80 id,
81 trace_event_internal::kNoId, 81 trace_event_internal::kNoId,
82 thread_id, 82 thread_id,
83 base::TraceTicks::FromInternalValue(timestamp), 83 base::TimeTicks::FromInternalValue(timestamp),
84 num_args, 84 num_args,
85 arg_names, 85 arg_names,
86 arg_types, 86 arg_types,
87 // This cast is necessary for LP64 systems, where uint64_t is defined as 87 // This cast is necessary for LP64 systems, where uint64_t is defined as
88 // an unsigned long int, but trace_event internals are hermetic and 88 // an unsigned long int, but trace_event internals are hermetic and
89 // accepts an |unsigned long long*|. The pointer types are compatible but 89 // accepts an |unsigned long long*|. The pointer types are compatible but
90 // the compiler throws an error without an explicit cast. 90 // the compiler throws an error without an explicit cast.
91 reinterpret_cast<const unsigned long long*>(arg_values), 91 reinterpret_cast<const unsigned long long*>(arg_values),
92 NULL, 92 NULL,
93 flags); 93 flags);
94 } 94 }
95 95
96 // static 96 // static
97 int64_t TraceEventImpl::Now() { 97 int64_t TraceEventImpl::Now() {
98 return base::TraceTicks::Now().ToInternalValue(); 98 return base::TimeTicks::Now().ToInternalValue();
99 } 99 }
100 100
101 // static 101 // static
102 void TraceEventImpl::SetThreadName(const char* thread_name) { 102 void TraceEventImpl::SetThreadName(const char* thread_name) {
103 base::PlatformThread::SetName(thread_name); 103 base::PlatformThread::SetName(thread_name);
104 } 104 }
105 105
106 namespace { 106 namespace {
107 107
108 const PPB_Trace_Event_Dev_0_1 g_ppb_trace_event_thunk_0_1 = { 108 const PPB_Trace_Event_Dev_0_1 g_ppb_trace_event_thunk_0_1 = {
(...skipping 17 matching lines...) Expand all
126 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() { 126 const PPB_Trace_Event_Dev_0_1* GetPPB_Trace_Event_Dev_0_1_Thunk() {
127 return &g_ppb_trace_event_thunk_0_1; 127 return &g_ppb_trace_event_thunk_0_1;
128 } 128 }
129 129
130 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() { 130 const PPB_Trace_Event_Dev_0_2* GetPPB_Trace_Event_Dev_0_2_Thunk() {
131 return &g_ppb_trace_event_thunk_0_2; 131 return &g_ppb_trace_event_thunk_0_2;
132 } 132 }
133 133
134 } // namespace thunk 134 } // namespace thunk
135 } // namespace ppapi 135 } // namespace ppapi
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698