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

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

Issue 17555005: Add events with custom timestamps and thread id to PPAPI dev tracing interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 7 years, 5 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
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/shared_impl/ppb_trace_event_impl.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 #ifndef PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_
6 #define PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_ 6 #define PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_
7 7
8 #include "ppapi/c/dev/ppb_trace_event_dev.h" 8 #include "ppapi/c/dev/ppb_trace_event_dev.h"
9 #include "ppapi/c/pp_bool.h" 9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/shared_impl/ppapi_shared_export.h" 10 #include "ppapi/shared_impl/ppapi_shared_export.h"
11 11
12 namespace ppapi { 12 namespace ppapi {
13 13
14 // Contains the implementation of the PPB_Trace_Event_Dev functions. Since these 14 // Contains the implementation of the PPB_Trace_Event_Dev functions. Since these
15 // functions are to be run from whatever plugin process/thread in which they 15 // functions are to be run from whatever plugin process/thread in which they
16 // originated, the implementation lives in shared_impl. 16 // originated, the implementation lives in shared_impl.
17 // 17 //
18 class PPAPI_SHARED_EXPORT TraceEventImpl { 18 class PPAPI_SHARED_EXPORT TraceEventImpl {
19 public: 19 public:
20 static void* GetCategoryEnabled(const char* category_name); 20 static void* GetCategoryEnabled(const char* category_name);
21 static void AddTraceEvent(int8_t phase, 21 static void AddTraceEvent(
22 const void* category_enabled, 22 int8_t phase,
23 const char* name, 23 const void* category_enabled,
24 uint64_t id, 24 const char* name,
25 uint32_t num_args, 25 uint64_t id,
26 const char* arg_names[], 26 uint32_t num_args,
27 const uint8_t arg_types[], 27 const char* arg_names[],
28 const uint64_t arg_values[], 28 const uint8_t arg_types[],
29 uint8_t flags); 29 const uint64_t arg_values[],
30 uint8_t flags);
31 static void AddTraceEventWithThreadIdAndTimestamp(
32 int8_t phase,
33 const void* category_enabled,
34 const char* name,
35 uint64_t id,
36 int32_t thread_id,
37 int64_t timestamp,
38 uint32_t num_args,
39 const char* arg_names[],
40 const uint8_t arg_types[],
41 const uint64_t arg_values[],
42 uint8_t flags);
43 static int64_t Now();
30 static void SetThreadName(const char* thread_name); 44 static void SetThreadName(const char* thread_name);
31 }; 45 };
32 46
33 } // namespace ppapi 47 } // namespace ppapi
34 48
35 #endif // PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_ 49 #endif // PPAPI_SHARED_IMPL_PPB_TRACE_EVENT_IMPL_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/shared_impl/ppb_trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698