GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TRC / V1-0-5
Constituent: trc     Tag: mv2304
#include <ctype.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include "PBI/Endianness.h"
#include "CPU_DB/CPU_DB_pubdefs.h"
#include "FBS/FBS_pubrtos.h"
#include "MDB/MDB_pubdefs.h"
#include "PBS/CACHE.h"
#include "PBS/MBA.h"
#include "PBS/PTS.h"
#include "PBS/RW.ih"
#include "TRC/TRC_msgs.h"
#include "TRC_prvdefs.h"
Include dependency graph for TRC_trace.c:
Functions | |
static void | recover (TRC_Buffer *trc) |
Try to recover if the row pointers are messed up. | |
static void | record (TRC_Buffer *trc, unsigned long long tim, unsigned int fui, unsigned int *dat) |
Insert a record in the trace (worker bee). | |
static unsigned int | validName (const char *name, const char *func) |
Validate a trace name. | |
unsigned int | TRC_advertise (TRC_Buffer *trc) |
Use a MSG to advertise the location of the system trace blob. | |
unsigned int | TRC_correlateTime (TRC_Buffer *trc) |
Place a time correlation record in a trace buffer header. | |
unsigned int | TRC_create (TRC_Buffer **trc, unsigned int rows, unsigned int id, const char *nam) |
Create a user trace buffer (no snaphost or telemetry capability). | |
unsigned int | TRC_delete (TRC_Buffer *trc) |
Create a user trace buffer. | |
unsigned long long | TRC_record (TRC_Buffer *trc, unsigned int fui, unsigned int *dat) |
Insert a record into a trace. | |
unsigned int | TRC_sizeofTrace (TRC_Buffer *trc) |
Return the size of a complete compound trace (buffer plus common). | |
int | TRC_tdb2tid (int tdb) |
Translate a task ID (CPU_DB/ITC style) to a VxWorks task ID. | |
unsigned int | TRC_write (TRC_Buffer *trc, const char *fil) |
Write a (compound) trace snapshot to a file. | |
Variables | |
static const char | s_noData [TRC_DATA_ROW_SIZE<< 2] |
Data recorded when the user specifies a NULL data pointer. | |
static const char | s_misaligned [TRC_DATA_ROW_SIZE<< 2] |
Data recorded when the user specifies a misaligned data pointer. | |
const char * | TRC_noData = s_noData |
External pointer to the fixed "no data" string. | |
const char * | TRC_misaligned = s_misaligned |
External pointer to the fixed "data misaligned" string. |
CVS $Id: TRC_trace.c,v 1.4 2008/02/01 04:02:22 apw Exp $
|
Insert a record in the trace (worker bee).
|
|
Try to recover if the row pointers are messed up.
|
|
Use a MSG to advertise the location of the system trace blob.
|
|
Place a time correlation record in a trace buffer header.
|
|
Create a user trace buffer (no snaphost or telemetry capability).
|
|
Create a user trace buffer.
|
|
Insert a record into a trace.
A trace buffer row is data cache line aligned and one cache line long (i.e. it's 32 bytes). The contents of the first eight bytes are defined by TRC. The first four bytes capture the low half of of the CPU's time base register, the next two bytes capture the information that allows the trace dump routine to figure out how to format the dump. The third byte records the task ID of the task in scope during which the call to TRC_record(). The last byte is reserved. The caller's responsibility is to put formatting information into the upper two bytes of fui, and fill in 24 bytes of user data into dat. |
|
Return the size of a complete compound trace (buffer plus common).
In normal operation, there can be one or more TRC_Buffer structures, but only one TRC_Common area. The "system trace" has the privilege of having the TRC_Common located area contiguously behind the TRC_Buffer area. TRC_sizeTrace() can therefore be used two ways. When called with a NULL pointer, it returns the size of the extant system trace (system trace buffer plus common area). When called with a pointer to a user trace buffer, it returns the size of a buffer necessary to accomodate the common area and the user's trace buffer back-to-back (with all necessary padding). The latter can be useful for user manipulation of trace buffers via facilities like TRC_copy(). |
|
Translate a task ID (CPU_DB/ITC style) to a VxWorks task ID.
|
|
Write a (compound) trace snapshot to a file.
|
|
Validate a trace name.
|
|
Initial value: { TRC_DAT_MISALIGN }
|
|
Initial value: { TRC_DAT_NODATA }
|