fix low hanging fruit when profiling...
authorBrian Demsky <bdemsky@uci.edu>
Thu, 4 Oct 2012 00:26:43 +0000 (17:26 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Thu, 4 Oct 2012 00:26:43 +0000 (17:26 -0700)
dump typo was turning off optimized version of checkpointing...option 2 is by far fastest
was spending most of the time freeing an oversized hashtable

cyclegraph.cc
snapshot.cc

index aa3d24548a554ab039074282f5bab3246e3d3ccd..f4d3b93314b4ad22dba40d4d56043fd5643c01d1 100644 (file)
@@ -174,7 +174,7 @@ bool CycleGraph::checkReachable(const ModelAction *from, const ModelAction *to)
  */
 bool CycleGraph::checkReachable(CycleNode *from, CycleNode *to) {
        std::vector<CycleNode *, ModelAlloc<CycleNode *> > queue;
-       HashTable<CycleNode *, CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> discovered;
+       HashTable<CycleNode *, CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> discovered(64);
 
        queue.push_back(from);
        discovered.put(from, from);
index b889791d7965305c9a50ff8bdbf6e7d680b3c156..f129f4cc31da565aeed8bfd0b2a5d1f4b063e8a5 100644 (file)
@@ -283,7 +283,7 @@ snapshot_id takeSnapshot( ){
  *  @param theID is the snapshot identifier to rollback to.
  */
 void rollBack( snapshot_id theID ){
-#if USE_MPOTECT_SNAPSHOT==2
+#if USE_MPROTECT_SNAPSHOT==2
        if (snapshotrecord->lastSnapShot==(theID+1)) {
                for(unsigned int page=snapshotrecord->snapShots[theID].firstBackingPage; page<snapshotrecord->lastBackingPage; page++) {
                        memcpy(snapshotrecord->backingRecords[page].basePtrOfPage, &snapshotrecord->backingStore[page], sizeof(struct SnapShotPage));