#include <ckcausalmlog.h>
Public Member Functions | |
ChareMlogData () | |
Default constructor. | |
MCount | nextSN (const CkObjID &recver) |
Ticket | next_ticket (CkObjID &sender, MCount SN) |
Generates the next ticket for a request. | |
void | verifyTicket (CkObjID &sender, MCount SN, MCount TN) |
Inserts a ticket in the ticketTable if it is not already there. | |
Ticket | getTicket (CkObjID &sender, MCount SN) |
Get the ticket associated with a combination of sender and SN, if any. | |
void | addLogEntry (MlogEntry *entry) |
Adds an entry into the message log. | |
virtual void | pup (PUP::er &p) |
Pup method for the metadata. | |
CkQ< MlogEntry * > * | getMlog () |
MCount | searchRestoredLocalQ (CkObjID &sender, CkObjID &recver, MCount SN) |
Searches the restoredlocal map to see if the combination of sender and sequence number shows up in the map. | |
ChareMlogData () | |
Default constructor. | |
MCount | nextSN (const CkObjID &recver) |
int | checkAndStoreSsn (const CkObjID &sender, MCount ssn) |
Checks whether a ssn has been already received. | |
void | addLogEntry (MlogEntry *entry) |
virtual void | pup (PUP::er &p) |
CkQ< MlogEntry * > * | getMlog () |
Data Fields | |
CkObjID | objID |
MCount | tCount |
MCount | tProcessed |
std::vector< MCount > * | receivedTNs |
MCount * | ticketHoles |
int | numberHoles |
int | currentHoles |
int | resendReplyRecvd |
bool | restartFlag |
bool | teamRecoveryFlag |
CkHashtableT < CkHashtableAdaptorT< CkObjID > , SNToTicket * > | teamTable |
bool | toResumeOrNot |
int | resumeCount |
bool | immigrantRecFlag |
int | immigrantSourcePE |
Private Member Functions | |
MCount | newTN () |
Gets a new ticket for a particular object. | |
Private Attributes | |
CkHashtableT < CkHashtableAdaptorT< CkObjID > , MCount > | snTable |
CkHashtableT < CkHashtableAdaptorT< CkObjID > , SNToTicket * > | ticketTable |
CkQ< MlogEntry * > | mlog |
CkHashtableT < CkHashtableAdaptorT< CkObjID > , MCount > | ssnTable |
CkHashtableT < CkHashtableAdaptorT< CkObjID > , RSSN * > | receivedSsnTable |
CkQ< MlogEntry * > | mlog |
This class stores all the message logging related data for a chare.
Definition at line 180 of file ckcausalmlog.h.
ChareMlogData::ChareMlogData | ( | ) | [inline] |
Default constructor.
Definition at line 224 of file ckcausalmlog.h.
References currentHoles, immigrantRecFlag, numberHoles, receivedTNs, resendReplyRecvd, restartFlag, resumeCount, tCount, teamRecoveryFlag, ticketHoles, toResumeOrNot, and tProcessed.
ChareMlogData::ChareMlogData | ( | ) | [inline] |
Default constructor.
Definition at line 180 of file ckmessagelogging.h.
References immigrantRecFlag, resendReplyRecvd, restartFlag, resumeCount, teamRecoveryFlag, and toResumeOrNot.
MCount ChareMlogData::newTN | ( | ) | [inline, private] |
Gets a new ticket for a particular object.
Definition at line 3798 of file ckcausalmlog.C.
References currentHoles, numberHoles, tCount, and ticketHoles.
Referenced by next_ticket().
MCount ChareMlogData::nextSN | ( | const CkObjID & | recver | ) | [inline] |
Definition at line 3784 of file ckcausalmlog.C.
References CkHashtableT< KEY, OBJ >::getPointer(), CkHashtableTslow< KEY, OBJ >::put(), and snTable.
Referenced by sendCommonMsg().
Generates the next ticket for a request.
Definition at line 3851 of file ckcausalmlog.C.
References Converse::CkMyPe(), CmiPrintf(), CmiWallTimer(), SNToTicket::get(), CkHashtableT< KEY, OBJ >::get(), newTN(), objID, CkHashtableTslow< KEY, OBJ >::put(), SNToTicket::put(), restartFlag, Ticket::state, tCount, ticketTable, Ticket::TN, and CkObjID::toString().
Referenced by _getTicket().
void ChareMlogData::verifyTicket | ( | CkObjID & | sender, | |
MCount | SN, | |||
MCount | TN | |||
) | [inline] |
Inserts a ticket in the ticketTable if it is not already there.
Definition at line 3830 of file ckcausalmlog.C.
References SNToTicket::get(), CkHashtableT< KEY, OBJ >::get(), SNToTicket::put(), CkHashtableTslow< KEY, OBJ >::put(), ticketTable, and Ticket::TN.
Referenced by _getTicket(), and processReceivedDet().
Get the ticket associated with a combination of sender and SN, if any.
Definition at line 3817 of file ckcausalmlog.C.
References SNToTicket::get(), CkHashtableT< KEY, OBJ >::get(), and ticketTable.
Referenced by _getTicket().
void ChareMlogData::addLogEntry | ( | MlogEntry * | entry | ) |
Adds an entry into the message log.
Definition at line 3894 of file ckcausalmlog.C.
References Converse::CkMyPe(), CmiMemoryCheck(), CkQ< T >::enq(), MlogEntry::env, mlog, objID, and CkObjID::toString().
Referenced by sendMsg(), and sendRemoteMsg().
void ChareMlogData::pup | ( | PUP::er & | p | ) | [virtual] |
Pup method for the metadata.
We are preventing the whole message log to be stored (as proposed by Sayantan for dealing with multiple failures). Then, we only support one failure at a time. Read Sayantan's thesis, sections 4.2 and 4.3 for more details.
Definition at line 3928 of file ckcausalmlog.C.
References Converse::CkMyPe(), CmiMyPe(), CmiPrintf(), currentHoles, CkHashtableIterator::hasNext(), PUP::er::isSizing(), PUP::er::isUnpacking(), CkHashtable::iterator(), name, CkHashtableIterator::next(), numberHoles, CkHashtable::numObjects(), objID, p, SNToTicket::pup(), CkHashtableT< KEY, OBJ >::pup(), CkHashtableTslow< KEY, OBJ >::put(), receivedTNs, resendReplyRecvd, restartFlag, resumeCount, PUP::sizer::size(), snTable, tCount, teamRecoveryFlag, ticketHoles, ticketTable, toResumeOrNot, CkObjID::toString(), and tProcessed.
Referenced by Chare::pup().
Definition at line 244 of file ckcausalmlog.h.
References mlog.
Referenced by garbageCollectMlogForChare(), removeProcessedLogs(), and resendMessageForChare().
Searches the restoredlocal map to see if the combination of sender and sequence number shows up in the map.
Returns the ticket if found, or 0 otherwise.
Definition at line 3910 of file ckcausalmlog.C.
References CmiMyPe(), CmiPrintf(), and CkObjID::toString().
MCount ChareMlogData::nextSN | ( | const CkObjID & | recver | ) | [inline] |
Checks whether a ssn has been already received.
The collateral effect is the ssn get added to the list.
Definition at line 2105 of file ckmessagelogging.C.
References RSSN::checkAndStore(), CkHashtableT< KEY, OBJ >::get(), CkHashtableTslow< KEY, OBJ >::put(), and receivedSsnTable.
Referenced by preProcessReceivedMessage().
void ChareMlogData::addLogEntry | ( | MlogEntry * | entry | ) |
virtual void ChareMlogData::pup | ( | PUP::er & | p | ) | [virtual] |
Definition at line 183 of file ckcausalmlog.h.
Referenced by _distributedLocationHandler(), _receivedDetDataHandler(), _receivedTNDataHandler(), _sendBackLocationHandler(), ElementDistributor::addLocation(), addLogEntry(), buildProcessedTicketLog(), Chare::Chare(), createObjIDList(), ArrayElement::initBasics(), IrrGroup::IrrGroup(), next_ticket(), NodeGroup::NodeGroup(), processReceivedTN(), pup(), removeProcessedLogs(), resendMessageForChare(), sendBackImmigrantRecObjs(), and updateHomePE().
MCount ChareMlogData::tCount |
Definition at line 185 of file ckcausalmlog.h.
Referenced by ChareMlogData(), newTN(), next_ticket(), processReceivedTN(), and pup().
MCount ChareMlogData::tProcessed |
Definition at line 187 of file ckcausalmlog.h.
Referenced by _getTicket(), buildProcessedTicketLog(), ChareMlogData(), createObjIDList(), postProcessReceivedMessage(), preProcessReceivedMessage(), processReceivedTN(), and pup().
std::vector<MCount>* ChareMlogData::receivedTNs |
Definition at line 190 of file ckcausalmlog.h.
Referenced by ChareMlogData(), initializeRestart(), processReceivedTN(), and pup().
MCount* ChareMlogData::ticketHoles |
Definition at line 191 of file ckcausalmlog.h.
Referenced by ChareMlogData(), newTN(), processReceivedTN(), and pup().
Definition at line 192 of file ckcausalmlog.h.
Referenced by ChareMlogData(), newTN(), processReceivedTN(), and pup().
Definition at line 193 of file ckcausalmlog.h.
Referenced by ChareMlogData(), newTN(), processReceivedTN(), and pup().
Definition at line 195 of file ckcausalmlog.h.
Referenced by ChareMlogData(), initializeRestart(), processReceivedTN(), and pup().
Definition at line 197 of file ckcausalmlog.h.
Referenced by _getTicket(), ChareMlogData(), initializeRestart(), next_ticket(), processReceivedTN(), and pup().
Definition at line 199 of file ckcausalmlog.h.
Referenced by ChareMlogData(), CkPupPerPlaceData(), pup(), Chare::pup(), setTeamRecovery(), and unsetTeamRecovery().
Definition at line 201 of file ckcausalmlog.h.
Referenced by fillTicketForChare(), and sendCommonMsg().
Definition at line 203 of file ckcausalmlog.h.
Referenced by _distributedLocationHandler(), CkMigratable::AtSync(), ChareMlogData(), pup(), and CkMigratable::staticResumeFromSync().
Definition at line 204 of file ckcausalmlog.h.
Referenced by ChareMlogData(), pup(), and CkMigratable::staticResumeFromSync().
Definition at line 205 of file ckcausalmlog.h.
Referenced by ChareMlogData(), and CkReductionMgr::contribute().
Definition at line 206 of file ckcausalmlog.h.
CkHashtableT<CkHashtableAdaptorT<CkObjID>,MCount> ChareMlogData::snTable [private] |
Definition at line 213 of file ckcausalmlog.h.
Referenced by getTicket(), next_ticket(), pup(), and verifyTicket().
CkQ<MlogEntry *> ChareMlogData::mlog [private] |
CkHashtableT<CkHashtableAdaptorT<CkObjID>, MCount> ChareMlogData::ssnTable [private] |
Definition at line 170 of file ckmessagelogging.h.
CkHashtableT<CkHashtableAdaptorT<CkObjID>, RSSN *> ChareMlogData::receivedSsnTable [private] |
CkQ<MlogEntry *> ChareMlogData::mlog [private] |
Definition at line 174 of file ckmessagelogging.h.