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

Unified Diff: services/resource_coordinator/public/interfaces/tracing/tracing.mojom

Issue 2833873003: WIP: The tracing service prototype
Patch Set: sync Created 3 years, 7 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
Index: services/resource_coordinator/public/interfaces/tracing/tracing.mojom
diff --git a/services/resource_coordinator/public/interfaces/tracing/tracing.mojom b/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
index fb8cd3cbac55e130bd256d99acf7e8df6844c50c..29402c9b9d098d3a3454a44904a45af04ea4bf27 100644
--- a/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
+++ b/services/resource_coordinator/public/interfaces/tracing/tracing.mojom
@@ -20,21 +20,25 @@ enum TraceDataType {
// Tracing agents, like |chrome|, |etw|, |battor|, and |cros|, use this
// interface to register themselves to the tracing service.
-interface Factory {
- RegisterAgent(Agent agent, string name, string label, TraceDataType type,
+interface AgentSet {
+ RegisterAgent(Agent agent, string label, TraceDataType type,
bool supports_explicit_clock_sync_);
};
-// There should be at most one implementation of this interface per process.
// When the tracing service calls |StopAndFlush| on an agent, the agent begins
// serializing data into the recorder that was given in the |StartTracing| call.
// When finished, the agent should close the recorder connection to signal the
// tracing service that no more data will be sent.
interface Agent {
- StartTracing(string categories, Recorder recorder);
+ // If |report_categories_only| is true, the agent should not send trace events
+ // to the recorder; they will be ignored; it should send only the list of
+ // categories known to the agent.
+ StartTracing(
+ string config, Recorder recorder, bool report_categories_only) => ();
StopAndFlush();
- RequestClockSyncMarker() => (mojo.common.mojom.TimeTicks issue_ts,
- mojo.common.mojom.TimeTicks issue_end_ts);
+ RequestClockSyncMarker(string sync_id) => (
+ mojo.common.mojom.TimeTicks issue_ts,
+ mojo.common.mojom.TimeTicks issue_end_ts);
RequestBufferStatus() => (uint32 capacity, uint32 count);
};
@@ -43,6 +47,7 @@ interface Agent {
// There should be only one agent of type STRING per agent label; otherwise
// their trace data would be mixed up.
interface Recorder {
+ AddCategories(string categories);
AddChunk(string chunk);
AddMetadata(mojo.common.mojom.DictionaryValue metadata);
};
@@ -51,8 +56,10 @@ interface Recorder {
// from all registered agents. At any given time, there should be at most one
// connected controller.
interface Coordinator {
- StartTracing(handle<data_pipe_producer> stream, string categories);
+ StartTracing(handle<data_pipe_producer> stream, string config);
StopAndFlush();
IsTracing() => (bool is_tracing);
- RequestBufferUsage() => (float percent_full, uint32 approximate_count);
+ RequestBufferUsage() => (bool success, float percent_full,
+ uint32 approximate_count);
+ GetCategories() => (string categories);
};

Powered by Google App Engine
This is Rietveld 408576698