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

Side by Side Diff: ppapi/api/dev/ppb_trace_event_dev.idl

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, 6 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 | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | ppapi/c/dev/ppb_trace_event_dev.h » ('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 5
6 /** 6 /**
7 * This file defines the <code>PPB_Trace_Event</code> interface. It is meant 7 * This file defines the <code>PPB_Trace_Event</code> interface. It is meant
8 * to be used in plugins as the API that trace macros from trace_event.h use. 8 * to be used in plugins as the API that trace macros from trace_event.h use.
9 */ 9 */
10 10
11 label Chrome { 11 label Chrome {
12 M25 = 0.1 12 M25 = 0.1,
13 M29 = 0.2
13 }; 14 };
14 15
16 /**
17 * A trace event timestamp.
18 */
19 typedef int64_t PP_TraceEventTime;
20
15 interface PPB_Trace_Event_Dev { 21 interface PPB_Trace_Event_Dev {
16 /** 22 /**
17 * Gets a pointer to a character for identifying a category name in the 23 * Gets a pointer to a character for identifying a category name in the
18 * tracing system as well as for being able to early exit in client-side 24 * tracing system as well as for being able to early exit in client-side
19 * tracing code. 25 * tracing code.
20 * 26 *
21 * NB: This mem_t return value should technically be const, but return values 27 * NB: This mem_t return value should technically be const, but return values
22 * for Pepper IDL of mem_t type are not const. The same is true for the arg 28 * for Pepper IDL of mem_t type are not const. The same is true for the arg
23 * |category_enabled| for AddTraceEvent. 29 * |category_enabled| for AddTraceEvent.
24 */ 30 */
(...skipping 11 matching lines...) Expand all
36 [in] mem_t category_enabled, 42 [in] mem_t category_enabled,
37 [in] cstr_t name, 43 [in] cstr_t name,
38 [in] uint64_t id, 44 [in] uint64_t id,
39 [in] uint32_t num_args, 45 [in] uint32_t num_args,
40 [in, size_as=num_args] str_t[] arg_names, 46 [in, size_as=num_args] str_t[] arg_names,
41 [in, size_as=num_args] uint8_t[] arg_types, 47 [in, size_as=num_args] uint8_t[] arg_types,
42 [in, size_as=num_args] uint64_t[] arg_values, 48 [in, size_as=num_args] uint64_t[] arg_values,
43 [in] uint8_t flags); 49 [in] uint8_t flags);
44 50
45 /** 51 /**
52 * Version of the above interface that allows specifying a custom thread id
53 * and timestamp. This is useful for when tracing data cannot be registered
54 * in real time. For example, this could be used by storing timestamps
55 * internally and then registering the events retroactively.
56 */
57 [version=0.2]
58 void AddTraceEventWithThreadIdAndTimestamp(
59 [in] int8_t phase,
60 [in] mem_t category_enabled,
61 [in] cstr_t name,
62 [in] uint64_t id,
63 [in] int32_t thread_id,
64 [in] PP_TraceEventTime timestamp,
65 [in] uint32_t num_args,
66 [in, size_as=num_args] str_t[] arg_names,
67 [in, size_as=num_args] uint8_t[] arg_types,
68 [in, size_as=num_args] uint64_t[] arg_values,
69 [in] uint8_t flags);
70
71 /**
72 * Get the current clock value. Since this uses the same function as the trace
73 * events use internally, it can be used to create events with explicit time
74 * stamps.
75 */
76 [version=0.2]
77 PP_TraceEventTime Now();
78
79 /**
46 * Sets the thread name of the calling thread in the tracing system so it will 80 * Sets the thread name of the calling thread in the tracing system so it will
47 * show up properly in chrome://tracing. 81 * show up properly in chrome://tracing.
48 */ 82 */
49 void SetThreadName([in] cstr_t thread_name); 83 void SetThreadName([in] cstr_t thread_name);
50 }; 84 };
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | ppapi/c/dev/ppb_trace_event_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698