Main component object for the simulation. More...
#include <introspectedComponent.h>
Public Types | |
enum | stats { core_temperature, branch_read, branch_write, RAS_read, RAS_write, il1_read, il1_readmiss, IB_read, IB_write, BTB_read, BTB_write, int_win_read, int_win_write, fp_win_read, fp_win_write, ROB_read, ROB_write, iFRAT_read, iFRAT_write, iFRAT_search, fFRAT_read, fFRAT_write, fFRAT_search, iRRAT_write, fRRAT_write, ifreeL_read, ifreeL_write, ffreeL_read, ffreeL_write, idcl_read, fdcl_read, dl1_read, dl1_readmiss, dl1_write, dl1_writemiss, LSQ_read, LSQ_write, itlb_read, itlb_readmiss, dtlb_read, dtlb_readmiss, int_regfile_reads, int_regfile_writes, float_regfile_reads, float_regfile_writes, RFWIN_read, RFWIN_write, bypass_access, router_access, L2_read, L2_readmiss, L2_write, L2_writemiss, L3_read, L3_readmiss, L3_write, L3_writemiss, L1Dir_read, L1Dir_readmiss, L1Dir_write, L1Dir_writemiss, L2Dir_read, L2Dir_readmiss, L2Dir_write, L2Dir_writemiss, memctrl_read, memctrl_write, alu_access, fpu_access, mult_access, io_access, cache_load_lookups, cache_load_misses, cache_store_lookups, cache_store_misses, writeback_lookups, writeback_misses, prefetch_lookups, prefetch_misses, prefetch_insertions, prefetch_useful_insertions, MSHR_occupancy, MSHR_full_cycles, WBB_insertions, WBB_victim_insertions, WBB_combines, WBB_occupancy, WBB_full_cycles, WBB_hits, WBB_victim_hits, core_lookups, core_misses, MSHR_combos, ib_access, issueQ_access, decoder_access, pipeline_access, lsq_access, rat_access, rob_access, btb_access, l2_access, mc_access, loadQ_access, rename_access, scheduler_access, l3_access, l1dir_access, l2dir_access, dram_backgroundEnergy, dram_burstEnergy, dram_actpreEnergy, dram_refreshEnergy, router_delay, local_message, current_power, leakage_power, runtime_power, total_power, peak_power } |
List of common statistics that components want to be monitored. More... | |
typedef std::map< std::string, std::string > | Params_t |
typedef std::map< std::string, int > | Monitors |
Public Member Functions | |
IntrospectedComponent (ComponentId_t id) | |
Constructor. | |
void | regPowerStats (Pdissipation_t pusage) |
Register/update power dissipation data in the central power database. | |
std::pair< bool, Pdissipation_t > | readPowerStats (Component *c) |
Read power dissipation data of this component from database. | |
SimTime_t | getFreq () |
Get the period set by defaultTimeBase, which is usually set by Component::registerClock(). | |
void | registerMonitorInt (std::string dataName) |
Add the statistical integer data to the map of monitors for this component. | |
std::pair< bool, int > | ifMonitorIntData (std::string dataName) |
Arbitrary statistical integer data monitoring. | |
void | registerMonitorDouble (std::string dataName) |
Add the statistical double data to the map of monitors for this component. | |
std::pair< bool, int > | ifMonitorDoubleData (std::string dataName) |
Arbitrary statistical double data monitoring. | |
void | addToIntroList (Introspector *introspector) |
Add the "id" of a introspector to an internal list, MyIntroList. | |
bool | isTimeToPush (Cycle_t current, const char *type) |
Check if current is the time for the component to push/report data (e.g. | |
virtual uint64_t | getIntData (int dataID, int index=0) |
Return the value of the integer data indicated by "dataID" and "index" (if the data structure is a table). | |
virtual double | getDoubleData (int dataID, int index=0) |
Return the value of the double data indicated by "dataID" and "index" (if the data structure is a table). | |
int | getDataID (std::string dataName) |
Returns the ID of the data associated with the string indicated by "dataName". | |
Data Fields | |
std::list< Introspector * > | MyIntroList |
List of id of introspectors that monitor this component. | |
Static Public Attributes | |
static PowerDatabase | PDB |
Central power/energy database that stores power dissipation data (including current power, total energy, peak power, etc) of the components on the same rank. | |
Protected Attributes | |
Monitors | monitorINT |
Database of integer monitors (arbitrary integer data that a compopent wishes to be monitored) available through introspectedComponent::getMonitorIntData(). | |
Monitors | monitorDOUBLE |
Database of double monitors (arbitrary double data that a compopent wishes to be monitored) available through introspectedComponent::getMonitorDoubleData(). | |
Friends | |
class | boost::serialization::access |
Main component object for the simulation.
All models inherit from this.
List of common statistics that components want to be monitored.
When editting the list, make sure to edit the vector, stats_name, in introspectedComponent::getDataID() as well.
SST::IntrospectedComponent::IntrospectedComponent | ( | ComponentId_t | id | ) |
Constructor.
Generally only called by the factory class.
id | Unique component ID | |
sim | Pointer to the global simulation object |
void SST::IntrospectedComponent::addToIntroList | ( | Introspector * | introspector | ) |
Add the "id" of a introspector to an internal list, MyIntroList.
Indicates the introspector monitors the component.
id | ID of the introspector that monitors the component |
References MyIntroList.
Referenced by SST::Introspector::monitorComponent().
int SST::IntrospectedComponent::getDataID | ( | std::string | dataName | ) |
Returns the ID of the data associated with the string indicated by "dataName".
This function is usually called in introspectedComponent::registerMonitorInt() or Component::registerMonitorDouble().
dataName | Description of the integer data |
Referenced by registerMonitorDouble(), and registerMonitorInt().
virtual double SST::IntrospectedComponent::getDoubleData | ( | int | dataID, | |
int | index = 0 | |||
) | [inline, virtual] |
Return the value of the double data indicated by "dataID" and "index" (if the data structure is a table).
Each component type needs to implement its own getDoubleData. The function is usually called by introspector pull mechanism.
dataID | ID of the integer data | |
index | of the table (if the data structure is a table); default is set to 0 |
Reimplemented in Cpu_data, and Routermodel.
SimTime_t SST::IntrospectedComponent::getFreq | ( | ) | [inline] |
Get the period set by defaultTimeBase, which is usually set by Component::registerClock().
This can be used by clever components to ensure they only compute statistics data when needed. Returns the time between two handler function calls. (For introspectors, this means time between introspections.)
References SST::Component::defaultTimeBase.
Referenced by isTimeToPush().
virtual uint64_t SST::IntrospectedComponent::getIntData | ( | int | dataID, | |
int | index = 0 | |||
) | [inline, virtual] |
Return the value of the integer data indicated by "dataID" and "index" (if the data structure is a table).
Each component type needs to implement its own getIntData. The function is usually called by introspector pull mechanism.
dataID | ID of the integer data | |
index | of the table (if the data structure is a table); default is set to 0 |
Reimplemented in Cpu_data, Cpu_PowerAndData, and Routermodel.
std::pair< bool, int > SST::IntrospectedComponent::ifMonitorDoubleData | ( | std::string | dataName | ) |
Arbitrary statistical double data monitoring.
Returns a pair<> which indicates if the component has a monitor associated with the string indicated by "dataName", and (if so) the ID of the double data.
dataName | Description of the double data |
References monitorDOUBLE.
std::pair< bool, int > SST::IntrospectedComponent::ifMonitorIntData | ( | std::string | dataName | ) |
Arbitrary statistical integer data monitoring.
Returns a pair<> which indicates if the component has a monitor associated with the string indicated by "dataName", and (if so) the ID of the integer data.
dataName | Description of the integer data |
References monitorINT.
bool SST::IntrospectedComponent::isTimeToPush | ( | Cycle_t | current, | |
const char * | type | |||
) |
std::pair< bool, Pdissipation_t > SST::IntrospectedComponent::readPowerStats | ( | Component * | c | ) |
Read power dissipation data of this component from database.
c | Pointer to the component that one whats to query power from the central power database |
References SST::Component::getId(), and PDB.
void SST::IntrospectedComponent::registerMonitorDouble | ( | std::string | dataName | ) |
Add the statistical double data to the map of monitors for this component.
The map, monitorDOUBLE, stores both the name and the ID of the double data.
dataName | Description of the double data |
References getDataID(), and monitorDOUBLE.
void SST::IntrospectedComponent::registerMonitorInt | ( | std::string | dataName | ) |
Add the statistical integer data to the map of monitors for this component.
The map, monitorINT, stores both the name and the ID of the integer data.
paramName | Description of the integer data |
References getDataID(), and monitorINT.
void SST::IntrospectedComponent::regPowerStats | ( | Pdissipation_t | pusage | ) |
Register/update power dissipation data in the central power database.
pusage | Structure that contains power dissipation data of a component |
References SST::Component::getId(), and PDB.
std::list<Introspector*> SST::IntrospectedComponent::MyIntroList |
List of id of introspectors that monitor this component.
Referenced by addToIntroList().
PowerDatabase SST::IntrospectedComponent::PDB [static] |
Central power/energy database that stores power dissipation data (including current power, total energy, peak power, etc) of the components on the same rank.
Referenced by readPowerStats(), and regPowerStats().