Simplify end_card calculation in G1BlockOffsetTablePart::verify

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • gc
    • b12

      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`.

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

              Created:
              Updated:
              Resolved: