| Index: ppapi/shared_impl/ppb_trace_event_impl.cc
|
| diff --git a/ppapi/shared_impl/ppb_trace_event_impl.cc b/ppapi/shared_impl/ppb_trace_event_impl.cc
|
| index 80037d693c4d0279fb577f31e3e18acd0b5375a6..ce1afb94b51bb18d824a536088e3ea54a47883bc 100644
|
| --- a/ppapi/shared_impl/ppb_trace_event_impl.cc
|
| +++ b/ppapi/shared_impl/ppb_trace_event_impl.cc
|
| @@ -9,7 +9,6 @@
|
| #include "base/threading/platform_thread.h"
|
| #include "ppapi/thunk/thunk.h"
|
|
|
| -
|
| namespace ppapi {
|
|
|
| // PPB_Trace_Event_Dev is a shared implementation because Trace Events can be
|
| @@ -30,27 +29,33 @@ void* TraceEventImpl::GetCategoryEnabled(const char* category_name) {
|
| }
|
|
|
| // static
|
| -void TraceEventImpl::AddTraceEvent(
|
| - int8_t phase,
|
| - const void* category_enabled,
|
| - const char* name,
|
| - uint64_t id,
|
| - uint32_t num_args,
|
| - const char* arg_names[],
|
| - const uint8_t arg_types[],
|
| - const uint64_t arg_values[],
|
| - uint8_t flags) {
|
| +void TraceEventImpl::AddTraceEvent(int8_t phase,
|
| + const void* category_enabled,
|
| + const char* name,
|
| + uint64_t id,
|
| + uint32_t num_args,
|
| + const char* arg_names[],
|
| + const uint8_t arg_types[],
|
| + const uint64_t arg_values[],
|
| + uint8_t flags) {
|
|
|
| COMPILE_ASSERT(sizeof(unsigned long long) == sizeof(uint64_t), msg);
|
|
|
| - base::debug::TraceLog::GetInstance()->AddTraceEvent(phase,
|
| - static_cast<const unsigned char*>(category_enabled), name, id, num_args,
|
| - arg_names, arg_types,
|
| + base::debug::TraceLog::GetInstance()->AddTraceEvent(
|
| + phase,
|
| + static_cast<const unsigned char*>(category_enabled),
|
| + name,
|
| + id,
|
| + num_args,
|
| + arg_names,
|
| + arg_types,
|
| // This cast is necessary for LP64 systems, where uint64_t is defined as
|
| // an unsigned long int, but trace_event internals are hermetic and
|
| // accepts an |unsigned long long*|. The pointer types are compatible but
|
| // the compiler throws an error without an explicit cast.
|
| - reinterpret_cast<const unsigned long long*>(arg_values), NULL, flags);
|
| + reinterpret_cast<const unsigned long long*>(arg_values),
|
| + NULL,
|
| + flags);
|
| }
|
|
|
| // static
|
| @@ -68,15 +73,21 @@ void TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp(
|
| uint8_t flags) {
|
| base::debug::TraceLog::GetInstance()->AddTraceEventWithThreadIdAndTimestamp(
|
| phase,
|
| - static_cast<const unsigned char*>(category_enabled), name, id,
|
| + static_cast<const unsigned char*>(category_enabled),
|
| + name,
|
| + id,
|
| thread_id,
|
| base::TimeTicks::FromInternalValue(timestamp),
|
| - num_args, arg_names, arg_types,
|
| + num_args,
|
| + arg_names,
|
| + arg_types,
|
| // This cast is necessary for LP64 systems, where uint64_t is defined as
|
| // an unsigned long int, but trace_event internals are hermetic and
|
| // accepts an |unsigned long long*|. The pointer types are compatible but
|
| // the compiler throws an error without an explicit cast.
|
| - reinterpret_cast<const unsigned long long*>(arg_values), NULL, flags);
|
| + reinterpret_cast<const unsigned long long*>(arg_values),
|
| + NULL,
|
| + flags);
|
| }
|
|
|
| // static
|
| @@ -92,18 +103,15 @@ void TraceEventImpl::SetThreadName(const char* thread_name) {
|
| namespace {
|
|
|
| const PPB_Trace_Event_Dev_0_1 g_ppb_trace_event_thunk_0_1 = {
|
| - &TraceEventImpl::GetCategoryEnabled,
|
| - &TraceEventImpl::AddTraceEvent,
|
| - &TraceEventImpl::SetThreadName,
|
| -};
|
| + &TraceEventImpl::GetCategoryEnabled, &TraceEventImpl::AddTraceEvent,
|
| + &TraceEventImpl::SetThreadName, };
|
|
|
| const PPB_Trace_Event_Dev_0_2 g_ppb_trace_event_thunk_0_2 = {
|
| - &TraceEventImpl::GetCategoryEnabled,
|
| - &TraceEventImpl::AddTraceEvent,
|
| - &TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp,
|
| - &TraceEventImpl::Now,
|
| - &TraceEventImpl::SetThreadName,
|
| -};
|
| + &TraceEventImpl::GetCategoryEnabled,
|
| + &TraceEventImpl::AddTraceEvent,
|
| + &TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp,
|
| + &TraceEventImpl::Now,
|
| + &TraceEventImpl::SetThreadName, };
|
|
|
| } // namespace ppapi
|
|
|
|
|