LTTng control library C API
Loading...
Searching...
No Matches
reclaim.h
1/*
2 * SPDX-FileCopyrightText: 2025 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only
5 *
6 */
7
8#ifndef LTTNG_RECLAIM_H
9#define LTTNG_RECLAIM_H
10
11#include <lttng/domain.h>
12#include <lttng/lttng-error.h>
13#include <lttng/lttng-export.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
31
60
83
141LTTNG_EXPORT extern enum lttng_reclaim_channel_memory_status
142lttng_reclaim_channel_memory(const char *session_name,
143 const char *channel_name,
144 enum lttng_domain_type domain,
145 uint64_t older_than_us,
146 struct lttng_reclaim_handle **handle);
147
159LTTNG_EXPORT extern void lttng_reclaim_handle_destroy(struct lttng_reclaim_handle *handle);
160
198LTTNG_EXPORT extern enum lttng_reclaim_handle_status
200
227LTTNG_EXPORT extern enum lttng_reclaim_handle_status
229 uint64_t *count);
230
262LTTNG_EXPORT extern enum lttng_reclaim_handle_status
264 uint64_t *count);
265
267
268#ifdef __cplusplus
269}
270#endif
271
272#endif /* LTTNG_RECLAIM_H */
lttng_reclaim_channel_memory_status
Return type of lttng_reclaim_channel_memory().
Definition reclaim.h:38
enum lttng_reclaim_handle_status lttng_reclaim_handle_get_reclaimed_subbuffer_count(const struct lttng_reclaim_handle *handle, uint64_t *count)
Sets *count to the total number of sub-buffers successfully reclaimed by the event record channel mem...
enum lttng_reclaim_handle_status lttng_reclaim_handle_get_pending_subbuffer_count(const struct lttng_reclaim_handle *handle, uint64_t *count)
Sets *count to the total number of sub-buffers pending reclamation from the event record channel memo...
void lttng_reclaim_handle_destroy(struct lttng_reclaim_handle *handle)
Destroys the event record channel memory reclaim operation handle handle.
enum lttng_reclaim_channel_memory_status lttng_reclaim_channel_memory(const char *session_name, const char *channel_name, enum lttng_domain_type domain, uint64_t older_than_us, struct lttng_reclaim_handle **handle)
Initiates an immediate memory reclaim operation for the event record channel named channel_name withi...
enum lttng_reclaim_handle_status lttng_reclaim_handle_wait_for_completion(struct lttng_reclaim_handle *handle, int timeout_ms)
Waits for the event record channel memory reclaim operation identified by handle to complete.
lttng_reclaim_handle_status
Return type of event record channel memory reclaim handle functions.
Definition reclaim.h:67
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_RECLAMATION_IN_PROGRESS
A memory reclamation request is already in progress for this event record channel.
Definition reclaim.h:49
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_NOT_SUPPORTED
Memory reclamation is not supported for this event record channel.
Definition reclaim.h:52
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_INVALID_PARAMETER
Unsatisfied precondition.
Definition reclaim.h:46
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_ERROR
Error.
Definition reclaim.h:43
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_OK
Success.
Definition reclaim.h:40
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_CHANNEL_NOT_FOUND
Event record channel not found.
Definition reclaim.h:58
@ LTTNG_RECLAIM_CHANNEL_MEMORY_STATUS_SESSION_NOT_FOUND
Session not found.
Definition reclaim.h:55
@ LTTNG_RECLAIM_HANDLE_STATUS_INVALID
Unsatisfied precondition.
Definition reclaim.h:78
@ LTTNG_RECLAIM_HANDLE_STATUS_ERROR
Other error.
Definition reclaim.h:81
@ LTTNG_RECLAIM_HANDLE_STATUS_COMPLETED
Reclamation operation completed.
Definition reclaim.h:72
@ LTTNG_RECLAIM_HANDLE_STATUS_TIMEOUT
Timeout reached.
Definition reclaim.h:75
@ LTTNG_RECLAIM_HANDLE_STATUS_OK
Success.
Definition reclaim.h:69
lttng_domain_type
Tracing domain type (tracer type).
Definition domain.h:27
Event record channel memory reclaim operation handle (opaque type).