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

G1: Merge multiple calls of block_size in HeapRegion::block_start

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • gc
    • b11

      ```
      inline HeapWord* HeapRegion::block_start(const void* addr, HeapWord* const pb) const {
        HeapWord* q = _bot_part.block_start_reaching_into_card(addr);
        // The returned address is the block that reaches into the card of addr. Walk
        // the heap to get to the block reaching into addr.
        HeapWord* n = q + block_size(q, pb);
        return forward_to_block_containing_addr(q, n, addr, pb); // <--- also calls block_size
      }
      ```

      Both this method and `block_size` are annotated with `inline`. Merge these two call sites into one to reduce #instruction in the assembly.

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

              Created:
              Updated:
              Resolved: