JDK-8277891 : The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms
  • Type: CSR
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P2
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 18
  • Submitted: 2021-11-29
  • Updated: 2021-11-29
  • Resolved: 2021-11-29
Related Reports
CSR :  
Description
Summary
-------

The upper bound for the `GCCardSizeInBytes` option must be 512 bytes for 32 bit platforms.

Problem
-------

In JDK-8275142 the new option `GCCardSizeInBytes` as been introduced with upper bounds of 1024 bytes for all platforms. This value does not work for 32 bit platforms due to implementation limitations. 

Solution
--------

Reduce the upper bound of `GCCardSizeInBytes` to 512 bytes for 32 bit platforms.

Specification
-------------

    diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp
    index b57be5abf62..684357297d8 100644
    --- a/src/hotspot/share/gc/shared/gc_globals.hpp
    +++ b/src/hotspot/share/gc/shared/gc_globals.hpp
    @@ -696,7 +696,7 @@
                                                                                 \
       product(uint, GCCardSizeInBytes, 512,                                     \
               "Card table entry size (in bytes) for card based collectors")     \
    -          range(128, 1024)                                                  \
    +          range(128, NOT_LP64(512) LP64_ONLY(1024))                         \
               constraint(GCCardSizeInBytesConstraintFunc,AtParse)
       // end of GC_FLAGS

Comments
Moving to Approved.
29-11-2021