summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-04-27 12:30:48 +0000
committerDmitry Vyukov <dvyukov@google.com>2016-04-27 12:30:48 +0000
commit3efe395788e17f9be556b2570fb0cd9a1ae93796 (patch)
treee1e706b5b00c4b4018cd55b67b41a8739f702db8 /compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
parent15cec298e64872b693430214980a822ee2044a5d (diff)
downloadbcm5719-llvm-3efe395788e17f9be556b2570fb0cd9a1ae93796.tar.gz
bcm5719-llvm-3efe395788e17f9be556b2570fb0cd9a1ae93796.zip
tsan: change tsan/Go interface for obtaining the current Processor
Current interface assumes that Go calls ProcWire/ProcUnwire to establish the association between thread and proc. With the wisdom of hindsight, this interface does not work very well. I had to sprinkle Go scheduler with wire/unwire calls, and any mistake leads to hard to debug crashes. This is not something one wants to maintian. Fortunately, there is a simpler solution. We can ask Go runtime as to what is the current Processor, and that question is very easy to answer on Go side. Switch to such interface. llvm-svn: 267703
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_interface_java.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_interface_java.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc b/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
index fd771b46a11..95be85994c6 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc
@@ -111,7 +111,7 @@ void __tsan_java_free(jptr ptr, jptr size) {
CHECK_GE(ptr, jctx->heap_begin);
CHECK_LE(ptr + size, jctx->heap_begin + jctx->heap_size);
- ctx->metamap.FreeRange(thr->proc, ptr, size);
+ ctx->metamap.FreeRange(thr->proc(), ptr, size);
}
void __tsan_java_move(jptr src, jptr dst, jptr size) {
OpenPOWER on IntegriCloud