blob: 429dd2bda3fec24a5714989c2aa3a963a54391ac [file] [log] [blame] [view]
<!--
Copyright 2023 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.
DO NOT EDIT. Generated from FIDL library zx by zither, a Fuchsia platform tool.
See //docs/reference/syscalls/README.md#documentation-generation for
regeneration instructions.
-->
# zx_sampler_stop
## Summary
Stop writing samples to the provided IOBuffer.
## Declaration
```c
#include <zircon/syscalls.h>
zx_status_t zx_sampler_stop(zx_handle_t iobuffer);
```
## Description
Stop sampling each attached thread and finish writing any in flight
samples to the iobuffer. This call will return after no additional
samples will be written. The provided IOBuffer must be one previously
returned by zx_sampler_create.
Attempting to stop a session which has already been stopped will return
an error, but will not modify the session.
## Errors
`ZX_ERR_NOT_SUPPORTED` `kernel.enable-debugging-syscalls` is not set to `true`
on the kernel command line or the experimental_thread_sampler_enabled
build param is not set to true.
`ZX_ERR_PERMISION_DENIED` *iobuffer* is not an IOBuffer returned by zx_sampler_create.
`ZX_ERR_BAD_STATE` the sampler has not started or has already been
stopped
## See also
- [`zx_sampler_create()`]
- [`zx_sampler_start()`]
[`zx_sampler_create()`]: sampler_create.md
[`zx_sampler_start()`]: sampler_stop.md