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

Improve dummy object filling condition in G1CollectedHeap::fill_archive_regions in cds

    XMLWordPrintable

Details

    • gc
    • b07

    Description

      it's a minor fix/enhancement.

      diff as below:

      diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
      index 5e0f4f8ac7d..299990cb052 100644
      --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
      +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
      @@ -705,7 +705,8 @@ void G1CollectedHeap::fill_archive_regions(MemRegion* ranges, size_t count) {
           // Fill the memory below the allocated range with dummy object(s),
           // if the region bottom does not match the range start, or if the previous
           // range ended within the same G1 region, and there is a gap.
      - if (start_address != bottom_address) {
      + assert(start_address >= bottom_address, "bottom address should not be greater than start address");
      + if (start_address > bottom_address) {
             size_t fill_size = pointer_delta(start_address, bottom_address);
             G1CollectedHeap::fill_with_objects(bottom_address, fill_size);
             increase_used(fill_size * HeapWordSize);

      Attachments

        Issue Links

          Activity

            People

              mli Hamlin Li
              mli Hamlin Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: