InterconnectProfile Class Reference

#include <interconnect_profile.hh>

List of all members.

Public Member Functions

 InterconnectProfile (const std::string &_name, bool _traceSends, bool _traceChannelUtil, Tick _startTick, Interconnect *_interconnect)
void initSendFile ()
void writeSendEntry ()
bool initChannelFile ()
void writeChannelEntry ()


Detailed Description

This class implements a simple profiler for interconnects. It retrieves some statistics from the interconnect object and writes it to a file at a regular interval. This interval is decided by the RESOLUTION definition at the begining of this file.

Currently, this class provides two forms of profiles:

Author:
Magnus Jahre

Definition at line 34 of file interconnect_profile.hh.


Constructor & Destructor Documentation

InterconnectProfile::InterconnectProfile ( const std::string &  _name,
bool  _traceSends,
bool  _traceChannelUtil,
Tick  _startTick,
Interconnect _interconnect 
)

This constructor creates the interconnect profiler and schedules the first profile event.

Parameters:
_name The name from the config file
_traceSends Wheter or not sends should be traced or not
_traceChannelUtil Wheter or not sends should be traced or not
_startTick The clock cycle the profiling will start
_interconnect A pointer to the interconnect that will be profiled

Definition at line 11 of file interconnect_profile.cc.

References initChannelFile(), initSendFile(), and Interconnect::registerProfiler().


Member Function Documentation

bool InterconnectProfile::initChannelFile (  ) 

This method initialises the channel file. It checks if the interconnect supports channel profiling and initalises the file if it does. The reason for this check is that channel profiling makes no sense with an ideal interconnect.

Returns:
True, if the interconnect supports channel profiling.

Definition at line 73 of file interconnect_profile.cc.

References Interconnect::getChannelCount(), and Interconnect::writeChannelDecriptor().

Referenced by InterconnectProfile().

void InterconnectProfile::initSendFile (  ) 

This method initialises the send profile file.

Definition at line 45 of file interconnect_profile.cc.

Referenced by InterconnectProfile().

void InterconnectProfile::writeChannelEntry (  ) 

This method retrieves the updated channel utilisation from the interconnect and writes these values to the channel utilisation file.

Definition at line 108 of file interconnect_profile.cc.

References Interconnect::getChannelCount(), and Interconnect::getChannelSample().

Referenced by InterconnectProfileEvent::process().

void InterconnectProfile::writeSendEntry (  ) 

This method is called when a profile event i serviced. It retrieves the current profile values from the interconnect and writes them to the send profile file.

Definition at line 54 of file interconnect_profile.cc.

References Interconnect::getSendSample().

Referenced by InterconnectProfileEvent::process().


The documentation for this class was generated from the following files:
Generated on Tue Jun 5 12:55:20 2007 for M5InterconnectExtensions by  doxygen 1.4.7