[aarch64-port-dev ] RFR (XS) 8252096: Shenandoah: adjust SerialPageShiftCount for x86_32 and JFR

Aleksey Shipilev shade at redhat.com
Thu Aug 20 13:03:46 UTC 2020


Once I added bootcycle-images to x86_32 test configurations, this failure was discovered:

#  Internal Error (/home/shade/trunks/shenandoah-jdk8/hotspot/src/share/vm/runtime/os.cpp:1280), 
pid=490815, tid=0xf5fefb40
#  assert(SerializePageShiftCount == count) failed: thread size changed, fix SerializePageShiftCount 

It happens when all three things hold true:
   - JFR is enabled at build time
   - Shenandoah is enabled at build time (i.e. the build config is not "minimal1")
   - 32-bit VM is being built

Therefore, it only affects aarch64-port/jdk8u-shenandoah, and here is the minimal fix that adjusts 
the constant when all three things are in effect at the same time:

diff -r ed70d5208f5f src/share/vm/utilities/globalDefinitions.hpp
--- a/src/share/vm/utilities/globalDefinitions.hpp      Mon Jun 22 20:26:02 2020 +0800
+++ b/src/share/vm/utilities/globalDefinitions.hpp      Thu Aug 20 13:03:44 2020 +0200
@@ -143,12 +143,18 @@
  // log2_intptr(sizeof(class JavaThread)) - log2_intptr(64);
  // see os::set_memory_serialize_page()
  #ifdef _LP64
  const int SerializePageShiftCount = 4;
+// JavaThread already has quite a few Shenandoah fields. Adding many JFR fields
+// trips sizeof(JavaThread) > 1024. Need to adjust it here.
+const int SerializePageShiftCount = 4;
  const int SerializePageShiftCount = 3;

  // An opaque struct of heap-word width, so that HeapWord* can be a generic
  // pointer into the heap.  We require that object sizes be measured in
  // units of heap words, so that that
  //   HeapWord* hw;

Testing: Linux {x86_64, x86_32} x {zero, minimal1, server} x {default, jfr} bootcycle-images build


More information about the aarch64-port-dev mailing list