posix_trace_attr_getstreamsize Subroutine

Purpose

Retrieves the trace stream size.

Library

Posix Trace Library (libposixtrace.a)

Syntax

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

int posix_trace_attr_getstreamsize(attr, streamsize)
trace_attr_t *attr;
size_t streamsize;

Description

The posix_trace_attr_getstreamsize subroutine copies the stream size, in bytes, from the stream_minsize attribute of the attr object into the variable pointed to by the streamsize parameter.

This stream size is the current total memory size reserved for system and user trace events in the trace stream. The default value for the stream_minsize attribute is 8192 bytes. The stream size refers to memory that is used to store trace event records. Other stream data (for example, trace attribute values) are not included in this size.

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.
streamsize Specifies where the stream_minsize attribute, 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_getstreamsize subroutine stores the maximum trace stream allowed size in the object pointed to by the streamsize 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 AIX® Version 7.1 Files Reference