RFR: 8166188: G1 Needs pre barrier on dereference of weak JNI handles (original) (raw)

Kim Barrett kim.barrett at oracle.com
Wed Feb 8 03:02:31 UTC 2017


On Feb 7, 2017, at 6:56 PM, dean.long at oracle.com wrote:

Hi Kim. I took a look at the sharedRuntime and templateInterpreterGenerator for arm, sparc, and x86. In sharedRuntimearm.cpp, I suggest simplifying: 1750 #ifdef AARCH64 1751 _ cbz(R0, done); // Use NULL as-is. 1752 STATICASSERT(JNIHandles::weaktagmask == 1u); 1753 _ tbz(R0, 0, notweak); // Test for jweak tag. 1754 #else // !AARCH64 1755 _ cmp(R0, 0); 1756 _ b(done, eq); // Use NULL as-is. 1757 _ tst(R0, JNIHandles::weaktagmask); // Test for jweak tag. 1758 _ b(notweak, eq); 1759 #endif // !AARCH64 to the equivalent: 1751 _ cbz(R0, done); // Use NULL as-is. 1752 STATICASSERT(JNIHandles::weaktagmask == 1u); 1753 _ tbz(R0, 0, notweak); // Test for jweak tag. as cbz and tbz expand to cmp/b and tst/b on arm32. The others look good.

Nice! That will make it much more readable. Thanks.



More information about the hotspot-dev mailing list