ldmp_bufest, ldmp_timeleft, ldmp_xmalloc, ldmp_xmfree, and ldmp_errstr Kernel Services

Purpose

Obtains information about the current live dump.

Syntax

#include <sys/livedump.h>

kerrno_t ldmp_bufest (id, cb, len)
dumpid_t id;
ras_block_t cb;
size_t *len;

kerrno_t ldmp_timeleft (id, timeleft)
dumpid_t id;
long *timeleft;

kerrno_t ldmp_xmalloc (id, size, align, p)
dumpid_t id;
size_t size;
uint align;
void **p;

kerrno_t ldmp_xmfree (id, p)
dumpid_t id;
void *p;

kerrno_t ldmp_errstr (id, cb, str)
dumpid_t id;
ras_block_t cb;
char *str;

Parameters

Item Description
align Specifies the log base 2 of the desired alignment. The maximum allowed alignment is 12, 4096 byte alignment.
cb Specifies the ras_block_t for the component.
id Specifies the ID of the dump.
len Specifies the estimate of data in bytes that can still be buffered by the specified component in this pass.
p Specifies the memory block to be allocated or freed.
size Specifies the memory size to be allocated.
str Specifies the error message.
timeleft Specifies the time, in nanoseconds, remaining for this pass. This value only has meaning for a serialized dump. It can be negative.

Description

The ldmp_bufest kernel service estimates the number of bytes of dump buffer storage available to this component.

The ldmp_timeleft kernel service estimates the time, in nanoseconds, remaining in this pass.

The ldmp_xmalloc kernel service allocates storage from the live dump heap.

The ldmp_xmfree kernel service frees live dump heap storage.

The ldmp_errstr kernel service records an error to be part of the live dump status reporting. The string is contained in the live dump and reported in the error log entry if there is sufficient space.
Important: An error log entry has a maximum length of 2048 bytes. The error string is limited to 128 bytes, including the trailing NULL, and is truncated if too long. The component's path name is also logged.
Tip: The ldmp_errstr kernel service can be called multiple times to report multiple errors.
Components are encouraged to limit the size of error strings due to limited space in the error log entry.

Return Values

Item Description
0 Indicates a successful completion.
EINVAL_RAS_xxx_BADARGS Indicates that the arguments for the service are not valid.
EFAULT_RAS_xxx_BADARGS Indicates that an address argument is not a valid address.
ENOMEM_RAS_LDMP_XMALLOC Indicates that there is insufficient space in the live dump heap to satisfy this request.