blob: 6aac963900f7ae42b882c921e15002bb2d802e13 [file] [log] [blame]
// Copyright 2017 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.
module profiling.mojom;
// The data that is recorded for an allocation stack.
enum StackMode {
// Instruction addresses from unwinding the stack.
// Uses trace events as identifiers.
// Uses a combination of trace events and selective native addresses.
// This interface is implemented by "memlog clients" (profiled processes that
// can send memory allocation events to the profiling process). These functions
// are called by the profiling process to control the senders.
interface ProfilingClient {
// Start recording allocations and sending them to the profiling process via
// |sender_pipe|. There is currently no mechanism to stop recording
// allocations.
// |stack_mode| refers to the type of data that should be recorded for each
// allocation.
StartProfiling(handle memlog_sender_pipe, StackMode stack_mode);
// Flushes the memlog pipe associated with this client. A barrier packet is
// set over the memlog pipe with the given identifier. This allows the
// receiver to synchronize with the flush.
FlushMemlogPipe(uint32 barrier_id);