Objects may move during the garbage collection, and JVM needs to notify ThreadAnalyzer about that. The new function __tsan_java_find eliminates the need to maintain these objects both in ThreadAnalyzer and JVM.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Just small nits and we are ready to land.
lib/tsan/rtl/tsan_interface_java.cc | ||
---|---|---|
157 | Please drop "(jptr)" and { } around body. ... or you can drop this whole check, the condition should be handled fine by the loop (the loop will terminate instantly as "from < to" is false). | |
167 | Wanted to ask if JVM can ever allocate 0-size blocks. But I see that we have the following checks in __tsan_java_alloc: CHECK_NE(size, 0); CHECK_EQ(size % kHeapAlignment, 0); So we should be good. | |
lib/tsan/rtl/tsan_interface_java.h | ||
61 | s/Returns 0 there are no/Returns 0 if there are no/ | |
test/tsan/java_find.cc | ||
22 | s/in \n/in\n/ |
s/Returns 0 there are no/Returns 0 if there are no/