From: adash Date: Wed, 8 Apr 2009 22:33:15 +0000 (+0000) Subject: bug fix: Was never starting a transaction in the run method but now it does X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e40704f07dc1309461e169f4d60e74eebaf95287;p=IRC.git bug fix: Was never starting a transaction in the run method but now it does --- diff --git a/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeRouter.java b/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeRouter.java index d4a2f44f..e29263d5 100644 --- a/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeRouter.java +++ b/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeRouter.java @@ -116,7 +116,6 @@ public class LeeRouter { if (TEST) GRID_SIZE = 10; else GRID_SIZE = 600; if(DEBUG) System.out.println("Creating grid..."); - //grid = new Grid(GRID_SIZE, GRID_SIZE, 2, rel, DEBUG, OCC, EMPTY, MAX_WEIGHT); //the Lee 3D Grid; grid = new Grid(GRID_SIZE, GRID_SIZE, 2, rel, this); //the Lee 3D Grid; if(DEBUG) System.out.println("Done creating grid"); work = new WorkQueue(); // empty @@ -211,7 +210,6 @@ public class LeeRouter { } - //FIXME public WorkQueue getNextTrack() { //synchronized(queueLock) { if(work.next != null) { @@ -221,7 +219,6 @@ public class LeeRouter { return null; } - //FIXME public boolean layNextTrack(WorkQueue q, int [][][]tempg) { // start transaction boolean done = false; @@ -616,7 +613,6 @@ public class LeeRouter { } System.out.println("DEBUG: found "+found+" missing "+missing); } - } public static void main(String [] args) { diff --git a/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeThread.java b/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeThread.java index 59f488b6..6ae1d0cb 100644 --- a/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeThread.java +++ b/Robust/src/Benchmarks/SingleTM/LeeRouting/LeeThread.java @@ -51,16 +51,6 @@ public class LeeThread extends Thread { boolean done; int[][][] tempg; - public LeeThread() { - stop = false; - finished = false; - sampleNow = false; - doneSample = true; - totalLaidTracks=0; - myLaidTracks=0; - done = true; - } - /* protected static ThreadLocal _threadState = new ThreadLocal() { protected synchronized ThreadState initialValue() { @@ -74,8 +64,15 @@ public class LeeThread extends Thread { }; */ - LeeThread(LeeRouter lt) { + stop = false; + finished = false; + sampleNow = false; + doneSample = true; + totalLaidTracks=0; + myLaidTracks=0; + done = true; + this.lt = lt; tempg = new int[lt.GRID_SIZE][lt.GRID_SIZE][2]; // Lee 2D Grid copy } @@ -87,8 +84,8 @@ public class LeeThread extends Thread { doneSample = true; sampleNow = false; } - atomic { - if(done) { + if(done) { + atomic { t = lt.getNextTrack(); done = false; } diff --git a/Robust/src/Benchmarks/SingleTM/LeeRouting/WorkQueue.java b/Robust/src/Benchmarks/SingleTM/LeeRouting/WorkQueue.java index 616a3360..516d39ee 100644 --- a/Robust/src/Benchmarks/SingleTM/LeeRouting/WorkQueue.java +++ b/Robust/src/Benchmarks/SingleTM/LeeRouting/WorkQueue.java @@ -83,7 +83,7 @@ public class WorkQueue { ent = a; a = b; b = b.next; - // System.out.print("#"); + // System.out.print("#"); } return done; } diff --git a/Robust/src/Benchmarks/SingleTM/LeeRouting/makefile b/Robust/src/Benchmarks/SingleTM/LeeRouting/makefile index e4f0912f..84b07394 100644 --- a/Robust/src/Benchmarks/SingleTM/LeeRouting/makefile +++ b/Robust/src/Benchmarks/SingleTM/LeeRouting/makefile @@ -5,7 +5,7 @@ SRC=${MAINCLASS}.java \ GridCell.java \ LeeThread.java \ WorkQueue.java -FLAGS=-singleTM -optimize -profile -mainclass ${MAINCLASS} -joptimize -debug -garbagestats -transstats +FLAGS=-singleTM -nooptimize -profile -mainclass ${MAINCLASS} -joptimize -debug -garbagestats -transstats default: ../../../buildscript ${FLAGS} -o ${MAINCLASS} ${SRC}