#include <Recoverer.h>
Onikiri::Recovererに対する継承グラフ
Recoverer.h の 50 行で定義されています。
Recoverer.h の 53 行で定義されています。
Recoverer::~Recoverer | ( | ) | [virtual] |
Onikiri::Recoverer::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
void Recoverer::Finalize | ( | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
Recoverer.cpp の 94 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::ReleaseParam().
00095 { 00096 ReleaseParam(); 00097 }
関数の呼び出しグラフ:
OpIterator Recoverer::GetRecoveryStartOp | ( | OpIterator | producer, | |
OpIterator | consumer, | |||
Recovery::From | from | |||
) | [protected] |
Recoverer.cpp の 412 行で定義されています。
参照先 ASSERT・Onikiri::DataPredMissRecovery::FROM_CONSUMER・Onikiri::DataPredMissRecovery::FROM_NEXT_OF_PRODUCER・Onikiri::DataPredMissRecovery::FROM_PRODUCER・Onikiri::InorderList::GetNextPCOp()・Onikiri::OpIterator::IsNull()・m_inorderList.
00413 { 00414 // Select a start point of recovery. 00415 OpIterator startOp(0); 00416 switch( from ){ 00417 case Recovery::FROM_PRODUCER: 00418 ASSERT( 00419 !producer.IsNull(), 00420 "The start point of recovery is specified as 'Producer', but a passed producer is null." 00421 "This may occur when a producer is already retired when violation is detected." 00422 ); 00423 startOp = producer; 00424 break; 00425 00426 case Recovery::FROM_NEXT_OF_PRODUCER: 00427 ASSERT( 00428 !producer.IsNull(), 00429 "The start point of recovery is specified as 'NextOfProducer', but a passed producer is null." 00430 "This may occur when a producer is already retired when violation is detected." 00431 ); 00432 startOp = m_inorderList->GetNextPCOp( producer ); 00433 break; 00434 00435 case Recovery::FROM_CONSUMER: 00436 startOp = consumer; 00437 break; 00438 00439 default: 00440 ASSERT( 0, "An unknown recovery start point." ); 00441 break; 00442 } 00443 return startOp; 00444 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Recoverer::Initialize | ( | InitPhase | phase | ) | [virtual] |
Recoverer.cpp の 77 行で定義されています。
参照先 Onikiri::DataPredMissRecovery::FromNextOfProducer()・Onikiri::DataPredMissRecovery::FromProducer()・Onikiri::Core::GetPartialLoadRecovery()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::ParamExchange::LoadParam()・m_core・THROW_RUNTIME_ERROR.
00078 { 00079 if( phase == INIT_PRE_CONNECTION ){ 00080 LoadParam(); 00081 } 00082 else if( phase == INIT_POST_CONNECTION ){ 00083 00084 // Policy checking. 00085 // Other policy checking is done in Scheduler. 00086 const DataPredMissRecovery& pmr = m_core->GetPartialLoadRecovery(); 00087 if( pmr.FromNextOfProducer() || pmr.FromProducer() ){ 00088 // Partial load violation may be detected after a producer is committed. 00089 THROW_RUNTIME_ERROR( "Partial load recovery supports only a mode 'from Consumer'." ); 00090 } 00091 } 00092 }
関数の呼び出しグラフ:
void Recoverer::RecoverBPredMiss | ( | OpIterator | branch | ) |
Recoverer.cpp の 101 行で定義されています。
参照先 Onikiri::InorderList::FlushBackward()・Onikiri::Thread::GetCore()・Onikiri::Core::GetFetcher()・Onikiri::InorderList::GetNextPCOp()・m_brPredRecoveryCount・m_brPredRecoveryLatency・m_brPredRecoveryOps・m_inorderList・m_thread・RecoverCheckpoint()・Onikiri::Thread::SetFetchPC()・Onikiri::PipelineNodeBase::StallNextCycle().
参照元 Onikiri::BPred::RecoveryFromBPredMiss().
00102 { 00103 // Recover processor state to a checkpoint after the branch. 00104 RecoverCheckpoint( branch->GetAfterCheckpoint() ); 00105 00106 // Flush backward ops. 00107 m_brPredRecoveryOps += 00108 m_inorderList->FlushBackward( m_inorderList->GetNextPCOp(branch) ); 00109 00110 // Set a correct branch result. 00111 m_thread->SetFetchPC( branch->GetNextPC() ); 00112 00113 // Stall a fetcher for a recovery latency. 00114 int latency = m_brPredRecoveryLatency; 00115 if( latency > 0 ){ 00116 m_thread->GetCore()->GetFetcher()->StallNextCycle( latency ); 00117 } 00118 00119 m_brPredRecoveryCount++; 00120 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RecoverByRefetch | ( | OpIterator | missedOp, | |
OpIterator | startOp | |||
) |
Recoverer.cpp の 244 行で定義されています。
参照先 ASSERT・Onikiri::InorderList::FlushBackward()・Onikiri::InorderList::GetFrontOpOfSamePC()・Onikiri::InorderList::GetPrevPCOp()・Onikiri::OpIterator::IsNull()・m_inorderList・m_thread・Onikiri::OpStatus::OS_COMITTING・RecoverCheckpoint()・Onikiri::Thread::SetFetchPC()・THROW_RUNTIME_ERROR.
参照元 RecoverDataPredMiss()・RecoverException().
00245 { 00246 // A pc that fetch is resumed from. 00247 PC fetchPC = startOp->GetPC(); 00248 00249 ASSERT( 00250 startOp->GetStatus() < OpStatus::OS_COMITTING, 00251 "Cannot re-fetch from this op because this op is already committed. op: %s", 00252 startOp->ToString(6).c_str() 00253 ); 00254 00255 // Recover the state to 'checkpoint'. 00256 Checkpoint* checkpoint = startOp->GetBeforeCheckpoint(); 00257 if( !checkpoint ){ 00258 OpIterator prevOp = m_inorderList->GetPrevPCOp( startOp ); 00259 if( prevOp.IsNull() ){ 00260 THROW_RUNTIME_ERROR( "A necessary checkpoint is not taken. op: %s", startOp->ToString(6).c_str() ); 00261 } 00262 checkpoint = m_inorderList->GetFrontOpOfSamePC(prevOp)->GetAfterCheckpoint(); 00263 if( !checkpoint ){ 00264 THROW_RUNTIME_ERROR( "A necessary checkpoint is not taken. op: %s", startOp->ToString(6).c_str() ); 00265 } 00266 } 00267 RecoverCheckpoint( checkpoint ); 00268 00269 // Flush backward ops. 00270 int flushedInsns = 00271 m_inorderList->FlushBackward( m_inorderList->GetFrontOpOfSamePC( startOp ) ); 00272 00273 // Set a correct branch result. 00274 m_thread->SetFetchPC( fetchPC ); 00275 00276 return flushedInsns; 00277 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RecoverByRescheduleAll | ( | OpIterator | missedOp, | |
OpIterator | startOp | |||
) |
Recoverer.cpp の 281 行で定義されています。
参照先 Onikiri::InorderList::GetNextIndexOp()・Onikiri::OpIterator::IsNull()・m_inorderList.
00282 { 00283 int recoveredInsns = 0; 00284 for( OpIterator i = startOp; !i.IsNull(); i = m_inorderList->GetNextIndexOp( i ) ){ 00285 if( i->GetScheduler()->Reschedule( i ) ){ 00286 recoveredInsns++; 00287 } 00288 } 00289 00290 return recoveredInsns; 00291 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RecoverByRescheduleNotFinished | ( | OpIterator | missedOp, | |
OpIterator | startOp | |||
) |
Recoverer.cpp の 294 行で定義されています。
参照先 Onikiri::InorderList::GetNextIndexOp()・Onikiri::OpIterator::IsNull()・m_inorderList・Onikiri::OpStatus::OS_EXECUTING.
00295 { 00296 int recoveredInsns = 0; 00297 for( OpIterator i = startOp; !i.IsNull(); i = m_inorderList->GetNextIndexOp( i ) ){ 00298 if( i->GetStatus() <= OpStatus::OS_EXECUTING ){ 00299 if( i->GetScheduler()->Reschedule( i ) ){ 00300 recoveredInsns++; 00301 } 00302 } 00303 } 00304 00305 return recoveredInsns; 00306 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RecoverByRescheduleSelective | ( | OpIterator | producerOp, | |
Recovery::From | from | |||
) |
Recoverer.cpp の 309 行で定義されています。
参照先 ASSERT・Onikiri::DataPredMissRecovery::FROM_NEXT_OF_PRODUCER・Onikiri::DataPredMissRecovery::FROM_PRODUCER・RescheduleConsumers().
00310 { 00311 ASSERT( 00312 from != Recovery::FROM_NEXT_OF_PRODUCER, 00313 "cannot reschedule selective next of producer" 00314 ); 00315 00316 int recoveredInsns = 0; 00317 if( from == Recovery::FROM_PRODUCER ){ 00318 if( producerOp->GetScheduler()->Reschedule( producerOp ) ){ 00319 recoveredInsns++; 00320 } 00321 } 00322 //recoveredInsns += producerOp->RescheduleConsumers( producerOp ); 00323 RescheduleConsumers( producerOp ); 00324 00325 return recoveredInsns; 00326 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Recoverer::RecoverCheckpoint | ( | Checkpoint * | checkpoint | ) | [protected] |
Recoverer.cpp の 329 行で定義されています。
参照先 ASSERT・m_checkpointMaster・Onikiri::CheckpointMaster::Recover().
参照元 RecoverBPredMiss()・RecoverByRefetch().
00330 { 00331 ASSERT( checkpoint != 0, "no checkpoint for recovery" ); 00332 m_checkpointMaster->Recover( checkpoint ); 00333 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RecoverDataPredMiss | ( | OpIterator | producer, | |
OpIterator | consumer, | |||
const DataPredMissRecovery & | recovery | |||
) |
Recoverer.cpp の 192 行で定義されています。
参照先 ASSERT・Onikiri::DataPredMissRecovery::GetFrom()・Onikiri::DataPredMissRecovery::GetPolicy()・GetRecoveryStartOp()・Onikiri::OpIterator::IsNull()・Onikiri::DataPredMissRecovery::POLICY_REFETCH・Onikiri::DataPredMissRecovery::POLICY_REISSUE_ALL・Onikiri::DataPredMissRecovery::POLICY_REISSUE_NOT_FINISHED・Onikiri::DataPredMissRecovery::POLICY_REISSUE_SELECTIVE・RecoverByRefetch()・RecoverByRescheduleAll()・RecoverByRescheduleNotFinished()・RecoverByRescheduleSelective().
00194 { 00195 // Recovered from: 00196 const Recovery::From& from = dpmr.GetFrom(); 00197 00198 // Recover policy: 00199 const Recovery::Policy& policy = dpmr.GetPolicy(); 00200 00201 if( policy == Recovery::POLICY_REISSUE_SELECTIVE ){ 00202 // In the case of Recovery::FROM_CONSUMER, 00203 // multiple consumers must be re-scheduled and 00204 // the bellow codes including GetFirstConsumer() cannnot treat this. 00205 return RecoverByRescheduleSelective( producer, from ); 00206 } 00207 00208 00209 // Select a start point of recovery. 00210 OpIterator startOp = GetRecoveryStartOp( producer, consumer, from ); 00211 00212 // Return if there are no ops recovered... 00213 if( startOp.IsNull() ) { 00214 return 0; 00215 } 00216 00217 int recovered = 0; 00218 00219 switch( policy ){ 00220 00221 case Recovery::POLICY_REFETCH: 00222 recovered = RecoverByRefetch( producer, startOp ); 00223 break; 00224 00225 case Recovery::POLICY_REISSUE_ALL: 00226 recovered = RecoverByRescheduleAll( producer, startOp ); 00227 break; 00228 00229 case Recovery::POLICY_REISSUE_NOT_FINISHED: 00230 recovered = RecoverByRescheduleNotFinished( producer, startOp ); 00231 break; 00232 00233 default: 00234 ASSERT( 0, "Unknown recovery policy." ); 00235 break; 00236 } 00237 00238 return recovered; 00239 00240 }
関数の呼び出しグラフ:
int Onikiri::Recoverer::RecoverDataPredMiss | ( | OpIterator | producer, | |
OpIterator | consumer, | |||
DataPredMissRecovery::Type | dataPredType | |||
) |
参照元 Onikiri::MemOrderManager::DetectAccessOrderViolation()・Onikiri::MemOrderManager::DetectPartialLoadViolation()・Onikiri::OpDetectLatPredMissEvent::Update().
Here is the caller graph for this function:
void Recoverer::RecoverException | ( | OpIterator | causer | ) |
Recoverer.cpp の 123 行で定義されています。
参照先 ASSERT・Onikiri::Exception::exception・Onikiri::Thread::GetCore()・Onikiri::Core::GetFetcher()・m_exceptionRecoveryCount・m_exceptionRecoveryLatency・m_exceptionRecoveryOps・m_thread・RecoverByRefetch()・Onikiri::PipelineNodeBase::StallNextCycle().
参照元 Onikiri::Retirer::UpdateException().
00124 { 00125 ASSERT( 00126 !causer->GetOpClass().IsSyscall(), 00127 "Exception of a system call is not supported." 00128 ); 00129 00130 m_exceptionRecoveryOps += 00131 RecoverByRefetch( causer, causer ); 00132 00133 // Clear an exception state 00134 Exception exception = causer->GetException(); 00135 exception.exception = false; 00136 causer->SetException( exception ); 00137 00138 // Stall a fetcher for a recovery latency. 00139 int latency = m_exceptionRecoveryLatency; 00140 if( latency > 0 ){ 00141 m_thread->GetCore()->GetFetcher()->StallNextCycle( latency ); 00142 } 00143 00144 m_exceptionRecoveryCount++; 00145 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Recoverer::RescheduleConsumers | ( | OpIterator | producer | ) | [protected] |
Recoverer.cpp の 372 行で定義されています。
参照先 Onikiri::Thread::GetMemOrderManager()・Onikiri::OpIterator::IsNull()・m_thread.
参照元 RecoverByRescheduleSelective().
00373 { 00374 int reshceduledInsns = 0; 00375 00376 // Reschedule consumers. 00377 int depNum = producer->GetDstDepNum(); 00378 for( int i = 0; i < depNum; ++i ){ 00379 Dependency* dep = producer->GetDstDep(i); 00380 const Dependency::ConsumerListType& consumers = dep->GetConsumers(); 00381 for(Dependency::ConsumerListConstIterator j = consumers.begin(); 00382 j != consumers.end(); 00383 ++j 00384 ){ 00385 OpIterator consumer = *j; 00386 if( consumer->GetScheduler()->Reschedule( consumer ) ){ 00387 reshceduledInsns++; 00388 } 00389 reshceduledInsns += RescheduleConsumers( consumer ); 00390 } 00391 } 00392 00393 // Rescheduling speculatively executed load instructions. 00394 if( producer->GetOpClass().IsStore() ) { 00395 MemOrderManager* memOrder = m_thread->GetMemOrderManager(); 00396 const MemAccess& memAccess = producer->GetMemAccess(); 00397 for( int i = 0; ; i++ ){ 00398 OpIterator consumer = memOrder->GetConsumerLoad( producer, memAccess, i ); 00399 if( consumer.IsNull() ) 00400 break; 00401 if( consumer->GetScheduler()->Reschedule( consumer ) ){ 00402 reshceduledInsns++; 00403 } 00404 reshceduledInsns += RescheduleConsumers( consumer ); 00405 } 00406 } 00407 00408 return reshceduledInsns; 00409 00410 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Recoverer::UpdateRecoveryStatistics | ( | int | recoveredInsns, | |
Recovery::Type | dataPredType | |||
) | [protected] |
Recoverer.cpp の 335 行で定義されています。
参照先 m_addrPredRecoveryCount・m_addrPredRecoveryOps・m_latPredRecoveryCount・m_latPredRecoveryOps・m_partialReadRecoveryCount・m_partialReadRecoveryOps・m_valuePredRecoveryCount・m_valuePredRecoveryOps・THROW_RUNTIME_ERROR.
00338 { 00339 typedef Recovery DPMR; 00340 00341 switch( dataPredType ){ 00342 00343 case DPMR::TYPE_LATENCY: 00344 m_latPredRecoveryOps += recoveredInsns; 00345 m_latPredRecoveryCount++; 00346 break; 00347 00348 case DPMR::TYPE_ADDRESS_MATCH: 00349 m_addrPredRecoveryOps += recoveredInsns; 00350 m_addrPredRecoveryCount++; 00351 break; 00352 00353 case DPMR::TYPE_VALUE: 00354 m_valuePredRecoveryOps += recoveredInsns; 00355 m_valuePredRecoveryCount++; 00356 break; 00357 00358 case DPMR::TYPE_PARTIAL_LOAD: 00359 m_partialReadRecoveryOps += recoveredInsns; 00360 m_partialReadRecoveryCount++; 00361 break; 00362 00363 default: 00364 THROW_RUNTIME_ERROR( "Unknown data prediction type." ); 00365 break; 00366 00367 } 00368 }
s64 Onikiri::Recoverer::m_addrPredRecoveryCount [protected] |
s64 Onikiri::Recoverer::m_addrPredRecoveryOps [protected] |
s64 Onikiri::Recoverer::m_brPredRecoveryCount [protected] |
int Onikiri::Recoverer::m_brPredRecoveryLatency [protected] |
s64 Onikiri::Recoverer::m_brPredRecoveryOps [protected] |
CheckpointMaster* Onikiri::Recoverer::m_checkpointMaster [protected] |
Core* Onikiri::Recoverer::m_core [protected] |
s64 Onikiri::Recoverer::m_exceptionRecoveryCount [protected] |
int Onikiri::Recoverer::m_exceptionRecoveryLatency [protected] |
s64 Onikiri::Recoverer::m_exceptionRecoveryOps [protected] |
InorderList* Onikiri::Recoverer::m_inorderList [protected] |
s64 Onikiri::Recoverer::m_latPredRecoveryCount [protected] |
s64 Onikiri::Recoverer::m_latPredRecoveryOps [protected] |
s64 Onikiri::Recoverer::m_partialReadRecoveryCount [protected] |
s64 Onikiri::Recoverer::m_partialReadRecoveryOps [protected] |
Thread* Onikiri::Recoverer::m_thread [protected] |
Recoverer.h の 144 行で定義されています。
参照元 RecoverBPredMiss()・RecoverByRefetch()・RecoverException()・RescheduleConsumers().
s64 Onikiri::Recoverer::m_valuePredRecoveryCount [protected] |
s64 Onikiri::Recoverer::m_valuePredRecoveryOps [protected] |