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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index ff01dea32859d6a62fa476a5b4b4b31d6a3556f5..8e483cd6e824e08f7b570b2d843c87ea88ae18d4 100644
--- a/ppapi/api/dev/ppb_trace_event_dev.idl
+++ b/ppapi/api/dev/ppb_trace_event_dev.idl
@@ -9,9 +9,15 @@
*/
label Chrome {
- M25 = 0.1
+ M25 = 0.1,
+ M29 = 0.2
};
+/**
+ * A trace event timestamp.
+ */
+typedef int64_t PP_TraceEventTime;
+
interface PPB_Trace_Event_Dev {
/**
* Gets a pointer to a character for identifying a category name in the
@@ -43,6 +49,34 @@ interface PPB_Trace_Event_Dev {
[in] uint8_t flags);
/**
+ * Version of the above interface that allows specifying a custom thread id
+ * and timestamp. This is useful for when tracing data cannot be registered
+ * in real time. For example, this could be used by storing timestamps
+ * internally and then registering the events retroactively.
+ */
+ [version=0.2]
+ void AddTraceEventWithThreadIdAndTimestamp(
+ [in] int8_t phase,
+ [in] mem_t category_enabled,
+ [in] cstr_t name,
+ [in] uint64_t id,
+ [in] int32_t thread_id,
+ [in] PP_TraceEventTime timestamp,
+ [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] uint8_t flags);
+
+ /**
+ * Get the current clock value. Since this uses the same function as the trace
+ * events use internally, it can be used to create events with explicit time
+ * stamps.
+ */
+ [version=0.2]
+ PP_TraceEventTime Now();
+
+ /**
* Sets the thread name of the calling thread in the tracing system so it will
* show up properly in chrome://tracing.
*/
« 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