[PATCH] D17802: [TSAN] Fix test java_race_pc for MIPS
Sagar Thakur via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 04:45:33 PST 2016
sagar updated this revision to Diff 49606.
sagar added a comment.
Addressed review comment.
Repository:
rL LLVM
http://reviews.llvm.org/D17802
Files:
test/tsan/java_race_pc.cc
test/tsan/test.h
Index: test/tsan/test.h
===================================================================
--- test/tsan/test.h
+++ test/tsan/test.h
@@ -67,3 +67,9 @@
return (unsigned long long)t.tv_sec * 1000000000ull + t.tv_nsec;
}
#endif
+
+#if defined(__mips__)
+ const int kPCInc = 8;
+#else
+ const int kPCInc = 1;
+#endif
Index: test/tsan/java_race_pc.cc
===================================================================
--- test/tsan/java_race_pc.cc
+++ test/tsan/java_race_pc.cc
@@ -13,7 +13,7 @@
void *Thread(void *p) {
barrier_wait(&barrier);
- __tsan_read1_pc((jptr)p, (jptr)foobar + 1);
+ __tsan_read1_pc((jptr)p, (jptr)foobar + kPCInc);
return 0;
}
@@ -26,7 +26,7 @@
__tsan_java_alloc(jheap, kBlockSize);
pthread_t th;
pthread_create(&th, 0, Thread, (void*)jheap);
- __tsan_write1_pc((jptr)jheap, (jptr)barbaz + 1);
+ __tsan_write1_pc((jptr)jheap, (jptr)barbaz + kPCInc);
barrier_wait(&barrier);
pthread_join(th, 0);
__tsan_java_free(jheap, kBlockSize);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17802.49606.patch
Type: text/x-patch
Size: 1000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160302/35ccd84d/attachment.bin>
More information about the llvm-commits
mailing list