trcstop Subroutine

Purpose

Stops a trace session.

Library

Runtime Services Library (librts.a)

Syntax

# include <sys/trcmacros.h>
# define TRCSTOP SERIAL 0x40000000
# define TRCSTOP DISCARDBUFS 0x20000000
int trcstop( Channel)
int Channel;

Description

The trcstop subroutine stops a trace session for a particular trace channel.

Parameters

Item Description
Channel Specifies one of eight trace channels. Channel number 0 always refers to the Event/Performance trace. Channel numbers 1 through 7 specify generic trace channels.
Serial (TRCSTOP SERIAL) If the channel is ORed with the Serial flag, then the trcstop subroutine serializes the trace I/O operations from multiple processor buffers into the trace file. The Serial flag is applicable for all modes of tracing. This flag is mutually exclusive with the discard_buff flag.
discard_buff (TRCSTOP DISCARDBUFF0) To set this option, the user needs to OR the discard_buff flag with the channel option. When invoked, the trcstop subroutine discards any captured trace buffers pending I/O operation. If trace buffers have already been written into file, then the discard_buff flag is ignored. This flag is mutually exclusive with the serial flag.

Return Values

Item Description
0 The trace session was stopped successfully.
-1 The trace session did not stop.