GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MON / dev > mon / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MON_perf.h File Reference

Interface to the CPU performance monitor. More...

#include <MON/MON_pubdefs.h>
#include <PBS/WUT.h>

Classes

struct  _MON_Perf_Control
 Performance monitor control state. More...

Typedefs

typedef struct _MON_Perf_Control MON_Perf_Control
 Typedef for _MON_Perf_Control.

Functions

unsigned int MON_perf_init (MON_Perf_Control *ctl_p)
 Initialize the performance monitor interface.
unsigned int MON_perf_shutdown (MON_Perf_Control *ctl_p)
 Shutdown the performance monitor interface.
unsigned int MON_perf_start (MON_Perf_Control *ctl_p, MON_Perf_Config *cfg_p)
 Clear performance monitor counters and start counting events.
unsigned int MON_perf_stop (MON_Perf_Control *ctl_p, MON_Perf_Stats *stats_p)
 Stop counting performance monitor events.
unsigned int MON_perf_collect (MON_Perf_Control *ctl_p, MON_Perf_Config *cfg_p, unsigned int time_us, MON_Perf_Stats *stats_p, MON_Perf_Cb cb, void *cb_parm)
 Collect performance monitor statistics for a period of time.
unsigned int MON_perf_poll (MON_Perf_Control *ctl_p)
 Poll for performance monitor activity.


Detailed Description

Interface to the CPU performance monitor.

**  CVS $Id: MON_perf.h,v 1.3 2011/03/28 23:52:03 russell Exp $
**  

Defines the interface to the functions found in MON_perf.c.


Function Documentation

unsigned int MON_perf_collect ( MON_Perf_Control ctl_p,
MON_Perf_Config cfg_p,
unsigned int  time_us,
MON_Perf_Stats stats_p,
MON_Perf_Cb  cb,
void *  cb_parm 
)

Collect performance monitor statistics for a period of time.

Parameters:
ctl_p Pointer to PERF state.
cfg_p Pointer to performance monitor configuration.
time_us Length of time, in microseconds, to collect statistics.
stats_p Pointer to location to return statistics.
cb Function to call when the collection is complete.
cb_parm Parameter to pass to cb function.
Returns:
MSG code.

References _MON_Perf_Control::cb, _MON_Perf_Control::cb_parm, MON_perf_start(), mon_perf_wut_handler(), _MON_Perf_Control::stats_p, _MON_Perf_Control::wut, and _MON_Perf_Control::wut_done.

Referenced by MON_collect_perf_stats().

unsigned int MON_perf_init ( MON_Perf_Control ctl_p  ) 

Initialize the performance monitor interface.

Parameters:
ctl_p Pointer to PERF state.
Returns:
MSG code.

References _MON_Perf_Control::wut.

Referenced by MON_initialize().

unsigned int MON_perf_poll ( MON_Perf_Control ctl_p  ) 

Poll for performance monitor activity.

Parameters:
ctl_p Pointer to PERF state.
Returns:
MSG code.

References _MON_Perf_Control::cb, _MON_Perf_Control::cb_parm, MON_perf_stop(), _MON_Perf_Control::running, _MON_Perf_Control::stats_p, and _MON_Perf_Control::wut_done.

Referenced by mon_poll_task().

unsigned int MON_perf_shutdown ( MON_Perf_Control ctl_p  ) 

Shutdown the performance monitor interface.

Parameters:
ctl_p Pointer to PERF state.
Returns:
MSG code.

References _MON_Perf_Control::wut.

Referenced by MON_shutdown().

unsigned int MON_perf_start ( MON_Perf_Control ctl_p,
MON_Perf_Config cfg_p 
)

Clear performance monitor counters and start counting events.

Parameters:
ctl_p Pointer to PERF state.
cfg_p Pointer to performance monitor configuration.
Returns:
MSG code.

References _MON_Perf_Control::config, _MON_Perf_Config::event_1, _MON_Perf_Config::event_2, _MON_Perf_Config::event_3, _MON_Perf_Config::event_4, MON_PERF_REG_VALUE, _MON_Perf_Config::rtc_select, _MON_Perf_Control::running, and _MON_Perf_Config::threshold.

Referenced by MON_perf_collect(), and MON_start_perf_mon().

unsigned int MON_perf_stop ( MON_Perf_Control ctl_p,
MON_Perf_Stats stats_p 
)

Stop counting performance monitor events.

Parameters:
ctl_p Pointer to PERF state.
stats_p Pointer to location to monitor statistics.
Returns:
MSG code.

References _MON_Perf_Control::config, _MON_Perf_Stats::config, _MON_Perf_Stats::count_1, _MON_Perf_Stats::count_2, _MON_Perf_Stats::count_3, _MON_Perf_Stats::count_4, MON_PERF_REG_VALUE, and _MON_Perf_Control::running.

Referenced by MON_perf_poll(), MON_stop(), and MON_stop_perf_mon().


Generated on Mon Mar 28 16:57:02 2011 by  doxygen 1.5.8