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

Simplify end_card calculation in G1BlockOffsetTablePart::verify

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • 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`.

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

              Created:
              Updated:
              Resolved: