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

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

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a flag for FLOW_OPTIONAL. Created 5 years, 4 months 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 trace_event_internal::kNoId, 81 trace_event_internal::kNoId,
82 thread_id, 82 thread_id,
83 base::TraceTicks::FromInternalValue(timestamp), 83 base::TraceTicks::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 nullptr,
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::TraceTicks::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);
(...skipping 22 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

Powered by Google App Engine
This is Rietveld 408576698