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

Side by Side Diff: ppapi/c/dev/ppb_trace_event_dev.h

Issue 11464005: Add trace event Pepper API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Deleted thunk, renamed, other feedback Created 8 years 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
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 /* From dev/ppb_trace_event_dev.idl modified Thu Dec 20 15:42:07 2012. */
7
8 #ifndef PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_
9 #define PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_
10
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_stdint.h"
13
14 #define PPB_TRACE_EVENT_DEV_INTERFACE_0_1 "PPB_Trace_Event(Dev);0.1"
15 #define PPB_TRACE_EVENT_DEV_INTERFACE PPB_TRACE_EVENT_DEV_INTERFACE_0_1
16
17 /**
18 * @file
19 * This file defines the <code>PPB_Trace_Event</code> interface. It is meant
20 * to be used in plugins as the API that trace macros from trace_event.h use.
21 */
22
23
24 /**
25 * @addtogroup Interfaces
26 * @{
27 */
28 struct PPB_Trace_Event_Dev_0_1 {
29 /**
30 * Gets a pointer to a character for identifying a category name in the
31 * tracing system as well as for being able to early exit in client-side
32 * tracing code.
33 *
34 * NB: This mem_t return value should technically be const, but return values
35 * for Pepper IDL of mem_t type are not const. The same is true for the arg
36 * |category_enabled| for AddTraceEvent.
37 */
38 void* (*GetCategoryEnabled)(const char* category_name);
39 /**
40 * Adds a trace event to the platform tracing system. This function call is
41 * usually the result of a TRACE_* macro from trace_event.h when tracing and
42 * the category of the particular trace are enabled. It is not advisable to
43 * call this function on its own; it is really only meant to be used by the
44 * trace macros.
45 */
46 int32_t (*AddTraceEvent)(int8_t phase,
47 const void* category_enabled,
48 const char* name,
49 uint64_t id,
50 uint32_t num_args,
51 const char* arg_names[],
52 const uint8_t arg_types[],
53 const uint64_t arg_values[],
54 int32_t threshold_begin_id,
55 int64_t threshold,
56 uint8_t flags);
57 /**
58 * Sets the thread name of the calling thread in the tracing system so it will
59 * show up properly in chrome://tracing.
60 */
61 void (*SetThreadName)(const char* thread_name);
62 };
63
64 typedef struct PPB_Trace_Event_Dev_0_1 PPB_Trace_Event_Dev;
65 /**
66 * @}
67 */
68
69 #endif /* PPAPI_C_DEV_PPB_TRACE_EVENT_DEV_H_ */
70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698