From: jzhou Date: Tue, 19 Apr 2011 00:46:07 +0000 (+0000) Subject: Remove __thread as it does not work on Tilera and use newflag for Task version X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e4a07a5e4936b94a57eae56fda36c1e2f440d0ff;p=IRC.git Remove __thread as it does not work on Tilera and use newflag for Task version --- diff --git a/Robust/src/Benchmarks/Scheduling/GC/Fibheaps/FibHeapsBench.java b/Robust/src/Benchmarks/Scheduling/GC/Fibheaps/FibHeapsBench.java index 46e295f1..e90b503e 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/Fibheaps/FibHeapsBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/Fibheaps/FibHeapsBench.java @@ -9,7 +9,7 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(){run}; + TestRunner tr = newflag TestRunner(){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/GCBench/GCBench.java b/Robust/src/Benchmarks/Scheduling/GC/GCBench/GCBench.java index b78ea7dd..6ffa1401 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/GCBench/GCBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/GCBench/GCBench.java @@ -52,7 +52,7 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; for(int i = 0; i < threadnum; ++i) { - TestRunner gcb = new TestRunner(){run}; + TestRunner gcb = newflag TestRunner(){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/JGFMonteCarlo/JGFMonteCarloBench.java b/Robust/src/Benchmarks/Scheduling/GC/JGFMonteCarlo/JGFMonteCarloBench.java index 7b6cf0ff..24dfcbcb 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/JGFMonteCarlo/JGFMonteCarloBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/JGFMonteCarlo/JGFMonteCarloBench.java @@ -27,15 +27,15 @@ task t1(StartupObject s{initialstate}) { int nruns = 62 * 62; //16 * 16; int group = 62; // 16; - AppDemo ad = new AppDemo(datasize, nruns, group){merge}; + AppDemo ad = newflag AppDemo(datasize, nruns, group){merge}; ad.initSerial(); for(int i = 0; i < group; i++) { - AppDemoRunner adr = new AppDemoRunner(i, - nruns, - group, - ad){run}; + AppDemoRunner adr = newflag AppDemoRunner(i, + nruns, + group, + ad){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/MTree/macrotest_tree.java b/Robust/src/Benchmarks/Scheduling/GC/MTree/macrotest_tree.java index 34f603c1..f242aefe 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/MTree/macrotest_tree.java +++ b/Robust/src/Benchmarks/Scheduling/GC/MTree/macrotest_tree.java @@ -5,7 +5,7 @@ task t1(StartupObject s{initialstate}) { int size = 40000; int nodenum = size*10; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(i, size, nodenum){run}; + TestRunner tr = newflag TestRunner(i, size, nodenum){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/RayTracer/RayTracerBench.java b/Robust/src/Benchmarks/Scheduling/GC/RayTracer/RayTracerBench.java index 5a288fda..1b07263f 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/RayTracer/RayTracerBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/RayTracer/RayTracerBench.java @@ -3,11 +3,11 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; int size = threadnum * 25; - Composer comp = new Composer(threadnum, size){compose}; + Composer comp = newflag Composer(threadnum, size){compose}; RayTracer rt = new RayTracer(); Scene scene = rt.createScene(); for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(i, threadnum, size, scene){run}; + TestRunner tr = newflag TestRunner(i, threadnum, size, scene){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/bh/BHBench.java b/Robust/src/Benchmarks/Scheduling/GC/bh/BHBench.java index 2c7e839d..ae858e4d 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/bh/BHBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/bh/BHBench.java @@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; int nbody = 700; //4096; //30000; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(nbody){run}; + TestRunner tr = newflag TestRunner(nbody){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/lcss/LcssBench.java b/Robust/src/Benchmarks/Scheduling/GC/lcss/LcssBench.java index 1bdeefe4..1e8b02a3 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/lcss/LcssBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/lcss/LcssBench.java @@ -16,7 +16,7 @@ task t1(StartupObject s{initialstate}) { args[4] = 81; //51; // 501; args[5] = 240; //0; // 1500; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(args){run}; + TestRunner tr = newflag TestRunner(args){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/tsp/TSPBench.java b/Robust/src/Benchmarks/Scheduling/GC/tsp/TSPBench.java index f00f6318..1d305a83 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/tsp/TSPBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/tsp/TSPBench.java @@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; int ncities = 4080; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(ncities){run}; + TestRunner tr = newflag TestRunner(ncities){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/Benchmarks/Scheduling/GC/voronoi/VoronoiBench.java b/Robust/src/Benchmarks/Scheduling/GC/voronoi/VoronoiBench.java index f1c44a96..1394fcfa 100644 --- a/Robust/src/Benchmarks/Scheduling/GC/voronoi/VoronoiBench.java +++ b/Robust/src/Benchmarks/Scheduling/GC/voronoi/VoronoiBench.java @@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) { int threadnum = 62; // 56; int npoints = 32000; //30000; for(int i = 0; i < threadnum; ++i) { - TestRunner tr = new TestRunner(npoints){run}; + TestRunner tr = newflag TestRunner(npoints){run}; } taskexit(s{!initialstate}); diff --git a/Robust/src/ClassLibrary/Bristlecone/Object.java b/Robust/src/ClassLibrary/Bristlecone/Object.java index d4ccd8f7..d364ac4c 100644 --- a/Robust/src/ClassLibrary/Bristlecone/Object.java +++ b/Robust/src/ClassLibrary/Bristlecone/Object.java @@ -1,6 +1,5 @@ public class Object { /* DO NOT USE ANY OF THESE - THEY ARE FOR IMPLEMENTING TAGS */ - private int cachedCode; //first field has to be a primitive private Object tags; public native int hashCode(); diff --git a/Robust/src/ClassLibrary/Bristlecone/ServerSocket.java b/Robust/src/ClassLibrary/Bristlecone/ServerSocket.java index 723e886c..e203c8cb 100644 --- a/Robust/src/ClassLibrary/Bristlecone/ServerSocket.java +++ b/Robust/src/ClassLibrary/Bristlecone/ServerSocket.java @@ -18,7 +18,7 @@ public class ServerSocket { } public Socket accept(tag td) { - Socket s=new Socket() { + Socket s=newflag Socket() { } {td}; int newfd=nativeaccept(s); s.setFD(newfd); diff --git a/Robust/src/Runtime/object.c b/Robust/src/Runtime/object.c index d0f59488..aaae9f38 100644 --- a/Robust/src/Runtime/object.c +++ b/Robust/src/Runtime/object.c @@ -14,8 +14,10 @@ #endif #ifndef MAC +#ifdef THREADS __thread struct lockvector lvector; __thread int mythreadid; +#endif #else #endif diff --git a/Robust/src/Runtime/runtime.h b/Robust/src/Runtime/runtime.h index cd7939f3..c09bf434 100644 --- a/Robust/src/Runtime/runtime.h +++ b/Robust/src/Runtime/runtime.h @@ -157,6 +157,7 @@ inline void setupsmemmode(void); #endif #endif +#ifdef THREADS #define MAXLOCKS 256 struct lockpair { @@ -173,6 +174,7 @@ struct lockvector { extern __thread struct lockvector lvector; extern __thread int mythreadid; #endif +#endif #ifdef TASK #ifndef MULTICORE