[lilliput-jdk17u:lilliput] RFR: 8299552: [Lilliput/JDK17] Fix 32bit builds
Aleksey Shipilev
shade at openjdk.org
Fri Jan 13 08:03:45 UTC 2023
On Tue, 3 Jan 2023 18:27:22 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> 32bit builds in Lilliput/JDK17 are broken:
>
> * For target hotspot_variant-server_libjvm_objs_space.o:
There must be a bug in fast-locking somewhere, because x86_32 `make bootcycle-images` asserts hard in `SharedRuntime::monitor_enter_helper`. I suggest we fix those separately. These are the additions I had to make x86_32 builds pass:
diff --git a/src/hotspot/share/gc/g1/heapRegion.inline.hpp b/src/hotspot/share/gc/g1/heapRegion.inline.hpp
index a4b38432ebb..8c40e0337db 100644
--- a/src/hotspot/share/gc/g1/heapRegion.inline.hpp
+++ b/src/hotspot/share/gc/g1/heapRegion.inline.hpp
@@ -184,9 +184,11 @@ inline size_t HeapRegion::block_size(const HeapWord *addr) const {
if (block_is_obj(addr)) {
oop obj = cast_to_oop(addr);
+#ifdef _LP64
if (obj->is_forwarded() && CompressedKlassPointers::is_null(obj->mark().narrow_klass())) {
obj = obj->forwardee();
}
+#endif
return obj->size();
}
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
index af4d02b3825..4e249e65ae9 100644
--- a/src/hotspot/share/runtime/arguments.cpp
+++ b/src/hotspot/share/runtime/arguments.cpp
@@ -3154,7 +3154,10 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
// Lilliput requires fast-locking.
+ // FIXME: x86_32 has problems with fast locking, disable it temporarily.
+#ifdef _LP64
FLAG_SET_DEFAULT(UseFastLocking, true);
+#endif
FLAG_SET_DEFAULT(UseBiasedLocking, false);
#ifdef _LP64
FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
-------------
PR: https://git.openjdk.org/lilliput-jdk17u/pull/2
More information about the lilliput-dev
mailing list