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

Simplify end_card calculation in G1BlockOffsetTablePart::verify

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 18
    • 18
    • hotspot
    • gc
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: