blob: 48d7ade1de53807e87e803b7e41df3dbc0f411f2 [file]
// Copyright 2026 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@available(added=HEAD)
library fuchsia.memory.stacktrack.process;
using zx;
/// Rights to map a VMO in read-only mode and read its "content size" property.
const VMO_MAP_READONLY_RIGHTS zx.Rights
= zx.RIGHTS_BASIC | zx.Rights.READ | zx.Rights.GET_PROPERTY | zx.Rights.MAP;
/// The Registry keeps track of all the instrumented processes.
@discoverable
open protocol Registry {
/// Binds the given process to the registry and share the relevant resources.
///
/// See //src/performance/memory/stacktrack/README.md and
/// //src/performance/memory/stacktrack/lib/stacktrack_vmo for details on
/// the format of the VMO.
strict RegisterV1(resource struct {
process zx.Handle:<PROCESS, zx.RIGHTS_BASIC | zx.RIGHTS_IO | zx.Rights.GET_PROPERTY>;
threads_table_vmo zx.Handle:<VMO, VMO_MAP_READONLY_RIGHTS>;
});
};