changes
authorPeizhao Ou <peizhaoo@uci.edu>
Tue, 13 Jan 2015 01:52:06 +0000 (17:52 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Tue, 13 Jan 2015 01:52:06 +0000 (17:52 -0800)
benchmark/chase-lev-deque-bugfix/deque.c
benchmark/chase-lev-deque-bugfix/deque.h
src/edu/uci/eecs/specCompiler/codeGenerator/CodeGenerator.java
src/edu/uci/eecs/specCompiler/codeGenerator/CodeVariables.java

index c9fc8a9..4dcb9bb 100644 (file)
@@ -99,20 +99,32 @@ void push(Deque *q, int x) {
                resize(q);
                //Bug in paper...should have next line...
                a = (Array *) atomic_load_explicit(&q->array, memory_order_relaxed);
+               /**
+                       @Begin
+                       @Commit_point_define_check: true
+                       @Label: Push_Read_Array
+                       @End
+               */
        }
        int size = atomic_load_explicit(&a->size, memory_order_relaxed);
+
        atomic_store_explicit(&a->buffer[b % size], x, memory_order_relaxed);
        /**
                @Begin
                @Commit_point_define_check: true
-               @Label: Push_Point
+               @Label: Push_Update_Buffer
                @End
        */
        /**** correctness error ****/
        atomic_thread_fence(memory_order_release);
        
        atomic_store_explicit(&q->bottom, b + 1, memory_order_relaxed);
-       
+       /**
+               @Begin
+               @Commit_point_define_check: true
+               @Label: Push_Update_Bottom
+               @End
+       */
 }
 
 /**
index 8a3e857..da81cfa 100644 (file)
@@ -91,7 +91,7 @@ int take(Deque *q);
 /**
     @Begin
     @Interface: Push 
-    @Commit_point_set: Push_Point
+    @Commit_point_set: Push_Read_Array | Push_Update_Buffer | Push_Update_Bottom
     @ID: get_and_inc(tag);
     @Action:
         tag_elem_t *elem = new_tag_elem(__ID__, x);
index dfa5976..7386052 100644 (file)
@@ -321,11 +321,11 @@ public class CodeGenerator {
                File[] srcMPMCQueue = {
                                new File(homeDir + "/benchmark/mpmc-queue/mpmc-queue.h"),
                                new File(homeDir + "/benchmark/mpmc-queue/mpmc-queue.cc") };
+//
+//             File[][] sources = { srcLinuxRWLocks,  srcMSQueue, srcRCU,
+//                             srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
 
-               File[][] sources = { srcLinuxRWLocks,  srcMSQueue, srcRCU,
-                               srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
-
-//              File[][] sources = { srcHashtable, srcMPMCQueue };
+                File[][] sources = {srcMSQueue };
                // Compile all the benchmarks
                for (int i = 0; i < sources.length; i++) {
                        CodeGenerator gen = new CodeGenerator(sources[i]);
index 12d0383..43e4e76 100644 (file)
@@ -854,11 +854,11 @@ public class CodeVariables {
                String structName = "cp_clear", anno = "annotation_cp_clear";
                newCode.add("\t\t"
                                + STRUCT_NEW_DECLARE_DEFINE(ANNO_CP_CLEAR, structName));
-               String labelNum = Integer.toString(semantics.commitPointLabel2Num
-                               .get(construct.label));
-               String interfaceNum = getCPInterfaceNum(semantics, construct.label);
-               newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num", labelNum));
-               newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "interface_num", interfaceNum));
+//             String labelNum = Integer.toString(semantics.commitPointLabel2Num
+//                             .get(construct.label));
+//             String interfaceNum = getCPInterfaceNum(semantics, construct.label);
+//             newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "label_num", labelNum));
+//             newCode.add("\t\t" + ASSIGN_TO_PTR(structName, "interface_num", interfaceNum));
                newCode.add("\t\t" + STRUCT_NEW_DECLARE_DEFINE(SPEC_ANNOTATION, anno));
                newCode.add("\t\t"
                                + ASSIGN_TO_PTR(anno, "type", SPEC_ANNO_TYPE_CP_CLEAR));