#include <CacheSystem.h>
Onikiri::CacheSystemに対する継承グラフ
Public メソッド | |
BEGIN_PARAM_PATH (GetParamPath()) BEGIN_PARAM_PATH(GetResultPath()) PARAM_ENTRY("@CacheAccessCoverage" | |
CacheSystem () | |
void | Cancel (OpIterator op) |
virtual void | ChangeSimulationMode (PhysicalResourceNode::SimulationMode mode) |
void | Commit (OpIterator op) |
virtual void | Finalize () |
void | Flush (OpIterator op) |
Cache * | GetFirstLevelDataCache () const |
Cache * | GetFirstLevelInsnCache () const |
virtual void | Initialize (InitPhase phase) |
m_memoryAccessDispersion | PARAM_ENTRY ("@MissesPerKiloInstructions", m_totalMPKI) |
PARAM_ENTRY ("@CacheAccessCoverage", m_memoryAccessCoverage) PARAM_ENTRY("@CacheAccessDispersion" | |
m_storeAccessDispersion | PARAM_ENTRY ("@MissesPerKiloInstructions", m_storeMPKI) |
PARAM_ENTRY ("@CacheAccessCoverage", m_storeAccessCoverage) PARAM_ENTRY("@CacheAccessDispersion" | |
m_loadAccessCoverage | PARAM_ENTRY ("@CacheAccessDispersion", m_loadAccessDispersion) PARAM_ENTRY("@MissesPerKiloInstructions" |
void | Retire (OpIterator op) |
virtual | ~CacheSystem () |
Public 変数 | |
m_loadAccessCoverage | m_loadMPKI |
Protected メソッド | |
void | CalculateCoverage (std::vector< double > *coverage, const std::vector< s64 > &dispersion) |
void | CalculateMissPerKiloInsns (std::vector< double > *mpki, const std::vector< s64 > &dispersion, s64 retiredInsns) |
int | GetDataCacheLevel (Cache *cache) |
void | InitCacheHierarchy (std::vector< Cache * > *hierarchy, std::vector< std::string > *hierarchyStr, Cache *top) |
Protected 変数 | |
std::vector< Cache * > | m_dataCacheHierarchy |
std::vector< std::string > | m_dataCacheHierarchyStr |
Cache * | m_firstLvDataCache |
Cache * | m_firstLvInsnCache |
std::vector< Cache * > | m_insnCacheHierarchy |
std::vector< std::string > | m_insnCacheHierarchyStr |
std::vector< double > | m_loadAccessCoverage |
std::vector< s64 > | m_loadAccessDispersion |
std::vector< double > | m_loadMPKI |
std::vector< double > | m_memoryAccessCoverage |
std::vector< s64 > | m_memoryAccessDispersion |
SimulationMode | m_mode |
s64 | m_numRetiredLoadAccess |
s64 | m_numRetiredMemoryAccess |
s64 | m_numRetiredStoreAccess |
s64 | m_numRetiredStoreForwarding |
std::vector< double > | m_storeAccessCoverage |
std::vector< s64 > | m_storeAccessDispersion |
std::vector< double > | m_storeMPKI |
PhysicalResourceArray< Thread > | m_thread |
std::vector< double > | m_totalMPKI |
CacheSystem.h の 50 行で定義されています。
CacheSystem::CacheSystem | ( | ) |
CacheSystem.cpp の 45 行で定義されています。
00045 : 00046 m_firstLvDataCache(0), 00047 m_firstLvInsnCache(0), 00048 m_mode( SM_SIMULATION ), 00049 m_numRetiredStoreForwarding(0), 00050 m_numRetiredLoadAccess(0), 00051 m_numRetiredStoreAccess(0) 00052 { 00053 }
CacheSystem::~CacheSystem | ( | ) | [virtual] |
Onikiri::CacheSystem::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
void CacheSystem::CalculateCoverage | ( | std::vector< double > * | coverage, | |
const std::vector< s64 > & | dispersion | |||
) | [protected] |
CacheSystem.cpp の 112 行で定義されています。
参照元 Finalize().
00115 { 00116 s64 total = 0; 00117 for( vector< s64 >::const_iterator i = dispersion.begin(); i != dispersion.end(); ++i ){ 00118 total += *i; 00119 } 00120 00121 s64 covered = 0; 00122 coverage->clear(); 00123 for( vector< s64 >::const_iterator i = dispersion.begin(); i != dispersion.end(); ++i ){ 00124 covered += *i; 00125 coverage->push_back( (double)covered / (double)total ); 00126 } 00127 }
Here is the caller graph for this function:
void CacheSystem::CalculateMissPerKiloInsns | ( | std::vector< double > * | mpki, | |
const std::vector< s64 > & | dispersion, | |||
s64 | retiredInsns | |||
) | [protected] |
CacheSystem.cpp の 131 行で定義されています。
参照元 Finalize().
00135 { 00136 s64 misses = 0; 00137 for( vector< s64 >::const_iterator i = dispersion.begin(); i != dispersion.end(); ++i ){ 00138 misses += *i; 00139 } 00140 00141 mpki->clear(); 00142 for( vector< s64 >::const_iterator i = dispersion.begin(); i != dispersion.end(); ++i ){ 00143 misses -= *i; 00144 mpki->push_back( 1000.0 * (double)misses / (double)retiredInsns ); 00145 } 00146 }
Here is the caller graph for this function:
void Onikiri::CacheSystem::Cancel | ( | OpIterator | op | ) | [inline] |
void CacheSystem::ChangeSimulationMode | ( | PhysicalResourceNode::SimulationMode | mode | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
CacheSystem.cpp の 208 行で定義されています。
参照先 m_mode.
00209 { 00210 m_mode = mode; 00211 }
void CacheSystem::Commit | ( | OpIterator | op | ) |
CacheSystem.cpp の 176 行で定義されています。
参照先 ASSERT・Onikiri::CacheAccessResult::cache・GetDataCacheLevel()・Onikiri::OpClass::IsLoad()・Onikiri::OpClass::IsMem()・m_loadAccessDispersion・m_numRetiredLoadAccess・m_numRetiredStoreAccess・m_numRetiredStoreForwarding・m_storeAccessDispersion.
参照元 Onikiri::InorderList::NotifyCommit()・Onikiri::InorderSystem::Run().
00177 { 00178 const OpClass& opClass = op->GetOpClass(); 00179 00180 if( opClass.IsMem() ){ 00181 // Update dispersion of accesses 00182 int level = 0; 00183 const CacheAccessResult& result = op->GetCacheAccessResult(); 00184 if( result.cache == NULL ){ // NULL is store forwarding. 00185 if( opClass.IsLoad() ){ 00186 m_numRetiredStoreForwarding++; 00187 } 00188 } 00189 else{ 00190 level = GetDataCacheLevel( op->GetCacheAccessResult().cache ); 00191 } 00192 00193 if( opClass.IsLoad() ){ 00194 ASSERT( level < (int)m_loadAccessDispersion.size() ); 00195 m_loadAccessDispersion[ level ]++; 00196 m_numRetiredLoadAccess++; 00197 } 00198 else{ 00199 ASSERT( level < (int)m_storeAccessDispersion.size() ); 00200 m_storeAccessDispersion[ level ]++; 00201 m_numRetiredStoreAccess++; 00202 } 00203 } 00204 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void CacheSystem::Finalize | ( | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
CacheSystem.cpp の 77 行で定義されています。
参照先 CalculateCoverage()・CalculateMissPerKiloInsns()・m_dataCacheHierarchy・m_loadAccessCoverage・m_loadAccessDispersion・m_loadMPKI・m_memoryAccessCoverage・m_memoryAccessDispersion・m_numRetiredMemoryAccess・m_storeAccessCoverage・m_storeAccessDispersion・m_storeMPKI・m_thread・m_totalMPKI・Onikiri::PhysicalResourceNode::ReleaseParam().
00078 { 00079 // For memory accesses 00080 m_memoryAccessDispersion.clear(); 00081 m_numRetiredMemoryAccess = 0; 00082 for( size_t i = 0; i < m_dataCacheHierarchy.size(); ++i ){ 00083 m_memoryAccessDispersion.push_back( 00084 m_loadAccessDispersion[i] + m_storeAccessDispersion[i] 00085 ); 00086 m_numRetiredMemoryAccess += m_memoryAccessDispersion[i]; 00087 } 00088 00089 // Calculate coverage of each cache hierarchy. 00090 CalculateCoverage( &m_loadAccessCoverage, m_loadAccessDispersion ); 00091 CalculateCoverage( &m_storeAccessCoverage, m_storeAccessDispersion ); 00092 CalculateCoverage( &m_memoryAccessCoverage, m_memoryAccessDispersion ); 00093 00094 // Calculate retired instructions. 00095 s64 retiredInsns = 0; 00096 for( int i = 0; i < m_thread.GetSize(); i++ ){ 00097 InorderList* ioList = m_thread[i]->GetInorderList(); 00098 if( ioList ){ 00099 retiredInsns += ioList->GetRetiredInsns(); 00100 } 00101 } 00102 00103 // Calculate MPKIs 00104 CalculateMissPerKiloInsns( &m_loadMPKI, m_loadAccessDispersion, retiredInsns ); 00105 CalculateMissPerKiloInsns( &m_storeMPKI, m_storeAccessDispersion, retiredInsns ); 00106 CalculateMissPerKiloInsns( &m_totalMPKI, m_memoryAccessDispersion, retiredInsns ); 00107 00108 ReleaseParam(); 00109 }
関数の呼び出しグラフ:
void Onikiri::CacheSystem::Flush | ( | OpIterator | op | ) | [inline] |
CacheSystem.h の 130 行で定義されています。
参照元 Onikiri::InorderList::NotifyFlush().
Here is the caller graph for this function:
int CacheSystem::GetDataCacheLevel | ( | Cache * | cache | ) | [protected] |
CacheSystem.cpp の 163 行で定義されています。
参照先 ASSERT・m_dataCacheHierarchy.
参照元 Commit().
00164 { 00165 for( size_t i = 0; i < m_dataCacheHierarchy.size(); ++i ){ 00166 if( cache == m_dataCacheHierarchy[i] ){ 00167 return (int)i; 00168 } 00169 } 00170 00171 ASSERT( "An unknow cache is passed." ); 00172 return 0; 00173 }
Here is the caller graph for this function:
Cache* Onikiri::CacheSystem::GetFirstLevelDataCache | ( | ) | const [inline] |
CacheSystem.h の 132 行で定義されています。
参照先 m_firstLvDataCache.
参照元 Onikiri::Core::Evaluate()・Onikiri::MemOrderManager::Initialize()・Onikiri::MemExecUnit::Initialize()・Onikiri::InorderSystem::Run().
00132 { return m_firstLvDataCache; }
Here is the caller graph for this function:
Cache* Onikiri::CacheSystem::GetFirstLevelInsnCache | ( | ) | const [inline] |
CacheSystem.h の 133 行で定義されています。
参照先 m_firstLvInsnCache.
参照元 Onikiri::Core::Evaluate()・Onikiri::Fetcher::GetICacheReadLatency()・Onikiri::Fetcher::Initialize()・Onikiri::Fetcher::Update().
00133 { return m_firstLvInsnCache; }
Here is the caller graph for this function:
void CacheSystem::InitCacheHierarchy | ( | std::vector< Cache * > * | hierarchy, | |
std::vector< std::string > * | hierarchyStr, | |||
Cache * | top | |||
) | [protected] |
CacheSystem.cpp の 149 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::GetName()・Onikiri::Cache::GetNextCache().
参照元 Initialize().
00153 { 00154 hierarchy->clear(); 00155 Cache* cache = top; 00156 for( int i = 0; cache; i++){ 00157 hierarchy->push_back( cache ); 00158 hierarchyStr->push_back( cache->GetName() ); 00159 cache = cache->GetNextCache(); 00160 } 00161 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void CacheSystem::Initialize | ( | InitPhase | phase | ) | [virtual] |
CacheSystem.cpp の 59 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・InitCacheHierarchy()・Onikiri::ParamExchange::LoadParam()・m_dataCacheHierarchy・m_dataCacheHierarchyStr・m_firstLvDataCache・m_firstLvInsnCache・m_insnCacheHierarchy・m_insnCacheHierarchyStr・m_loadAccessDispersion・m_storeAccessDispersion.
00060 { 00061 if(phase == INIT_PRE_CONNECTION){ 00062 00063 LoadParam(); 00064 00065 } 00066 else if( phase == INIT_POST_CONNECTION ){ 00067 00068 // Initialize cache hierarchy and related information 00069 InitCacheHierarchy( &m_dataCacheHierarchy, &m_dataCacheHierarchyStr, m_firstLvDataCache ); 00070 InitCacheHierarchy( &m_insnCacheHierarchy, &m_insnCacheHierarchyStr, m_firstLvInsnCache ); 00071 m_loadAccessDispersion.resize( m_dataCacheHierarchy.size(), 0 ); 00072 m_storeAccessDispersion.resize( m_dataCacheHierarchy.size(), 0 ); 00073 00074 } 00075 }
関数の呼び出しグラフ:
m_memoryAccessDispersion Onikiri::CacheSystem::PARAM_ENTRY | ( | "@MissesPerKiloInstructions" | , | |
m_totalMPKI | ||||
) |
Onikiri::CacheSystem::PARAM_ENTRY | ( | "@CacheAccessCoverage" | , | |
m_memoryAccessCoverage | ||||
) |
m_storeAccessDispersion Onikiri::CacheSystem::PARAM_ENTRY | ( | "@MissesPerKiloInstructions" | , | |
m_storeMPKI | ||||
) |
Onikiri::CacheSystem::PARAM_ENTRY | ( | "@CacheAccessCoverage" | , | |
m_storeAccessCoverage | ||||
) |
m_loadAccessCoverage Onikiri::CacheSystem::PARAM_ENTRY | ( | "@CacheAccessDispersion" | , | |
m_loadAccessDispersion | ||||
) |
void Onikiri::CacheSystem::Retire | ( | OpIterator | op | ) | [inline] |
CacheSystem.h の 129 行で定義されています。
参照元 Onikiri::InorderList::NotifyRetire().
Here is the caller graph for this function:
std::vector< Cache* > Onikiri::CacheSystem::m_dataCacheHierarchy [protected] |
std::vector< std::string > Onikiri::CacheSystem::m_dataCacheHierarchyStr [protected] |
Cache* Onikiri::CacheSystem::m_firstLvDataCache [protected] |
Cache* Onikiri::CacheSystem::m_firstLvInsnCache [protected] |
std::vector< Cache* > Onikiri::CacheSystem::m_insnCacheHierarchy [protected] |
std::vector< std::string > Onikiri::CacheSystem::m_insnCacheHierarchyStr [protected] |
std::vector< double > Onikiri::CacheSystem::m_loadAccessCoverage [protected] |
std::vector< s64 > Onikiri::CacheSystem::m_loadAccessDispersion [protected] |
std::vector< double > Onikiri::CacheSystem::m_loadMPKI [protected] |
CacheSystem.h の 161 行で定義されています。
std::vector< double > Onikiri::CacheSystem::m_memoryAccessCoverage [protected] |
std::vector< s64 > Onikiri::CacheSystem::m_memoryAccessDispersion [protected] |
SimulationMode Onikiri::CacheSystem::m_mode [protected] |
s64 Onikiri::CacheSystem::m_numRetiredLoadAccess [protected] |
s64 Onikiri::CacheSystem::m_numRetiredMemoryAccess [protected] |
s64 Onikiri::CacheSystem::m_numRetiredStoreAccess [protected] |
s64 Onikiri::CacheSystem::m_numRetiredStoreForwarding [protected] |
std::vector< double > Onikiri::CacheSystem::m_storeAccessCoverage [protected] |
std::vector< s64 > Onikiri::CacheSystem::m_storeAccessDispersion [protected] |
std::vector< double > Onikiri::CacheSystem::m_storeMPKI [protected] |
PhysicalResourceArray<Thread> Onikiri::CacheSystem::m_thread [protected] |
std::vector< double > Onikiri::CacheSystem::m_totalMPKI [protected] |