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

Unified Diff: ppapi/api/dev/ppb_trace_event_dev.idl

Issue 11464005: Add trace event Pepper API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Enable NaCl compilation 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/api/dev/ppb_trace_event_dev.idl
diff --git a/ppapi/api/dev/ppb_trace_event_dev.idl b/ppapi/api/dev/ppb_trace_event_dev.idl
new file mode 100644
index 0000000000000000000000000000000000000000..728292c0ac089c5665f87da88bf91d8b6bf8e012
--- /dev/null
+++ b/ppapi/api/dev/ppb_trace_event_dev.idl
@@ -0,0 +1,50 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_Trace_Event</code> interface. It is meant
+ * to be used in plugins as the API that trace macros from trace_event.h use.
+ * It is not supported in Native Client currently.
+ */
+
+label Chrome {
+ M25 = 0.1
+};
+
+interface PPB_Trace_Event_Dev {
+ /**
+ * Gets a pointer to a character for identifying a category name in the
+ * tracing system as well as for being able to early exit in client-side
+ * tracing code.
+ *
+ * NB: This mem_t return value should technically be const, but return values
+ * for Pepper IDL of mem_t type are not const. The same is true for the arg
+ * |category_enabled| for AddTraceEvent.
+ */
+ mem_t GetCategoryEnabled([in] PP_Instance instance,
jbauman 2012/12/14 00:36:07 Do we actually need the instance parameters on the
brettw 2012/12/15 00:35:31 I think all pepper interfaces need a PP_Instance o
elijahtaylor1 2012/12/18 20:40:31 I'm not sure if I understand you Brett. Why is it
+ [in] cstr_t category_name);
+
+ /**
+ * Adds a trace event to the platform tracing system.
+ */
+ int32_t AddTraceEvent(
+ [in] PP_Instance instance,
+ [in] int8_t phase,
+ [in] mem_t category_enabled,
+ [in] cstr_t name,
+ [in] uint64_t id,
+ [in] uint32_t num_args,
+ [in, size_as=num_args] str_t[] arg_names,
+ [in, size_as=num_args] uint8_t[] arg_types,
+ [in, size_as=num_args] uint64_t[] arg_values,
+ [in] int32_t threshold_begin_id,
+ [in] int64_t threshold,
+ [in] uint8_t flags);
+
+ /**
+ * Sets the thread name so it will show up properly in chrome://tracing.
+ */
+ void SetThreadName([in] PP_Instance instance, [in] cstr_t thread_name);
+};

Powered by Google App Engine
This is Rietveld 408576698