GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TRC / V1-0-1

Constituent: trc     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

TRC_control.c File Reference

Control functions for the TRC package. More...

#include <ctype.h>
#include <string.h>
#include "PBS/CACHE.h"
#include "PBS/MBA.h"
#include "PBS/PTS.h"
#include "PBS/RW.ih"
#include "PBS/MTX.h"
#include "MDB/MDB_pubdefs.h"
#include "TRC/TRC_msgs.h"
#include "TRC/TRC_pubdefs.h"
#include "TRC_prvdefs.h"

Include dependency graph for TRC_control.c:


Defines

#define TRC_L_SEED   (3)
 Length of the task name seed table.

Functions

unsigned int TRC_ID2Trace (unsigned int id, TRC_Buffer **trc)
 Convert a trace identity to a trace buffer handle.
unsigned int TRC_initialize (unsigned int rows, unsigned int enable)
 Initialize the tracing facility.
unsigned int TRC_name2Trace (const char *nam, TRC_Buffer **trc)
 Convert a trace identity to a trace buffer handle.
FORK_que * TRC_setFork (FORK_que *fqi)
 Convert a trace name to a trace buffer pointer.
unsigned int TRC_validTrace (TRC_Control *tcb, TRC_Buffer **trc)
 Validate a trace pointer (plus trace initialization...).

Variables

TRC_ControlTRC_tcb
 Pointer to trace control block (initialized to NULL).
static char * s_seed [TRC_L_SEED] = { "UND>", "EX5>", "EX9>" }
 Array of task seed names.
static char * s_system = "system"
 Array of task seed names.

Detailed Description

Control functions for the TRC package.

CVS $Id: TRC_control.c,v 1.2 2007/03/22 01:47:39 apw Exp $
Author:
A.P.Waite
TRC_control.c provides facilities to initialize the TRC trace system. These are the very basic trace facilities and require very little in the way of resources (other than large quantities of memory). The goal is to have this package exist at such a low level in the package hierarchy that nearly all other packages can call the TRC_record() function.

Warning:
Suitable task switch tracing facilities are not available on host systems, so while this facility can be compiled and linked on host systems, it cannot perform a run time trace of task switches. It can still, however, record events generated by TRC_record() calls.

Function Documentation

unsigned int TRC_ID2Trace unsigned int  id,
TRC_Buffer **  trc
 

Convert a trace identity to a trace buffer handle.

Parameters:
id (in) Trace identification number (user defined)
trc (out) Trace buffer handle
Return values:
TRC_NOSCHID No trace with this identifier
TRC_NOTINIT Trace system not in state initialized
TRC_SUCCESS Success

unsigned int TRC_initialize unsigned int  rows,
unsigned int  enable
 

Initialize the tracing facility.

Parameters:
rows (in) Number of rows in system trace buffer (default 1024)
enable (in) System trace elements to enable
Return values:
TRC_ADDHOOK Cannot add task switch hook routine
TRC_ALLOCMEM Cannot allocate memory
TRC_ALLOCMTX Cannot allocate mutex
TRC_BADSTATE Invalid state for operation
TRC_SUCCESS Success
TRC_initialize() builds up the trace facilities

unsigned int TRC_name2Trace const char *  nam,
TRC_Buffer **  trc
 

Convert a trace identity to a trace buffer handle.

Parameters:
nam (in) Trace name (user defined)
trc (out) Trace buffer handle
Return values:
TRC_NOSCHNAM No trace with this name
TRC_NOTINIT Trace system not in state initialized
TRC_SUCCESS Success

FORK_que* TRC_setFork FORK_que *  fqi  ) 
 

Convert a trace name to a trace buffer pointer.

Parameters:
fqi (in) Set the fork queue trace should use for snapshots
Returns:
Previous value of fork queue

unsigned int TRC_validTrace TRC_Control tcb,
TRC_Buffer **  trc
 

Validate a trace pointer (plus trace initialization...).

Parameters:
tcb (in) Trace control block
trc (in) Trace buffer handle (doubly indirect!)
Return values:
TRC_NOTINIT Trace system not in state initialized
TRC_NOTTRACE Not a trace buffer
TRC_SUCCESS Success
TRC_validTrace() runs a standard validation on a trace buffer pointer. Success indicates that the control block is valid, the trace buffer pointer is valid (and may have been substituted with the system trace buffer pointer if the buffer pointer was originally NULL).


Generated on Fri May 25 05:17:23 2007 by  doxygen 1.4.4