Removing useless code and adding a hack for migration.
authorEsteban Meneses <emenese2@illinois.edu>
Sat, 22 Sep 2012 22:48:55 +0000 (17:48 -0500)
committerEsteban Meneses <emenese2@illinois.edu>
Sat, 22 Sep 2012 22:48:55 +0000 (17:48 -0500)
src/ck-core/ckmessagelogging.C
src/ck-core/ckmessagelogging.h

index 05d5e580567387c97a2b6392afe4723f4d6fdb61..8bc09c3919c44f227446238d843f9b14525788a4 100644 (file)
@@ -1175,13 +1175,6 @@ void _verifyAckHandler(VerifyAckMsg *verifyReply){
        }
 }
 
-/**
- * Resets sequences numbers.
- */
-void resetRSSN(void *data, ChareMlogData *mlogData){
-       mlogData->resetRSSN();
-}
-
 /**
  * Sends the checkpoint to its buddy. 
  */
@@ -1930,9 +1923,6 @@ void _checkpointBarrierAckHandler(CheckpointBarrierMsg *msg){
        DEBUG(CmiPrintf("[%d] _checkpointBarrierAckHandler \n",CmiMyPe()));
        DEBUGLB(CkPrintf("[%d] Reaching this point\n",CkMyPe()));
 
-       // resetting sequences
-       forAllCharesDo(resetRSSN,NULL);
-
        // resuming LB function pointer
        (*resumeLbFnPtr)(centralLb);
 
@@ -2182,18 +2172,6 @@ int ChareMlogData::checkAndStoreSsn(const CkObjID &sender, MCount ssn){
        return rssn->checkAndStore(ssn);
 }
 
-/**
- * Resets all sequences.
- */
-void ChareMlogData::resetRSSN(){
-       CkHashtableIterator *iter = receivedSsnTable.iterator();
-       while(iter->hasNext()){
-               RSSN **row = (RSSN **)iter->next();
-               (*row)->reset();
-       }
-       delete iter;
-}
-
 /**
  * Pup method for the metadata.
  * We are preventing the whole message log to be stored (as proposed by Sayantan for dealing with multiple failures).
index 88a0fa33ccd0c9b93cf5b92a5d7f577dc16ffa3e..043581836273cda84a3c66f6ca5bd0ab6c473a07 100644 (file)
@@ -58,13 +58,6 @@ public:
                bzero(data,sizeof(MCount)*currentSize);
        }
 
-       // Resets the sequences
-       void reset(){
-               start = 0;
-               end = 0;
-               bzero(data,sizeof(MCount)*currentSize);
-       }
-
        // Checks if a particular SSN is already in the data; if not, stores it         
        // return value: 0 (sucess, value stored), 1 (value already there)
        int checkAndStore(MCount ssn){
@@ -79,13 +72,19 @@ public:
 
                // checking if ssn was already received
                if(ssn <= data[start]){
-                       DEBUG_NOW(CkPrintf("[%d] Repeated ssn=%d start=%d\n",CkMyPe(),ssn,data[start]));
+                       DEBUG(CkPrintf("[%d] Repeated ssn=%d start=%d\n",CkMyPe(),ssn,data[start]));
                        return 1;
                }
 
                // checking if data needs to be extended
                if(ssn-data[start] >= currentSize){
-                       CkPrintf("[%d] Extending Data %d %d %d\n",CkMyPe(),ssn,data[start],currentSize);
+                       DEBUG(CkPrintf("[%d] Extending Data %d %d %d\n",CkMyPe(),ssn,data[start],currentSize));
+
+                       // HACK for migration
+                       data[0] = ssn;
+                       start = end = 0;
+                       return 0;               //HACK
+
                        old = data;
                        oldCS = currentSize;
                        currentSize *= 2;
@@ -99,7 +98,7 @@ public:
                        delete[] old;
                }
 
-               DEBUG_NOW(CkPrintf("[%d] Ahead ssn=%d start=%d\n",CkMyPe(),ssn,data[start]));
+               DEBUG(CkPrintf("[%d] Ahead ssn=%d start=%d\n",CkMyPe(),ssn,data[start]));
 
                // adding ssn into data
                num = end - start;
@@ -134,12 +133,6 @@ public:
                for(int i=0;i<currentSize;i++){
                        p | data[i];
                }
-               // HACK for migration
-               if(p.isUnpacking()){
-                       start = 0;
-                       end = 0;
-                       bzero(data,sizeof(MCount)*currentSize);
-               }
        }
 
 };
@@ -194,7 +187,6 @@ public:
        void addLogEntry(MlogEntry *entry);
        virtual void pup(PUP::er &p);
        CkQ<MlogEntry *> *getMlog(){ return &mlog;};
-       void resetRSSN();
 };
 
 /**