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

Constituent: trc     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

TRC_trace.c File Reference

Facilities to insert records into a trace. More...

#include <string.h>
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "PBS/CACHE.h"
#include "PBS/PTS.h"
#include "PBS/RW.ih"
#include "MDB/MDB_pubdefs.h"
#include "TRC/TRC_msgs.h"
#include "TRC_prvrtos.h"

Include dependency graph for TRC_trace.c:


Functions

unsigned int TRC_record (unsigned int fui, TRC_TraceUser *dat)
 Insert a record in the task trace.

Variables

TRC_TraceUser traceDefault
 Default trace user block if user does not supply one.

Detailed Description

Facilities to insert records into a trace.

CVS $Id: TRC_trace.c,v 1.1.1.1 2006/12/20 00:44:59 apw Exp $
Author:
A.P.Waite
TRC_trace.c provides facilities to insert records into trace

Warning:
Suitable task 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_record unsigned int  fui,
TRC_TraceUser dat
 

Insert a record in the task trace.

Parameters:
fui (in) Record format (as unsigned int)
dat (in) Record data (maximum 20 bytes)
TRC_record() records a row in the trace buffer.

A trace buffer row is data cache line aligned and one cache line long (i.e. it's 32 bytes). The first 3 longwords are owned by TRC and are used to capture a timestamp, the watchdog timeout, plus some assorted meta-information. The last 5 longwords are open to the caller of this routine. The trace will capture the 20 bytes pointed to by dat.

To distingish different record types, the user must supply a record id. While While identified as an unsigned int, it's really a short with a "facility" number encoded in the most significant byte of the short and an "instance" encoded in the least significant byte of the short. Example: when recording entrancies and exits of exception handlers, the "facility" is (a small integer representing) "exception" and the instances are (small integers representing) "entrance" and "exit".


Generated on Wed Dec 20 09:24:40 2006 by  doxygen 1.4.4