GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> TRC / V1-0-8 > trc / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

TRC_monitor.c File Reference

Facilities to monitor CPU performance. More...

#include <string.h>
#include <CPU_DB/CPU_DB_pubdefs.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/WCT.h>
#include <TRC/TRC_msgs.h>
#include <TRC_prvdefs.h>

Functions

unsigned int TRC_differMonitor (TRC_Monitor *old, TRC_Monitor *new, TRC_Top *top)
 Take the difference between monitor snapshots.
WCT_time_sat TRC_getTopTime (TRC_Top *top)
 Get the timestamp from a differential monitor record.
unsigned int TRC_sizeofMonitor ()
 The size of a buffer to accomodate a task monitor snapshot.
unsigned int TRC_sizeofTop ()
 The size of a buffer to accomodate a task monitor snapshot.
unsigned int TRC_snapMonitor (TRC_Monitor *mon)
 Snapshot the task monitor structure.


Detailed Description

Facilities to monitor CPU performance.

CVS $Id: TRC_monitor.c,v 1.5 2011/03/29 00:59:53 apw Exp $
Author:
A.P.Waite
TRC_monitor.c provides facilities to monitor CPU performance

Function Documentation

unsigned int TRC_differMonitor ( TRC_Monitor old,
TRC_Monitor new,
TRC_Top top 
)

Take the difference between monitor snapshots.

Parameters:
old (in) Record at start of sampling period
new (in) Record at end of sampling period
top (out) Differential monitor record
Return values:
TRC_MONMATCH Monitor record serial numbers do not match
TRC_NOCALC Time mis-ordered (or zero), cannot calculate
TRC_NOOLDMON Older monitor buffer not valid for differencing
TRC_NOTMON Invalid monitor record
TRC_PARMNULL NULL parameter detected
TRC_SUCCESS Success
TRC_differMonitor() knows how to take the "difference" between two monitor records and place a summary in the output TRC_Top structure.

References _TRC_Monitor::cnt, _TRC_TaskCount::dtics, _TRC_Top::dtim, _TRC_TaskCount::enter, _TRC_Top::ex5, _TRC_Top::ex9, _TRC_Top::freq, _TRC_Monitor::itic, _TRC_Monitor::itim, _TRC_Top::serial, _TRC_Monitor::serial, _TRC_Top::tim, _TRC_Top::top, TRC_L_TASKLIST, TRC_TSK_OTHER, and _TRC_Monitor::when.

WCT_time_sat TRC_getTopTime ( TRC_Top top  ) 

Get the timestamp from a differential monitor record.

Parameters:
top (in) Differential monitor record
Return values:
0 Invalid structure pointer
x Timestamp in WCT_sat_time format

References _TRC_Top::tim.

unsigned int TRC_sizeofMonitor ( void   ) 

The size of a buffer to accomodate a task monitor snapshot.

Return values:
x Size of a buffer to hold a task monitor snapshot

unsigned int TRC_sizeofTop ( void   ) 

The size of a buffer to accomodate a task monitor snapshot.

Return values:
x Size of a buffer to hold a task monitor snapshot

unsigned int TRC_snapMonitor ( TRC_Monitor mon  ) 

Snapshot the task monitor structure.

Parameters:
mon (out) Where to put the results
Return values:
TRC_PARMNULL NULL parameter detected
TRC_NOTINIT Trace system not in state initialized
TRC_SUCCESS Success
TRC_snapMonitor() copies the current monitor contents of the task to name table to a lookaside monitor buffer.

References _TRC_Task2Name::cnt, _TRC_Monitor::cnt, _TRC_Control::com, _TRC_TaskCount::dtics, _TRC_TaskCount::enter, _TRC_Common::freq, _TRC_Monitor::freq, _TRC_Buffer::itic, _TRC_Monitor::itic, _TRC_Buffer::itim, _TRC_Monitor::itim, _TRC_Buffer::last, _TRC_Control::nxt, _TRC_Common::serial, _TRC_Monitor::serial, _TRC_Control::state, _TRC_Common::t2nbas, TRC_CTL_INITIALIZED, TRC_L_TASKLIST, TRC_tcb, and _TRC_Monitor::when.


Generated on Tue Nov 29 20:28:00 2011 by  doxygen 1.5.8