GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TRC / V1-0-2
Constituent: trc     Tag: mv2304
#include "PBS/FORK.h"
#include "TEX/TEX_pubdefs.h"
Include dependency graph for TRC_pubdefs.h:
This graph shows which files directly or indirectly include this file:
Defines | |
#define | TRC_M_BUFFER (0x54524301) |
Framing word at start of a trace buffer ("TRC" || 1). | |
#define | TRC_M_COMMON (0x54434d01) |
Framing word at start of the trace common area ("TCM" || 1). | |
#define | TRC_L_TRACENAME (16) |
Longest trace name (including terminator). | |
#define | LSW_APID_SDI_BASE (0x3e3) |
Base of APID range for dumping LSW datagrams to the SDI. | |
#define | LSW_LSF_DGM_TYP_TRACE (0) |
Framing word at start of a trace buffer ("TRC" || 1). | |
#define | LSW_LSF_DGM_VER_TRACE (0) |
Framing word at start of the trace common area ("TCM" || 1). | |
Typedefs | |
typedef enum _TRC_SnapDest | TRC_SnapDest |
Typedef for enum _TRC_SnapDest. | |
typedef _TRC_Buffer | TRC_Buffer |
Typedef for struct _TRC_Buffer. | |
typedef _TRC_Monitor | TRC_Monitor |
Typedef for struct _TRC_Monitor. | |
typedef _TRC_SnapTrace | TRC_SnapTrace |
Typedef for struct _TRC_SnapTrace. | |
typedef _TRC_Top | TRC_Top |
Typedef for struct _TRC_Top. | |
typedef unsigned int | TRC_cb_Dispose (void *prm, unsigned int len, TRC_SnapTrace *snp, TRC_Buffer *trc) |
Disposition routine for a trace snapshot. | |
Enumerations | |
enum | _TRC_SnapDest { TRC_SNAP_DEST_CTDB = 0, TRC_SNAP_DEST_SDI = 1 } |
Possible telemetry destinations for a trace snapshot. More... | |
Functions | |
unsigned int | TRC_advertise (TRC_Buffer *trc) |
Use a MSG to advertise the location of the system trace blob. | |
unsigned int | TRC_attachSnap (TRC_Buffer *trc, unsigned int cnt) |
Attach snapshot buffers to a trace. | |
unsigned int | TRC_copy (TRC_Buffer *dtrc, TRC_Buffer *strc, unsigned int reason) |
Make a coherent copy of a trace buffer (if possible). | |
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 int | TRC_detachSnap (TRC_Buffer *trc) |
Detach snapshot buffers to a trace. | |
unsigned int | TRC_differMonitor (TRC_Monitor *old, TRC_Monitor *new, TRC_Top *top) |
Take the difference between monitor snapshots. | |
void | TRC_freeSnap (TRC_SnapTrace *snp) |
Free a trace snapshot buffer. | |
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. | |
unsigned long long | TRC_record (TRC_Buffer *trc, unsigned int fui, unsigned int *dat) |
Insert a record into a trace. | |
unsigned int | TRC_saveStart (void *prm, unsigned int len, TRC_SnapTrace *snp, TRC_Buffer *trc) |
Save the start line trace in a safe place. | |
unsigned int | TRC_sendCTDB (void *prm, unsigned int len, TRC_SnapTrace *snp, TRC_Buffer *trc) |
Send a snapshot to the science data interface. | |
unsigned int | TRC_sendFile (void *prm, unsigned int len, TRC_SnapTrace *snp, TRC_Buffer *trc) |
Send the trace from a snapshot to a file. | |
unsigned int | TRC_sendSDI (void *prm, unsigned int len, TRC_SnapTrace *snp, TRC_Buffer *trc) |
Send a snapshot to the science data interface. | |
unsigned int | TRC_sendStart (TRC_SnapDest dest) |
Send the start line trace to the indicated destination. | |
FORK_que * | TRC_setFork (FORK_que *fqi) |
Convert a trace name to a trace buffer pointer. | |
unsigned int | TRC_sizeofMonitor (void) |
The size of a buffer to accomodate a task monitor snapshot. | |
unsigned int | TRC_sizeofTop (void) |
The size of a buffer to accomodate a task monitor snapshot. | |
unsigned int | TRC_sizeofTrace (TRC_Buffer *trc) |
Return the size of a complete compound trace (buffer plus common). | |
unsigned int | TRC_snapMonitor (TRC_Monitor *mon) |
Snapshot the task monitor structure. | |
unsigned int | TRC_snapTrace (TRC_Buffer *trc, unsigned int reason, TRC_cb_Dispose *rtn, void *prm, unsigned int len) |
Snapshot a trace and send the output to a (telemetry) destination. | |
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. |
CVS $Id: TRC_pubdefs.h,v 1.2 2007/03/22 01:47:39 apw Exp $
|
Possible telemetry destinations for a trace snapshot.
|
|
Use a MSG to advertise the location of the system trace blob.
|
|
Attach snapshot buffers to a trace.
|
|
Make a coherent copy of a trace buffer (if possible).
|
|
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.
|
|
Detach snapshot buffers to a trace.
|
|
Take the difference between monitor snapshots.
|
|
Free a trace snapshot buffer.
|
|
Convert a trace identity to a trace buffer handle.
|
|
Initialize the tracing facility.
|
|
Convert a trace identity to a trace buffer handle.
|
|
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. |
|
Save the start line trace in a safe place.
|
|
Send a snapshot to the science data interface.
|
|
Send the trace from a snapshot to a file.
|
|
Send a snapshot to the science data interface.
|
|
Send the start line trace to the indicated destination.
|
|
Convert a trace name to a trace buffer pointer.
|
|
The size of a buffer to accomodate a task monitor snapshot.
|
|
The size of a buffer to accomodate a task monitor snapshot.
|
|
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(). |
|
Snapshot the task monitor structure.
|
|
Snapshot a trace and send the output to a (telemetry) destination.
The parameters rtn, prm, and len are user defined and specify a "disposition" for the snapshot once the high priority task has captured it. The definition of rtn follows the normal conventions for a callback routine (in this case, is must follow the prototype TRC_cb_Dispose). prm and len are slightly less conventional. It's difficult to predict what a user disposition might look like, and how much user data is needed to parameterize it, so the solution adopted here is to reserve a fairly large "user parameter block" in the snapshot request (TRC_L_USERPARM bytes long) then simply copy through anything the user wants to put in there. The poster child for a callback that needs a fairly big user parameter block would be a routine that writes the captured snapshot out to a file, but needs to know the name of the file to open. That could be accomplished with an indirect pointer of course, but then caller needs to arrange for the memory to persist until the file writing is complete and then arrange for that memory's disposal. All in all, it's easier if the caller can just store the file name along with the request and have done. |
|
Translate a task ID (CPU_DB/ITC style) to a VxWorks task ID.
|
|
Write a (compound) trace snapshot to a file.
|