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

Simplify end_card calculation in G1BlockOffsetTablePart::verify

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b12

      Description

      In `G1BlockOffsetTablePart::verify()`, we verify cards up to `end_card`:

      ```
      size_t next_offset_index = _bot->index_for_raw(_next_offset_threshold);
      size_t end_card = MIN2(_bot->index_for(_hr->top() - 1), next_offset_index - 1);
      ```

      For regions with valid BOT, `_top <= _next_offset_threshold` holds, meaning each object has its corresponding block.

      Therefore, we can use `_top` alone to determine `end_card`.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: