クラス Onikiri::CacheSystem

#include <CacheSystem.h>

Onikiri::CacheSystemに対する継承グラフ

Inheritance graph
[凡例]
Onikiri::CacheSystemのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

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)
CacheGetFirstLevelDataCache () const
CacheGetFirstLevelInsnCache () 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
Cachem_firstLvDataCache
Cachem_firstLvInsnCache
std::vector< Cache * > m_insnCacheHierarchy
std::vector< std::string > m_insnCacheHierarchyStr
std::vector< double > m_loadAccessCoverage
std::vector< s64m_loadAccessDispersion
std::vector< double > m_loadMPKI
std::vector< double > m_memoryAccessCoverage
std::vector< s64m_memoryAccessDispersion
SimulationMode m_mode
s64 m_numRetiredLoadAccess
s64 m_numRetiredMemoryAccess
s64 m_numRetiredStoreAccess
s64 m_numRetiredStoreForwarding
std::vector< double > m_storeAccessCoverage
std::vector< s64m_storeAccessDispersion
std::vector< double > m_storeMPKI
PhysicalResourceArray< Threadm_thread
std::vector< double > m_totalMPKI

説明

CacheSystem.h50 行で定義されています。


コンストラクタとデストラクタ

CacheSystem::CacheSystem (  ) 

CacheSystem.cpp45 行で定義されています。

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]

CacheSystem.cpp55 行で定義されています。

00056 {
00057 }


関数

Onikiri::CacheSystem::BEGIN_PARAM_PATH ( GetParamPath()   ) 

void CacheSystem::CalculateCoverage ( std::vector< double > *  coverage,
const std::vector< s64 > &  dispersion 
) [protected]

CacheSystem.cpp112 行で定義されています。

参照元 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.cpp131 行で定義されています。

参照元 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]

CacheSystem.h128 行で定義されています。

00128 {};

void CacheSystem::ChangeSimulationMode ( PhysicalResourceNode::SimulationMode  mode  )  [virtual]

Onikiri::PhysicalResourceNodeを再定義しています。

CacheSystem.cpp208 行で定義されています。

参照先 m_mode.

00209 {
00210     m_mode = mode;
00211 }

void CacheSystem::Commit ( OpIterator  op  ) 

CacheSystem.cpp176 行で定義されています。

参照先 ASSERTOnikiri::CacheAccessResult::cacheGetDataCacheLevel()Onikiri::OpClass::IsLoad()Onikiri::OpClass::IsMem()m_loadAccessDispersionm_numRetiredLoadAccessm_numRetiredStoreAccessm_numRetiredStoreForwardingm_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.cpp77 行で定義されています。

参照先 CalculateCoverage()CalculateMissPerKiloInsns()m_dataCacheHierarchym_loadAccessCoveragem_loadAccessDispersionm_loadMPKIm_memoryAccessCoveragem_memoryAccessDispersionm_numRetiredMemoryAccessm_storeAccessCoveragem_storeAccessDispersionm_storeMPKIm_threadm_totalMPKIOnikiri::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.h130 行で定義されています。

参照元 Onikiri::InorderList::NotifyFlush().

00130 {};

Here is the caller graph for this function:

int CacheSystem::GetDataCacheLevel ( Cache cache  )  [protected]

CacheSystem.cpp163 行で定義されています。

参照先 ASSERTm_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.h132 行で定義されています。

参照先 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.h133 行で定義されています。

参照先 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.cpp149 行で定義されています。

参照先 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.cpp59 行で定義されています。

参照先 Onikiri::PhysicalResourceNode::INIT_POST_CONNECTIONOnikiri::PhysicalResourceNode::INIT_PRE_CONNECTIONInitCacheHierarchy()Onikiri::ParamExchange::LoadParam()m_dataCacheHierarchym_dataCacheHierarchyStrm_firstLvDataCachem_firstLvInsnCachem_insnCacheHierarchym_insnCacheHierarchyStrm_loadAccessDispersionm_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.h129 行で定義されています。

参照元 Onikiri::InorderList::NotifyRetire().

00129 {};

Here is the caller graph for this function:


変数

std::vector< Cache* > Onikiri::CacheSystem::m_dataCacheHierarchy [protected]

CacheSystem.h143 行で定義されています。

参照元 Finalize()GetDataCacheLevel()Initialize().

std::vector< std::string > Onikiri::CacheSystem::m_dataCacheHierarchyStr [protected]

CacheSystem.h145 行で定義されています。

参照元 Initialize().

Cache* Onikiri::CacheSystem::m_firstLvDataCache [protected]

CacheSystem.h137 行で定義されています。

参照元 GetFirstLevelDataCache()Initialize().

Cache* Onikiri::CacheSystem::m_firstLvInsnCache [protected]

CacheSystem.h138 行で定義されています。

参照元 GetFirstLevelInsnCache()Initialize().

std::vector< Cache* > Onikiri::CacheSystem::m_insnCacheHierarchy [protected]

CacheSystem.h144 行で定義されています。

参照元 Initialize().

std::vector< std::string > Onikiri::CacheSystem::m_insnCacheHierarchyStr [protected]

CacheSystem.h146 行で定義されています。

参照元 Initialize().

std::vector< double > Onikiri::CacheSystem::m_loadAccessCoverage [protected]

CacheSystem.h156 行で定義されています。

参照元 Finalize().

std::vector< s64 > Onikiri::CacheSystem::m_loadAccessDispersion [protected]

CacheSystem.h150 行で定義されています。

参照元 Commit()Finalize()Initialize().

std::vector< double > Onikiri::CacheSystem::m_loadMPKI [protected]

CacheSystem.h161 行で定義されています。

m_loadAccessCoverage Onikiri::CacheSystem::m_loadMPKI

CacheSystem.h75 行で定義されています。

参照元 Finalize().

std::vector< double > Onikiri::CacheSystem::m_memoryAccessCoverage [protected]

CacheSystem.h158 行で定義されています。

参照元 Finalize().

std::vector< s64 > Onikiri::CacheSystem::m_memoryAccessDispersion [protected]

CacheSystem.h152 行で定義されています。

参照元 Finalize().

SimulationMode Onikiri::CacheSystem::m_mode [protected]

CacheSystem.h140 行で定義されています。

参照元 ChangeSimulationMode().

s64 Onikiri::CacheSystem::m_numRetiredLoadAccess [protected]

CacheSystem.h166 行で定義されています。

参照元 Commit().

s64 Onikiri::CacheSystem::m_numRetiredMemoryAccess [protected]

CacheSystem.h168 行で定義されています。

参照元 Finalize().

s64 Onikiri::CacheSystem::m_numRetiredStoreAccess [protected]

CacheSystem.h167 行で定義されています。

参照元 Commit().

s64 Onikiri::CacheSystem::m_numRetiredStoreForwarding [protected]

CacheSystem.h165 行で定義されています。

参照元 Commit().

std::vector< double > Onikiri::CacheSystem::m_storeAccessCoverage [protected]

CacheSystem.h157 行で定義されています。

参照元 Finalize().

std::vector< s64 > Onikiri::CacheSystem::m_storeAccessDispersion [protected]

CacheSystem.h151 行で定義されています。

参照元 Commit()Finalize()Initialize().

std::vector< double > Onikiri::CacheSystem::m_storeMPKI [protected]

CacheSystem.h162 行で定義されています。

参照元 Finalize().

PhysicalResourceArray<Thread> Onikiri::CacheSystem::m_thread [protected]

CacheSystem.h139 行で定義されています。

参照元 Finalize().

std::vector< double > Onikiri::CacheSystem::m_totalMPKI [protected]

CacheSystem.h163 行で定義されています。

参照元 Finalize().


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 14:53:58 2013に生成されました。  doxygen 1.4.7