posix_trace_attr_getmaxsystemeventsize Subroutine

Purpose

Retrieves the maximum size of a system trace event.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <sys/types.h>
#include <trace.h>

int posix_trace_attr_getmaxsystemeventsize(attr, eventsize)
const trace_attr_t *restrict attr;
size_t *restrict eventsize;

Description

The posix_trace_attr_getmaxsystemeventsize subroutine calculates the maximum size, in bytes, of memory that is required to store a single system trace event. The size value is calculated for the trace stream attributes of the attr object, and is returned in the eventsize parameter.

The values returned as the maximum memory sizes of the user and system trace events, so that when the sum of the maximum memory sizes of a set of the trace events, which might be recorded in a trace stream, is less than or equal to the minimum stream size attribute of that trace stream, the system provides the necessary resources for recording all those trace events without loss.

If this subroutine is called with a non-initialized attributes object as parameter, the result is not specified.

Parameters

Item Description
attr Specifies the trace attributes object.
eventsize Specifies where the maximum memory size attribute of the attr object, in bytes, will be stored.

Return Values

Upon successful completion, this subroutine returns a value of zero. Otherwise, it returns the corresponding error number.

The posix_trace_attr_getmaxsystemeventsize subroutine stores the maximum memory size to store a single system trace event in the object pointed to by the eventsize parameter, if successful.

Errors

This subroutine fails if the following error number returns:
Item Description
EINVAL The attr parameter is null or the other parameter is not valid.

Files

The trace.h file and the types.h file in the Files Reference