chromium/services/tracing/public/mojom/system_tracing_service.mojom

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module tracing.mojom;

import "mojo/public/mojom/base/file.mojom";

// Mojo interface between a child and the browser process. It's used to open the
// socket connection to the Perfetto system tracing service daemon (traced) from
// within a sandboxed child process. This enables system-wide trace collection
// that includes trace data from all Chrome processes.
interface SystemTracingService {
  // For the browser process to provide the producer socket to a child process,
  // where opening a socket is prohibited by the sandbox. The producer socket is
  // used to inject data into the trace but doesn't not allow starting/stopping
  // tracing or reading back the trace data. See
  // https://perfetto.dev/docs/concepts/service-model.
  OpenProducerSocket() => (mojo_base.mojom.File? traced_socket);
};