[crac] RFR: Merge jdk:jdk-25+19

Dmitry Cherepanov dcherepanov at openjdk.org
Fri Jul 11 17:42:52 UTC 2025


After [JDK-8350441](https://bugs.openjdk.org/browse/JDK-8350441) removed Page Cache, the merge updates the original patch for [JDK-8353241](https://bugs.openjdk.org/browse/JDK-8353241) by moving some parts for uncommitting unused memory to Page Allocator.

Comparing the test results for the original patch from https://github.com/openjdk/crac/pull/219
> the image is 177 MB with G1 while 215 MB with ZGC (fastdebug build, -Xmx1G)

my testing shows 201 MB with G1 and 280 MB with ZGC (fastdebug build, -Xmx1G)

I expect this part to be updated further after future merge with [JDK-8356716](https://bugs.openjdk.org/browse/JDK-8356716)

<details>

<summary>Conflicts</summary>


commit 0b7dcb74717c57308db4f71dfca60dc3496cf566 (HEAD -> merge-jdk, dmitry-crac/merge-jdk)
Merge: 74dabd26c79 a71f621a324
Author: Dmitry Cherepanov <dcherepanov at azul.com>
Date:   Fri Jul 4 18:30:22 2025 +0400

    Merge with jdk-25+19

diff --git a/src/hotspot/share/gc/z/zPageAllocator.cpp b/src/hotspot/share/gc/z/zPageAllocator.cpp
remerge CONFLICT (content): Merge conflict in src/hotspot/share/gc/z/zPageAllocator.cpp
index 813ce39fc74..fa37122cb82 100644
--- a/src/hotspot/share/gc/z/zPageAllocator.cpp
+++ b/src/hotspot/share/gc/z/zPageAllocator.cpp
@@ -740,7 +740,7 @@ bool ZPartition::claim_capacity(ZMemoryAllocation* allocation) {
   return true;
 }
 
-size_t ZPartition::uncommit(uint64_t* timeout) {
+size_t ZPartition::uncommit(uint64_t* timeout, uintx delay) {
   ZArray<ZVirtualMemory> flushed_vmems;
   size_t flushed = 0;
 
@@ -754,9 +754,9 @@ size_t ZPartition::uncommit(uint64_t* timeout) {
     const double time_since_last_commit = std::floor(now - _last_commit);
     const double time_since_last_uncommit = std::floor(now - _last_uncommit);
 
-    if (time_since_last_commit < double(ZUncommitDelay)) {
+    if (time_since_last_commit < double(delay)) {
       // We have committed within the delay, stop uncommitting.
-      *timeout = uint64_t(double(ZUncommitDelay) - time_since_last_commit);
+      *timeout = uint64_t(double(delay) - time_since_last_commit);
       return 0;
     }
 
@@ -769,15 +769,15 @@ size_t ZPartition::uncommit(uint64_t* timeout) {
     if (limit == 0) {
       // This may occur if the current max capacity for this partition is 0
 
-      // Set timeout to ZUncommitDelay
-      *timeout = ZUncommitDelay;
+      // Set timeout to delay
+      *timeout = delay;
       return 0;
     }
 
-    if (time_since_last_uncommit < double(ZUncommitDelay)) {
+    if (time_since_last_uncommit < double(delay)) {
       // We are in the uncommit phase
       const size_t num_uncommits_left = _to_uncommit / limit;
-      const double time_left = double(ZUncommitDelay) - time_since_last_uncommit;
+      const double time_left = double(delay) - time_since_last_uncommit;
       if (time_left < *timeout * num_uncommits_left) {
         // Running out of time, speed up.
         uint64_t new_timeout = uint64_t(std::floor(time_left / double(num_uncommits_left + 1)));
@@ -789,7 +789,7 @@ size_t ZPartition::uncommit(uint64_t* timeout) {
       _last_uncommit = now;
 
       const size_t split = _to_uncommit / limit + 1;
-      uint64_t new_timeout = ZUncommitDelay / split;
+      uint64_t new_timeout = delay / split;
       *timeout = new_timeout;
     }
 
@@ -2251,57 +2251,10 @@ void ZPageAllocator::decrease_used(size_t size) {
   // Update atomically since we have concurrent readers
   const size_t used = Atomic::sub(&_used, size);
 
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
-  // Only decrease the overall used and not the generation used,
-  // since the allocation failed and generation used wasn't bumped.
-  decrease_used(allocation->size());
-
-  size_t freed = 0;
-
-  // Free any allocated/flushed pages
-  ZListRemoveIterator<ZPage> iter(allocation->pages());
-  for (ZPage* page; iter.next(&page);) {
-    freed += page->size();
-    recycle_page(page);
-  }
-
-  // Adjust capacity and used to reflect the failed capacity increase
-  const size_t remaining = allocation->size() - freed;
-  decrease_capacity(remaining, true /* set_max_capacity */);
-
-  // Try satisfy stalled allocations
-  satisfy_stalled();
-}
-
-size_t ZPageAllocator::uncommit(uint64_t* timeout, uintx delay) {
-  // We need to join the suspendible thread set while manipulating capacity and
-  // used, to make sure GC safepoints will have a consistent view.
-  ZList<ZPage> pages;
-  size_t flushed;
-
-  {
-    SuspendibleThreadSetJoiner sts_joiner;
-    ZLocker<ZLock> locker(&_lock);
-
-    // Never uncommit below min capacity. We flush out and uncommit chunks at
-    // a time (~0.8% of the max capacity, but at least one granule and at most
-    // 256M), in case demand for memory increases while we are uncommitting.
-    const size_t retain = MAX2(_used, _min_capacity);
-    const size_t release = _capacity - retain;
-    const size_t limit = MIN2(align_up(_current_max_capacity >> 7, ZGranuleSize), 256 * M);
-    const size_t flush = MIN2(release, limit);
-
-    // Flush pages to uncommit
-    flushed = _cache.flush_for_uncommit(flush, &pages, timeout, delay);
-    if (flushed == 0) {
-      // Nothing flushed
-      return 0;
-=======
   // Update used low
   for (auto& stats : _collection_stats) {
     if (used < stats._used_low) {
       stats._used_low = used;
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
     }
   }
 }
@@ -2518,10 +2471,14 @@ void ZPageAllocator::print_on_inner(outputStream* st) const {
 void ZPageAllocator::uncommit_unused_memory() {
   uint64_t timeout;
   size_t flushed, uncommitted = 0;
-  do {
-    flushed = uncommit(&timeout, 0);
-    uncommitted += flushed;
-  } while (flushed > 0);
+  ZPartitionIterator iter = partition_iterator();
+  for (ZPartition* partition; iter.next(&partition);) {
+    partition->_cache.reset_min();
+    do {
+      flushed = partition->uncommit(&timeout, 0);
+      uncommitted += flushed;
+    } while (flushed > 0);
+  }
   if (uncommitted > 0) {
     EventZUncommit event;
     log_info(gc, heap)("Uncommitted (cleanup): %zuM(%.0f%%)",
diff --git a/src/hotspot/share/gc/z/zPageAllocator.hpp b/src/hotspot/share/gc/z/zPageAllocator.hpp
remerge CONFLICT (content): Merge conflict in src/hotspot/share/gc/z/zPageAllocator.hpp
index d8dcffe011f..4259f60406f 100644
--- a/src/hotspot/share/gc/z/zPageAllocator.hpp
+++ b/src/hotspot/share/gc/z/zPageAllocator.hpp
@@ -283,13 +283,11 @@ class ZPageAllocator {
 
   void threads_do(ThreadClosure* tc) const;
 
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
-  void uncommit_unused_memory();
-=======
   void print_on(outputStream* st) const;
   void print_extended_on_error(outputStream* st) const;
   void print_on_error(outputStream* st) const;
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
+
+  void uncommit_unused_memory();
 };
 
 class ZPageAllocatorStats {
diff --git a/src/hotspot/share/gc/z/zPageCache.cpp b/src/hotspot/share/gc/z/zPageCache.cpp
deleted file mode 100644
remerge CONFLICT (modify/delete): src/hotspot/share/gc/z/zPageCache.cpp deleted in a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration) and modified in 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine).  Version 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine) of src/hotspot/share/gc/z/zPageCache.cpp left in tree.
index 4d35db5197b..00000000000
--- a/src/hotspot/share/gc/z/zPageCache.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "gc/z/zGlobals.hpp"
-#include "gc/z/zList.inline.hpp"
-#include "gc/z/zNUMA.inline.hpp"
-#include "gc/z/zPage.inline.hpp"
-#include "gc/z/zPageCache.hpp"
-#include "gc/z/zStat.hpp"
-#include "gc/z/zValue.inline.hpp"
-#include "memory/allocation.hpp"
-#include "runtime/globals.hpp"
-#include "runtime/os.hpp"
-
-static const ZStatCounter ZCounterPageCacheHitL1("Memory", "Page Cache Hit L1", ZStatUnitOpsPerSecond);
-static const ZStatCounter ZCounterPageCacheHitL2("Memory", "Page Cache Hit L2", ZStatUnitOpsPerSecond);
-static const ZStatCounter ZCounterPageCacheHitL3("Memory", "Page Cache Hit L3", ZStatUnitOpsPerSecond);
-static const ZStatCounter ZCounterPageCacheMiss("Memory", "Page Cache Miss", ZStatUnitOpsPerSecond);
-
-class ZPageCacheFlushClosure : public StackObj {
-  friend class ZPageCache;
-
-protected:
-  const size_t _requested;
-  size_t       _flushed;
-
-public:
-  ZPageCacheFlushClosure(size_t requested);
-  virtual bool do_page(const ZPage* page) = 0;
-};
-
-ZPageCacheFlushClosure::ZPageCacheFlushClosure(size_t requested)
-  : _requested(requested),
-    _flushed(0) {}
-
-ZPageCache::ZPageCache()
-  : _small(),
-    _medium(),
-    _large(),
-    _last_commit(0) {}
-
-ZPage* ZPageCache::alloc_small_page() {
-  const uint32_t numa_id = ZNUMA::id();
-  const uint32_t numa_count = ZNUMA::count();
-
-  // Try NUMA local page cache
-  ZPage* const l1_page = _small.get(numa_id).remove_first();
-  if (l1_page != nullptr) {
-    ZStatInc(ZCounterPageCacheHitL1);
-    return l1_page;
-  }
-
-  // Try NUMA remote page cache(s)
-  uint32_t remote_numa_id = numa_id + 1;
-  const uint32_t remote_numa_count = numa_count - 1;
-  for (uint32_t i = 0; i < remote_numa_count; i++) {
-    if (remote_numa_id == numa_count) {
-      remote_numa_id = 0;
-    }
-
-    ZPage* const l2_page = _small.get(remote_numa_id).remove_first();
-    if (l2_page != nullptr) {
-      ZStatInc(ZCounterPageCacheHitL2);
-      return l2_page;
-    }
-
-    remote_numa_id++;
-  }
-
-  return nullptr;
-}
-
-ZPage* ZPageCache::alloc_medium_page() {
-  ZPage* const page = _medium.remove_first();
-  if (page != nullptr) {
-    ZStatInc(ZCounterPageCacheHitL1);
-    return page;
-  }
-
-  return nullptr;
-}
-
-ZPage* ZPageCache::alloc_large_page(size_t size) {
-  // Find a page with the right size
-  ZListIterator<ZPage> iter(&_large);
-  for (ZPage* page; iter.next(&page);) {
-    if (size == page->size()) {
-      // Page found
-      _large.remove(page);
-      ZStatInc(ZCounterPageCacheHitL1);
-      return page;
-    }
-  }
-
-  return nullptr;
-}
-
-ZPage* ZPageCache::alloc_oversized_medium_page(size_t size) {
-  if (size <= ZPageSizeMedium) {
-    return _medium.remove_first();
-  }
-
-  return nullptr;
-}
-
-ZPage* ZPageCache::alloc_oversized_large_page(size_t size) {
-  // Find a page that is large enough
-  ZListIterator<ZPage> iter(&_large);
-  for (ZPage* page; iter.next(&page);) {
-    if (size <= page->size()) {
-      // Page found
-      _large.remove(page);
-      return page;
-    }
-  }
-
-  return nullptr;
-}
-
-ZPage* ZPageCache::alloc_oversized_page(size_t size) {
-  ZPage* page = alloc_oversized_large_page(size);
-  if (page == nullptr) {
-    page = alloc_oversized_medium_page(size);
-  }
-
-  if (page != nullptr) {
-    ZStatInc(ZCounterPageCacheHitL3);
-  }
-
-  return page;
-}
-
-ZPage* ZPageCache::alloc_page(ZPageType type, size_t size) {
-  ZPage* page;
-
-  // Try allocate exact page
-  if (type == ZPageType::small) {
-    page = alloc_small_page();
-  } else if (type == ZPageType::medium) {
-    page = alloc_medium_page();
-  } else {
-    page = alloc_large_page(size);
-  }
-
-  if (page == nullptr) {
-    // Try allocate potentially oversized page
-    ZPage* const oversized = alloc_oversized_page(size);
-    if (oversized != nullptr) {
-      if (size < oversized->size()) {
-        // Split oversized page
-        page = oversized->split(type, size);
-
-        // Cache remainder
-        free_page(oversized);
-      } else {
-        // Re-type correctly sized page
-        page = oversized->retype(type);
-      }
-    }
-  }
-
-  if (page == nullptr) {
-    ZStatInc(ZCounterPageCacheMiss);
-  }
-
-  return page;
-}
-
-void ZPageCache::free_page(ZPage* page) {
-  const ZPageType type = page->type();
-  if (type == ZPageType::small) {
-    _small.get(page->numa_id()).insert_first(page);
-  } else if (type == ZPageType::medium) {
-    _medium.insert_first(page);
-  } else {
-    _large.insert_first(page);
-  }
-}
-
-bool ZPageCache::flush_list_inner(ZPageCacheFlushClosure* cl, ZList<ZPage>* from, ZList<ZPage>* to) {
-  ZPage* const page = from->last();
-  if (page == nullptr || !cl->do_page(page)) {
-    // Don't flush page
-    return false;
-  }
-
-  // Flush page
-  from->remove(page);
-  to->insert_last(page);
-  return true;
-}
-
-void ZPageCache::flush_list(ZPageCacheFlushClosure* cl, ZList<ZPage>* from, ZList<ZPage>* to) {
-  while (flush_list_inner(cl, from, to));
-}
-
-void ZPageCache::flush_per_numa_lists(ZPageCacheFlushClosure* cl, ZPerNUMA<ZList<ZPage> >* from, ZList<ZPage>* to) {
-  const uint32_t numa_count = ZNUMA::count();
-  uint32_t numa_done = 0;
-  uint32_t numa_next = 0;
-
-  // Flush lists round-robin
-  while (numa_done < numa_count) {
-    ZList<ZPage>* const numa_list = from->addr(numa_next);
-    if (++numa_next == numa_count) {
-      numa_next = 0;
-    }
-
-    if (flush_list_inner(cl, numa_list, to)) {
-      // Not done
-      numa_done = 0;
-    } else {
-      // Done
-      numa_done++;
-    }
-  }
-}
-
-void ZPageCache::flush(ZPageCacheFlushClosure* cl, ZList<ZPage>* to) {
-  // Prefer flushing large, then medium and last small pages
-  flush_list(cl, &_large, to);
-  flush_list(cl, &_medium, to);
-  flush_per_numa_lists(cl, &_small, to);
-
-  if (cl->_flushed > cl->_requested) {
-    // Overflushed, re-insert part of last page into the cache
-    const size_t overflushed = cl->_flushed - cl->_requested;
-    ZPage* const reinsert = to->last()->split(overflushed);
-    free_page(reinsert);
-    cl->_flushed -= overflushed;
-  }
-}
-
-class ZPageCacheFlushForAllocationClosure : public ZPageCacheFlushClosure {
-public:
-  ZPageCacheFlushForAllocationClosure(size_t requested)
-    : ZPageCacheFlushClosure(requested) {}
-
-  virtual bool do_page(const ZPage* page) {
-    if (_flushed < _requested) {
-      // Flush page
-      _flushed += page->size();
-      return true;
-    }
-
-    // Don't flush page
-    return false;
-  }
-};
-
-void ZPageCache::flush_for_allocation(size_t requested, ZList<ZPage>* to) {
-  ZPageCacheFlushForAllocationClosure cl(requested);
-  flush(&cl, to);
-}
-
-class ZPageCacheFlushForUncommitClosure : public ZPageCacheFlushClosure {
-private:
-  const uint64_t _now;
-  uint64_t*      _timeout;
-  uintx          _delay;
-
-public:
-  ZPageCacheFlushForUncommitClosure(size_t requested, uint64_t now, uint64_t* timeout, uintx delay)
-    : ZPageCacheFlushClosure(requested),
-      _now(now),
-      _timeout(timeout),
-      _delay(delay) {
-    // Set initial timeout
-    *_timeout = delay;
-  }
-
-  virtual bool do_page(const ZPage* page) {
-    const uint64_t expires = page->last_used() + _delay;
-    if (expires > _now) {
-      // Don't flush page, record shortest non-expired timeout
-      *_timeout = MIN2(*_timeout, expires - _now);
-      return false;
-    }
-
-    if (_flushed >= _requested) {
-      // Don't flush page, requested amount flushed
-      return false;
-    }
-
-    // Flush page
-    _flushed += page->size();
-    return true;
-  }
-};
-
-size_t ZPageCache::flush_for_uncommit(size_t requested, ZList<ZPage>* to, uint64_t* timeout, uintx delay) {
-  const uint64_t now = (uint64_t)os::elapsedTime();
-  const uint64_t expires = _last_commit + delay;
-  if (expires > now) {
-    // Delay uncommit, set next timeout
-    *timeout = expires - now;
-    return 0;
-  }
-
-  if (requested == 0) {
-    // Nothing to flush, set next timeout
-    *timeout = delay;
-    return 0;
-  }
-
-  ZPageCacheFlushForUncommitClosure cl(requested, now, timeout, delay);
-  flush(&cl, to);
-
-  return cl._flushed;
-}
-
-void ZPageCache::set_last_commit() {
-  _last_commit = (uint64_t)ceil(os::elapsedTime());
-}
diff --git a/src/hotspot/share/gc/z/zPageCache.hpp b/src/hotspot/share/gc/z/zPageCache.hpp
deleted file mode 100644
remerge CONFLICT (modify/delete): src/hotspot/share/gc/z/zPageCache.hpp deleted in a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration) and modified in 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine).  Version 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine) of src/hotspot/share/gc/z/zPageCache.hpp left in tree.
index e36662e387d..00000000000
--- a/src/hotspot/share/gc/z/zPageCache.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef SHARE_GC_Z_ZPAGECACHE_HPP
-#define SHARE_GC_Z_ZPAGECACHE_HPP
-
-#include "gc/z/zList.hpp"
-#include "gc/z/zPage.hpp"
-#include "gc/z/zPageType.hpp"
-#include "gc/z/zValue.hpp"
-
-class ZPageCacheFlushClosure;
-
-class ZPageCache {
-private:
-  ZPerNUMA<ZList<ZPage> > _small;
-  ZList<ZPage>            _medium;
-  ZList<ZPage>            _large;
-  uint64_t                _last_commit;
-
-  ZPage* alloc_small_page();
-  ZPage* alloc_medium_page();
-  ZPage* alloc_large_page(size_t size);
-
-  ZPage* alloc_oversized_medium_page(size_t size);
-  ZPage* alloc_oversized_large_page(size_t size);
-  ZPage* alloc_oversized_page(size_t size);
-
-  bool flush_list_inner(ZPageCacheFlushClosure* cl, ZList<ZPage>* from, ZList<ZPage>* to);
-  void flush_list(ZPageCacheFlushClosure* cl, ZList<ZPage>* from, ZList<ZPage>* to);
-  void flush_per_numa_lists(ZPageCacheFlushClosure* cl, ZPerNUMA<ZList<ZPage> >* from, ZList<ZPage>* to);
-  void flush(ZPageCacheFlushClosure* cl, ZList<ZPage>* to);
-
-public:
-  ZPageCache();
-
-  ZPage* alloc_page(ZPageType type, size_t size);
-  void free_page(ZPage* page);
-
-  void flush_for_allocation(size_t requested, ZList<ZPage>* to);
-  size_t flush_for_uncommit(size_t requested, ZList<ZPage>* to, uint64_t* timeout, uintx delay);
-
-  void set_last_commit();
-};
-
-#endif // SHARE_GC_Z_ZPAGECACHE_HPP
diff --git a/src/hotspot/share/gc/z/zUncommitter.cpp b/src/hotspot/share/gc/z/zUncommitter.cpp
remerge CONFLICT (content): Merge conflict in src/hotspot/share/gc/z/zUncommitter.cpp
index 4505c95db1c..6ecbc6e6201 100644
--- a/src/hotspot/share/gc/z/zUncommitter.cpp
+++ b/src/hotspot/share/gc/z/zUncommitter.cpp
@@ -68,13 +68,8 @@ void ZUncommitter::run_thread() {
 
     while (should_continue()) {
       // Uncommit chunk
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
-      const size_t flushed = _page_allocator->uncommit(&timeout, ZUncommitDelay);
-      if (flushed == 0) {
-=======
-      const size_t uncommitted = _partition->uncommit(&timeout);
+      const size_t uncommitted = _partition->uncommit(&timeout, ZUncommitDelay);
       if (uncommitted == 0) {
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
         // Done
         break;
       }
diff --git a/src/hotspot/share/logging/logAsyncWriter.cpp b/src/hotspot/share/logging/logAsyncWriter.cpp
remerge CONFLICT (content): Merge conflict in src/hotspot/share/logging/logAsyncWriter.cpp
index ff7c85b5c1d..dd82998a52e 100644
--- a/src/hotspot/share/logging/logAsyncWriter.cpp
+++ b/src/hotspot/share/logging/logAsyncWriter.cpp
@@ -358,7 +358,6 @@ void AsyncLogWriter::flush() {
     _instance->_flush_sem.wait();
   }
 }
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
 
 void AsyncLogWriter::stop() {
   _block_async.lock();
@@ -368,29 +367,3 @@ void AsyncLogWriter::stop() {
 void AsyncLogWriter::resume() {
   _block_async.unlock();
 }
-
-AsyncLogWriter::BufferUpdater::BufferUpdater(size_t newsize) {
-  ConsumerLocker clocker;
-  auto p = AsyncLogWriter::_instance;
-
-  _buf1 = p->_buffer;
-  _buf2 = p->_buffer_staging;
-  p->_buffer = new Buffer(newsize);
-  p->_buffer_staging = new Buffer(newsize);
-}
-
-AsyncLogWriter::BufferUpdater::~BufferUpdater() {
-  AsyncLogWriter::flush();
-  auto p = AsyncLogWriter::_instance;
-
-  {
-    ConsumerLocker clocker;
-
-    delete p->_buffer;
-    delete p->_buffer_staging;
-    p->_buffer = _buf1;
-    p->_buffer_staging = _buf2;
-  }
-}
-=======
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
diff --git a/src/hotspot/share/runtime/threads.cpp b/src/hotspot/share/runtime/threads.cpp
remerge CONFLICT (content): Merge conflict in src/hotspot/share/runtime/threads.cpp
index 38550f61e48..4cfb43f6c01 100644
--- a/src/hotspot/share/runtime/threads.cpp
+++ b/src/hotspot/share/runtime/threads.cpp
@@ -426,7 +426,6 @@ void Threads::initialize_jsr292_core_classes(TRAPS) {
   }
 }
 
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
 static jint check_for_restore(JavaVMInitArgs* args) {
   if (Arguments::is_restore_option_set(args)) {
     if (!Arguments::parse_options_for_restore(args)) {
@@ -435,7 +434,7 @@ static jint check_for_restore(JavaVMInitArgs* args) {
   }
   return JNI_OK;
 }
-=======
+
 // One-shot PeriodicTask subclass for reading the release file
 class ReadReleaseFileTask : public PeriodicTask {
  public:
@@ -448,7 +447,6 @@ class ReadReleaseFileTask : public PeriodicTask {
     delete this;
   }
 };
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
 
 jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
   extern void JDK_Version_init();
@@ -617,7 +615,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
     return status;
   }
 
-<<<<<<< 74dabd26c79 (8361124: [CRaC] Move recursive checkpoint test to simengine)
   // Output stream module should be already initialized for error reporting during restore.
   // JDK version should also be intialized. There is lot of initializations needed to read
   // the current machine's CPUFeatures.
@@ -628,11 +625,10 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
       return JNI_ERR;
     }
   }
-=======
+
   // Have the WatcherThread read the release file in the background.
   ReadReleaseFileTask* read_task = new ReadReleaseFileTask();
   read_task->enroll();
->>>>>>> a71f621a324 (8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration)
 
   // Create WatcherThread as soon as we can since we need it in case
   // of hangs during error reporting.


</details>

-------------

Commit messages:
 - Merge with jdk-25+19
 - 8353694: Resolved Class/Field/Method CP entries missing from AOT Configuration
 - 8329887: RISC-V: C2: Support Zvbb Vector And-Not instruction
 - 8354559: gc/g1/TestAllocationFailure.java doesn't need WB API
 - 8295651: JFR: 'jfr scrub' should summarize what was removed
 - 8354471: Assertion failure with -XX:-EnableX86ECoreOpts
 - 8353589: Open source a few Swing menu-related tests
 - 8352001: AOT cache should not contain classes injected into built-in class loaders
 - 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI
 - 8351603: Change to GCC 14.2.0 for building on Linux at Oracle
 - ... and 108 more: https://git.openjdk.org/crac/compare/74dabd26...0b7dcb74

The webrevs contain the adjustments done while merging with regards to each parent branch:
 - crac: https://webrevs.openjdk.org/?repo=crac&pr=242&range=00.0
 - jdk:jdk-25+19: https://webrevs.openjdk.org/?repo=crac&pr=242&range=00.1

Changes: https://git.openjdk.org/crac/pull/242/files
  Stats: 200018 lines in 645 files changed: 23990 ins; 173323 del; 2705 mod
  Patch: https://git.openjdk.org/crac/pull/242.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/242/head:pull/242

PR: https://git.openjdk.org/crac/pull/242


More information about the crac-dev mailing list