RFR (XS) 8223589: Build failures after JDK-8223534 (add back fixed test_markOop.cpp)

Aleksey Shipilev shade at redhat.com
Wed May 8 21:44:06 UTC 2019


Bug:
  https://bugs.openjdk.java.net/browse/JDK-8223589

The only use of assert_not_test_pattern is protected by _LP64, so default x86_32 build config fails
with "unused function". We could ifdef the definition too, but better yet, let's just use it on
!_LP64 path. Since this is a negative assert, it would not fail if we get the expected string wrong.
I had to look into markOopDesc::print_on and guess what the mark word printout on 32-bit would look
like. I mean not look like. Err...

Fix:

diff -r 62b6e7587b1f test/hotspot/gtest/oops/test_markOop.cpp
--- a/test/hotspot/gtest/oops/test_markOop.cpp  Tue Apr 16 13:06:23 2019 -0700
+++ b/test/hotspot/gtest/oops/test_markOop.cpp  Wed May 08 23:37:51 2019 +0200
@@ -102,7 +102,9 @@
   obj->set_mark(mark);
   ObjectSynchronizer::fast_enter(h_obj, lock.lock(), true, THREAD);
+  // Look for the biased_locker in markOop, not prototype_header.
 #ifdef _LP64
-  // Look for the biased_locker in markOop, not prototype_header.
   assert_not_test_pattern(h_obj, "mark(is_biased biased_locker=0x0000000000000000");
+#else
+  assert_not_test_pattern(h_obj, "mark(is_biased biased_locker=0x00000000");
 #endif


Testing: Linux (x86_64, x86_32) build, gtest:markOopDesc

-- 
Thanks,
-Aleksey




More information about the hotspot-runtime-dev mailing list