Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294057

Parallel: Tighten ParallelCompactData::initialize_region_data

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • gc
    • b18

    Description

      In `ParallelCompactData::initialize_region_data`:

      ```
      const size_t count = (region_size + RegionSizeOffsetMask) >> Log2RegionSize;
      ```

      The `+ RegionSizeOffsetMask` part is to account for `region_size` being unaligned. However, in the sole caller of this method, the alignment is already asserted.

      ```
        assert((region_size & RegionSizeOffsetMask) == 0,
               "region size not a multiple of RegionSize");
      ```

      Drop the unnecessary adjustment and move the assertion inside the method as a precondition.

      Attachments

        Issue Links

          Activity

            People

              ayang Albert Yang
              ayang Albert Yang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: