From kbarrett at openjdk.org Sun Feb 1 00:26:01 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Sun, 1 Feb 2026 00:26:01 GMT Subject: RFR: 8376115: G1: Convert G1CMRootRegions to use Atomic [v2] In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 09:45:46 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change to convert `G1CMRootRegions` to use `Atomic`. >> >> Testing: gha >> >> Thanks, >> Thomas > > Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: > > * kbarrett review Still good. ------------- Marked as reviewed by kbarrett (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29363#pullrequestreview-3734061605 From lkorinth at openjdk.org Mon Feb 2 08:05:21 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 2 Feb 2026 08:05:21 GMT Subject: RFR: 8367993: G1: Speed up ConcurrentMark initialization [v9] In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 14:47:12 GMT, Leo Korinth wrote: >> This change moves almost all of the ConcurrentMark initialisation from its constructor to the method `G1ConcurrentMark::fully_initialize()`. Thus, creation time of the VM can be slightly improved by postponing creation of ConcurrentMark. Most time is saved postponing creation of statistics buffers and threads. >> >> It is not obvious that this is the best solution. I have earlier experimented with lazily allocating statistics buffers _only_. One could also initialise a little bit more eagerly (for example the concurrent mark thread) and maybe get a slightly cleaner change. However IMO it seems better to not have ConcurrentMark "half initiated" with a created mark thread, but un-initialised worker threads. >> >> This change is depending on the integration of https://bugs.openjdk.org/browse/JDK-8373253. >> >> I will be out for vacation, and will be back after new year (and will not answer questions during that time), but I thought I get the pull request out now so that you can have a look. > > Leo Korinth has updated the pull request incrementally with two additional commits since the last revision: > > - Reapply "remove commented out code" > > This reverts commit d0d1860058f0dae7813c3e5115e2784da8331f3b. > - Reapply "Stefan J 4" > > This reverts commit c5a7e2bb44ce111f8c8d1d7f728f1bf8013475e0. Thanks everyone! ------------- PR Comment: https://git.openjdk.org/jdk/pull/28723#issuecomment-3833554735 From lkorinth at openjdk.org Mon Feb 2 08:05:23 2026 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 2 Feb 2026 08:05:23 GMT Subject: Integrated: 8367993: G1: Speed up ConcurrentMark initialization In-Reply-To: References: Message-ID: On Tue, 9 Dec 2025 14:56:49 GMT, Leo Korinth wrote: > This change moves almost all of the ConcurrentMark initialisation from its constructor to the method `G1ConcurrentMark::fully_initialize()`. Thus, creation time of the VM can be slightly improved by postponing creation of ConcurrentMark. Most time is saved postponing creation of statistics buffers and threads. > > It is not obvious that this is the best solution. I have earlier experimented with lazily allocating statistics buffers _only_. One could also initialise a little bit more eagerly (for example the concurrent mark thread) and maybe get a slightly cleaner change. However IMO it seems better to not have ConcurrentMark "half initiated" with a created mark thread, but un-initialised worker threads. > > This change is depending on the integration of https://bugs.openjdk.org/browse/JDK-8373253. > > I will be out for vacation, and will be back after new year (and will not answer questions during that time), but I thought I get the pull request out now so that you can have a look. This pull request has now been integrated. Changeset: 766e03b1 Author: Leo Korinth URL: https://git.openjdk.org/jdk/commit/766e03b151b2972108ddc207eed10428e9a91c30 Stats: 57 lines in 9 files changed: 30 ins; 6 del; 21 mod 8367993: G1: Speed up ConcurrentMark initialization Reviewed-by: sjohanss, tschatzl ------------- PR: https://git.openjdk.org/jdk/pull/28723 From tschatzl at openjdk.org Mon Feb 2 08:23:03 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 08:23:03 GMT Subject: RFR: 8374782: Parallel: Investigate removal of specialized objArray iteration code In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 12:58:01 GMT, Ivan Walulya wrote: > Hi, > > Please review this change removes specialized local methods used to iterate over array slices in `PSPromotionManager`. Any performance differences between these methods and `objArrayOopDesc::oop_iterate_elements_range` are attributable to differences in inlining behavior. For this reason, `ALWAYSINLINE` is applied. Further investigation is ongoing to improve inlining of calls through `objArrayOopDesc::oop_iterate_elements_range`. > > Testing: Tier 1-3, perf testing with SPECjvm2008-XML.validation. Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29486#pullrequestreview-3737938205 From tschatzl at openjdk.org Mon Feb 2 10:02:47 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 10:02:47 GMT Subject: RFR: 8376115: G1: Convert G1CMRootRegions to use Atomic [v2] In-Reply-To: References: Message-ID: On Sun, 1 Feb 2026 00:23:36 GMT, Kim Barrett wrote: >> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: >> >> * kbarrett review > > Still good. Thanks @kimbarrett @walulyai for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29363#issuecomment-3834103665 From tschatzl at openjdk.org Mon Feb 2 10:02:48 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 10:02:48 GMT Subject: Integrated: 8376115: G1: Convert G1CMRootRegions to use Atomic In-Reply-To: References: Message-ID: On Thu, 22 Jan 2026 15:00:17 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `G1CMRootRegions` to use `Atomic`. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 5e248603 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/5e248603813a46221c97f1c05311b06f21387bd7 Stats: 23 lines in 2 files changed: 2 ins; 0 del; 21 mod 8376115: G1: Convert G1CMRootRegions to use Atomic Reviewed-by: kbarrett, iwalulya ------------- PR: https://git.openjdk.org/jdk/pull/29363 From tschatzl at openjdk.org Mon Feb 2 16:06:12 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 16:06:12 GMT Subject: RFR: 8376666: Convert various BlockOffsetTables to use Atomic In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 09:22:07 GMT, Thomas Schatzl wrote: > Hi all, > > please review this conversion of the various block offset tables to use `Atomic`. Since they are very similar, and mostly changes from `uint8*` to `Atomic*` I merged the conversion together. > > It is not the goal to actually merge them into one class that all three collectors use. I filed https://bugs.openjdk.org/browse/JDK-8376667 though, not finding a pre-existing RFE. > > Testing: tier1-5, gha GHA issue is infra issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29482#issuecomment-3836113200 From tschatzl at openjdk.org Mon Feb 2 16:08:32 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 16:08:32 GMT Subject: RFR: 8376410: G1: Task queue statistics not reset properly on mark abort Message-ID: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> Hi all, please review this change that makes sure that task queue stats are properly reset. Previously, if marking had been aborted (or restarted), there were leftovers in the statistics, which caused the assertion failure. The change not only fixes reset of the task queue stats, but also reset of the partial array splitter which suffers from the same issue. Testing: given test case not failing any more after 30mins (failed within a few iterations typically), GHA, tier1-5 Thanks, Thomas ------------- Commit messages: - 8376410 Changes: https://git.openjdk.org/jdk/pull/29524/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29524&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8376410 Stats: 16 lines in 2 files changed: 9 ins; 5 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29524.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29524/head:pull/29524 PR: https://git.openjdk.org/jdk/pull/29524 From iwalulya at openjdk.org Mon Feb 2 16:51:39 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Mon, 2 Feb 2026 16:51:39 GMT Subject: RFR: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic [v4] In-Reply-To: <0ksKxc3kj_pqlRLKTKLNjqVBu-f9kz7HYwaqa7-wQIs=.4cc463ce-de77-4682-807c-66cf13612748@github.com> References: <0ksKxc3kj_pqlRLKTKLNjqVBu-f9kz7HYwaqa7-wQIs=.4cc463ce-de77-4682-807c-66cf13612748@github.com> Message-ID: On Wed, 28 Jan 2026 12:54:52 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please convert remaining volatile declarations in `G1ConcurrentMark` to use `Atomic`. These volatiles are used to indicate concurrent phased access (like changing the variable in thread A, then reading the variable in thread B while A is dormant, or only ever updating it in one direction) where concurrency safety is provided by barriers between these phases. But there are also other cases) >> >> The exception is `G1ConcurrentMark::_finger` that has apparently been overlooked in an earlier changes. >> >> Testing: gha >> >> Thanks, >> Thomas > > Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: > > * try to fix non-gcc build failures Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29368#pullrequestreview-3740705028 From tschatzl at openjdk.org Mon Feb 2 17:00:13 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 17:00:13 GMT Subject: RFR: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic [v4] In-Reply-To: References: <0ksKxc3kj_pqlRLKTKLNjqVBu-f9kz7HYwaqa7-wQIs=.4cc463ce-de77-4682-807c-66cf13612748@github.com> Message-ID: On Mon, 2 Feb 2026 16:48:19 GMT, Ivan Walulya wrote: >> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: >> >> * try to fix non-gcc build failures > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @stefank @kimbarrett for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29368#issuecomment-3836481160 From tschatzl at openjdk.org Mon Feb 2 17:00:16 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 2 Feb 2026 17:00:16 GMT Subject: Integrated: 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic In-Reply-To: References: Message-ID: On Thu, 22 Jan 2026 16:36:08 GMT, Thomas Schatzl wrote: > Hi all, > > please convert remaining volatile declarations in `G1ConcurrentMark` to use `Atomic`. These volatiles are used to indicate concurrent phased access (like changing the variable in thread A, then reading the variable in thread B while A is dormant, or only ever updating it in one direction) where concurrency safety is provided by barriers between these phases. But there are also other cases) > > The exception is `G1ConcurrentMark::_finger` that has apparently been overlooked in an earlier changes. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: b6024988 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/b60249882cc511a7fc9cf9ae11e8beb1602ea10f Stats: 64 lines in 4 files changed: 10 ins; 0 del; 54 mod 8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic Reviewed-by: iwalulya, kbarrett, stefank ------------- PR: https://git.openjdk.org/jdk/pull/29368 From iwalulya at openjdk.org Mon Feb 2 17:18:45 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Mon, 2 Feb 2026 17:18:45 GMT Subject: RFR: 8376199: Convert CodeCacheUnloadingTask to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 13:58:05 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert usages of `AtomicAccess` to `Atomic` in the `CodeCacheUnloadingTask` class. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29418#pullrequestreview-3740848773 From iwalulya at openjdk.org Mon Feb 2 17:25:04 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Mon, 2 Feb 2026 17:25:04 GMT Subject: RFR: 8376328: Convert PLABStats to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 14:42:04 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert the `PLABStats` class to use `Atomic`. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29420#pullrequestreview-3740888152 From wkemper at openjdk.org Mon Feb 2 17:26:14 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 17:26:14 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation In-Reply-To: References: Message-ID: On Sat, 31 Jan 2026 00:52:29 GMT, Kelvin Nilsen wrote: >> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. > > src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 223: > >> 221: } >> 222: >> 223: current_card_index = object_card_index; > > IIUC, I believe current_card_index corresponds to previous_offset and previous_address in the next iteration of this loop. For clarity in naming of variables, would it make sense to call this "previous_card_index"? Yes, will do. > src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 234: > >> 232: >> 233: const oop obj = cast_to_oop(address); >> 234: address += obj->oop_iterate_size(&make_cards_dirty); > > It feels to me like this code will still redundantly mark a card dirty for as many objects as touch this card. Wouldn't it be faster to have a single call outside this loop to mark all cards dirty in the range from address to end? I tested that configuration, but the results may have been distorted by my instrumentation. I will rerun that comparison without so much instrumentation. > src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 238: > >> 236: >> 237: // Register the last object seen in this range. >> 238: set_last_start(current_card_index, previous_offset); > > It seems this statement should only be executed if previous_address != nullptr That is correct, will fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2755450701 PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2755448659 PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2755451417 From wkemper at openjdk.org Mon Feb 2 17:31:38 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 17:31:38 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation In-Reply-To: References: Message-ID: On Sat, 31 Jan 2026 01:22:43 GMT, Kelvin Nilsen wrote: >> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. > > src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 41: > >> 39: ShenandoahScanRemembered* const _scanner; >> 40: >> 41: public: > > I had not initially appreciated that we are investing in more precise dirtying of cards as part of this PR. Please check my analysis of the tradeoffs here: > > Option 1 (as currently implemented): > 1. This will take longer to do entry_update_card_table() because we have to rescan every copied object. This rescanning may also result in increased contention for cache lines and memory bus with mutator threads during this phase. This also results in redundant dirtying of cards for any card that holds more than one "interesting pointer". > 2. The benefit of this option is that our subsequent scan-remembered pass will have less work to do because potentially fewer cards will need to be scanned. > > Option 2(blindly dirty the entire range of copied objects): > 1. This matches current implementation. The existing design is based on the idea that it is "overall" more efficient to scan this data once rather than twice. We'll scan the data once when we next scan remembered set. > 2. The scan-once benefit applies only to cards that are dirty. In option 1, we scan data corresponding to dirty cards twice. In option 2, we scan data corresponding to dirty cards once. Data corresponding to clean cards is scanned only once in either option, though the timing of when we scan that data is different. > > I'm wondering if we've done any experiment to evaluate the tradeoffs of these alternative approaches on various workloads? I ran these tests on an earlier iteration of the changes here. They showed the reduction in remembered set scan times was greater than the increase in the time to update the card table. I will re-run the tests with the current version of the code here. > src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 210: > >> 208: log_debug(gc, remset)("Update remembered set from " PTR_FORMAT ", to " PTR_FORMAT, p2i(start), p2i(end)); >> 209: >> 210: while (address < end) { > > I'm assuming there must be a preparatory pass over all cards to pre-initialize each one, denoting that each card does not hold the start of an object. Then, this loop changes that state only for the cards that do hold the start of an object. > > I haven't worked through the all the details, so my intuition may be wrong here. But it feels to me like we could skip the preparatory pass by making a small change to how this loop is structured. The following is my "first" impulse for how I would write this loop. I'm not sure it's better, but offer it for your consideration. > > next_relevant_object = address > For each card_index in the range: > if the next_relevant_object pertains to this card { > set_first_start(card_index, offset_in_card(next_relevant_object)) > while (next_relevant_object + next_relevant_object->size() < addr_for_card_index(card_index+1)) { > next_relevant_object += next_relevant_object->size(); > } > set_last_start(card_index, offset_in_card(next_relevant_object); > next_relevant_object += next_relevant_object->size(); > } else { > clear_card_status(card_index); // no objects start in this card's range > } Somewhat surprisingly, we clear the card table for old regions when they are initially allocated: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L1558. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2755470989 PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2755462158 From shade at openjdk.org Mon Feb 2 17:37:41 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 2 Feb 2026 17:37:41 GMT Subject: RFR: 8376969: Shenandoah: GC state getters should be inlineable Message-ID: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. This PR does a pretty simple move, so I expect no semantics change. Additional testing: - [x] Eye-balling barrier profiles on targeted microbenchmarks - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` ------------- Commit messages: - Fix Changes: https://git.openjdk.org/jdk/pull/29526/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29526&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8376969 Stats: 25 lines in 3 files changed: 11 ins; 12 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29526.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29526/head:pull/29526 PR: https://git.openjdk.org/jdk/pull/29526 From iwalulya at openjdk.org Mon Feb 2 17:43:31 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Mon, 2 Feb 2026 17:43:31 GMT Subject: RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: On Mon, 26 Jan 2026 16:58:25 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSParallelCompact` to use `Atomic`. > > Testing: tier1-5,gha > > Thanks, > Thomas Note: These files seem to follow a different style guide. Example: `class SplitInfo {` then many of the constructors are `defaulted`, not clear if that is intentional. ------------- Marked as reviewed by iwalulya (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29425#pullrequestreview-3740974678 From shade at openjdk.org Mon Feb 2 17:44:38 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 2 Feb 2026 17:44:38 GMT Subject: RFR: 8376410: G1: Task queue statistics not reset properly on mark abort In-Reply-To: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> References: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> Message-ID: <7DJZXGel3CIdifAgyhpEacA9LQv_G05oWp2CxifQTnI=.9bb4d939-11ab-4413-9357-8df86599fc51@github.com> On Mon, 2 Feb 2026 13:55:21 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change that makes sure that task queue stats are properly reset. Previously, if marking had been aborted (or restarted), there were leftovers in the statistics, which caused the assertion failure. > > The change not only fixes reset of the task queue stats, but also reset of the partial array splitter which suffers from the same issue. > > Testing: given test case not failing any more after 30mins (failed within a few iterations typically), GHA, tier1-5 > > Thanks, > Thomas Looks reasonable ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29524#pullrequestreview-3740979185 From shade at openjdk.org Mon Feb 2 18:14:57 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Mon, 2 Feb 2026 18:14:57 GMT Subject: RFR: 8376970: Shenandoah: Verifier should do basic verification before touching oops Message-ID: Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. We need to tighten this up, so that Verifier does work properly in these conditions. Additional testing: - [x] Ad-hoc crashes now show proper diagnostics - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` ------------- Commit messages: - Also make sure the verificaion runs in release mode - Other paths too - Fix Changes: https://git.openjdk.org/jdk/pull/29527/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29527&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8376970 Stats: 39 lines in 1 file changed: 27 ins; 5 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/29527.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29527/head:pull/29527 PR: https://git.openjdk.org/jdk/pull/29527 From wkemper at openjdk.org Mon Feb 2 18:30:10 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 18:30:10 GMT Subject: RFR: 8376969: Shenandoah: GC state getters should be inlineable In-Reply-To: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> References: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Message-ID: On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. > > This PR does a pretty simple move, so I expect no semantic change. > > Additional testing: > - [x] Eye-balling barrier profiles on targeted microbenchmarks > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Looks good to me. ------------- Marked as reviewed by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29526#pullrequestreview-3741199164 From wkemper at openjdk.org Mon Feb 2 18:36:35 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 18:36:35 GMT Subject: RFR: 8376970: Shenandoah: Verifier should do basic verification before touching oops In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:06:33 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. > > We need to tighten this up, so that Verifier does work properly in these conditions. > > Additional testing: > - [x] Ad-hoc crashes now show proper diagnostics > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Looks good, thank you! ------------- Marked as reviewed by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29527#pullrequestreview-3741227348 From wkemper at openjdk.org Mon Feb 2 19:59:05 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 19:59:05 GMT Subject: RFR: 8314599: [GenShen] Couple adaptive tenuring and generation size budgeting [v14] In-Reply-To: References: Message-ID: <3HLZm6atopwuoyqNfTD3klcS1wgz_gCJ4FuOeyxrD1Q=.13088047-4dce-49c1-9b6a-f7d51491871c@github.com> On Tue, 6 Jan 2026 23:18:02 GMT, William Kemper wrote: >> Notable changes: >> * Improvements to logging >> * More accurate tracking of promotion failures >> * Use shared allocation for promotions only when the size is above the maximum plab size (not the minimum size) >> * Use census information gathered during mark to size promotion reserves and old generation >> >> With these changes, GenShen is expected to have fewer promotion failures and this is indeed the case. As a result of this, we expect less time to be spent in concurrent marking and update refs for young collections. We may also expect shorter concurrent evacuation phases because GenShen will have fewer densely packed regions stuck in the young generation. With more objects being promoted, we also expect to see longer remembered set scan times. This is generally the case across all benchmarks, but we do also see some counter-intuitive results. >> >> Here we are comparing 20 executions (10 on x86, 10 on aarch64) of the changes in the PR (experiment) against 20 executions of the same benchmarks results from tip. This is a summary of statistically significant changes of more than 5% across all benchmarks: >> >> >> Concurrent Evacuation: 7 improvements, 3 regressions >> ? Best improvements: extremem-large-45g (-29.6%), neo4j-analytics (-26.9%) >> ? Worst regression: xalan (+53.7%) >> >> Concurrent Marking: 15 improvements, 1 regression >> ? Best improvements: hyperalloc_a2048_o4096 (-30.1%), crypto.rsa (-27.3%) >> ? Only regression: serial (+8.9%) >> >> Concurrent Scan Remembered Set: 7 improvements, 2 regressions >> ? Best improvements: xalan (-49.4%), pmd (-49.0%), crypto.rsa (-41.8%) >> ? Worst regression: extremem-phased (+52.4%) >> >> Concurrent Update Refs: 5 improvements, 4 regressions >> ? Best improvements: crypto.rsa (-36.4%), mnemonics (-28.4%) >> ? Worst regression: xalan (+89.4%) > > William Kemper has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 81 commits: > > - Merge remote-tracking branch 'jdk/master' into promotion-budget-improvements > - Merge remote-tracking branch 'jdk/master' into promotion-budget-improvements > - Fix comments, add back an assertion > - Merge remote-tracking branch 'jdk/master' into promotion-budget-improvements > - Accommodate behavior of global heuristic > - Restore missing update for inplace promotion padding > - Remove reference to adaptive tuning flag > - Remove commented out assertion > - Merge remote-tracking branch 'jdk/master' into promotion-budget-improvements > - Adaptive tenuring is no longer optional > > We are using age census data to compute promotion reserves. The tenuring threshold may still be fixed by setting the min/max threshold to the same value. > - ... and 71 more: https://git.openjdk.org/jdk/compare/7c979c14...f460f115 This PR will need considerable rework after recent changes in mainline. I'm closing this PR and will follow up with others. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27632#issuecomment-3837259118 From wkemper at openjdk.org Mon Feb 2 19:59:06 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 2 Feb 2026 19:59:06 GMT Subject: Withdrawn: 8314599: [GenShen] Couple adaptive tenuring and generation size budgeting In-Reply-To: References: Message-ID: On Fri, 3 Oct 2025 23:19:58 GMT, William Kemper wrote: > Notable changes: > * Improvements to logging > * More accurate tracking of promotion failures > * Use shared allocation for promotions only when the size is above the maximum plab size (not the minimum size) > * Use census information gathered during mark to size promotion reserves and old generation > > With these changes, GenShen is expected to have fewer promotion failures and this is indeed the case. As a result of this, we expect less time to be spent in concurrent marking and update refs for young collections. We may also expect shorter concurrent evacuation phases because GenShen will have fewer densely packed regions stuck in the young generation. With more objects being promoted, we also expect to see longer remembered set scan times. This is generally the case across all benchmarks, but we do also see some counter-intuitive results. > > Here we are comparing 20 executions (10 on x86, 10 on aarch64) of the changes in the PR (experiment) against 20 executions of the same benchmarks results from tip. This is a summary of statistically significant changes of more than 5% across all benchmarks: > > > Concurrent Evacuation: 7 improvements, 3 regressions > ? Best improvements: extremem-large-45g (-29.6%), neo4j-analytics (-26.9%) > ? Worst regression: xalan (+53.7%) > > Concurrent Marking: 15 improvements, 1 regression > ? Best improvements: hyperalloc_a2048_o4096 (-30.1%), crypto.rsa (-27.3%) > ? Only regression: serial (+8.9%) > > Concurrent Scan Remembered Set: 7 improvements, 2 regressions > ? Best improvements: xalan (-49.4%), pmd (-49.0%), crypto.rsa (-41.8%) > ? Worst regression: extremem-phased (+52.4%) > > Concurrent Update Refs: 5 improvements, 4 regressions > ? Best improvements: crypto.rsa (-36.4%), mnemonics (-28.4%) > ? Worst regression: xalan (+89.4%) This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/27632 From kdnilsen at openjdk.org Mon Feb 2 21:47:23 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 2 Feb 2026 21:47:23 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v21] In-Reply-To: References: Message-ID: <5qi-C9Dr6BXFdxDtwpfEdB8DUfqDQ-p5ORn-NgOuZ1o=.e4c0d575-c4ea-46d6-9e6f-a4e5c7517685@github.com> > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Remove debug instrumentation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/26296f5d..edcde867 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=20 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=19-20 Stats: 197 lines in 1 file changed: 0 ins; 197 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From dholmes at openjdk.org Mon Feb 2 22:18:16 2026 From: dholmes at openjdk.org (David Holmes) Date: Mon, 2 Feb 2026 22:18:16 GMT Subject: RFR: 8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic Message-ID: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> Revert "8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" This reverts commit b60249882cc511a7fc9cf9ae11e8beb1602ea10f. Thanks ------------- Commit messages: - Revert "8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" Changes: https://git.openjdk.org/jdk/pull/29535/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29535&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377000 Stats: 64 lines in 4 files changed: 0 ins; 10 del; 54 mod Patch: https://git.openjdk.org/jdk/pull/29535.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29535/head:pull/29535 PR: https://git.openjdk.org/jdk/pull/29535 From kvn at openjdk.org Mon Feb 2 22:28:42 2026 From: kvn at openjdk.org (Vladimir Kozlov) Date: Mon, 2 Feb 2026 22:28:42 GMT Subject: RFR: 8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic In-Reply-To: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> References: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> Message-ID: <_cUvAKgeKYuEwcQ_vMp17ubqv6n1k8qzBWNnliCFlPg=.439d3e35-f9e6-4584-bab2-61f753689fc6@github.com> On Mon, 2 Feb 2026 22:10:48 GMT, David Holmes wrote: > Revert "8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" > > This reverts commit b60249882cc511a7fc9cf9ae11e8beb1602ea10f. > > Thanks trivial ------------- Marked as reviewed by kvn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29535#pullrequestreview-3741894082 From dholmes at openjdk.org Mon Feb 2 22:32:27 2026 From: dholmes at openjdk.org (David Holmes) Date: Mon, 2 Feb 2026 22:32:27 GMT Subject: RFR: 8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic In-Reply-To: <_cUvAKgeKYuEwcQ_vMp17ubqv6n1k8qzBWNnliCFlPg=.439d3e35-f9e6-4584-bab2-61f753689fc6@github.com> References: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> <_cUvAKgeKYuEwcQ_vMp17ubqv6n1k8qzBWNnliCFlPg=.439d3e35-f9e6-4584-bab2-61f753689fc6@github.com> Message-ID: On Mon, 2 Feb 2026 22:25:52 GMT, Vladimir Kozlov wrote: >> Revert "8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" >> >> This reverts commit b60249882cc511a7fc9cf9ae11e8beb1602ea10f. >> >> Thanks > > trivial Thanks @vnkozlov ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29535#issuecomment-3837634840 From dholmes at openjdk.org Mon Feb 2 22:32:29 2026 From: dholmes at openjdk.org (David Holmes) Date: Mon, 2 Feb 2026 22:32:29 GMT Subject: Integrated: 8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic In-Reply-To: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> References: <5CGGZou08_G7sFJD43JtJWwHCDzgjxcHEQ3l2k7OKuE=.6836d4d4-3578-4ce0-b795-5928c19660c6@github.com> Message-ID: On Mon, 2 Feb 2026 22:10:48 GMT, David Holmes wrote: > Revert "8376126: G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" > > This reverts commit b60249882cc511a7fc9cf9ae11e8beb1602ea10f. > > Thanks This pull request has now been integrated. Changeset: 67079b18 Author: David Holmes URL: https://git.openjdk.org/jdk/commit/67079b18afb4454fc849a35dd208ccf0b702339f Stats: 64 lines in 4 files changed: 0 ins; 10 del; 54 mod 8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic Reviewed-by: kvn ------------- PR: https://git.openjdk.org/jdk/pull/29535 From xpeng at openjdk.org Mon Feb 2 22:56:04 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Mon, 2 Feb 2026 22:56:04 GMT Subject: RFR: 8376969: Shenandoah: GC state getters should be inlineable In-Reply-To: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> References: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Message-ID: <1ijpyw_aBXLeoPnsSir4YwtVrQr3PiYsIDLlN1Mrtg8=.673e187f-9b4d-4345-acf1-4219bc9db962@github.com> On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. > > This PR does a pretty simple move, so I expect no semantic change. > > Additional testing: > - [x] Eye-balling barrier profiles on targeted microbenchmarks > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` It looks good to me. I did test in gitfarm pipeline few months ago for the same change, but left it behind since I didn't see significant difference in the result, but it is still good to inline these two functions. ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29526#pullrequestreview-3741970401 From xpeng at openjdk.org Mon Feb 2 22:59:44 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Mon, 2 Feb 2026 22:59:44 GMT Subject: RFR: 8376970: Shenandoah: Verifier should do basic verification before touching oops In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:06:33 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. > > We need to tighten this up, so that Verifier does work properly in these conditions. > > Additional testing: > - [x] Ad-hoc crashes now show proper diagnostics > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` LGTM, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29527#pullrequestreview-3741982329 From kdnilsen at openjdk.org Tue Feb 3 00:29:52 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 3 Feb 2026 00:29:52 GMT Subject: RFR: 8376969: Shenandoah: GC state getters should be inlineable In-Reply-To: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> References: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Message-ID: On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. > > This PR does a pretty simple move, so I expect no semantic change. > > Additional testing: > - [x] Eye-balling barrier profiles on targeted microbenchmarks > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Thanks. ------------- Marked as reviewed by kdnilsen (Committer). PR Review: https://git.openjdk.org/jdk/pull/29526#pullrequestreview-3742208069 From kdnilsen at openjdk.org Tue Feb 3 00:35:24 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 3 Feb 2026 00:35:24 GMT Subject: RFR: 8376970: Shenandoah: Verifier should do basic verification before touching oops In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:06:33 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. > > We need to tighten this up, so that Verifier does work properly in these conditions. > > Additional testing: > - [x] Ad-hoc crashes now show proper diagnostics > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Marked as reviewed by kdnilsen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29527#pullrequestreview-3742224088 From xpeng at openjdk.org Tue Feb 3 00:44:06 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 00:44:06 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed Message-ID: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> This fix the problem causing following 3 jtreg tests with tlab disabled to fail: gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. The fix is to call assert_bounds only when boundaries have changed: 1. When retire a region; 2. When a the object is allocated in a new region - one region became non-empty. There is also minor improvement to the if-else code in the PR. Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) ### Tests - [x] hotspot_gc_shenandoah - [ ] GHA ------------- Commit messages: - assert_bounds should be only called when boundaries have changed Changes: https://git.openjdk.org/jdk/pull/29537/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29537&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377011 Stats: 20 lines in 2 files changed: 11 ins; 8 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29537.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29537/head:pull/29537 PR: https://git.openjdk.org/jdk/pull/29537 From iwalulya at openjdk.org Tue Feb 3 04:52:00 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Tue, 3 Feb 2026 04:52:00 GMT Subject: RFR: 8376410: G1: Task queue statistics not reset properly on mark abort In-Reply-To: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> References: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> Message-ID: On Mon, 2 Feb 2026 13:55:21 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change that makes sure that task queue stats are properly reset. Previously, if marking had been aborted (or restarted), there were leftovers in the statistics, which caused the assertion failure. > > The change not only fixes reset of the task queue stats, but also reset of the partial array splitter which suffers from the same issue. > > Testing: given test case not failing any more after 30mins (failed within a few iterations typically), GHA, tier1-5 > > Thanks, > Thomas Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29524#pullrequestreview-3742930005 From aboldtch at openjdk.org Tue Feb 3 06:25:00 2026 From: aboldtch at openjdk.org (Axel Boldt-Christmas) Date: Tue, 3 Feb 2026 06:25:00 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 07:21:24 GMT, Guanqiang Han wrote: > Please review this change. Thanks! > > **Description:** > > This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. > ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 > > For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 > > The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. > > **Fix:** > > The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. > > **Test:** > > GHA Looks good. Exiting without a core file when we fail to allocated these data structures seems resonable. Not sure how valuable the regression test is. Maybe someone else has an opinion. test/hotspot/jtreg/gc/z/TestZValueStorageAlloc.java line 46: > 44: output.shouldNotContain("# A fatal error has been detected by the Java Runtime Environment"); > 45: } > 46: } Suggestion: } ------------- PR Review: https://git.openjdk.org/jdk/pull/29460#pullrequestreview-3743220397 PR Review Comment: https://git.openjdk.org/jdk/pull/29460#discussion_r2757404086 From stefank at openjdk.org Tue Feb 3 08:07:03 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Tue, 3 Feb 2026 08:07:03 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 06:22:51 GMT, Axel Boldt-Christmas wrote: >> Please review this change. Thanks! >> >> **Description:** >> >> This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. >> ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 >> >> For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 >> >> The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. >> >> **Fix:** >> >> The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. >> >> **Test:** >> >> GHA > > test/hotspot/jtreg/gc/z/TestZValueStorageAlloc.java line 46: > >> 44: output.shouldNotContain("# A fatal error has been detected by the Java Runtime Environment"); >> 45: } >> 46: } > > Suggestion: > > } That test took a very long time to run on my machines. If we want to integrate it we need to figure out a way so that it is not run in tier1. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29460#discussion_r2757752389 From shade at openjdk.org Tue Feb 3 08:43:52 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 3 Feb 2026 08:43:52 GMT Subject: RFR: 8376969: Shenandoah: GC state getters should be inlineable In-Reply-To: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> References: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Message-ID: On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. > > This PR does a pretty simple move, so I expect no semantic change. > > Additional testing: > - [x] Eye-balling barrier profiles on targeted microbenchmarks > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Thanks for reviews! I think all interested parties have replied, so I am integrating before 24 hours expire. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29526#issuecomment-3839906686 From shade at openjdk.org Tue Feb 3 08:45:10 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 3 Feb 2026 08:45:10 GMT Subject: RFR: 8376970: Shenandoah: Verifier should do basic verification before touching oops In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:06:33 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. > > We need to tighten this up, so that Verifier does work properly in these conditions. > > Additional testing: > - [x] Ad-hoc crashes now show proper diagnostics > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` Thanks for reviews! I think all interested parties have replied, so I am integrating before 24 hours expire. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29527#issuecomment-3839905109 From shade at openjdk.org Tue Feb 3 08:45:12 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 3 Feb 2026 08:45:12 GMT Subject: Integrated: 8376970: Shenandoah: Verifier should do basic verification before touching oops In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:06:33 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). When Verifier is about to fail on broken oop, it would decode the broken compressed pointer before doing any verification on it. So the end result is that we _at best_ catch the non-verbose assert in shared code in debug builds, or we crash the VM with opaque error in release builds, instead of rich Shenandoah verification failure. > > We need to tighten this up, so that Verifier does work properly in these conditions. > > Additional testing: > - [x] Ad-hoc crashes now show proper diagnostics > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` This pull request has now been integrated. Changeset: 8e2bd92b Author: Aleksey Shipilev URL: https://git.openjdk.org/jdk/commit/8e2bd92bacd6503346a48df236959c8a959c9c77 Stats: 39 lines in 1 file changed: 27 ins; 5 del; 7 mod 8376970: Shenandoah: Verifier should do basic verification before touching oops Reviewed-by: wkemper, xpeng, kdnilsen ------------- PR: https://git.openjdk.org/jdk/pull/29527 From shade at openjdk.org Tue Feb 3 08:47:12 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 3 Feb 2026 08:47:12 GMT Subject: Integrated: 8376969: Shenandoah: GC state getters should be inlineable In-Reply-To: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> References: <2aByvBR2EIBUPX9TMNhIeYWYEeANzDmRKuWdQx8WDic=.5524d6d2-77de-4ad7-95d3-f9753bc2e0ac@github.com> Message-ID: On Mon, 2 Feb 2026 17:29:49 GMT, Aleksey Shipilev wrote: > Noticed this when working on [JDK-8376749](https://bugs.openjdk.org/browse/JDK-8376749). Looks like some GC state checks we are using from the native barriers are not inlined into the fast-paths. This is very visible with smaller clones, for example. We should move GC state checks to appropriate .inline.hpp-s. Actually, I think these were inlineable before [JDK-8344055](https://bugs.openjdk.org/browse/JDK-8344055), so it is a minor regression in JDK 25. > > This PR does a pretty simple move, so I expect no semantic change. > > Additional testing: > - [x] Eye-balling barrier profiles on targeted microbenchmarks > - [x] Linux x86_64 server fastdebug, `hotspot_gc_shenandoah` This pull request has now been integrated. Changeset: 692444f0 Author: Aleksey Shipilev URL: https://git.openjdk.org/jdk/commit/692444f071cab930d1b92bbfac79f87d0d801aab Stats: 25 lines in 3 files changed: 11 ins; 12 del; 2 mod 8376969: Shenandoah: GC state getters should be inlineable Reviewed-by: wkemper, xpeng, kdnilsen ------------- PR: https://git.openjdk.org/jdk/pull/29526 From stefank at openjdk.org Tue Feb 3 08:58:05 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Tue, 3 Feb 2026 08:58:05 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Could you explain why this is needed? It looks like the old code already initialized _card_table_base in the else-branch: if (bs->is_a(BarrierSet::CardTableBarrierSet)) { CardTableBarrierSet* ctbs = CardTableBarrierSet::barrier_set(); _card_table_base = (address)ctbs->card_table_base_const(); } else { _card_table_base = nullptr; } Does G1 and Shenandoah answer `true` to the `bs->is_a(BarrierSet::CardTableBarrierSet)` check? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3839974235 From shade at openjdk.org Tue Feb 3 09:07:18 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Tue, 3 Feb 2026 09:07:18 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 08:55:49 GMT, Stefan Karlsson wrote: > Does G1 and Shenandoah answer `true` to the `bs->is_a(BarrierSet::CardTableBarrierSet)` check? Yes, because they are having card tables. But in both G1 and Shenandoah the card table base is not constant, so stashing it somewhere is a programming error. You can ask for a card table base as long as you are sure it would not change, e.g. in error handler. Otherwise you are risking recording bad (stale) card table. That is why we did original: https://github.com/openjdk/jdk/commit/88c8a55a4337a857ac17ffff068f730f67cf5763 -- to capture the accesses where we assume the card table base is constant (notice `*_const` in getter name), while it is actually isn't. Exactly like this one. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3840011675 From ghan at openjdk.org Tue Feb 3 11:52:27 2026 From: ghan at openjdk.org (Guanqiang Han) Date: Tue, 3 Feb 2026 11:52:27 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 06:22:51 GMT, Axel Boldt-Christmas wrote: >> Please review this change. Thanks! >> >> **Description:** >> >> This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. >> ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 >> >> For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 >> >> The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. >> >> **Fix:** >> >> The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. >> >> **Test:** >> >> GHA > > test/hotspot/jtreg/gc/z/TestZValueStorageAlloc.java line 46: > >> 44: output.shouldNotContain("# A fatal error has been detected by the Java Runtime Environment"); >> 45: } >> 46: } > > Suggestion: > > } Hi @xmas92 @stefank , thanks for the feedback. On my side the regression test doesn?t seem particularly slow, and it also runs reasonably fast in the current GitHub Actions jobs. That said, I understand it can be much slower on some machines/environments. If you feel it doesn?t add much value, I?m happy to drop the regression test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29460#discussion_r2758689485 From stefank at openjdk.org Tue Feb 3 12:05:39 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Tue, 3 Feb 2026 12:05:39 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Marked as reviewed by stefank (Reviewer). OK. Looks good then. ------------- PR Review: https://git.openjdk.org/jdk/pull/29528#pullrequestreview-3744875414 PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3840905462 From tschatzl at openjdk.org Tue Feb 3 12:39:51 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 3 Feb 2026 12:39:51 GMT Subject: RFR: 8376410: G1: Task queue statistics not reset properly on mark abort In-Reply-To: References: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> Message-ID: <4_TWqmPLv76BKzhq3Z__cl6qsC8xB_XJuRJyknjguCg=.ac27e819-6813-40b7-9d75-35a3cd019aa0@github.com> On Tue, 3 Feb 2026 04:49:15 GMT, Ivan Walulya wrote: >> Hi all, >> >> please review this change that makes sure that task queue stats are properly reset. Previously, if marking had been aborted (or restarted), there were leftovers in the statistics, which caused the assertion failure. >> >> The change not only fixes reset of the task queue stats, but also reset of the partial array splitter which suffers from the same issue. >> >> Testing: given test case not failing any more after 30mins (failed within a few iterations typically), GHA, tier1-5 >> >> Thanks, >> Thomas > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @shipilev for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29524#issuecomment-3841065114 From tschatzl at openjdk.org Tue Feb 3 12:39:52 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 3 Feb 2026 12:39:52 GMT Subject: Integrated: 8376410: G1: Task queue statistics not reset properly on mark abort In-Reply-To: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> References: <-UYpFztsGGQm6jVAXDuAcHO36Wrzjlyk7Hjq0Ns1laY=.eab92324-7cc0-4c7d-bed1-6642fa534232@github.com> Message-ID: On Mon, 2 Feb 2026 13:55:21 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change that makes sure that task queue stats are properly reset. Previously, if marking had been aborted (or restarted), there were leftovers in the statistics, which caused the assertion failure. > > The change not only fixes reset of the task queue stats, but also reset of the partial array splitter which suffers from the same issue. > > Testing: given test case not failing any more after 30mins (failed within a few iterations typically), GHA, tier1-5 > > Thanks, > Thomas This pull request has now been integrated. Changeset: 69c3e278 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/69c3e2780c44c6ad2ef0f296e8cfba7796f2213e Stats: 16 lines in 2 files changed: 9 ins; 5 del; 2 mod 8376410: G1: Task queue statistics not reset properly on mark abort Reviewed-by: shade, iwalulya ------------- PR: https://git.openjdk.org/jdk/pull/29524 From eastigeevich at openjdk.org Tue Feb 3 15:00:31 2026 From: eastigeevich at openjdk.org (Evgeny Astigeevich) Date: Tue, 3 Feb 2026 15:00:31 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v13] In-Reply-To: References: Message-ID: On Wed, 3 Dec 2025 16:11:14 GMT, Aleksey Shipilev wrote: >> Evgeny Astigeevich has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits: >> >> - Fix linux-cross-compile build aarch64 >> - Merge branch 'master' into JDK-8370947 >> - Remove trailing whitespaces >> - Add support of deferred icache invalidation to other GCs and JIT >> - Add UseDeferredICacheInvalidation to defer invalidation on CPU with hardware cache coherence >> - Add jtreg test >> - Fix linux-cross-compile aarch64 build >> - Fix regressions for Java methods without field accesses >> - Fix code style >> - Correct ifdef; Add dsb after ic >> - ... and 9 more: https://git.openjdk.org/jdk/compare/3d54a802...4b04496f > > Interesting work! I was able to look through it very briefly: @shipilev @theRealAph @fisk Ping ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3841835786 From xpeng at openjdk.org Tue Feb 3 16:59:49 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 16:59:49 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments Message-ID: While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel ### Test - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah - [x] GHA ------------- Commit messages: - Merge branch 'openjdk:master' into shenandoah-heap-lock-asserts - Def type ShenandoahRebuildLock as ShenandoahReentrantLock - Revert name change of ShenandoahRebuildLock for the PR(it will be in next pr after this) - Rename ShenandoahRebuildLock to ShenandoahHeapUsageAccountingLock - Use ShenandoahReentrantLock as ShenandoahRebuildLock to simplify code - ShenandoahHeapLocker should assert if current thread is holding free-set rebuild lock - Use template to impl ShenandoahReentrantLock and ShenandoahLocker Changes: https://git.openjdk.org/jdk/pull/29543/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377048 Stats: 136 lines in 15 files changed: 38 ins; 34 del; 64 mod Patch: https://git.openjdk.org/jdk/pull/29543.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29543/head:pull/29543 PR: https://git.openjdk.org/jdk/pull/29543 From xpeng at openjdk.org Tue Feb 3 17:07:34 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 17:07:34 GMT Subject: RFR: 8373468: Shenandoah: Mutator may block at _gc_waiters_lock after allocation failure even block parameter is false [v5] In-Reply-To: References: <62mzeOhRYpxYa0sNRcH2vs58S-jcGhv8gAqIx2R4L5M=.9914f2b4-4632-4f3c-ac05-0132b0d1370d@github.com> Message-ID: On Thu, 11 Dec 2025 18:56:15 GMT, Xiaolong Peng wrote: >> There is behavior discrepancy between Shenandoah generational mode and non-generational when it handles mutator allocation failure, as stated in the description of [JDK-8373468](https://bugs.openjdk.org/browse/JDK-8373468), in non-generational, the `block` parameter may not always work. >> >> Further looking into ShenandoahGenerationalControlThread and ShenandoahControlThread, they handle the _requested_gc_cause and ShenandoahHeap::cancelled_cause differently in other places as well, the change in this PR will minimize the gap to unify the behavior, and also fix potentially missed allocation failure notifications in some rare cases for both control threads. >> >> ### Test >> - [x] hotspot_gc_shenandoah >> - [x] GHA (includes tier1 but no unit unit with gtest) >> - [x] gtest > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > format issue Closing this PR as we may not want to change the behavior of classic Shenandoah as long as it is not broken. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28758#issuecomment-3842535770 From xpeng at openjdk.org Tue Feb 3 17:07:35 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 17:07:35 GMT Subject: Withdrawn: 8373468: Shenandoah: Mutator may block at _gc_waiters_lock after allocation failure even block parameter is false In-Reply-To: <62mzeOhRYpxYa0sNRcH2vs58S-jcGhv8gAqIx2R4L5M=.9914f2b4-4632-4f3c-ac05-0132b0d1370d@github.com> References: <62mzeOhRYpxYa0sNRcH2vs58S-jcGhv8gAqIx2R4L5M=.9914f2b4-4632-4f3c-ac05-0132b0d1370d@github.com> Message-ID: On Thu, 11 Dec 2025 00:28:50 GMT, Xiaolong Peng wrote: > There is behavior discrepancy between Shenandoah generational mode and non-generational when it handles mutator allocation failure, as stated in the description of [JDK-8373468](https://bugs.openjdk.org/browse/JDK-8373468), in non-generational, the `block` parameter may not always work. > > Further looking into ShenandoahGenerationalControlThread and ShenandoahControlThread, they handle the _requested_gc_cause and ShenandoahHeap::cancelled_cause differently in other places as well, the change in this PR will minimize the gap to unify the behavior, and also fix potentially missed allocation failure notifications in some rare cases for both control threads. > > ### Test > - [x] hotspot_gc_shenandoah > - [x] GHA (includes tier1 but no unit unit with gtest) > - [x] gtest This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/28758 From kdnilsen at openjdk.org Tue Feb 3 17:56:33 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 3 Feb 2026 17:56:33 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 09:54:44 GMT, Xiaolong Peng wrote: > While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. > > Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. > > Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel > > ### Test > - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah > - [x] GHA Thanks for submitting this PR. Please help motivate the changes in the intro to this PR. src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 912: > 910: void ShenandoahRegionPartitions::assert_bounds() { > 911: shenandoah_assert_heaplocked(); > 912: ShenandoahRebuildLocker locker(_free_set->rebuild_lock()); assert_bounds() often happens when we are not rebuilding the free set. Not clear why you need to add this lock here. src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 647: > 645: ShenandoahFreeSet(ShenandoahHeap* heap, size_t max_regions); > 646: > 647: ShenandoahRebuildLock* rebuild_lock() { unintentional spaces? src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 790: > 788: // inconsistent data: available may not equal capacity - used because the intermediate states of any "atomic" > 789: // locked action can be seen by these unlocked functions. > 790: inline size_t capacity_holding_lock() const { It looks like you're adding overhead to these calls here. Previously, we were able to ask for capacity() and used() and available() without needing to pay the cost of acquiring a lock. Now, we always have to acquire the lock(). Have you measured impact? src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2846: > 2844: } > 2845: > 2846: ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) { Can we have a comment to explain when lock will equal nullptr? src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2848: > 2846: ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) { > 2847: ShenandoahFreeSet* free_set = ShenandoahHeap::heap()->free_set(); > 2848: assert(free_set == nullptr || !free_set->rebuild_lock()->owned_by_self(), "Dead lock, can't acquire heap lock while holding free-set rebuild lock"); Can we add a comment to explain when free_set will equal nullptr? Does this correspond to "pre-initialized state" or something else? Would probably be more clear that we don't need to consult free_set unless asserts are enabled, so enclose this code in #ifdef ASSERT src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 121: > 119: > 120: typedef ShenandoahLock ShenandoahHeapLock; > 121: // ShenandoahHeapLocker checks potential deadlock and asserts Years from now, the reader of this comment will not "appreciate" the context in which it was written. The comment only makes sense in the context of this "diff". Would be better to say: ShenandoahHeapLocker implements a lock to assure mutually exclusive access to the global heap data structures. Asserts in the implementation detect potential deadlock usage with regards the rebuild lock that is present in ShenandoahFreeSet. Whenever both locks are acquired, this lock should be acquired before the ShenandoahFreeSet rebuild lock. ------------- Changes requested by kdnilsen (Committer). PR Review: https://git.openjdk.org/jdk/pull/29543#pullrequestreview-3746585690 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760187909 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760194774 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760206836 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760231347 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760229796 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760247618 From kdnilsen at openjdk.org Tue Feb 3 18:08:16 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 3 Feb 2026 18:08:16 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 17:26:10 GMT, William Kemper wrote: >> src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 210: >> >>> 208: log_debug(gc, remset)("Update remembered set from " PTR_FORMAT ", to " PTR_FORMAT, p2i(start), p2i(end)); >>> 209: >>> 210: while (address < end) { >> >> I'm assuming there must be a preparatory pass over all cards to pre-initialize each one, denoting that each card does not hold the start of an object. Then, this loop changes that state only for the cards that do hold the start of an object. >> >> I haven't worked through the all the details, so my intuition may be wrong here. But it feels to me like we could skip the preparatory pass by making a small change to how this loop is structured. The following is my "first" impulse for how I would write this loop. I'm not sure it's better, but offer it for your consideration. >> >> next_relevant_object = address >> For each card_index in the range: >> if the next_relevant_object pertains to this card { >> set_first_start(card_index, offset_in_card(next_relevant_object)) >> while (next_relevant_object + next_relevant_object->size() < addr_for_card_index(card_index+1)) { >> next_relevant_object += next_relevant_object->size(); >> } >> set_last_start(card_index, offset_in_card(next_relevant_object); >> next_relevant_object += next_relevant_object->size(); >> } else { >> clear_card_status(card_index); // no objects start in this card's range >> } > > Somewhat surprisingly, we clear the card table for old regions when they are initially allocated: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L1558. So that happens when region r is first put into action (having been initially empty). When we promote regions in place, it looks to me like we (currently) dirty up to top_before_promote, but we don't clean from top to end. Is this a bug? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2760330782 From kdnilsen at openjdk.org Tue Feb 3 18:08:17 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 3 Feb 2026 18:08:17 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 18:04:32 GMT, Kelvin Nilsen wrote: >> Somewhat surprisingly, we clear the card table for old regions when they are initially allocated: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp#L1558. > > So that happens when region r is first put into action (having been initially empty). When we promote regions in place, it looks to me like we (currently) dirty up to top_before_promote, but we don't clean from top to end. Is this a bug? (I guess the bug would be "harmless", in that it might result in some rescan of data that is not really dirty.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2760333702 From xpeng at openjdk.org Tue Feb 3 18:41:15 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 18:41:15 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 17:28:14 GMT, Kelvin Nilsen wrote: >> While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. >> >> Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. >> >> Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel >> >> ### Test >> - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah >> - [x] GHA > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 912: > >> 910: void ShenandoahRegionPartitions::assert_bounds() { >> 911: shenandoah_assert_heaplocked(); >> 912: ShenandoahRebuildLocker locker(_free_set->rebuild_lock()); > > assert_bounds() often happens when we are not rebuilding the free set. Not clear why you need to add this lock here. For this change, it is not needed, I peel the PR from the change to defer heap usage accounting re-computation in which the same lock is used for when update&read heap usage accounting data, this one is untented, I'll remove it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760474019 From xpeng at openjdk.org Tue Feb 3 18:51:04 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 18:51:04 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 17:39:52 GMT, Kelvin Nilsen wrote: >> While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. >> >> Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. >> >> Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel >> >> ### Test >> - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah >> - [x] GHA > > src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2846: > >> 2844: } >> 2845: >> 2846: ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) { > > Can we have a comment to explain when lock will equal nullptr? Good catch. I think it is impossible to be nullprt. I copied the Locker impl from shenandoahLock.hpp which implies the lock could be nullptr, but I think we should assert non-null for all the Locker impls. > src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2848: > >> 2846: ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) { >> 2847: ShenandoahFreeSet* free_set = ShenandoahHeap::heap()->free_set(); >> 2848: assert(free_set == nullptr || !free_set->rebuild_lock()->owned_by_self(), "Dead lock, can't acquire heap lock while holding free-set rebuild lock"); > > Can we add a comment to explain when free_set will equal nullptr? Does this correspond to "pre-initialized state" or something else? > > Would probably be more clear that we don't need to consult free_set unless asserts are enabled, so enclose this code in #ifdef ASSERT Yes, it is related to initialization, and only happens in the "pre-initialized state", I'll add some comments for this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760511873 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760517897 From wkemper at openjdk.org Tue Feb 3 18:52:12 2026 From: wkemper at openjdk.org (William Kemper) Date: Tue, 3 Feb 2026 18:52:12 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 18:05:20 GMT, Kelvin Nilsen wrote: >> So that happens when region r is first put into action (having been initially empty). When we promote regions in place, it looks to me like we (currently) dirty up to top_before_promote, but we don't clean from top to end. Is this a bug? > > (I guess the bug would be "harmless", in that it might result in some rescan of data that is not really dirty.) > When we promote regions in place, it looks to me like we (currently) dirty up to top_before_promote, but we don't clean from top to end. It could be? You are worried about invalid/stale object start registrations for the memory between `_top_before_promote` and `_end`? To me, it makes more intuitive sense to clear cards when a region is recycled. This would cover the case when a young region becomes old by way of in-place-promotions. What I think you're describing might not be harmless, it could cause invalid object registrations if the in-place-promoted region is used for subsequent evacuations to old. It could be rare because I think, generally, in-place-promoted regions have `_top == _end`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2760519944 From xpeng at openjdk.org Tue Feb 3 18:57:51 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 18:57:51 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 17:43:56 GMT, Kelvin Nilsen wrote: >> While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. >> >> Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. >> >> Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel >> >> ### Test >> - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah >> - [x] GHA > > src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 121: > >> 119: >> 120: typedef ShenandoahLock ShenandoahHeapLock; >> 121: // ShenandoahHeapLocker checks potential deadlock and asserts > > Years from now, the reader of this comment will not "appreciate" the context in which it was written. The comment only makes sense in the context of this "diff". > > Would be better to say: ShenandoahHeapLocker implements a lock to assure mutually exclusive access to the global heap data structures. Asserts in the implementation detect potential deadlock usage with regards the rebuild lock that is present in ShenandoahFreeSet. Whenever both locks are acquired, this lock should be acquired before the ShenandoahFreeSet rebuild lock. Thanks, appreciate it! I'll update the comments here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2760537365 From xpeng at openjdk.org Tue Feb 3 21:26:08 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 21:26:08 GMT Subject: RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v59] In-Reply-To: References: Message-ID: <9Q9sgr4WY1itebA0jJPIMQtDBCgEMxoBwJ-zLpr9RP0=.94de7762-dd7d-4022-b506-dd4f4538c2e1@github.com> > Shenandoah always allocates memory with heap lock, we have observed heavy heap lock contention on memory allocation path in performance analysis of some service in which we tried to adopt Shenandoah. This change is to propose an optimization for the code path of memory allocation to improve heap lock contention, along with the optimization, a better OOD is also done to Shenandoah memory allocation to reuse the majority of the code: > > * ShenandoahAllocator: base class of the allocators, most of the allocation code is in this class. > * ShenandoahMutatorAllocator: allocator for mutator, inherit from ShenandoahAllocator, only override methods `alloc_start_index`, `verify`, `_alloc_region_count` and `_yield_to_safepoint` to customize the allocator for mutator. > * ShenandoahCollectorAllocator: allocator for collector allocation in Collector partition, similar to ShenandoahMutatorAllocator, only few lines of code to customize the allocator for Collector. > * ShenandoahOldCollectorAllocator: allocator for mutator collector allocation in OldCollector partition, it doesn't inherit the logic from ShenandoahAllocator for now, the `allocate` method has been overridden to delegate to `FreeSet::allocate_for_collector` due to the special allocation considerations for `plab` in old gen. We will rewrite this part later and move the code out of `FreeSet::allocate_for_collector` > > I'm not expecting significant performance impact for most of the cases since in most case the contention on heap lock it not high enough to cause performance issue, but in some cases it may improve the latency/performance: > > 1. Dacapo lusearch test on EC2 host with 96 CPU cores, p90 is improved from 500+us to less than 150us, p99 from 1000+us to ~200us. > > java -XX:-TieredCompilation -XX:+AlwaysPreTouch -Xms31G -Xmx31G -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-ShenandoahUncommit -XX:ShenandoahGCMode=generational -XX:+UseTLAB -jar ~/tools/dacapo/dacapo-23.11-MR2-chopin.jar -n 10 lusearch | grep "metered full smoothing" > > > Openjdk TIP: > > ===== DaCapo tail latency, metered full smoothing: 50% 241098 usec, 90% 402356 usec, 99% 411065 usec, 99.9% 411763 usec, 99.99% 415531 usec, max 428584 usec, measured over 524288 events ===== > ===== DaCapo tail latency, metered full smoothing: 50% 902 usec, 90% 3713 usec, 99% 5898 usec, 99.9% 6488 usec, 99.99% 7081 usec, max 8048 usec, measured over 524288 events ===== > ===== DaCapo tail latency, metered full smoothing: 50% 2... Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 328 commits: - Merge branch 'master' into cas-alloc-1 - Add assert to functions new_top & set_new_top; fix typo - Update ProblemList to enable the tests affected by the change for accounting update - Fix crash after merging from tip(due to the new free-set rebuild calls) - Fix build error after merging tip - Merge branch 'master' into cas-alloc-1 - FullGC should not update accounting when release alloc regions - Not update accounting if no region is unretired to partition - Invoke assert_bounds after updating accounting from ShenandoahAllocator - Remove use AtomicAccess for _top if permits - ... and 318 more: https://git.openjdk.org/jdk/compare/efa16e9e...a5e38b0a ------------- Changes: https://git.openjdk.org/jdk/pull/26171/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26171&range=58 Stats: 1844 lines in 30 files changed: 1468 ins; 240 del; 136 mod Patch: https://git.openjdk.org/jdk/pull/26171.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26171/head:pull/26171 PR: https://git.openjdk.org/jdk/pull/26171 From xpeng at openjdk.org Tue Feb 3 23:35:15 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Tue, 3 Feb 2026 23:35:15 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v2] In-Reply-To: References: Message-ID: <9KS1Ric-CGdg0GgEVCFFNQ2B9lXJ8CW5caDnGR8ifxI=.13cff9eb-1024-4664-818d-de31cf4fb721@github.com> > While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. > > Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. > > Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel > > ### Test > - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah > - [x] GHA Xiaolong Peng has updated the pull request incrementally with three additional commits since the last revision: - Address review comments - Remove unintentional spaces - Remove unintended lock in ShenandoahRegionPartitions::assert_bounds ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29543/files - new: https://git.openjdk.org/jdk/pull/29543/files/44bdd69a..14cbd3ed Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=00-01 Stats: 11 lines in 4 files changed: 7 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29543.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29543/head:pull/29543 PR: https://git.openjdk.org/jdk/pull/29543 From xpeng at openjdk.org Wed Feb 4 00:30:18 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 00:30:18 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: > This fix the problem causing following 3 jtreg tests with tlab disabled to fail: > > gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all > gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all > gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all > > > > The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. > > The fix is to call assert_bounds only when boundaries have changed: > 1. When retire a region; > 2. When a the object is allocated in a new region - one region became non-empty. > > There is also minor improvement to the if-else code in the PR. > > Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. > > Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) > > ### Tests > - [x] hotspot_gc_shenandoah > - [x] GHA Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: Add assert_bounds_not_changed as Kelvin suggested ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29537/files - new: https://git.openjdk.org/jdk/pull/29537/files/c487fe96..ea68047f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29537&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29537&range=00-01 Stats: 22 lines in 2 files changed: 18 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/29537.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29537/head:pull/29537 PR: https://git.openjdk.org/jdk/pull/29537 From kdnilsen at openjdk.org Wed Feb 4 00:30:40 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 4 Feb 2026 00:30:40 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v22] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Delay accelerated trigger until some garbage has accumulated ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/edcde867..6d1adcac Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=21 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=20-21 Stats: 28 lines in 1 file changed: 16 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From xpeng at openjdk.org Wed Feb 4 00:31:09 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 00:31:09 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 18:38:31 GMT, Xiaolong Peng wrote: >> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 912: >> >>> 910: void ShenandoahRegionPartitions::assert_bounds() { >>> 911: shenandoah_assert_heaplocked(); >>> 912: ShenandoahRebuildLocker locker(_free_set->rebuild_lock()); >> >> assert_bounds() often happens when we are not rebuilding the free set. Not clear why you need to add this lock here. > > For this change, it is not needed, I peel the PR from the change to defer heap usage accounting re-computation in which the same lock is used when update&read heap usage accounting data, this one is untented, I'll remove it. I have removed it from the PR, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2761624262 From xpeng at openjdk.org Wed Feb 4 00:31:12 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 00:31:12 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v2] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 17:30:13 GMT, Kelvin Nilsen wrote: >> Xiaolong Peng has updated the pull request incrementally with three additional commits since the last revision: >> >> - Address review comments >> - Remove unintentional spaces >> - Remove unintended lock in ShenandoahRegionPartitions::assert_bounds > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 647: > >> 645: ShenandoahFreeSet(ShenandoahHeap* heap, size_t max_regions); >> 646: >> 647: ShenandoahRebuildLock* rebuild_lock() { > > unintentional spaces? Fixed, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2761623404 From xpeng at openjdk.org Wed Feb 4 00:58:58 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 00:58:58 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v3] In-Reply-To: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: > This fix the problem causing following 3 jtreg tests with tlab disabled to fail: > > gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all > gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all > gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all > > > > The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. > > The fix is to call assert_bounds only when boundaries have changed: > 1. When retire a region; > 2. When a the object is allocated in a new region - one region became non-empty. > > There is also minor improvement to the if-else code in the PR. > > Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. > > Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) > > ### Tests > - [x] hotspot_gc_shenandoah > - [x] GHA Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: code format ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29537/files - new: https://git.openjdk.org/jdk/pull/29537/files/ea68047f..4339e8c5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29537&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29537&range=01-02 Stats: 10 lines in 1 file changed: 4 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29537.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29537/head:pull/29537 PR: https://git.openjdk.org/jdk/pull/29537 From wkemper at openjdk.org Wed Feb 4 00:59:55 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 4 Feb 2026 00:59:55 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v2] In-Reply-To: References: Message-ID: > When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. William Kemper has updated the pull request incrementally with six additional commits since the last revision: - Search for interesting pointers in objects that span into the next card - Reset card table for old regions when they are recycled Instead of when they are allocated. This covers the case of in-place-promotions having potentially stale card table entries above top after being promoted. - Do not iterate objects on cards that are already dirty - Record top at evac start when in place promotion completes - Use better names for things - Record top at evac start when preparing for evacuation ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29511/files - new: https://git.openjdk.org/jdk/pull/29511/files/d1456700..08bfab8b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=00-01 Stats: 41 lines in 8 files changed: 29 ins; 2 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/29511.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29511/head:pull/29511 PR: https://git.openjdk.org/jdk/pull/29511 From xpeng at openjdk.org Wed Feb 4 07:15:24 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 07:15:24 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v3] In-Reply-To: References: Message-ID: On Tue, 3 Feb 2026 18:46:37 GMT, Xiaolong Peng wrote: >> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2846: >> >>> 2844: } >>> 2845: >>> 2846: ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) { >> >> Can we have a comment to explain when lock will equal nullptr? > > Good catch. > I think it is impossible to be nullprt. I copied the Locker impl from shenandoahLock.hpp which implies the lock could be nullptr, but I think we should assert non-null for all the Locker impls. I have changed code to assert _lock != nullptr for both ShenandoahHeapLocker and the ShenandoahLocker in shenandoahLock.hpp. >> src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 121: >> >>> 119: >>> 120: typedef ShenandoahLock ShenandoahHeapLock; >>> 121: // ShenandoahHeapLocker checks potential deadlock and asserts >> >> Years from now, the reader of this comment will not "appreciate" the context in which it was written. The comment only makes sense in the context of this "diff". >> >> Would be better to say: ShenandoahHeapLocker implements a lock to assure mutually exclusive access to the global heap data structures. Asserts in the implementation detect potential deadlock usage with regards the rebuild lock that is present in ShenandoahFreeSet. Whenever both locks are acquired, this lock should be acquired before the ShenandoahFreeSet rebuild lock. > > Thanks, appreciate it! I'll update the comments here. Updated the comment as you suggested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2762544296 PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2762539612 From xpeng at openjdk.org Wed Feb 4 07:15:22 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 07:15:22 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v3] In-Reply-To: References: Message-ID: > While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. > > Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. > > Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel > > ### Test > - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah > - [x] GHA Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: Locker class should assume that lock instance is never be nullptr ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29543/files - new: https://git.openjdk.org/jdk/pull/29543/files/14cbd3ed..af4cbe5c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=01-02 Stats: 12 lines in 3 files changed: 0 ins; 7 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/29543.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29543/head:pull/29543 PR: https://git.openjdk.org/jdk/pull/29543 From xpeng at openjdk.org Wed Feb 4 07:45:37 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 07:45:37 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v3] In-Reply-To: References: Message-ID: <9zecTWGyAX-5Cl1JvJBWu5Cl68dN-1oqx2FfDh1YVoA=.c20d02f5-7025-41cc-9d3a-40e94c63226e@github.com> On Tue, 3 Feb 2026 17:32:57 GMT, Kelvin Nilsen wrote: >> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: >> >> Locker class should assume that lock instance is never be nullptr > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 790: > >> 788: // inconsistent data: available may not equal capacity - used because the intermediate states of any "atomic" >> 789: // locked action can be seen by these unlocked functions. >> 790: inline size_t capacity_holding_lock() const { > > It looks like you're adding overhead to these calls here. Previously, we were able to ask for capacity() and used() and available() without needing to pay the cost of acquiring a lock. Now, we always have to acquire the lock(). Have you measured impact? I didn't run test for it yet, but for non-debug build, the capacity/used/available are not frequently read, the overhead should have very minor impact(it may still compete with thread doing rebuild). In debug build, because of the asserts need to read the accountings much more often, it should have a small performance impact. The change is really about correctness, these filed may be be updated with rebuild lock being hold, but can be read w/o acquiring the rebuild lock, so a thread reading them w/o the rebuild lock may see stale value. As a part of the change of JDK-8373371, I am updating how the heap usage accountings are updated: 1. All changes to heap usage accountings must be done with holding heap lock and heap usage accounting lock(rebuild lock will be renamed to usage accounting lock), 2. All reads must be done under heap usage accounting lock, no need to hold heap lock. 3. Computation of total/young/old accountings will be done in the read path under heap usage accounting lock. Here are the examples of young_used(), old_used(), global_used() with deferred re-computation: // Return bytes used by young inline size_t young_used() { ShenandoahHeapUsageAccountingLocker locker(usage_accounting_lock()); return _partitions.used_by(ShenandoahFreeSetPartitionId::Mutator) + _partitions.used_by(ShenandoahFreeSetPartitionId::Collector); } // Return bytes used by old inline size_t old_used() { ShenandoahHeapUsageAccountingLocker locker(usage_accounting_lock()); return _partitions.used_by(ShenandoahFreeSetPartitionId::OldCollector); } // Return bytes used by global inline size_t global_used() { ShenandoahHeapUsageAccountingLocker locker(usage_accounting_lock()); return young_used() + old_used(); } ShenandoahHeapUsageAccountingLock is a reentrant lock, global_used acquires the lock first, so it will have stable snapshot of young_used and old old_used when it calculate the global_used. Reentrance of the ShenandoahHeapUsageAccountingLock is very cheap since the current thread already holds it, it just checks the owner of the lock and increase the counter. I have pushed this change to gitfarm pipeline, I'm not really expecting any performance regression form this, I'll check the result tomorrow. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2762629599 From ayang at openjdk.org Wed Feb 4 07:49:12 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 07:49:12 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 Message-ID: Trivial removing dead code. Test: tier1 ------------- Commit messages: - g1-trivial-remove-local-var Changes: https://git.openjdk.org/jdk/pull/29561/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29561&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377141 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29561.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29561/head:pull/29561 PR: https://git.openjdk.org/jdk/pull/29561 From shade at openjdk.org Wed Feb 4 07:52:47 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 07:52:47 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: <1M_v5TvlO_vCamgM6NOiEEk9Fi6Jjyl7P6ySr9Pt8So=.34b81e9f-82c2-486f-99d3-171e0c0dee25@github.com> On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Thanks Stefan! I need another Review before I can integrate. @tschatzl -- you were interested in this fix, I think :) ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3845875432 From ayang at openjdk.org Wed Feb 4 08:05:37 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 08:05:37 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: <3qMpMczy46cLl0788x9RH6nchRUxKQdo0iSbqH5oAJE=.516d280d-5990-4795-862b-f84a9a0b1f7b@github.com> On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Instead of relying on `bs->is_a`, I wonder whether the intention is more explicit if using `UseXGC`, sth like: // Some comment saying that only Serial/Parallel has constant card-table-base, etc. if (UseSerialGC || UseParallelGC) { _card_table_base = ... } else { _card_table_base = nullptr; } ------------- PR Review: https://git.openjdk.org/jdk/pull/29528#pullrequestreview-3749548941 From shade at openjdk.org Wed Feb 4 08:05:38 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 08:05:38 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: <3qMpMczy46cLl0788x9RH6nchRUxKQdo0iSbqH5oAJE=.516d280d-5990-4795-862b-f84a9a0b1f7b@github.com> References: <3qMpMczy46cLl0788x9RH6nchRUxKQdo0iSbqH5oAJE=.516d280d-5990-4795-862b-f84a9a0b1f7b@github.com> Message-ID: On Wed, 4 Feb 2026 08:02:33 GMT, Albert Mingkun Yang wrote: > Instead of relying on `bs->is_a`, I wonder whether the intention is more explicit if using `UseXGC`, sth like: Maybe, but the current fix follows https://github.com/openjdk/jdk/commit/88c8a55a4337a857ac17ffff068f730f67cf5763 style. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3845921452 From tschatzl at openjdk.org Wed Feb 4 08:11:02 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 08:11:02 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 07:37:21 GMT, Albert Mingkun Yang wrote: > Trivial removing dead code. > > Test: tier1 Trivial, but copyright update is missing. ------------- Marked as reviewed by tschatzl (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29561#pullrequestreview-3749567979 From ayang at openjdk.org Wed Feb 4 08:15:57 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 08:15:57 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 [v2] In-Reply-To: References: Message-ID: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> > Trivial removing dead code. > > Test: tier1 Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision: copyright ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29561/files - new: https://git.openjdk.org/jdk/pull/29561/files/81319b57..0b074d3e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29561&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29561&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29561.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29561/head:pull/29561 PR: https://git.openjdk.org/jdk/pull/29561 From shade at openjdk.org Wed Feb 4 08:32:16 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 08:32:16 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 [v2] In-Reply-To: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> References: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> Message-ID: On Wed, 4 Feb 2026 08:15:57 GMT, Albert Mingkun Yang wrote: >> Trivial removing dead code. >> >> Test: tier1 > > Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision: > > copyright Marked as reviewed by shade (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29561#pullrequestreview-3749658092 From xpeng at openjdk.org Wed Feb 4 08:33:40 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 08:33:40 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v3] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 07:15:22 GMT, Xiaolong Peng wrote: >> While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. >> >> Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. >> >> Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel >> >> ### Test >> - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah >> - [x] GHA > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > Locker class should assume that lock instance is never be nullptr src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp line 69: > 67: idx_t const _max; // The maximum number of heap regions > 68: size_t const _region_size_bytes; > 69: ShenandoahFreeSet* const _free_set; unintended change, will revert these lines. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29543#discussion_r2762799966 From ayang at openjdk.org Wed Feb 4 08:39:47 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 08:39:47 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: <3qMpMczy46cLl0788x9RH6nchRUxKQdo0iSbqH5oAJE=.516d280d-5990-4795-862b-f84a9a0b1f7b@github.com> Message-ID: On Wed, 4 Feb 2026 08:03:33 GMT, Aleksey Shipilev wrote: > Maybe, but the current fix follows https://github.com/openjdk/jdk/commit/88c8a55a4337a857ac17ffff068f730f67cf5763 style. Thanks for the link. I skimmed through it and found the following sites of that style: `disassembler.cpp`: I don't understand why can't all GCs use the same `card_table()->byte_map_base()` path to retrieve `card_table_base`. Is specializing the constant-card-table-base case just for perf purpose? (I tend to think it's written that way because card-table-base was always constant for `CardTableBarrierSet` from the start.) `jvmciCompilerToVMInit.cpp` probably don't need to use `bs->is_a` -- directly checking `UseXGC` is enough, which is more similar to the scenario here. Based on that, I am leaned towards not using `bs->is_a` in all those cases; just my 2c. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3846075650 From stefank at openjdk.org Wed Feb 4 08:39:49 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Wed, 4 Feb 2026 08:39:49 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` > > Instead of relying on `bs->is_a`, I wonder whether the intention is more explicit if using `UseXGC`, sth like: > > Maybe, but the current fix follows [88c8a55](https://github.com/openjdk/jdk/commit/88c8a55a4337a857ac17ffff068f730f67cf5763) style. FWIW, I would have been less confused if the code was using "UseXGC". I didn't know that the FakeRTTI / is_a had support for answering true for multiple tags ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3846081380 From ayang at openjdk.org Wed Feb 4 08:43:16 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 08:43:16 GMT Subject: RFR: 8374782: Parallel: Investigate removal of specialized objArray iteration code In-Reply-To: References: Message-ID: <4Wi37KBHk5HvwoG1TDLvkncuBtBVdawVu0kJ8QCLUMg=.df5f7492-7fd8-482a-b1da-fe29f29facae@github.com> On Thu, 29 Jan 2026 12:58:01 GMT, Ivan Walulya wrote: > Hi, > > Please review this change removes specialized local methods used to iterate over array slices in `PSPromotionManager`. Any performance differences between these methods and `objArrayOopDesc::oop_iterate_elements_range` are attributable to differences in inlining behavior. For this reason, `ALWAYSINLINE` is applied. Further investigation is ongoing to improve inlining of calls through `objArrayOopDesc::oop_iterate_elements_range`. > > Testing: Tier 1-3, perf testing with SPECjvm2008-XML.validation. I suggest renaming the title now that the investigation is complete; maybe just `Parallel: Remove specialized ...`. ------------- Marked as reviewed by ayang (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29486#pullrequestreview-3749698825 From shade at openjdk.org Wed Feb 4 08:54:56 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 08:54:56 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: <7kwRDf7utKePzyfksGZUIkg7ScJCD-IoIkbPcE0bNuM=.d8753d11-6434-41f8-953b-bee552e2edfc@github.com> On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Let's not spend too much time on this. If you want to change the style, then sure, we can do that as the followups. But this one is for unbreaking ARM32, and it stands to reason to follow the style of the original changeset. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3846143038 From xpeng at openjdk.org Wed Feb 4 08:55:45 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 08:55:45 GMT Subject: RFR: 8377048: Shenandoah: shenandoahLock related improvments [v4] In-Reply-To: References: Message-ID: > While I was working on https://bugs.openjdk.org/browse/JDK-8373371, I made these changes to the shenandoahLock, but I feel it make sense peel off these changes into a separate PR as they are not really related to JDK-8373371. > > Major thing in this PR is to use template for ShenandoahReentrantLock and ShenandoahLocker so we could get rid of duplicate code, along with some other changes where the locks are used e.g. use type alias for ShenandoahNMethodLock and ShenandoahNMethodLocker, use ShenandoahReentrantLock for ShenandoahRebuildLock. > > Another improvement is to strengthen assert in SheandnoahHeapLocker to avoid potential dead lock(this was also discussed in previous PR [here](https://github.com/openjdk/jdk/pull/27612#discussion_r2479898169) and our internal channel > > ### Test > - [x] MacOS aach64, server fastdebug: hotspot_gc_shenandoah > - [x] GHA Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: Revert unintended changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29543/files - new: https://git.openjdk.org/jdk/pull/29543/files/af4cbe5c..76a97f46 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29543&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/29543.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29543/head:pull/29543 PR: https://git.openjdk.org/jdk/pull/29543 From ayang at openjdk.org Wed Feb 4 09:08:01 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 09:08:01 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` > Let's not spend too much time on this. If you want to change the style, then sure, we can do that as the followups... Sure. ------------- Marked as reviewed by ayang (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29528#pullrequestreview-3749834351 From tschatzl at openjdk.org Wed Feb 4 09:35:38 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 09:35:38 GMT Subject: RFR: 8376666: Convert G1BlockOffsetTable to use Atomic In-Reply-To: References: Message-ID: <9tBCyz_5ZpK5A_-oGzsfvCp9yUGb9piJMsw1aIMMabg=.8789b6d4-2b39-44e8-bf15-81ec5be3c8cd@github.com> On Thu, 29 Jan 2026 09:22:07 GMT, Thomas Schatzl wrote: > Hi all, > > please review this conversion of the G1 block offset table to use `Atomic`. > > Testing: tier1-5, gha Limited the change to G1. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29482#issuecomment-3846329186 From tschatzl at openjdk.org Wed Feb 4 09:35:37 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 09:35:37 GMT Subject: RFR: 8376666: Convert G1BlockOffsetTable to use Atomic [v2] In-Reply-To: References: Message-ID: > Hi all, > > please review this conversion of the G1 block offset table to use `Atomic`. > > Testing: tier1-5, gha Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - * only change G1 BOT for now - Merge branch 'master' into 8376666-convert-bot - 8376666 Hi all, please review this conversion of the various block offset tables to use `Atomic`. Since they are very similar, and mostly changes from `uint8*` to `Atomic*` I merged the conversion together. It is not the goal to actually merge them into one class that all three collectors use. Testing: tier1-5, gha ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29482/files - new: https://git.openjdk.org/jdk/pull/29482/files/cb652fe6..4d588b78 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29482&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29482&range=00-01 Stats: 45066 lines in 593 files changed: 20652 ins; 15837 del; 8577 mod Patch: https://git.openjdk.org/jdk/pull/29482.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29482/head:pull/29482 PR: https://git.openjdk.org/jdk/pull/29482 From iwalulya at openjdk.org Wed Feb 4 09:51:28 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Wed, 4 Feb 2026 09:51:28 GMT Subject: RFR: 8374782: Parallel: Remove specialized objArray iteration code In-Reply-To: <4Wi37KBHk5HvwoG1TDLvkncuBtBVdawVu0kJ8QCLUMg=.df5f7492-7fd8-482a-b1da-fe29f29facae@github.com> References: <4Wi37KBHk5HvwoG1TDLvkncuBtBVdawVu0kJ8QCLUMg=.df5f7492-7fd8-482a-b1da-fe29f29facae@github.com> Message-ID: <8rRwRZhZndc6FfIu9TYHF_vdmiwzqz0rXHdDn7odjxA=.e5c66773-1e85-46c1-b689-d0e1e219f79f@github.com> On Wed, 4 Feb 2026 08:40:07 GMT, Albert Mingkun Yang wrote: >> Hi, >> >> Please review this change removes specialized local methods used to iterate over array slices in `PSPromotionManager`. Any performance differences between these methods and `objArrayOopDesc::oop_iterate_elements_range` are attributable to differences in inlining behavior. For this reason, `ALWAYSINLINE` is applied. Further investigation is ongoing to improve inlining of calls through `objArrayOopDesc::oop_iterate_elements_range`. >> >> Testing: Tier 1-3, perf testing with SPECjvm2008-XML.validation. > > I suggest renaming the title now that the investigation is complete; maybe just `Parallel: Remove specialized ...`. Thanks @albertnetymk and @tschatzl for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/29486#issuecomment-3846410781 From iwalulya at openjdk.org Wed Feb 4 09:54:57 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Wed, 4 Feb 2026 09:54:57 GMT Subject: Integrated: 8374782: Parallel: Remove specialized objArray iteration code In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 12:58:01 GMT, Ivan Walulya wrote: > Hi, > > Please review this change removes specialized local methods used to iterate over array slices in `PSPromotionManager`. Any performance differences between these methods and `objArrayOopDesc::oop_iterate_elements_range` are attributable to differences in inlining behavior. For this reason, `ALWAYSINLINE` is applied. Further investigation is ongoing to improve inlining of calls through `objArrayOopDesc::oop_iterate_elements_range`. > > Testing: Tier 1-3, perf testing with SPECjvm2008-XML.validation. This pull request has now been integrated. Changeset: 848171a6 Author: Ivan Walulya URL: https://git.openjdk.org/jdk/commit/848171a6ccc6c3610b8de0c871d0082204369bee Stats: 29 lines in 3 files changed: 2 ins; 17 del; 10 mod 8374782: Parallel: Remove specialized objArray iteration code Reviewed-by: tschatzl, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29486 From tschatzl at openjdk.org Wed Feb 4 11:04:46 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 11:04:46 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 [v2] In-Reply-To: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> References: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> Message-ID: On Wed, 4 Feb 2026 08:15:57 GMT, Albert Mingkun Yang wrote: >> Trivial removing dead code. >> >> Test: tier1 > > Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision: > > copyright Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29561#pullrequestreview-3750391524 From tschatzl at openjdk.org Wed Feb 4 11:05:45 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 11:05:45 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29528#pullrequestreview-3750394288 From shade at openjdk.org Wed Feb 4 11:57:35 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 11:57:35 GMT Subject: RFR: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` Thanks! Here goes. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29528#issuecomment-3847001144 From shade at openjdk.org Wed Feb 4 11:57:37 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 11:57:37 GMT Subject: Integrated: 8376761: ARM32: Constant base assert after JDK-8373266 In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 18:39:50 GMT, Aleksey Shipilev wrote: > Missed the obvious spot in [JDK-8373266](https://bugs.openjdk.org/browse/JDK-8373266). ARM32 uses this cached field for quick loads in CardTableBarrierSet barriers. This does not apply to Shenandoah and G1 barriers. So we only need to make sure card table is properly initialized to nullptr. > > Additional testing: > - [x] Linux ARM32 build now passes `java HelloWorld.java` This pull request has now been integrated. Changeset: a181dd09 Author: Aleksey Shipilev URL: https://git.openjdk.org/jdk/commit/a181dd09bd7ba6b23bf34327aa2be61bb00768dd Stats: 10 lines in 1 file changed: 10 ins; 0 del; 0 mod 8376761: ARM32: Constant base assert after JDK-8373266 Reviewed-by: stefank, ayang, tschatzl ------------- PR: https://git.openjdk.org/jdk/pull/29528 From tschatzl at openjdk.org Wed Feb 4 12:16:49 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 4 Feb 2026 12:16:49 GMT Subject: RFR: 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h Message-ID: Hi all, please review this trivial change that inlines the `_g1h` member use in ?G1FullGCScope` to be allowed to remove it. Testing: gha Thanks, Thomas ------------- Commit messages: - 8377161 Changes: https://git.openjdk.org/jdk/pull/29566/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29566&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377161 Stats: 5 lines in 2 files changed: 0 ins; 2 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/29566.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29566/head:pull/29566 PR: https://git.openjdk.org/jdk/pull/29566 From shade at openjdk.org Wed Feb 4 12:16:49 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 12:16:49 GMT Subject: RFR: 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 12:06:14 GMT, Thomas Schatzl wrote: > Hi all, > > please review this trivial change that inlines the `_g1h` member use in ?G1FullGCScope` to be allowed to remove it. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by shade (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29566#pullrequestreview-3750707964 From ayang at openjdk.org Wed Feb 4 13:01:11 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 13:01:11 GMT Subject: RFR: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 [v2] In-Reply-To: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> References: <_VXEdaxQL-SDtgfYgtFIDgja7IEMrnUo5ilJlNrxl6s=.22b89b4e-5a7a-4a2e-9915-cdcd55bf0bc9@github.com> Message-ID: <5g_ZTg2hnlCjtm1dzK2dzVuhH5vZt4MdOLXTEZJLX30=.b92cb938-0b6c-45f9-94aa-8becbc30947a@github.com> On Wed, 4 Feb 2026 08:15:57 GMT, Albert Mingkun Yang wrote: >> Trivial removing dead code. >> >> Test: tier1 > > Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision: > > copyright Thanks for review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29561#issuecomment-3847300233 From ayang at openjdk.org Wed Feb 4 13:01:13 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 13:01:13 GMT Subject: Integrated: 8377141: G1: Remove unused local declaration in G1BarrierSetC2 In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 07:37:21 GMT, Albert Mingkun Yang wrote: > Trivial removing dead code. > > Test: tier1 This pull request has now been integrated. Changeset: 8ad91ac1 Author: Albert Mingkun Yang URL: https://git.openjdk.org/jdk/commit/8ad91ac1109e76ee8485bf221adeac7e1751ef17 Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod 8377141: G1: Remove unused local declaration in G1BarrierSetC2 Reviewed-by: tschatzl, shade ------------- PR: https://git.openjdk.org/jdk/pull/29561 From ayang at openjdk.org Wed Feb 4 13:01:57 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 4 Feb 2026 13:01:57 GMT Subject: RFR: 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 12:06:14 GMT, Thomas Schatzl wrote: > Hi all, > > please review this trivial change that inlines the `_g1h` member use in `G1FullGCScope` to be allowed to remove it. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29566#pullrequestreview-3750925987 From iwalulya at openjdk.org Wed Feb 4 13:13:03 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Wed, 4 Feb 2026 13:13:03 GMT Subject: RFR: 8376666: Convert G1BlockOffsetTable to use Atomic [v2] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 09:35:37 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this conversion of the G1 block offset table to use `Atomic`. >> >> Testing: tier1-5, gha > > Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - * only change G1 BOT for now > - Merge branch 'master' into 8376666-convert-bot > - 8376666 > > Hi all, > > please review this conversion of the various block offset tables to use `Atomic`. Since they are very similar, and mostly changes from `uint8*` to `Atomic*` I merged the conversion together. > > It is not the goal to actually merge them into one class that all three collectors use. > > Testing: tier1-5, gha Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29482#pullrequestreview-3750989248 From aph at openjdk.org Wed Feb 4 14:26:23 2026 From: aph at openjdk.org (Andrew Haley) Date: Wed, 4 Feb 2026 14:26:23 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: Message-ID: On Thu, 15 Jan 2026 13:54:01 GMT, Evgeny Astigeevich wrote: >> Arm Neoverse N1 erratum 1542419: "The core might fetch a stale instruction from memory which violates the ordering of instruction fetches". It is fixed in Neoverse N1 r4p1. >> >> Neoverse-N1 implementations mitigate erratum 1542419 with a workaround: >> - Disable coherent icache. >> - Trap IC IVAU instructions. >> - Execute: >> - `tlbi vae3is, xzr` >> - `dsb sy` >> >> `tlbi vae3is, xzr` invalidates translations for all address spaces (global for address). It waits for all memory accesses using in-scope old translation information to complete before it is considered complete. >> >> As this workaround has significant overhead, Arm Neoverse N1 (MP050) Software Developer Errata Notice version 29.0 suggests: >> >> "Since one TLB inner-shareable invalidation is enough to avoid this erratum, the number of injected TLB invalidations should be minimized in the trap handler to mitigate the performance impact due to this workaround." >> >> This PR introduces a mechanism to defer instruction cache (ICache) invalidation for AArch64 to address the Arm Neoverse N1 erratum 1542419, which causes significant performance overhead if ICache invalidation is performed too frequently. The implementation includes detection of affected Neoverse N1 CPUs and automatic enabling of the workaround for relevant Neoverse N1 revisions. >> >> Changes include: >> >> * Added a new diagnostic AArch64 JVM flag `NeoverseN1Errata1542419` to enable or disable the workaround for the erratum. The flag is automatically enabled for Neoverse N1 CPUs prior to r4p1, as detected during VM initialization. >> * Added a new diagnostic JVM flag `UseDeferredICacheInvalidation` to enable or disable defered icache invalidation. The flag is automatically enabled for AArch64 if CPU supports hardware cache coherence. >> * Introduced the `ICacheInvalidationContext` class to manage deferred ICache invalidation, with platform-specific logic for AArch64. This context is used to batch ICache invalidations, reducing performance impact. >> * Provided a default (no-op) implementation for `DefaultICacheInvalidationContext` on platforms where the workaround is not needed, ensuring portability and minimal impact on other architectures. >> >> **Testing results: linux fastdebug build** >> - Neoverse-N1 (Graviton 2) >> - [x] tier1: passed >> - [x] tier2: passed >> - [x] tier3: passed >> - [x] tier4: 3 failures >> - `containers/docker/TestJcmdWithSideCar.java`: JDK-8341518 >> - `com/sun/nio/sctp/SctpChannel/CloseDe... > > Evgeny Astigeevich has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 36 commits: > > - Merge branch 'master' into JDK-8370947 > - Use SingleShotTime mode with multiple iterations for GCPatchingNmethodCost > - Fix macos and windows aarch64 debug builds > - Remove redundant code > - Merge branch 'master' into JDK-8370947 > - Fix linux-cross-compile riscv64 build > - Restore deleted comment > - Remove redundant blank line > - Remove redundant include > - Merge branch 'master' into JDK-8370947 > - ... and 26 more: https://git.openjdk.org/jdk/compare/78a106ff...b0ede0a8 What's the test plan for this? That is, how do we ensure the erratum-specific code path gets tested? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3847761733 From kdnilsen at openjdk.org Wed Feb 4 14:41:22 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 4 Feb 2026 14:41:22 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v23] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Make delay of acceleration trigger shorter ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/6d1adcac..d5161df7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=22 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=21-22 Stats: 9 lines in 1 file changed: 1 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From shade at openjdk.org Wed Feb 4 17:11:31 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 17:11:31 GMT Subject: RFR: 8376756: GenShen: Improve encapsulation of generational collection set choosing [v2] In-Reply-To: References: Message-ID: On Fri, 30 Jan 2026 00:46:39 GMT, William Kemper wrote: >> Choosing the collection set for Shenandoah's generational mode is somewhat more complicated than the non-generational modes. The logic is spread out in unnatural places which compounds the complexity. This change was spun off from https://github.com/openjdk/jdk/pull/27632. There is more to come, but I'm breaking the changes up over several PRs to facilitate reviewing. >> >> Description of changes: >> >> The methods: >> * `ShGeneration::compute_evacuation_budgets` >> * `ShGeneration::select_aged_regions` >> * `ShGeneration::adjust_evacuation-budgets` >> >> Were all moved into `ShGenerationalHeuristics`. The signature of `ShHeuritics::choose_collection_set` is restored to return `void` instead of returning a `size_t` which represents the number of old regions to be added to top off the collection set. The one heuristic that returned a non-zero value for this (`ShYoungHeuristics`) now carries it in a member variable. >> >> Redundant keyword modifiers have been removed from the headers touched here. > > William Kemper has updated the pull request incrementally with one additional commit since the last revision: > > Fix zero build I assume the bulk of the move is mechanical and there are no substantial changes in the body of those bulk moves. src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp line 40: > 38: bool should_start_gc() override; > 39: > 40: void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset, Argument list indenting is a bit off now. src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.hpp line 41: > 39: > 40: > 41: void choose_collection_set_from_regiondata(ShenandoahCollectionSet* cset, Same: argument indentation. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29496#pullrequestreview-3752239839 PR Review Comment: https://git.openjdk.org/jdk/pull/29496#discussion_r2765047521 PR Review Comment: https://git.openjdk.org/jdk/pull/29496#discussion_r2765053792 From kdnilsen at openjdk.org Wed Feb 4 17:18:36 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 4 Feb 2026 17:18:36 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative Message-ID: This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: Existing behavior not to scale: <--- Concurrent GC experiencesallocation failure --> <-- Degen STW pause with bad progress --> <-- Full GC --> [ STW pause is 100 ms degen + 3s full GC] ------------- Commit messages: - Delay escalation to full GC for traditional Shenandoah Changes: https://git.openjdk.org/jdk/pull/29574/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377180 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29574.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574 PR: https://git.openjdk.org/jdk/pull/29574 From wkemper at openjdk.org Wed Feb 4 17:24:07 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 4 Feb 2026 17:24:07 GMT Subject: RFR: 8376756: GenShen: Improve encapsulation of generational collection set choosing [v3] In-Reply-To: References: Message-ID: > Choosing the collection set for Shenandoah's generational mode is somewhat more complicated than the non-generational modes. The logic is spread out in unnatural places which compounds the complexity. This change was spun off from https://github.com/openjdk/jdk/pull/27632. There is more to come, but I'm breaking the changes up over several PRs to facilitate reviewing. > > Description of changes: > > The methods: > * `ShGeneration::compute_evacuation_budgets` > * `ShGeneration::select_aged_regions` > * `ShGeneration::adjust_evacuation-budgets` > > Were all moved into `ShGenerationalHeuristics`. The signature of `ShHeuritics::choose_collection_set` is restored to return `void` instead of returning a `size_t` which represents the number of old regions to be added to top off the collection set. The one heuristic that returned a non-zero value for this (`ShYoungHeuristics`) now carries it in a member variable. > > Redundant keyword modifiers have been removed from the headers touched here. William Kemper has updated the pull request incrementally with one additional commit since the last revision: Fix parameter indentation after signature change ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29496/files - new: https://git.openjdk.org/jdk/pull/29496/files/cf28eff5..6b39a7b2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29496&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29496&range=01-02 Stats: 23 lines in 12 files changed: 0 ins; 0 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/29496.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29496/head:pull/29496 PR: https://git.openjdk.org/jdk/pull/29496 From wkemper at openjdk.org Wed Feb 4 17:31:30 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 4 Feb 2026 17:31:30 GMT Subject: RFR: 8376756: GenShen: Improve encapsulation of generational collection set choosing [v2] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 17:08:19 GMT, Aleksey Shipilev wrote: > I assume the bulk of the move is mechanical and there are no substantial changes in the body of those bulk moves. Correct. The most substantive change is converting the return value of `chose_collection_set_from_regiondata` into a member variable, used here: https://github.com/openjdk/jdk/pull/29496/changes#diff-4fe32d046615496c72012064c8b5c7d44b8430699281bd20173c4035d3b913cbR65 and here: https://github.com/openjdk/jdk/pull/29496/changes#diff-777feeea79dc19a54964570587e9ae6cc864829a67f640c6c7f0f78b6480b001R647 ------------- PR Comment: https://git.openjdk.org/jdk/pull/29496#issuecomment-3848769993 From shade at openjdk.org Wed Feb 4 17:35:08 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 4 Feb 2026 17:35:08 GMT Subject: RFR: 8376756: GenShen: Improve encapsulation of generational collection set choosing [v3] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 17:24:07 GMT, William Kemper wrote: >> Choosing the collection set for Shenandoah's generational mode is somewhat more complicated than the non-generational modes. The logic is spread out in unnatural places which compounds the complexity. This change was spun off from https://github.com/openjdk/jdk/pull/27632. There is more to come, but I'm breaking the changes up over several PRs to facilitate reviewing. >> >> Description of changes: >> >> The methods: >> * `ShGeneration::compute_evacuation_budgets` >> * `ShGeneration::select_aged_regions` >> * `ShGeneration::adjust_evacuation-budgets` >> >> Were all moved into `ShGenerationalHeuristics`. The signature of `ShHeuritics::choose_collection_set` is restored to return `void` instead of returning a `size_t` which represents the number of old regions to be added to top off the collection set. The one heuristic that returned a non-zero value for this (`ShYoungHeuristics`) now carries it in a member variable. >> >> Redundant keyword modifiers have been removed from the headers touched here. > > William Kemper has updated the pull request incrementally with one additional commit since the last revision: > > Fix parameter indentation after signature change Marked as reviewed by shade (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29496#pullrequestreview-3752369950 From kdnilsen at openjdk.org Wed Feb 4 17:46:50 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 4 Feb 2026 17:46:50 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v2] In-Reply-To: References: Message-ID: > This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. > > The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. > > Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: > > Existing behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] > [ experiences ] [ with ] > [ allocation ] [ bad ] > [ failure ] [ progress ] > [ STW pause is 100 ms degen + 3s full GC ] > > Revised behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] > [ experiences ] [ with ] [ experiences ] [ with ] > [ allocation ] [ bad ] [ allocation ] [ good ] > [ failure ] [ progress ] [ failure ] [ progress ] > [ 100 ms ] [ 100 ms ] > [ pause ] [ pause ] Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Fix gtest for ShenandoahCollectorPolicy ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29574/files - new: https://git.openjdk.org/jdk/pull/29574/files/8c8aee6f..0f094a68 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=00-01 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29574.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574 PR: https://git.openjdk.org/jdk/pull/29574 From btaylor at openjdk.org Wed Feb 4 18:47:14 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 4 Feb 2026 18:47:14 GMT Subject: RFR: 8377126: Convert ShenandoahVerifier related code to use Atomic Message-ID: Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. ------------- Commit messages: - 8377126: Convert ShenandoahVerifier related code to use Atomic Changes: https://git.openjdk.org/jdk/pull/29576/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29576&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377126 Stats: 14 lines in 2 files changed: 0 ins; 0 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/29576.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29576/head:pull/29576 PR: https://git.openjdk.org/jdk/pull/29576 From wkemper at openjdk.org Wed Feb 4 19:26:11 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 4 Feb 2026 19:26:11 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic In-Reply-To: References: Message-ID: <4HiyHpIE75zagr0IROnRhR87n9swrhcUEm6CYoC5WbE=.45d17a1e-ad9d-4c81-a673-545b96f2284f@github.com> On Wed, 4 Feb 2026 18:20:18 GMT, Ben Taylor wrote: > Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. LGTM ------------- Marked as reviewed by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29576#pullrequestreview-3752910670 From wkemper at openjdk.org Wed Feb 4 19:36:16 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 4 Feb 2026 19:36:16 GMT Subject: Integrated: 8376756: GenShen: Improve encapsulation of generational collection set choosing In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 23:43:31 GMT, William Kemper wrote: > Choosing the collection set for Shenandoah's generational mode is somewhat more complicated than the non-generational modes. The logic is spread out in unnatural places which compounds the complexity. This change was spun off from https://github.com/openjdk/jdk/pull/27632. There is more to come, but I'm breaking the changes up over several PRs to facilitate reviewing. > > Description of changes: > > The methods: > * `ShGeneration::compute_evacuation_budgets` > * `ShGeneration::select_aged_regions` > * `ShGeneration::adjust_evacuation-budgets` > > Were all moved into `ShGenerationalHeuristics`. The signature of `ShHeuritics::choose_collection_set` is restored to return `void` instead of returning a `size_t` which represents the number of old regions to be added to top off the collection set. The one heuristic that returned a non-zero value for this (`ShYoungHeuristics`) now carries it in a member variable. > > Redundant keyword modifiers have been removed from the headers touched here. This pull request has now been integrated. Changeset: 949370ab Author: William Kemper URL: https://git.openjdk.org/jdk/commit/949370ab0e701cfcc68cb84dd0f91e5db41f4f45 Stats: 1234 lines in 22 files changed: 574 ins; 573 del; 87 mod 8376756: GenShen: Improve encapsulation of generational collection set choosing Reviewed-by: shade, kdnilsen ------------- PR: https://git.openjdk.org/jdk/pull/29496 From xpeng at openjdk.org Wed Feb 4 23:08:38 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 4 Feb 2026 23:08:38 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:18 GMT, Ben Taylor wrote: > Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. LGTM, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29576#pullrequestreview-3753717179 From shade at openjdk.org Thu Feb 5 07:33:31 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 5 Feb 2026 07:33:31 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:18 GMT, Ben Taylor wrote: > Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp line 667: > 665: } > 666: > 667: _processed.add_then_fetch(processed); Lost `memory_order_relaxed` here? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29576#discussion_r2767523123 From stuefe at openjdk.org Thu Feb 5 07:53:07 2026 From: stuefe at openjdk.org (Thomas Stuefe) Date: Thu, 5 Feb 2026 07:53:07 GMT Subject: RFR: 8372566: Genshen: crash at ShenandoahScanRemembered::process_clusters after JDK-8371667 [v2] In-Reply-To: References: <9K39uUxWtW6O-UsFRqrUXttqHu1K29lVAYNHcFMTaoc=.ab3856ff-55ff-4a23-ab33-870c9713e6ab@github.com> <6Y104R2wl_Z1TSFnYaYXRQdOzZGCCxXigrwBK8RM_r4=.265e3f37-88ff-4189-865b-8c17b6b8317a@github.com> Message-ID: On Tue, 27 Jan 2026 18:01:10 GMT, Xiaolong Peng wrote: >> Thanks all for the reviews! > >> Hi, @pengxiaolong , >> >> I have user error reports for JDK 25. Cannot reproduce them myself, but they have in common >> >> * Lilliput + GenShen >> * SIGSEGV during marking phase >> * disassembly seems to indicate we crash when trying in Klass::is_array_klass(). Crash address always in the narrow Klass decoding range. Most likely cause is reading a garbage markword from the heap, extracting a garbage narrow Klass pointer, then decoding it. >> >> The second hs-err file in your JBS issue (the one with the segfault) looks similar, at least for the latter point. Even though the crash was in a different GC phase. >> >> So, question: could this error happen in JDK 25? If yes, should the fix be downported? > > Hi @tstuefe, > > I believe it is a different bug in JDK25, this PR fix the bug caused by https://github.com/openjdk/jdk/pull/28247, which has not been backported to JDK25 yet. > Could you share more details of the crash? the hs-err file would be great, I can try to run the test and reproduce it. > > Thanks. > > Hi, @pengxiaolong , > > I have user error reports for JDK 25. Cannot reproduce them myself, but they have in common > > > > * Lilliput + GenShen > > * SIGSEGV during marking phase > > * disassembly seems to indicate we crash when trying in Klass::is_array_klass(). Crash address always in the narrow Klass decoding range. Most likely cause is reading a garbage markword from the heap, extracting a garbage narrow Klass pointer, then decoding it. > > > > The second hs-err file in your JBS issue (the one with the segfault) looks similar, at least for the latter point. Even though the crash was in a different GC phase. > > So, question: could this error happen in JDK 25? If yes, should the fix be downported? > > Hi @tstuefe, > > I believe it is a different bug in JDK25, this PR fix the bug caused by #28247, which has not been backported to JDK25 yet. Could you share more details of the crash? the hs-err file would be great, I can try to run the test and reproduce it. > > Thanks. Hi @pengxiaolong, @kdnilsen, I opened https://bugs.openjdk.org/browse/JDK-8377214 with my findings and the users' logs. In that bug, it looks like we fall over garbage narrow Klass pointers read from heap during marking. I assigned the bug to @kdnilsen so that it would not get lost. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28521#issuecomment-3851606510 From tschatzl at openjdk.org Thu Feb 5 08:39:04 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 08:39:04 GMT Subject: RFR: 8377150: G1: Full GC should not execute barrier code during reference processing Message-ID: Hi all, please review this changes that removes execution of the (post-) barrier when enqueuing discovered references during full gc. It is simply not necessary as full gc throws away all remembered set information anyway later. Also allows adding checks that nobody else is executing G1BarrierSet code in the future. Testing: gha, tier1-5 Thanks, Thomas ------------- Commit messages: - 8377150 Changes: https://git.openjdk.org/jdk/pull/29564/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29564&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377150 Stats: 16 lines in 1 file changed: 15 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29564.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29564/head:pull/29564 PR: https://git.openjdk.org/jdk/pull/29564 From tschatzl at openjdk.org Thu Feb 5 08:39:10 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 08:39:10 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects Message-ID: Hi all, this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. Testing: gha Thanks, Thomas ------------- Commit messages: - * fix whitespace - * fix copyright - 8377165 Changes: https://git.openjdk.org/jdk/pull/29568/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29568&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377165 Stats: 62 lines in 5 files changed: 21 ins; 29 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/29568.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29568/head:pull/29568 PR: https://git.openjdk.org/jdk/pull/29568 From sjohanss at openjdk.org Thu Feb 5 08:39:05 2026 From: sjohanss at openjdk.org (Stefan Johansson) Date: Thu, 5 Feb 2026 08:39:05 GMT Subject: RFR: 8377150: G1: Full GC should not execute barrier code during reference processing In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 09:40:39 GMT, Thomas Schatzl wrote: > Hi all, > > please review this changes that removes execution of the (post-) barrier when enqueuing discovered references during full gc. It is simply not necessary as full gc throws away all remembered set information anyway later. Also allows adding checks that nobody else is executing G1BarrierSet code in the future. > > Testing: gha, tier1-5 > > Thanks, > Thomas Looks good. ------------- Marked as reviewed by sjohanss (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29564#pullrequestreview-3750123282 From ayang at openjdk.org Thu Feb 5 09:58:40 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Thu, 5 Feb 2026 09:58:40 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 13:34:24 GMT, Thomas Schatzl wrote: > Hi all, > > this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. > > All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29568#pullrequestreview-3755752716 From tschatzl at openjdk.org Thu Feb 5 11:53:27 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 11:53:27 GMT Subject: RFR: 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h In-Reply-To: References: Message-ID: <4Ic5lGk7PborgWUpAK75lelGtkhTiMl8zxltkKtXMxw=.2c3346d0-5327-437d-bdfa-7a198500c0c6@github.com> On Wed, 4 Feb 2026 12:57:39 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this trivial change that inlines the `_g1h` member used in `G1FullGCScope` to be allowed to remove it. >> >> Testing: gha >> >> Thanks, >> Thomas > > Marked as reviewed by ayang (Reviewer). Thanks @albertnetymk @shipilev for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29566#issuecomment-3853132300 From tschatzl at openjdk.org Thu Feb 5 11:53:28 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 11:53:28 GMT Subject: Integrated: 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 12:06:14 GMT, Thomas Schatzl wrote: > Hi all, > > please review this trivial change that inlines the `_g1h` member used in `G1FullGCScope` to be allowed to remove it. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 72eec521 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/72eec521f91d34b97dabfc3ee8cea511d88079e2 Stats: 5 lines in 2 files changed: 0 ins; 2 del; 3 mod 8377161: G1: Remove unnecessary member G1FullGCScope::_g1h Reviewed-by: shade, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29566 From tschatzl at openjdk.org Thu Feb 5 11:54:19 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 11:54:19 GMT Subject: RFR: 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 08:03:59 GMT, Albert Mingkun Yang wrote: > Remove the `if (isTenuredParallelGC) {` path in `JstatGcCapacityResults.java` because ParallelGC ensures `NGC == S0C + S1C + EC` like other GCs nowadays. > > Test: tier1-5 Maybe update copyright date. ------------- Marked as reviewed by tschatzl (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29562#pullrequestreview-3756572047 From iwalulya at openjdk.org Thu Feb 5 14:33:20 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Thu, 5 Feb 2026 14:33:20 GMT Subject: RFR: 8377150: G1: Full GC should not execute barrier code during reference processing In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 09:40:39 GMT, Thomas Schatzl wrote: > Hi all, > > please review this changes that removes execution of the (post-) barrier when enqueuing discovered references during full gc. It is simply not necessary as full gc throws away all remembered set information anyway later. Also allows adding checks that nobody else is executing G1BarrierSet code in the future. > > Testing: gha, tier1-5 > > Thanks, > Thomas Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29564#pullrequestreview-3757478813 From iwalulya at openjdk.org Thu Feb 5 14:40:48 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Thu, 5 Feb 2026 14:40:48 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 13:22:08 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. >> >> Testing: gha >> >> Thanks, >> Thomas > > src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp line 127: > >> 125: // bytes), and may just incorrectly return 0. >> 126: // Intented fo external inspection only where accuracy is not 100% required. >> 127: size_t cooked_used_bytes() const; > > Since the doc uses `estimate`, I'd suggest `estimated_used_bytes` as the name. I agree, `cooked_` might be misunderstood ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29573#discussion_r2769510581 From tschatzl at openjdk.org Thu Feb 5 15:00:13 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 15:00:13 GMT Subject: RFR: 8377150: G1: Full GC should not execute barrier code during reference processing In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 10:03:28 GMT, Stefan Johansson wrote: >> Hi all, >> >> please review this changes that removes execution of the (post-) barrier when enqueuing discovered references during full gc. It is simply not necessary as full gc throws away all remembered set information anyway later. Also allows adding checks that nobody else is executing G1BarrierSet code in the future. >> >> Testing: gha, tier1-5 >> >> Thanks, >> Thomas > > Looks good. Thanks @kstefanj @walulyai for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29564#issuecomment-3854181545 From tschatzl at openjdk.org Thu Feb 5 15:00:15 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 15:00:15 GMT Subject: Integrated: 8377150: G1: Full GC should not execute barrier code during reference processing In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 09:40:39 GMT, Thomas Schatzl wrote: > Hi all, > > please review this changes that removes execution of the (post-) barrier when enqueuing discovered references during full gc. It is simply not necessary as full gc throws away all remembered set information anyway later. Also allows adding checks that nobody else is executing G1BarrierSet code in the future. > > Testing: gha, tier1-5 > > Thanks, > Thomas This pull request has now been integrated. Changeset: 1614714b Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/1614714bc2d9891f9a393c3e19f0c92a5713a276 Stats: 16 lines in 1 file changed: 15 ins; 0 del; 1 mod 8377150: G1: Full GC should not execute barrier code during reference processing Reviewed-by: sjohanss, iwalulya ------------- PR: https://git.openjdk.org/jdk/pull/29564 From tschatzl at openjdk.org Thu Feb 5 15:21:04 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 15:21:04 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v2] In-Reply-To: References: Message-ID: > Hi all, > > please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. > > Testing: gha > > Thanks, > Thomas Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: * ayang review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29573/files - new: https://git.openjdk.org/jdk/pull/29573/files/d229bddb..723233c2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29573&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29573&range=00-01 Stats: 10 lines in 3 files changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/29573.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29573/head:pull/29573 PR: https://git.openjdk.org/jdk/pull/29573 From tschatzl at openjdk.org Thu Feb 5 15:21:06 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Thu, 5 Feb 2026 15:21:06 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v2] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 13:28:55 GMT, Albert Mingkun Yang wrote: >> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: >> >> * ayang review > > src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp line 472: > >> 470: // the used bytes from a semi-initialized TLAB ending up with implausible values. >> 471: // In this case also just return 0. >> 472: if ((diff <= 0) || (diff > checked_cast(ThreadLocalAllocBuffer::max_size_in_bytes()))) { > > I think the logic would be much cleaner if the negative case and exceeding-max case are separated, sth like: > > > if (top < start) { > return 0; > } > size = pointer_delta(top, start, 1); > if (size > max) { > return 0; > } > return size; Either is fine with me. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29573#discussion_r2769712384 From eastigeevich at openjdk.org Thu Feb 5 16:10:23 2026 From: eastigeevich at openjdk.org (Evgeny Astigeevich) Date: Thu, 5 Feb 2026 16:10:23 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 14:23:08 GMT, Andrew Haley wrote: > What's the test plan for this? That is, how do we ensure the erratum-specific code path gets tested? `test/hotspot/jtreg/gc/TestDeferredICacheInvalidation.java` is a minimal test checking no assert is triggered. Other possible tests to write: - If `NeoverseN1Errata1542419` is set then `UseDeferredICacheInvalidation` is set. There can be a set of tests checking those options are set correctly. - There could be tests that involve multiple threads executing methods while GC is patching those methods. Tests to run on Neoverse-N1: - jcstress - tier 1 - tier 4 - benchmarks: specjvm, specjbb, dacapo, renaissance Does this plan look reasonable? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3854622153 From btaylor at openjdk.org Thu Feb 5 16:45:30 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Thu, 5 Feb 2026 16:45:30 GMT Subject: RFR: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic Message-ID: Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. ------------- Commit messages: - 8377043: Convert ShenandoahHeapRegion related code to use Atomic Changes: https://git.openjdk.org/jdk/pull/29575/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29575&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377043 Stats: 37 lines in 4 files changed: 2 ins; 2 del; 33 mod Patch: https://git.openjdk.org/jdk/pull/29575.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29575/head:pull/29575 PR: https://git.openjdk.org/jdk/pull/29575 From btaylor at openjdk.org Thu Feb 5 16:54:34 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Thu, 5 Feb 2026 16:54:34 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic [v2] In-Reply-To: References: Message-ID: > Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. Ben Taylor has updated the pull request incrementally with one additional commit since the last revision: Restore dropped in shenandoahVerifier ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29576/files - new: https://git.openjdk.org/jdk/pull/29576/files/f5c311b4..87229bad Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29576&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29576&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29576.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29576/head:pull/29576 PR: https://git.openjdk.org/jdk/pull/29576 From shade at openjdk.org Thu Feb 5 17:27:14 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 5 Feb 2026 17:27:14 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic [v2] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 16:54:34 GMT, Ben Taylor wrote: >> Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. >> >> Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. > > Ben Taylor has updated the pull request incrementally with one additional commit since the last revision: > > Restore dropped in shenandoahVerifier Marked as reviewed by shade (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29576#pullrequestreview-3758424642 From wkemper at openjdk.org Thu Feb 5 17:34:20 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 5 Feb 2026 17:34:20 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: References: Message-ID: > When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. William Kemper has updated the pull request incrementally with three additional commits since the last revision: - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards - Clear card table for young regions when full gc rebuilds remembered set - Dirty all the cards en masse This might be faster if less precise. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29511/files - new: https://git.openjdk.org/jdk/pull/29511/files/08bfab8b..f905138c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=01-02 Stats: 69 lines in 1 file changed: 27 ins; 32 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/29511.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29511/head:pull/29511 PR: https://git.openjdk.org/jdk/pull/29511 From wkemper at openjdk.org Thu Feb 5 17:34:21 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 5 Feb 2026 17:34:21 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 17:31:58 GMT, William Kemper wrote: >> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. > > William Kemper has updated the pull request incrementally with three additional commits since the last revision: > > - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards > - Clear card table for young regions when full gc rebuilds remembered set > - Dirty all the cards en masse > > This might be faster if less precise. src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1558: > 1556: // coalesce-and-fill processing. > 1557: r->end_preemptible_coalesce_and_fill(); > 1558: _heap->old_generation()->clear_cards_for(r); Clearing the card table and object starts when allocating new old regions likely contributed to slower evacuations in old generation. Cards are now cleared when old regions are recycled. We must also do this when a full GC switches the affiliation of regions from young to old. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2770328359 From wkemper at openjdk.org Thu Feb 5 17:39:16 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 5 Feb 2026 17:39:16 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 17:28:39 GMT, William Kemper wrote: >> src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 41: >> >>> 39: ShenandoahScanRemembered* const _scanner; >>> 40: >>> 41: public: >> >> I had not initially appreciated that we are investing in more precise dirtying of cards as part of this PR. Please check my analysis of the tradeoffs here: >> >> Option 1 (as currently implemented): >> 1. This will take longer to do entry_update_card_table() because we have to rescan every copied object. This rescanning may also result in increased contention for cache lines and memory bus with mutator threads during this phase. This also results in redundant dirtying of cards for any card that holds more than one "interesting pointer". >> 2. The benefit of this option is that our subsequent scan-remembered pass will have less work to do because potentially fewer cards will need to be scanned. >> >> Option 2(blindly dirty the entire range of copied objects): >> 1. This matches current implementation. The existing design is based on the idea that it is "overall" more efficient to scan this data once rather than twice. We'll scan the data once when we next scan remembered set. >> 2. The scan-once benefit applies only to cards that are dirty. In option 1, we scan data corresponding to dirty cards twice. In option 2, we scan data corresponding to dirty cards once. Data corresponding to clean cards is scanned only once in either option, though the timing of when we scan that data is different. >> >> I'm wondering if we've done any experiment to evaluate the tradeoffs of these alternative approaches on various workloads? > > I ran these tests on an earlier iteration of the changes here. They showed the reduction in remembered set scan times was greater than the increase in the time to update the card table. I will re-run the tests with the current version of the code here. Latest round of testing shows that more precise card dirtying approximately doubles the time of this new phase with no significant reduction in average remembered set scan times. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2770346664 From kdnilsen at openjdk.org Thu Feb 5 18:18:16 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 5 Feb 2026 18:18:16 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v24] In-Reply-To: References: Message-ID: <95batM-97UOIYqamTcd-NbHYYeSzDSwhYqeWkAOWufg=.0fb157d7-850c-4c1c-9241-593b1cc972ed@github.com> > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: - Merge remote-tracking branch 'jdk/master' into accelerated-triggers - Make delay of acceleration trigger shorter - Delay accelerated trigger until some garbage has accumulated - Remove debug instrumentation - no need to set_mutator_free_after_updaterefs - Merge remote-tracking branch 'jdk/master' into accelerated-triggers - some cosmetic improvements - Use fewer samples to detect acceleration - align log messages for trigger trace - remove problematic debug messages - ... and 81 more: https://git.openjdk.org/jdk/compare/949370ab...d6dfa2c7 ------------- Changes: https://git.openjdk.org/jdk/pull/29039/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=23 Stats: 1007 lines in 24 files changed: 902 ins; 41 del; 64 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From xpeng at openjdk.org Thu Feb 5 18:43:00 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Thu, 5 Feb 2026 18:43:00 GMT Subject: RFR: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:17 GMT, Ben Taylor wrote: > Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. Looks good to me, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29575#pullrequestreview-3758761900 From xpeng at openjdk.org Thu Feb 5 20:05:50 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Thu, 5 Feb 2026 20:05:50 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic [v2] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 16:54:34 GMT, Ben Taylor wrote: >> Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. >> >> Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. > > Ben Taylor has updated the pull request incrementally with one additional commit since the last revision: > > Restore dropped in shenandoahVerifier Still good, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29576#pullrequestreview-3759168196 From iwalulya at openjdk.org Thu Feb 5 20:32:21 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Thu, 5 Feb 2026 20:32:21 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v2] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 15:21:04 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. >> >> Testing: gha >> >> Thanks, >> Thomas > > Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: > > * ayang review Marked as reviewed by iwalulya (Reviewer). failing tests ------------- PR Review: https://git.openjdk.org/jdk/pull/29573#pullrequestreview-3759290717 Changes requested by iwalulya (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29573#pullrequestreview-3759294802 From wkemper at openjdk.org Thu Feb 5 21:04:00 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 5 Feb 2026 21:04:00 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v2] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 17:46:50 GMT, Kelvin Nilsen wrote: >> This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 >> >> The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. >> >> Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: >> >> Existing behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] >> [ experiences ] [ with ] >> [ allocation ] [ bad ] >> [ failure ] [ progress ] >> [ STW pause is 100 ms degen + 3s full GC ] >> >> Revised behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] >> [ experiences ] [ with ] [ experiences ] [ with ] >> [ allocation ] [ bad ] [ allocation ] [ good ] >> [ failure ] [ progress ] [ failure ] [ progress ] >> [ 100 ms ] [ 100 ms ] >> [ pause ] [ pause ] > > Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: > > Fix gtest for ShenandoahCollectorPolicy Looks good, suggest one small change. src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 122: > 120: // Genshen will only upgrade to a full gc after the configured number of futile degenerated cycles. > 121: bool should_upgrade_degenerated_gc() const { > 122: return _consecutive_degenerated_gcs_without_progress >= GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD; Shall we rename `GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD` as well? Perhaps `CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD`? ------------- Changes requested by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29574#pullrequestreview-3759449781 PR Review Comment: https://git.openjdk.org/jdk/pull/29574#discussion_r2771144740 From duke at openjdk.org Thu Feb 5 21:19:46 2026 From: duke at openjdk.org (duke) Date: Thu, 5 Feb 2026 21:19:46 GMT Subject: RFR: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic [v2] In-Reply-To: References: Message-ID: <1djorDXv3XwEsODETkD4Kuo47HzX5UUw3WRhWau98Jw=.ec3ed535-b9ee-4053-afa8-b8d0a21283f0@github.com> On Thu, 5 Feb 2026 16:54:34 GMT, Ben Taylor wrote: >> Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. >> >> Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. > > Ben Taylor has updated the pull request incrementally with one additional commit since the last revision: > > Restore dropped in shenandoahVerifier @benty-amzn Your change (at version 87229bad6ec3d50bce64794c80b08c211a60613e) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29576#issuecomment-3856264690 From cslucas at openjdk.org Thu Feb 5 21:39:37 2026 From: cslucas at openjdk.org (Cesar Soares Lucas) Date: Thu, 5 Feb 2026 21:39:37 GMT Subject: RFR: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic In-Reply-To: References: Message-ID: <8HnXSOHh_q32Z3Xv9Xvu02fClOTTv94R3kZeUiyfiDI=.b9b581f1-482d-46f4-b282-d0f639004b96@github.com> On Wed, 4 Feb 2026 18:20:17 GMT, Ben Taylor wrote: > Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. LGTM, although I suggest testing on other platforms and tiers as well. ------------- Marked as reviewed by cslucas (Committer). PR Review: https://git.openjdk.org/jdk/pull/29575#pullrequestreview-3759588380 From kdnilsen at openjdk.org Thu Feb 5 22:22:34 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 5 Feb 2026 22:22:34 GMT Subject: RFR: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:17 GMT, Ben Taylor wrote: > Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. Thanks. ------------- Marked as reviewed by kdnilsen (Committer). PR Review: https://git.openjdk.org/jdk/pull/29575#pullrequestreview-3759755707 From kdnilsen at openjdk.org Thu Feb 5 22:25:37 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 5 Feb 2026 22:25:37 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v2] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 21:00:58 GMT, William Kemper wrote: >> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix gtest for ShenandoahCollectorPolicy > > src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp line 122: > >> 120: // Genshen will only upgrade to a full gc after the configured number of futile degenerated cycles. >> 121: bool should_upgrade_degenerated_gc() const { >> 122: return _consecutive_degenerated_gcs_without_progress >= GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD; > > Shall we rename `GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD` as well? Perhaps `CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD`? Sure. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29574#discussion_r2771410369 From kdnilsen at openjdk.org Thu Feb 5 22:32:44 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 5 Feb 2026 22:32:44 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v3] In-Reply-To: References: Message-ID: <_n936ekjoiLn1UK9n2hRUWzov1EIHoP46h-WfudjH3c=.37563954-4a2e-49ea-b0d8-7679c2744251@github.com> > This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 > > The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. > > Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: > > Existing behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] > [ experiences ] [ with ] > [ allocation ] [ bad ] > [ failure ] [ progress ] > [ STW pause is 100 ms degen + 3s full GC ] > > Revised behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] > [ experiences ] [ with ] [ experiences ] [ with ] > [ allocation ] [ bad ] [ allocation ] [ good ] > [ failure ] [ progress ] [ failure ] [ progress ] > [ 100 ms ] [ 100 ms ] > [ pause ] [ pause ] Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Fix constant name and comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29574/files - new: https://git.openjdk.org/jdk/pull/29574/files/0f094a68..d8d5423f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=01-02 Stats: 11 lines in 1 file changed: 0 ins; 7 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/29574.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574 PR: https://git.openjdk.org/jdk/pull/29574 From btaylor at openjdk.org Thu Feb 5 22:47:40 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Thu, 5 Feb 2026 22:47:40 GMT Subject: Integrated: 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:18 GMT, Ben Taylor wrote: > Modernizes ShenandoahVerifier code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. This pull request has now been integrated. Changeset: b9c0e053 Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/b9c0e0537f979534b12ba6c44b6cf35a8ed78f89 Stats: 14 lines in 2 files changed: 0 ins; 0 del; 14 mod 8377126: Shenandoah: Convert ShenandoahVerifier related code to use Atomic Reviewed-by: xpeng, shade, wkemper ------------- PR: https://git.openjdk.org/jdk/pull/29576 From kdnilsen at openjdk.org Thu Feb 5 22:56:07 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 5 Feb 2026 22:56:07 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v4] In-Reply-To: References: Message-ID: > This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 > > The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. > > Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: > > Existing behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] > [ experiences ] [ with ] > [ allocation ] [ bad ] > [ failure ] [ progress ] > [ STW pause is 100 ms degen + 3s full GC ] > > Revised behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] > [ experiences ] [ with ] [ experiences ] [ with ] > [ allocation ] [ bad ] [ allocation ] [ good ] > [ failure ] [ progress ] [ failure ] [ progress ] > [ 100 ms ] [ 100 ms ] > [ pause ] [ pause ] Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Fix comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29574/files - new: https://git.openjdk.org/jdk/pull/29574/files/d8d5423f..cb40a211 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29574.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574 PR: https://git.openjdk.org/jdk/pull/29574 From wkemper at openjdk.org Thu Feb 5 23:37:17 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 5 Feb 2026 23:37:17 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v4] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 22:56:07 GMT, Kelvin Nilsen wrote: >> This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 >> >> The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. >> >> Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: >> >> Existing behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] >> [ experiences ] [ with ] >> [ allocation ] [ bad ] >> [ failure ] [ progress ] >> [ STW pause is 100 ms degen + 3s full GC ] >> >> Revised behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] >> [ experiences ] [ with ] [ experiences ] [ with ] >> [ allocation ] [ bad ] [ allocation ] [ good ] >> [ failure ] [ progress ] [ failure ] [ progress ] >> [ 100 ms ] [ 100 ms ] >> [ pause ] [ pause ] > > Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: > > Fix comment Marked as reviewed by wkemper (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29574#pullrequestreview-3759952680 From tschatzl at openjdk.org Fri Feb 6 07:24:01 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 6 Feb 2026 07:24:01 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v3] In-Reply-To: References: Message-ID: > Hi all, > > please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. > > Testing: gha > > Thanks, > Thomas Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: * left vs. right in "pointer_delta" ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29573/files - new: https://git.openjdk.org/jdk/pull/29573/files/723233c2..9b1e6abc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29573&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29573&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29573.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29573/head:pull/29573 PR: https://git.openjdk.org/jdk/pull/29573 From iwalulya at openjdk.org Fri Feb 6 08:49:06 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Fri, 6 Feb 2026 08:49:06 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v3] In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 07:24:01 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. >> >> Testing: gha >> >> Thanks, >> Thomas > > Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: > > * left vs. right in "pointer_delta" Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29573#pullrequestreview-3761602257 From iwalulya at openjdk.org Fri Feb 6 08:50:30 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Fri, 6 Feb 2026 08:50:30 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 13:34:24 GMT, Thomas Schatzl wrote: > Hi all, > > this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. > > All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by iwalulya (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29568#pullrequestreview-3761605811 From tschatzl at openjdk.org Fri Feb 6 10:36:44 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 6 Feb 2026 10:36:44 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects [v2] In-Reply-To: References: Message-ID: > Hi all, > > this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. > > All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. > > Testing: gha > > Thanks, > Thomas Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - Merge branch 'master' into 8377165-common-gc-mark - * fix whitespace - * fix copyright - 8377165 Hi all, this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. Testing: gha Thanks, Thomas ------------- Changes: https://git.openjdk.org/jdk/pull/29568/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29568&range=01 Stats: 60 lines in 5 files changed: 21 ins; 29 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/29568.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29568/head:pull/29568 PR: https://git.openjdk.org/jdk/pull/29568 From ayang at openjdk.org Fri Feb 6 10:37:55 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Fri, 6 Feb 2026 10:37:55 GMT Subject: RFR: 8377352: Parallel: Incorrect capacity in GC overhead log Message-ID: Trivial oneliner fix in GC logs. ------------- Commit messages: - pgc-log-bug-fix Changes: https://git.openjdk.org/jdk/pull/29603/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29603&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377352 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29603.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29603/head:pull/29603 PR: https://git.openjdk.org/jdk/pull/29603 From tschatzl at openjdk.org Fri Feb 6 10:39:45 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 6 Feb 2026 10:39:45 GMT Subject: Integrated: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 16:28:02 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 5f83e9ad Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/5f83e9ad0e57396b58520f2bb1dfb3e10c7113b3 Stats: 61 lines in 3 files changed: 13 ins; 25 del; 23 mod 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29573 From tschatzl at openjdk.org Fri Feb 6 10:39:43 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 6 Feb 2026 10:39:43 GMT Subject: RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer [v3] In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 08:46:35 GMT, Ivan Walulya wrote: >> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: >> >> * left vs. right in "pointer_delta" > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @albertnetymk for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29573#issuecomment-3859544741 From tschatzl at openjdk.org Fri Feb 6 11:44:21 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 6 Feb 2026 11:44:21 GMT Subject: RFR: 8377352: Parallel: Incorrect capacity in GC overhead log In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:31:01 GMT, Albert Mingkun Yang wrote: > Trivial oneliner fix in GC logs. Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29603#pullrequestreview-3762624576 From eastigeevich at openjdk.org Fri Feb 6 14:38:40 2026 From: eastigeevich at openjdk.org (Evgeny Astigeevich) Date: Fri, 6 Feb 2026 14:38:40 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 16:07:54 GMT, Evgeny Astigeevich wrote: > > What's the test plan for this? That is, how do we ensure the erratum-specific code path gets tested? > > `test/hotspot/jtreg/gc/TestDeferredICacheInvalidation.java` is a minimal test checking no assert is triggered. Other possible tests to write: > > * If `NeoverseN1Errata1542419` is set then `UseDeferredICacheInvalidation` is set. There can be a set of tests checking those options are set correctly. > > * There could be tests that involve multiple threads executing methods while GC is patching those methods. > > > Tests to run on Neoverse-N1: > > * jcstress > > * tier 1 - tier 4 > > * benchmarks: specjvm, specjbb, dacapo, renaissance > > > Does this plan look reasonable? @theRealAph @shipilev @fisk Any other tests to run in addition to the suggested tests above? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3860816874 From wkemper at openjdk.org Mon Feb 9 21:23:35 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 9 Feb 2026 21:23:35 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v3] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Wed, 4 Feb 2026 00:58:58 GMT, Xiaolong Peng wrote: >> This fix the problem causing following 3 jtreg tests with tlab disabled to fail: >> >> gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all >> >> >> >> The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. >> >> The fix is to call assert_bounds only when boundaries have changed: >> 1. When retire a region; >> 2. When a the object is allocated in a new region - one region became non-empty. >> >> There is also minor improvement to the if-else code in the PR. >> >> Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. >> >> Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) >> >> ### Tests >> - [x] hotspot_gc_shenandoah >> - [x] GHA > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > code format Marked as reviewed by wkemper (Reviewer). src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1677: > 1675: } > 1676: DEBUG_ONLY(bool boundary_changed = false;) > 1677: if ((result != nullptr) && in_new_region) { Why make this a standalone test instead of having it be subordinate to `alloc_capacity(r) < PLAB::min_size() * HeapWordSize` as it was before? ------------- PR Review: https://git.openjdk.org/jdk/pull/29537#pullrequestreview-3765791072 PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2776535181 From kdnilsen at openjdk.org Mon Feb 9 21:23:37 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 9 Feb 2026 21:23:37 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Wed, 4 Feb 2026 00:30:18 GMT, Xiaolong Peng wrote: >> This fix the problem causing following 3 jtreg tests with tlab disabled to fail: >> >> gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all >> >> >> >> The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. >> >> The fix is to call assert_bounds only when boundaries have changed: >> 1. When retire a region; >> 2. When a the object is allocated in a new region - one region became non-empty. >> >> There is also minor improvement to the if-else code in the PR. >> >> Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. >> >> Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) >> >> ### Tests >> - [x] hotspot_gc_shenandoah >> - [x] GHA > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > Add assert_bounds_not_changed as Kelvin suggested src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1197: > 1195: "Mutator humongous waste must match"); > 1196: } > 1197: I realize I requested/suggested this, but upon further thought, I wonder if this is too strong. IIRC, sometimes the leftmost_empty(partition) does not represent the left-most empty partition. Sometimes it is just a left-most bound on the first empty partition. The less demanding sanity check is probably: assert((leftmost_empty(partition) == _max) || (leftmost_empty(partition >= leftmost(partition)) Similarly for rightmost_empty(partition). As rewritten, I believe this is sufficient to handle the case that leftmost(partition) == _max or rightmost(partition) == -1. Whenever leftmost(partition) == max or righmost(partition) == -1, the leftmost_empty(partition) should equal _max and righmost_empty(partition) should equal -1. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2776673512 From xpeng at openjdk.org Mon Feb 9 21:23:38 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Mon, 9 Feb 2026 21:23:38 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v3] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Sat, 7 Feb 2026 00:34:11 GMT, William Kemper wrote: >> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: >> >> code format > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1677: > >> 1675: } >> 1676: DEBUG_ONLY(bool boundary_changed = false;) >> 1677: if ((result != nullptr) && in_new_region) { > > Why make this a standalone test instead of having it be subordinate to `alloc_capacity(r) < PLAB::min_size() * HeapWordSize` as it was before? Logically the new code is same as before, the old control flow is like: if (alloc_capacity(r) < PLAB::min_size() * HeapWordSize) { ...// do sth. if ((result != nullptr) && in_new_region) { _partitions.one_region_is_no_longer_empty(orig_partition); } } else if ((result != nullptr) && in_new_region) { _partitions.one_region_is_no_longer_empty(orig_partition); } ``` The test `if ((result != nullptr) && in_new_region)` is always done, having standalone test make it easier to read and understand. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2776602684 From xpeng at openjdk.org Mon Feb 9 21:24:43 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Mon, 9 Feb 2026 21:24:43 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 17:34:20 GMT, William Kemper wrote: >> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. > > William Kemper has updated the pull request incrementally with three additional commits since the last revision: > > - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards > - Clear card table for young regions when full gc rebuilds remembered set > - Dirty all the cards en masse > > This might be faster if less precise. src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 641: > 639: // when the in-place-promotion is completed. Such a region may be used for additional > 640: // promotions in the same cycle it was itself promoted. > 641: _card_scan->update_card_table(region->get_top_at_evac_start(), region->top()); parallel_heap_region_iterate(which is used by for_each_region) use single thread if the number of is <= 4096; the assumption is for most of lightweight task, for example, capturing TAMS at init mark, the overhead of multiple threads is more expensive than the task itself. For more complicated task, we may not want to use parallel_heap_region_iterate, I had a [PR](https://github.com/openjdk/jdk/pull/28613) recently to address this kind of issue in bitmap reset. I'm not sure update_card_table is suitable to use parallel_heap_region_iterate after reading the impl, I saw you also added timing metrics for it, you can do some simple test to verify it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2784359317 From wkemper at openjdk.org Mon Feb 9 21:25:32 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 9 Feb 2026 21:25:32 GMT Subject: RFR: 8377396: GenShen: Consolidate and simplify in place region promotions Message-ID: The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. ------------- Commit messages: - Fix missingforward declaration and another include sort order - Add missing include - Document public methods - Colocate code for planning and executing for promoting regions in place Changes: https://git.openjdk.org/jdk/pull/29618/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29618&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377396 Stats: 701 lines in 6 files changed: 406 ins; 279 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/29618.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29618/head:pull/29618 PR: https://git.openjdk.org/jdk/pull/29618 From ayang at openjdk.org Mon Feb 9 21:26:16 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:26:16 GMT Subject: RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: On Mon, 26 Jan 2026 16:58:25 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSParallelCompact` to use `Atomic`. > > Testing: tier1-5,gha > > Thanks, > Thomas src/hotspot/share/gc/parallel/psParallelCompact.cpp line 1401: > 1399: for (unsigned int i = PSParallelCompact::old_space_id; i < PSParallelCompact::last_space_id; ++i) { > 1400: ::new (&_claim_counters[i]) Atomic{}; > 1401: } I wonder with `8376810: Make Atomic default constructor non-explicit` merged, if this loop is still needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29425#discussion_r2781631278 From tschatzl at openjdk.org Mon Feb 9 21:26:17 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:26:17 GMT Subject: RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: On Mon, 9 Feb 2026 09:43:14 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this change to convert `PSParallelCompact` to use `Atomic`. >> >> Testing: tier1-5,gha >> >> Thanks, >> Thomas > > src/hotspot/share/gc/parallel/psParallelCompact.cpp line 1401: > >> 1399: for (unsigned int i = PSParallelCompact::old_space_id; i < PSParallelCompact::last_space_id; ++i) { >> 1400: ::new (&_claim_counters[i]) Atomic{}; >> 1401: } > > I wonder with `8376810: Make Atomic default constructor non-explicit` merged, if this loop is still needed. I will clean up all these loops with [JDK-8377224](https://bugs.openjdk.org/browse/JDK-8377224) (probably split up a bit depending on e.g. gc) instead of fixing it in half of the places now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29425#discussion_r2783056303 From ayang at openjdk.org Mon Feb 9 21:27:47 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:27:47 GMT Subject: RFR: 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java [v2] In-Reply-To: References: Message-ID: <3pxWosqynbCpFwE_ka1kYLtMWKLkuybs8HxuneY1fTA=.1041f2d9-2ccf-4172-8196-2ca97feedb93@github.com> > Remove the `if (isTenuredParallelGC) {` path in `JstatGcCapacityResults.java` because ParallelGC ensures `NGC == S0C + S1C + EC` like other GCs nowadays. > > Test: tier1-5 Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - copyright - Merge branch 'master' into pgc-svc-remove-if-check - pgc-svc-remove-if-check ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29562/files - new: https://git.openjdk.org/jdk/pull/29562/files/4da63a0b..1d891f3e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29562&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29562&range=00-01 Stats: 12360 lines in 357 files changed: 6714 ins; 2181 del; 3465 mod Patch: https://git.openjdk.org/jdk/pull/29562.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29562/head:pull/29562 PR: https://git.openjdk.org/jdk/pull/29562 From aph at openjdk.org Mon Feb 9 21:32:08 2026 From: aph at openjdk.org (Andrew Haley) Date: Mon, 9 Feb 2026 21:32:08 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: Message-ID: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> On Fri, 6 Feb 2026 14:35:37 GMT, Evgeny Astigeevich wrote: > > @theRealAph @shipilev @fisk Any other tests to run in addition to the suggested tests above? It all goes back to the question I asked before. If we run this test on all Neoverse N1, not just the affected stepping, would there be any disadvantage? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3871568795 From aph at openjdk.org Mon Feb 9 21:32:16 2026 From: aph at openjdk.org (Andrew Haley) Date: Mon, 9 Feb 2026 21:32:16 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> References: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> Message-ID: On Mon, 9 Feb 2026 13:00:04 GMT, Andrew Haley wrote: > > @theRealAph @shipilev @fisk Any other tests to run in addition to the suggested tests above? > > It all goes back to the question I asked before. If we run this test on all Neoverse N1, not just the affected stepping, would there be any disadvantage? Sorry, i mean if we run the same workaround code on all Neoverse N1. Why not? Would it be slower? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3871575377 From eastigeevich at openjdk.org Mon Feb 9 21:32:24 2026 From: eastigeevich at openjdk.org (Evgeny Astigeevich) Date: Mon, 9 Feb 2026 21:32:24 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> Message-ID: On Mon, 9 Feb 2026 13:01:32 GMT, Andrew Haley wrote: > > > @theRealAph @shipilev @fisk Any other tests to run in addition to the suggested tests above? > > > > > > It all goes back to the question I asked before. If we run this test on all Neoverse N1, not just the affected stepping, would there be any disadvantage? > > Sorry, i mean if we run the same workaround code on all Neoverse N1. Why not? Would it be slower? I don't have unaffected N1 to check. Out of curiosity, does unaffected N1 exist in any cloud? I think it would not be slower. Unaffected N1 will be running the following code, as V1 and V2, once per patched nmethod: dsb ish isb [Graviton 3(Neoverse V1) results](https://github.com/openjdk/jdk/pull/28328#issuecomment-3585923078) show benefits of the deferred invalidation as well. So should unaffected N1. An explanation of the improvement is in the comment: https://github.com/openjdk/jdk/pull/28328#issuecomment-3585923078. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3871928510 From wkemper at openjdk.org Mon Feb 9 21:37:48 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 9 Feb 2026 21:37:48 GMT Subject: RFR: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:17 GMT, Ben Taylor wrote: > Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. Marked as reviewed by wkemper (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29575#pullrequestreview-3765670882 From btaylor at openjdk.org Mon Feb 9 21:37:54 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Mon, 9 Feb 2026 21:37:54 GMT Subject: Integrated: 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 18:20:17 GMT, Ben Taylor wrote: > Modernizes ShenandoahHeapRegion code by replacing `AtomicAccess` methods with `Atomic` types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with `TEST_VM_OPTS=-XX:+UseShenandoahGC`. This pull request has now been integrated. Changeset: 57eb9c79 Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/57eb9c79b050224c6bf402ebe7d18afff1f5ce09 Stats: 37 lines in 4 files changed: 2 ins; 2 del; 33 mod 8377043: Shenandoah: Convert ShenandoahHeapRegion related code to use Atomic Reviewed-by: xpeng, cslucas, kdnilsen, wkemper ------------- PR: https://git.openjdk.org/jdk/pull/29575 From ayang at openjdk.org Mon Feb 9 21:38:15 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:38:15 GMT Subject: RFR: 8376356: Parallel: Convert PSCardTable to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 17:21:13 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSCardTable` to use `Atomic`. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29428#pullrequestreview-3772077753 From tschatzl at openjdk.org Mon Feb 9 21:38:22 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:22 GMT Subject: RFR: 8376356: Parallel: Convert PSCardTable to use Atomic In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 09:11:04 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this change to convert `PSCardTable` to use `Atomic`. >> >> Testing: gha >> >> Thanks, >> Thomas > > Marked as reviewed by ayang (Reviewer). Thanks @albertnetymk @walulyai for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29428#issuecomment-3872178490 From duke at openjdk.org Mon Feb 9 21:38:20 2026 From: duke at openjdk.org (luben karavelov) Date: Mon, 9 Feb 2026 21:38:20 GMT Subject: RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v12] In-Reply-To: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> References: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> Message-ID: On Wed, 5 Feb 2025 13:40:59 GMT, Ivan Walulya wrote: >> Hi all, >> >> Please review this change to assign multiple collection candidate regions to a single instance of a G1CardSet. Currently, we maintain a 1:1 mapping of old-gen regions and G1CardSet instances, assuming these regions are collected independently. However, regions are collected in batches for performance reasons to meet the G1MixedGCCountTarget. >> >> In this change, at the end of the Remark phase, we batch regions that we anticipate will be collected together into a collection group while selecting remembered set rebuild candidates. Regions in a collection group should be evacuated at the same time because they are assigned to the same G1CardSet instances. This implies that we do not need to maintain cross-region remembered set entries for regions within the same collection group. >> >> The benefit is a reduction in the memory overhead of the remembered set and the remembered set merge time during the collection pause. One disadvantage is that this approach decreases the flexibility during evacuation: you can only evacuate all regions that share a particular G1CardSet at the same time. Another downside is that pinned regions that are part of a collection group have to be partially evacuated when the collection group is selected for evacuation. This removes the optimization in the mainline implementation where the pinned regions are skipped to allow for potential unpinning before evacuation. >> >> In this change, we make significant changes to the collection set implementation as we switch to group selection instead of region selection. Consequently, many of the changes in the PR are about switching from region-centered collection set selection to a group-centered approach. >> >> Note: The batching is based on the sort order by reclaimable bytes which may change the evacuation order in which regions would have been evacuated when sorted by gc efficiency. >> >> We have not observed any regressions on internal performance testing platforms. Memory comparisons for the Cachestress benchmark for different heap sizes are attached below. >> >> Testing: Mach5 Tier1-6 >> >> ![16GB](https://github.com/user-attachments/assets/3224c2f1-172d-4d76-ba28-bf483b1b1c95) >> ![32G](https://github.com/user-attachments/assets/abd10537-41a9-4cf9-b668-362af12fe949) >> ![64GB](https://github.com/user-attachments/assets/fa87eefc-cf8a-4fb5-9fc4-e7151498bf73) >> ![128GB](https://github.com/user-attachments/assets/c3a59e32-6bd7-43e3-a3e4-c472f71aa544) > > Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision: > > space Looks that this causes intermittent data corruption when using zstd-jni. Reported in https://github.com/luben/zstd-jni/issues/377 ------------- PR Comment: https://git.openjdk.org/jdk/pull/22015#issuecomment-3872901745 From iwalulya at openjdk.org Mon Feb 9 21:38:38 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Mon, 9 Feb 2026 21:38:38 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects [v2] In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:36:44 GMT, Thomas Schatzl wrote: >> Hi all, >> >> this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. >> >> All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. >> >> Testing: gha >> >> Thanks, >> Thomas > > Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: > > - Merge branch 'master' into 8377165-common-gc-mark > - * fix whitespace > - * fix copyright > - 8377165 > > Hi all, > > this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. > > Testing: gha > > Thanks, > Thomas Still good! ------------- Marked as reviewed by iwalulya (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29568#pullrequestreview-3771945974 From xpeng at openjdk.org Mon Feb 9 21:39:03 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Mon, 9 Feb 2026 21:39:03 GMT Subject: RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v4] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 22:56:07 GMT, Kelvin Nilsen wrote: >> This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 >> >> The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. >> >> Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: >> >> Existing behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] >> [ experiences ] [ with ] >> [ allocation ] [ bad ] >> [ failure ] [ progress ] >> [ STW pause is 100 ms degen + 3s full GC ] >> >> Revised behavior not to scale: >> <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] >> [ experiences ] [ with ] [ experiences ] [ with ] >> [ allocation ] [ bad ] [ allocation ] [ good ] >> [ failure ] [ progress ] [ failure ] [ progress ] >> [ 100 ms ] [ 100 ms ] >> [ pause ] [ pause ] > > Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: > > Fix comment Traditional Shenandoah will have same upgrade policy as Genshen with the change. Looks good to me, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29574#pullrequestreview-3764940680 From tschatzl at openjdk.org Mon Feb 9 21:38:40 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:40 GMT Subject: RFR: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects [v2] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 08:46:33 GMT, Ivan Walulya wrote: >> Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: >> >> - Merge branch 'master' into 8377165-common-gc-mark >> - * fix whitespace >> - * fix copyright >> - 8377165 >> >> Hi all, >> >> this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. >> >> Testing: gha >> >> Thanks, >> Thomas > > Still good! thanks @walulyai @albertnetymk for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29568#issuecomment-3870602304 From tschatzl at openjdk.org Mon Feb 9 21:38:28 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:28 GMT Subject: Integrated: 8376356: Parallel: Convert PSCardTable to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 17:21:13 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSCardTable` to use `Atomic`. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 2a8badf5 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/2a8badf5a6c956536fc0b4d55992f213409808c2 Stats: 6 lines in 2 files changed: 1 ins; 0 del; 5 mod 8376356: Parallel: Convert PSCardTable to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29428 From tschatzl at openjdk.org Mon Feb 9 21:38:43 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:43 GMT Subject: Integrated: 8377165: G1: Introduce common G1 GC Mark to collect scoped objects In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 13:34:24 GMT, Thomas Schatzl wrote: > Hi all, > > this change factors out the initial scoped objects common to g1 young and full gc into `G1GCMark` to avoid duplication and ordering issues. > > All other scoped objects (maybe but `G1HeapPrinterMark`) are specific to the separate collectors. Not sure it is worth commonalizing them. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: a7bf468a Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/a7bf468a8fd86bf2845acef8aea1462f865c8182 Stats: 60 lines in 5 files changed: 21 ins; 29 del; 10 mod 8377165: G1: Introduce common G1 GC Mark to collect scoped objects Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29568 From ayang at openjdk.org Mon Feb 9 21:38:22 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:38:22 GMT Subject: RFR: 8376199: Convert CodeCacheUnloadingTask to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 13:58:05 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert usages of `AtomicAccess` to `Atomic` in the `CodeCacheUnloadingTask` class. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29418#pullrequestreview-3773430277 From kdnilsen at openjdk.org Mon Feb 9 21:39:05 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 9 Feb 2026 21:39:05 GMT Subject: Integrated: 8377180: Shenandoah: make escalation from degen to full more conservative In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 17:11:33 GMT, Kelvin Nilsen wrote: > This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See https://github.com/openjdk/jdk/pull/27456 > > The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol. > > Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses: > > Existing behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Full GC ] > [ experiences ] [ with ] > [ allocation ] [ bad ] > [ failure ] [ progress ] > [ STW pause is 100 ms degen + 3s full GC ] > > Revised behavior not to scale: > <- [ Conc GC ] -> <- [ Degen ] -> <- [ Conc GC ] -> [ Degen ] > [ experiences ] [ with ] [ experiences ] [ with ] > [ allocation ] [ bad ] [ allocation ] [ good ] > [ failure ] [ progress ] [ failure ] [ progress ] > [ 100 ms ] [ 100 ms ] > [ pause ] [ pause ] This pull request has now been integrated. Changeset: eec76d7b Author: Kelvin Nilsen URL: https://git.openjdk.org/jdk/commit/eec76d7b8c4c8a64593d85338225906c188f679c Stats: 20 lines in 3 files changed: 0 ins; 7 del; 13 mod 8377180: Shenandoah: make escalation from degen to full more conservative Reviewed-by: wkemper, xpeng ------------- PR: https://git.openjdk.org/jdk/pull/29574 From kbarrett at openjdk.org Mon Feb 9 21:38:23 2026 From: kbarrett at openjdk.org (Kim Barrett) Date: Mon, 9 Feb 2026 21:38:23 GMT Subject: RFR: 8377352: Parallel: Incorrect capacity in GC overhead log In-Reply-To: References: Message-ID: <-orQ1xySLxJ4MAxi-LZixvNkyo67v-109_xLm3db6RI=.8df00162-29d3-4443-9473-06fb937558c8@github.com> On Fri, 6 Feb 2026 10:31:01 GMT, Albert Mingkun Yang wrote: > Trivial oneliner fix in GC logs. Marked as reviewed by kbarrett (Reviewer). trivial ------------- PR Review: https://git.openjdk.org/jdk/pull/29603#pullrequestreview-3764764502 Marked as reviewed by kbarrett (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29603#pullrequestreview-3764770463 From tschatzl at openjdk.org Mon Feb 9 21:38:28 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:28 GMT Subject: RFR: 8376199: Convert CodeCacheUnloadingTask to use Atomic In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 13:50:42 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this change to convert usages of `AtomicAccess` to `Atomic` in the `CodeCacheUnloadingTask` class. >> >> Testing: gha >> >> Thanks, >> Thomas > > Marked as reviewed by ayang (Reviewer). Thanks @albertnetymk @walulyai for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29418#issuecomment-3872161359 From ayang at openjdk.org Mon Feb 9 21:38:19 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:38:19 GMT Subject: RFR: 8376351: Parallel: Convert ParallelScavengeHeap to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 16:28:45 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to use `Atomic` in `ParallelScavengeHeap`. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29424#pullrequestreview-3772086298 From tschatzl at openjdk.org Mon Feb 9 21:39:09 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:39:09 GMT Subject: Integrated: 8377443: G1: Remove unnecessary cast in ResizeTLABAndSwapCardTableTask Message-ID: Hi all, please review this trivial removal of an unnecessary cast because `tlab()` is a member of `Thread` already and does not need `JavaThread`. Testing: local compilation, gha Thanks, Thomas ------------- Commit messages: - 8377443 Changes: https://git.openjdk.org/jdk/pull/29628/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29628&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377443 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29628.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29628/head:pull/29628 PR: https://git.openjdk.org/jdk/pull/29628 From ayang at openjdk.org Mon Feb 9 21:38:28 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:38:28 GMT Subject: RFR: 8377352: Parallel: Incorrect capacity in GC overhead log In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:31:01 GMT, Albert Mingkun Yang wrote: > Trivial oneliner fix in GC logs. Thanks for review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29603#issuecomment-3870978893 From tschatzl at openjdk.org Mon Feb 9 21:38:33 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:33 GMT Subject: Integrated: 8376199: Convert CodeCacheUnloadingTask to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 13:58:05 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert usages of `AtomicAccess` to `Atomic` in the `CodeCacheUnloadingTask` class. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 47b2e994 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/47b2e994b083f1c53f51fae605a192a6a44f2483 Stats: 7 lines in 2 files changed: 1 ins; 0 del; 6 mod 8376199: Convert CodeCacheUnloadingTask to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29418 From tschatzl at openjdk.org Mon Feb 9 21:38:31 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:31 GMT Subject: RFR: 8376351: Parallel: Convert ParallelScavengeHeap to use Atomic In-Reply-To: <4RbLpvRH92c9rYYGCyzuc7cR3MlJFrd7rFpYpWZQffI=.26fa4e4b-7343-4aa1-a8aa-7db5806f2016@github.com> References: <4RbLpvRH92c9rYYGCyzuc7cR3MlJFrd7rFpYpWZQffI=.26fa4e4b-7343-4aa1-a8aa-7db5806f2016@github.com> Message-ID: On Tue, 27 Jan 2026 09:14:04 GMT, Ivan Walulya wrote: >> Hi all, >> >> please review this change to use `Atomic` in `ParallelScavengeHeap`. >> >> Testing: gha >> >> Thanks, >> Thomas > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @albertnetymk for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29424#issuecomment-3872164567 From ayang at openjdk.org Mon Feb 9 21:39:09 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:39:09 GMT Subject: Integrated: 8377443: G1: Remove unnecessary cast in ResizeTLABAndSwapCardTableTask In-Reply-To: References: Message-ID: <90A3DJvOePcxuVkXTNFuYkvP5SvrzImPQpOJpZuYpDQ=.a320e949-1d52-4a4b-95ab-da213e48ba8b@github.com> On Mon, 9 Feb 2026 07:34:38 GMT, Thomas Schatzl wrote: > Hi all, > > please review this trivial removal of an unnecessary cast because `tlab()` is a member of `Thread` already and does not need `JavaThread`. > > Testing: local compilation, gha > > Thanks, > Thomas Trivial. I suggest adding `G1: ` prefix in the tittle. ------------- Marked as reviewed by ayang (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29628#pullrequestreview-3771831305 From ayang at openjdk.org Mon Feb 9 21:38:33 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 9 Feb 2026 21:38:33 GMT Subject: Integrated: 8377352: Parallel: Incorrect capacity in GC overhead log In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:31:01 GMT, Albert Mingkun Yang wrote: > Trivial oneliner fix in GC logs. This pull request has now been integrated. Changeset: d10ddb82 Author: Albert Mingkun Yang URL: https://git.openjdk.org/jdk/commit/d10ddb820316a053c58a61ba706af7548d089acf Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8377352: Parallel: Incorrect capacity in GC overhead log Reviewed-by: tschatzl, kbarrett ------------- PR: https://git.openjdk.org/jdk/pull/29603 From ghan at openjdk.org Mon Feb 9 21:39:24 2026 From: ghan at openjdk.org (Guanqiang Han) Date: Mon, 9 Feb 2026 21:39:24 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads [v2] In-Reply-To: References: Message-ID: > Please review this change. Thanks! > > **Description:** > > This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. > ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 > > For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 > > The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. > > **Fix:** > > The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. > > **Test:** > > GHA Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: - Drop regression test - Merge remote-tracking branch 'upstream/master' into 8376491 - fix test func - fix bug 8376491 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29460/files - new: https://git.openjdk.org/jdk/pull/29460/files/b24d79e8..83491bb3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29460&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29460&range=00-01 Stats: 60546 lines in 952 files changed: 30259 ins; 18167 del; 12120 mod Patch: https://git.openjdk.org/jdk/pull/29460.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29460/head:pull/29460 PR: https://git.openjdk.org/jdk/pull/29460 From tschatzl at openjdk.org Mon Feb 9 21:39:09 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:39:09 GMT Subject: Integrated: 8377443: G1: Remove unnecessary cast in ResizeTLABAndSwapCardTableTask In-Reply-To: <90A3DJvOePcxuVkXTNFuYkvP5SvrzImPQpOJpZuYpDQ=.a320e949-1d52-4a4b-95ab-da213e48ba8b@github.com> References: <90A3DJvOePcxuVkXTNFuYkvP5SvrzImPQpOJpZuYpDQ=.a320e949-1d52-4a4b-95ab-da213e48ba8b@github.com> Message-ID: On Mon, 9 Feb 2026 08:21:26 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this trivial removal of an unnecessary cast because `tlab()` is a member of `Thread` already and does not need `JavaThread`. >> >> Testing: local compilation, gha >> >> Thanks, >> Thomas > > Trivial. I suggest adding `G1: ` prefix in the tittle. Thanks @albertnetymk for your review ------------- PR Comment: https://git.openjdk.org/jdk/pull/29628#issuecomment-3870222993 From tschatzl at openjdk.org Mon Feb 9 21:38:36 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:38:36 GMT Subject: Integrated: 8376351: Parallel: Convert ParallelScavengeHeap to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 16:28:45 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to use `Atomic` in `ParallelScavengeHeap`. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: f81bea29 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/f81bea29a3595195d747068adea2a427cf26385e Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod 8376351: Parallel: Convert ParallelScavengeHeap to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29424 From aboldtch at openjdk.org Mon Feb 9 21:39:24 2026 From: aboldtch at openjdk.org (Axel Boldt-Christmas) Date: Mon, 9 Feb 2026 21:39:24 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads [v2] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 09:48:04 GMT, Guanqiang Han wrote: >> Please review this change. Thanks! >> >> **Description:** >> >> This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. >> ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 >> >> For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 >> >> The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. >> >> **Fix:** >> >> The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. >> >> **Test:** >> >> GHA > > Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Drop regression test > - Merge remote-tracking branch 'upstream/master' into 8376491 > - fix test func > - fix bug 8376491 lgtm. ------------- Marked as reviewed by aboldtch (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29460#pullrequestreview-3771510524 From tschatzl at openjdk.org Mon Feb 9 21:39:09 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Mon, 9 Feb 2026 21:39:09 GMT Subject: Integrated: 8377443: G1: Remove unnecessary cast in ResizeTLABAndSwapCardTableTask In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 07:34:38 GMT, Thomas Schatzl wrote: > Hi all, > > please review this trivial removal of an unnecessary cast because `tlab()` is a member of `Thread` already and does not need `JavaThread`. > > Testing: local compilation, gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 1314857b Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/1314857b335502998e22f114b401c29af2517548 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8377443: G1: Remove unnecessary cast in ResizeTLABAndSwapCardTableTask Reviewed-by: ayang ------------- PR: https://git.openjdk.org/jdk/pull/29628 From stefank at openjdk.org Mon Feb 9 21:39:25 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Mon, 9 Feb 2026 21:39:25 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads [v2] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 09:48:04 GMT, Guanqiang Han wrote: >> Please review this change. Thanks! >> >> **Description:** >> >> This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. >> ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 >> >> For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. >> https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 >> >> The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. >> >> **Fix:** >> >> The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. >> >> **Test:** >> >> GHA > > Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Drop regression test > - Merge remote-tracking branch 'upstream/master' into 8376491 > - fix test func > - fix bug 8376491 Marked as reviewed by stefank (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29460#pullrequestreview-3772124479 From ghan at openjdk.org Mon Feb 9 21:39:27 2026 From: ghan at openjdk.org (Guanqiang Han) Date: Mon, 9 Feb 2026 21:39:27 GMT Subject: RFR: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads [v2] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 06:57:41 GMT, Axel Boldt-Christmas wrote: >> Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: >> >> - Drop regression test >> - Merge remote-tracking branch 'upstream/master' into 8376491 >> - fix test func >> - fix bug 8376491 > > lgtm. Hi @xmas92 @stefank , Thank you for the reviews ! I have integrated this PR, could you please sponsor it ? Thanks! > test/hotspot/jtreg/gc/z/TestZValueStorageAlloc.java line 46: > >> 44: output.shouldNotContain("# A fatal error has been detected by the Java Runtime Environment"); >> 45: } >> 46: } > > Suggestion: > > } Hi @xmas92 @stefank , Based on the feedback, I?ve removed the regression test since it doesn?t seem to add enough value and may be slow on some machines/environments. Could you please take another look? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29460#issuecomment-3870463243 PR Review Comment: https://git.openjdk.org/jdk/pull/29460#discussion_r2777454849 From ghan at openjdk.org Mon Feb 9 21:39:28 2026 From: ghan at openjdk.org (Guanqiang Han) Date: Mon, 9 Feb 2026 21:39:28 GMT Subject: Integrated: 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads In-Reply-To: References: Message-ID: On Wed, 28 Jan 2026 07:21:24 GMT, Guanqiang Han wrote: > Please review this change. Thanks! > > **Description:** > > This change fixes a crash during ZGC initialization when -XX:ConcGCThreads is set to an extremely large value. > ZThreadLocalAllocBuffer::initialize() creates a ZPerWorker, which uses ZValueStorage::alloc to allocate per-worker storage which size is related to ConcGCThreads > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zThreadLocalAllocBuffer.cpp#L35-L38 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.hpp#L111 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L125-L127 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L60-L61 > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zValue.inline.hpp#L108-L110 > > For very large ConcGCThreads, the calculated block_size becomes huge and os::malloc() inside ZUtils::alloc_aligned_unfreeable() may fail. > https://github.com/openjdk/jdk/blob/1161a640abe454b47de95ed73452a78535160deb/src/hotspot/share/gc/z/zUtils.inline.hpp#L37-L42 > > The current code does not check the returned pointer and unconditionally aligns and memset()s it, which can lead to a segmentation fault. > > **Fix:** > > The fix adds a NULL check after os::malloc() and terminates the VM with a proper OutOfMemoryError message instead of crashing. > > **Test:** > > GHA This pull request has now been integrated. Changeset: 07f78779 Author: Guanqiang Han Committer: Axel Boldt-Christmas URL: https://git.openjdk.org/jdk/commit/07f78779e099d2dead74a05acf84ac4c457293b5 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod 8376491: ZGC: crash in __memset_evex_unaligned_erms when initializing heap using high values for -XX:ConcGCThreads Reviewed-by: aboldtch, stefank ------------- PR: https://git.openjdk.org/jdk/pull/29460 From wkemper at openjdk.org Mon Feb 9 22:00:03 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 9 Feb 2026 22:00:03 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: References: Message-ID: <3oIQ01y5cbdL-LwWyeJrToqomebnRHDXuIq1NNPFbKw=.ae31dea3-2cee-4148-8fa1-c29247d4edd9@github.com> On Mon, 9 Feb 2026 20:25:53 GMT, Xiaolong Peng wrote: >> William Kemper has updated the pull request incrementally with three additional commits since the last revision: >> >> - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards >> - Clear card table for young regions when full gc rebuilds remembered set >> - Dirty all the cards en masse >> >> This might be faster if less precise. > > src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 641: > >> 639: // when the in-place-promotion is completed. Such a region may be used for additional >> 640: // promotions in the same cycle it was itself promoted. >> 641: _card_scan->update_card_table(region->get_top_at_evac_start(), region->top()); > > parallel_heap_region_iterate(which is used by for_each_region) use single thread if the number of is <= 4096; the assumption is for most of lightweight task, for example, capturing TAMS at init mark, the overhead of multiple threads is more expensive than the task itself. For more complicated task, we may not want to use parallel_heap_region_iterate, I had a [PR](https://github.com/openjdk/jdk/pull/28613) recently to address this kind of issue in bitmap reset. > > I'm not sure update_card_table is suitable to use parallel_heap_region_iterate after reading the impl, I saw you also added timing metrics for it, you can do some simple test to verify it. I added it as a timed phase, but not as a parallel worker phase so it won't show the break down of time per thread. The work could be kind of "lumpy" in that only _some_ old regions will accepted evacuations. I will try some experiments to force parallelization. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2784703644 From wkemper at openjdk.org Mon Feb 9 22:43:06 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 9 Feb 2026 22:43:06 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v4] In-Reply-To: References: Message-ID: > When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. William Kemper has updated the pull request incrementally with one additional commit since the last revision: Avoid update call when there is no work to be done ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29511/files - new: https://git.openjdk.org/jdk/pull/29511/files/f905138c..e29d3d4e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=02-03 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29511.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29511/head:pull/29511 PR: https://git.openjdk.org/jdk/pull/29511 From kdnilsen at openjdk.org Mon Feb 9 23:46:55 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 9 Feb 2026 23:46:55 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v24] In-Reply-To: <95batM-97UOIYqamTcd-NbHYYeSzDSwhYqeWkAOWufg=.0fb157d7-850c-4c1c-9241-593b1cc972ed@github.com> References: <95batM-97UOIYqamTcd-NbHYYeSzDSwhYqeWkAOWufg=.0fb157d7-850c-4c1c-9241-593b1cc972ed@github.com> Message-ID: On Thu, 5 Feb 2026 18:18:16 GMT, Kelvin Nilsen wrote: >> After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: >> >> 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. >> 2. Sample allocation rates more frequently than once every 100 ms. >> 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. >> 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. > > Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: > > - Merge remote-tracking branch 'jdk/master' into accelerated-triggers > - Make delay of acceleration trigger shorter > - Delay accelerated trigger until some garbage has accumulated > - Remove debug instrumentation > - no need to set_mutator_free_after_updaterefs > - Merge remote-tracking branch 'jdk/master' into accelerated-triggers > - some cosmetic improvements > - Use fewer samples to detect acceleration > - align log messages for trigger trace > - remove problematic debug messages > - ... and 81 more: https://git.openjdk.org/jdk/compare/949370ab...d6dfa2c7 Both master and this PR have evolved significantly since performance comparisons reported above were gathered. I have repeated the measurements with updated master vs updated PR. SpecJBB results now show a larger increase in max-jOPS and a small decrease in critical-jOPS: Screenshot 2026-02-09 at 3 42 28?PM ------------- PR Comment: https://git.openjdk.org/jdk/pull/29039#issuecomment-3874469730 From kdnilsen at openjdk.org Mon Feb 9 23:57:57 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 9 Feb 2026 23:57:57 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v24] In-Reply-To: <95batM-97UOIYqamTcd-NbHYYeSzDSwhYqeWkAOWufg=.0fb157d7-850c-4c1c-9241-593b1cc972ed@github.com> References: <95batM-97UOIYqamTcd-NbHYYeSzDSwhYqeWkAOWufg=.0fb157d7-850c-4c1c-9241-593b1cc972ed@github.com> Message-ID: On Thu, 5 Feb 2026 18:18:16 GMT, Kelvin Nilsen wrote: >> After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: >> >> 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. >> 2. Sample allocation rates more frequently than once every 100 ms. >> 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. >> 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. > > Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 91 commits: > > - Merge remote-tracking branch 'jdk/master' into accelerated-triggers > - Make delay of acceleration trigger shorter > - Delay accelerated trigger until some garbage has accumulated > - Remove debug instrumentation > - no need to set_mutator_free_after_updaterefs > - Merge remote-tracking branch 'jdk/master' into accelerated-triggers > - some cosmetic improvements > - Use fewer samples to detect acceleration > - align log messages for trigger trace > - remove problematic debug messages > - ... and 81 more: https://git.openjdk.org/jdk/compare/949370ab...d6dfa2c7 During development and testing, we discovered that high percentile Extremem latencies are sensitive to startup overheads such as JIT compilation and GC learning cycles. For this reason, the rerun of Extremem tests adds the following option to its configuration: -dWarmupDuration=30s \ The reported results still show general improvement of accelerated triggers compared to baseline in all but the 16GB heap-size configuration. Screenshot 2026-02-09 at 3 54 47?PM ------------- PR Comment: https://git.openjdk.org/jdk/pull/29039#issuecomment-3874517530 From kdnilsen at openjdk.org Tue Feb 10 00:11:44 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 10 Feb 2026 00:11:44 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v25] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 93 commits: - Merge remote-tracking branch 'jdk/master' into accelerated-triggers - Fix whitespace and improve test for minimal allocations before next trigger - Merge remote-tracking branch 'jdk/master' into accelerated-triggers - Make delay of acceleration trigger shorter - Delay accelerated trigger until some garbage has accumulated - Remove debug instrumentation - no need to set_mutator_free_after_updaterefs - Merge remote-tracking branch 'jdk/master' into accelerated-triggers - some cosmetic improvements - Use fewer samples to detect acceleration - ... and 83 more: https://git.openjdk.org/jdk/compare/f9ded7f8...8a96de04 ------------- Changes: https://git.openjdk.org/jdk/pull/29039/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=24 Stats: 1007 lines in 24 files changed: 902 ins; 41 del; 64 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From kdnilsen at openjdk.org Tue Feb 10 02:01:02 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 10 Feb 2026 02:01:02 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v4] In-Reply-To: References: Message-ID: On Mon, 9 Feb 2026 22:43:06 GMT, William Kemper wrote: >> When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. > > William Kemper has updated the pull request incrementally with one additional commit since the last revision: > > Avoid update call when there is no work to be done Thanks for pulling this together. I think it is a very valuable improvement. ------------- Marked as reviewed by kdnilsen (Committer). PR Review: https://git.openjdk.org/jdk/pull/29511#pullrequestreview-3776290826 From kdnilsen at openjdk.org Tue Feb 10 02:01:06 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 10 Feb 2026 02:01:06 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v4] In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 17:31:58 GMT, William Kemper wrote: >> William Kemper has updated the pull request incrementally with one additional commit since the last revision: >> >> Avoid update call when there is no work to be done > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1558: > >> 1556: // coalesce-and-fill processing. >> 1557: r->end_preemptible_coalesce_and_fill(); >> 1558: _heap->old_generation()->clear_cards_for(r); > > Clearing the card table and object starts when allocating new old regions likely contributed to slower evacuations in old generation. Cards are now cleared when old regions are recycled. We must also do this when a full GC switches the affiliation of regions from young to old. Thanks for commenting on this detail. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2785369427 From kdnilsen at openjdk.org Tue Feb 10 02:01:09 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 10 Feb 2026 02:01:09 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v3] In-Reply-To: <3oIQ01y5cbdL-LwWyeJrToqomebnRHDXuIq1NNPFbKw=.ae31dea3-2cee-4148-8fa1-c29247d4edd9@github.com> References: <3oIQ01y5cbdL-LwWyeJrToqomebnRHDXuIq1NNPFbKw=.ae31dea3-2cee-4148-8fa1-c29247d4edd9@github.com> Message-ID: On Mon, 9 Feb 2026 21:53:02 GMT, William Kemper wrote: >> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 641: >> >>> 639: // when the in-place-promotion is completed. Such a region may be used for additional >>> 640: // promotions in the same cycle it was itself promoted. >>> 641: _card_scan->update_card_table(region->get_top_at_evac_start(), region->top()); >> >> parallel_heap_region_iterate(which is used by for_each_region) use single thread if the number of is <= 4096; the assumption is for most of lightweight task, for example, capturing TAMS at init mark, the overhead of multiple threads is more expensive than the task itself. For more complicated task, we may not want to use parallel_heap_region_iterate, I had a [PR](https://github.com/openjdk/jdk/pull/28613) recently to address this kind of issue in bitmap reset. >> >> I'm not sure update_card_table is suitable to use parallel_heap_region_iterate after reading the impl, I saw you also added timing metrics for it, you can do some simple test to verify it. > > I added it as a timed phase, but not as a parallel worker phase so it won't show the break down of time per thread. The work could be kind of "lumpy" in that only _some_ old regions will accepted evacuations. I will try some experiments to force parallelization. Maybe we make further efficiency improvements in a follow-on PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29511#discussion_r2785395884 From kdnilsen at openjdk.org Tue Feb 10 02:09:29 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Tue, 10 Feb 2026 02:09:29 GMT Subject: RFR: 8377396: GenShen: Consolidate and simplify in place region promotions In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 22:32:58 GMT, William Kemper wrote: > The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. Thanks for this cleanup. ------------- Marked as reviewed by kdnilsen (Committer). PR Review: https://git.openjdk.org/jdk/pull/29618#pullrequestreview-3776331575 From ayang at openjdk.org Tue Feb 10 08:02:42 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Tue, 10 Feb 2026 08:02:42 GMT Subject: RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: On Mon, 26 Jan 2026 16:58:25 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSParallelCompact` to use `Atomic`. > > Testing: tier1-5,gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29425#pullrequestreview-3777309024 From ayang at openjdk.org Tue Feb 10 08:07:46 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Tue, 10 Feb 2026 08:07:46 GMT Subject: RFR: 8376666: Convert G1BlockOffsetTable to use Atomic [v2] In-Reply-To: References: Message-ID: On Wed, 4 Feb 2026 09:35:37 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this conversion of the G1 block offset table to use `Atomic`. >> >> Testing: tier1-5, gha > > Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - * only change G1 BOT for now > - Merge branch 'master' into 8376666-convert-bot > - 8376666 > > Hi all, > > please review this conversion of the various block offset tables to use `Atomic`. Since they are very similar, and mostly changes from `uint8*` to `Atomic*` I merged the conversion together. > > It is not the goal to actually merge them into one class that all three collectors use. > > Testing: tier1-5, gha Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29482#pullrequestreview-3777328724 From ayang at openjdk.org Tue Feb 10 08:10:27 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Tue, 10 Feb 2026 08:10:27 GMT Subject: RFR: 8376328: Convert PLABStats to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 14:42:04 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert the `PLABStats` class to use `Atomic`. > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29420#pullrequestreview-3777339760 From ayang at openjdk.org Tue Feb 10 08:14:07 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Tue, 10 Feb 2026 08:14:07 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:11:43 GMT, SendaoYan wrote: > Hi all, > > Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. > The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. > > This PR change include: > > 1. the -Xmx seted to 64G > 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. > 3. Invoke whitebox.fullgc() explicitly, make sure the JFR check code has enough heap memory to finish. > > The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java line 64: > 62: } catch (java.lang.OutOfMemoryError e) { > 63: System.gc(); > 64: whitebox.fullGC(); Why manually invoking GC after OOM? Since we are not dropping refs to live-obj, I can't see that it will have any impact. Do you encounter test failures without these two lines? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29601#discussion_r2786425395 From tschatzl at openjdk.org Tue Feb 10 08:30:17 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:30:17 GMT Subject: RFR: 8376328: Convert PLABStats to use Atomic In-Reply-To: References: Message-ID: On Mon, 2 Feb 2026 17:22:34 GMT, Ivan Walulya wrote: >> Hi all, >> >> please review this change to convert the `PLABStats` class to use `Atomic`. >> >> Testing: gha >> >> Thanks, >> Thomas > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @albertnetymk for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29420#issuecomment-3876107496 From tschatzl at openjdk.org Tue Feb 10 08:30:21 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:30:21 GMT Subject: RFR: 8376666: Convert G1BlockOffsetTable to use Atomic [v2] In-Reply-To: References: Message-ID: <5MVSB80nFdzOnpcd-UAXO7qde3P6DjSXFZnVMPcjkOE=.ace3f964-4876-4aa1-a235-4ffbbdc61bdd@github.com> On Wed, 4 Feb 2026 13:09:48 GMT, Ivan Walulya wrote: >> Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: >> >> - * only change G1 BOT for now >> - Merge branch 'master' into 8376666-convert-bot >> - 8376666 >> >> Hi all, >> >> please review this conversion of the various block offset tables to use `Atomic`. Since they are very similar, and mostly changes from `uint8*` to `Atomic*` I merged the conversion together. >> >> It is not the goal to actually merge them into one class that all three collectors use. >> >> Testing: tier1-5, gha > > Marked as reviewed by iwalulya (Reviewer). Thanks @walulyai @albertnetymk for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29482#issuecomment-3876111090 From tschatzl at openjdk.org Tue Feb 10 08:31:57 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:31:57 GMT Subject: RFR: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: <6-IlBLdvqE_v8HGBixi95Vj4WgAXcSVnZuiTyUWGSpE=.a477b278-de45-46db-8bbc-ff227780f379@github.com> On Tue, 10 Feb 2026 08:00:15 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> please review this change to convert `PSParallelCompact` to use `Atomic`. >> >> Testing: tier1-5,gha >> >> Thanks, >> Thomas > > Marked as reviewed by ayang (Reviewer). Thanks @albertnetymk @walulyai for your reviews ------------- PR Comment: https://git.openjdk.org/jdk/pull/29425#issuecomment-3876103846 From tschatzl at openjdk.org Tue Feb 10 08:31:59 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:31:59 GMT Subject: Integrated: 8376353: Parallel: Convert PSParallelCompact classes to use Atomic In-Reply-To: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> References: <-5nTZabTnBZ5xbkLyrYTPKb7qYHO5FFrnHCaWYHWGSI=.be644ab7-3373-4ab0-9549-29290a532bdb@github.com> Message-ID: On Mon, 26 Jan 2026 16:58:25 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert `PSParallelCompact` to use `Atomic`. > > Testing: tier1-5,gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: 2c9c2f51 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/2c9c2f514be0928d15a0642058b98d73c494572f Stats: 51 lines in 2 files changed: 7 ins; 1 del; 43 mod 8376353: Parallel: Convert PSParallelCompact classes to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29425 From syan at openjdk.org Tue Feb 10 08:33:08 2026 From: syan at openjdk.org (SendaoYan) Date: Tue, 10 Feb 2026 08:33:08 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 08:11:43 GMT, Albert Mingkun Yang wrote: >> Hi all, >> >> Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. >> The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. >> >> This PR change include: >> >> 1. the -Xmx seted to 64G >> 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. >> 3. Invoke whitebox.fullgc() explicitly, make sure the JFR check code has enough heap memory to finish. >> >> The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. > > test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java line 64: > >> 62: } catch (java.lang.OutOfMemoryError e) { >> 63: System.gc(); >> 64: whitebox.fullGC(); > > Why manually invoking GC after OOM? Since we are not dropping refs to live-obj, I can't see that it will have any impact. > > Do you encounter test failures without these two lines? I was wondering the implicit GC after OOM does only free the young area. The intention of whitebox.fullgc is free the young and old heap. This is make sure there will enough free heap memory to continue the following test. I will try to remove these two lines and run this test later, to verify that does these two lines are redunt. Thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29601#discussion_r2786519995 From tschatzl at openjdk.org Tue Feb 10 08:34:46 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:34:46 GMT Subject: Integrated: 8376328: Convert PLABStats to use Atomic In-Reply-To: References: Message-ID: On Mon, 26 Jan 2026 14:42:04 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change to convert the `PLABStats` class to use `Atomic`. > > Testing: gha > > Thanks, > Thomas This pull request has now been integrated. Changeset: fef06c04 Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/fef06c04e74f509905e2229b0e2d1682aa5d3852 Stats: 27 lines in 3 files changed: 2 ins; 2 del; 23 mod 8376328: Convert PLABStats to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29420 From tschatzl at openjdk.org Tue Feb 10 08:34:47 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Tue, 10 Feb 2026 08:34:47 GMT Subject: Integrated: 8376666: Convert G1BlockOffsetTable to use Atomic In-Reply-To: References: Message-ID: On Thu, 29 Jan 2026 09:22:07 GMT, Thomas Schatzl wrote: > Hi all, > > please review this conversion of the G1 block offset table to use `Atomic`. > > Testing: tier1-5, gha This pull request has now been integrated. Changeset: f124f86f Author: Thomas Schatzl URL: https://git.openjdk.org/jdk/commit/f124f86f4304fbb62aabdef8f2d480d197aaa1b3 Stats: 45 lines in 3 files changed: 1 ins; 1 del; 43 mod 8376666: Convert G1BlockOffsetTable to use Atomic Reviewed-by: iwalulya, ayang ------------- PR: https://git.openjdk.org/jdk/pull/29482 From iwalulya at openjdk.org Tue Feb 10 09:12:37 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Tue, 10 Feb 2026 09:12:37 GMT Subject: RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v12] In-Reply-To: References: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> Message-ID: On Mon, 9 Feb 2026 17:13:38 GMT, luben karavelov wrote: >> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision: >> >> space > > Looks that this causes intermittent data corruption when using zstd-jni. Reported in https://github.com/luben/zstd-jni/issues/377 @luben, could you please file an issue at https://bugreport.java.com/ or send an email to hotspot-gc-dev at openjdk.org so we can follow up on this outside of the current PR? When filing, please include any relevant hs_err logs or logs with verification enabled to help with diagnosing the issue. Additionally, could you test with JDK 26 to confirm whether the issue persists in later versions? ------------- PR Comment: https://git.openjdk.org/jdk/pull/22015#issuecomment-3876325802 From syan at openjdk.org Tue Feb 10 12:11:26 2026 From: syan at openjdk.org (SendaoYan) Date: Tue, 10 Feb 2026 12:11:26 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v2] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 08:29:34 GMT, SendaoYan wrote: >> test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java line 64: >> >>> 62: } catch (java.lang.OutOfMemoryError e) { >>> 63: System.gc(); >>> 64: whitebox.fullGC(); >> >> Why manually invoking GC after OOM? Since we are not dropping refs to live-obj, I can't see that it will have any impact. >> >> Do you encounter test failures without these two lines? > > I was wondering the implicit GC after OOM does only free the young area. The intention of whitebox.fullgc is free the young and old heap. This is make sure there will enough free heap memory to continue the following test. > > I will try to remove these two lines and run this test later, to verify that does these two lines are redunt. > > Thanks. I remove the explict System.gc() and whitebox.fullgc() and then run this test 10k times on the same machin which observed intermittent OOME, all tests passed. So I think the explict gc invoke do not needed. I have remove it. Thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29601#discussion_r2787577393 From syan at openjdk.org Tue Feb 10 12:11:23 2026 From: syan at openjdk.org (SendaoYan) Date: Tue, 10 Feb 2026 12:11:23 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v2] In-Reply-To: References: Message-ID: > Hi all, > > Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. > The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. > > This PR change include: > > 1. the -Xmx seted to 64G > 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. > > The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. SendaoYan has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary explict gc() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29601/files - new: https://git.openjdk.org/jdk/pull/29601/files/5e7f914f..de5fd628 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29601&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29601&range=00-01 Stats: 10 lines in 1 file changed: 0 ins; 9 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29601.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29601/head:pull/29601 PR: https://git.openjdk.org/jdk/pull/29601 From ayang at openjdk.org Tue Feb 10 13:10:17 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Tue, 10 Feb 2026 13:10:17 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v2] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 12:11:23 GMT, SendaoYan wrote: >> Hi all, >> >> Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. >> The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. >> >> This PR change include: >> >> 1. the -Xmx seted to 64G >> 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. >> >> The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary explict gc() test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java line 51: > 49: > 50: // Allocate many large objects quickly, to outrun the GC > 51: try { Why using `try-catch` here, now that the `catch` block is empty? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29601#discussion_r2787864797 From aph at openjdk.org Tue Feb 10 13:13:31 2026 From: aph at openjdk.org (Andrew Haley) Date: Tue, 10 Feb 2026 13:13:31 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> Message-ID: On Mon, 9 Feb 2026 14:06:18 GMT, Evgeny Astigeevich wrote: > I don't have unaffected N1 to check. Out of curiosity, does unaffected N1 exist in any cloud? > > I think it would not be slower. Right, so let's turn this on for all N1. Then we can be sure that it gets tested. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3877509075 From syan at openjdk.org Tue Feb 10 14:17:11 2026 From: syan at openjdk.org (SendaoYan) Date: Tue, 10 Feb 2026 14:17:11 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v2] In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 13:07:50 GMT, Albert Mingkun Yang wrote: >> SendaoYan has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove unnecessary explict gc() > > test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java line 51: > >> 49: >> 50: // Allocate many large objects quickly, to outrun the GC >> 51: try { > > Why using `try-catch` here, now that the `catch` block is empty? After the max heap memory change from 32M to 64M, this new 4MB object still trigger OOME intermittently, so we need try catch the OOME and ignore it. Seems that GC maybe slower than object creation sometimes on some specific machines. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29601#discussion_r2788217967 From rsunderbabu at openjdk.org Tue Feb 10 15:23:59 2026 From: rsunderbabu at openjdk.org (Ramkumar Sunderbabu) Date: Tue, 10 Feb 2026 15:23:59 GMT Subject: RFR: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless Message-ID: Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. The test is susceptible to issues like JDK-8299023 and JDK-8323635 Testing: Local testing with and without flags all higher tiers that run hotspot_gc group ------------- Commit messages: - mark flagless Changes: https://git.openjdk.org/jdk/pull/29656/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29656&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8373041 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29656.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29656/head:pull/29656 PR: https://git.openjdk.org/jdk/pull/29656 From tschatzl at openjdk.org Wed Feb 11 09:28:34 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 11 Feb 2026 09:28:34 GMT Subject: RFR: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 15:06:57 GMT, Ramkumar Sunderbabu wrote: > Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. > The test is susceptible to issues like JDK-8299023 and JDK-8323635 > > Testing: > Local testing with and without flags > all higher tiers that run hotspot_gc group Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29656#pullrequestreview-3783652315 From kdnilsen at openjdk.org Wed Feb 11 09:30:14 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 09:30:14 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Sat, 7 Feb 2026 01:35:40 GMT, Kelvin Nilsen wrote: >> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: >> >> Add assert_bounds_not_changed as Kelvin suggested > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1197: > >> 1195: "Mutator humongous waste must match"); >> 1196: } >> 1197: > > I realize I requested/suggested this, but upon further thought, I wonder if this is too strong. > > IIRC, sometimes the leftmost_empty(partition) does not represent the left-most empty partition. Sometimes it is just a left-most bound on the first empty partition. The less demanding sanity check is probably: > > assert((leftmost_empty(partition) == _max) || (leftmost_empty(partition >= leftmost(partition)) > > Similarly for rightmost_empty(partition). > > As rewritten, I believe this is sufficient to handle the case that leftmost(partition) == _max or rightmost(partition) == -1. Whenever leftmost(partition) == max or righmost(partition) == -1, the leftmost_empty(partition) should equal _max and righmost_empty(partition) should equal -1. In the existing assert_bounds() implementation, I note that we assert the following: 1. The left-most found empty region is >= _leftmosts_empty[] 2. The right-most found empty region is <= _righmosts_empty[] ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2790171950 From kdnilsen at openjdk.org Wed Feb 11 09:30:16 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 09:30:16 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: <4KLO23BrYK7uGOLms3i6-HDDpu5SqN9SA5BNyrVt9hw=.f27153e7-5f59-4872-bf53-7d4435f85acd@github.com> On Tue, 10 Feb 2026 20:40:14 GMT, Kelvin Nilsen wrote: >> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1197: >> >>> 1195: "Mutator humongous waste must match"); >>> 1196: } >>> 1197: >> >> I realize I requested/suggested this, but upon further thought, I wonder if this is too strong. >> >> IIRC, sometimes the leftmost_empty(partition) does not represent the left-most empty partition. Sometimes it is just a left-most bound on the first empty partition. The less demanding sanity check is probably: >> >> assert((leftmost_empty(partition) == _max) || (leftmost_empty(partition >= leftmost(partition)) >> >> Similarly for rightmost_empty(partition). >> >> As rewritten, I believe this is sufficient to handle the case that leftmost(partition) == _max or rightmost(partition) == -1. Whenever leftmost(partition) == max or righmost(partition) == -1, the leftmost_empty(partition) should equal _max and righmost_empty(partition) should equal -1. > > In the existing assert_bounds() implementation, I note that we assert the following: > 1. The left-most found empty region is >= _leftmosts_empty[] > 2. The right-most found empty region is <= _righmosts_empty[] We're trying to avoid the costs of "finding" the left-most and right-most empty regions, so that assert won't work here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2790174337 From btaylor at openjdk.org Wed Feb 11 09:33:03 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 09:33:03 GMT Subject: RFR: 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic Message-ID: Modernizes ShenandoahLock code by replacing AtomicAccess methods with Atomic types. Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. ------------- Commit messages: - 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic Changes: https://git.openjdk.org/jdk/pull/29658/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29658&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377045 Stats: 20 lines in 2 files changed: 1 ins; 1 del; 18 mod Patch: https://git.openjdk.org/jdk/pull/29658.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29658/head:pull/29658 PR: https://git.openjdk.org/jdk/pull/29658 From wkemper at openjdk.org Wed Feb 11 09:33:08 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 09:33:08 GMT Subject: RFR: 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 17:59:56 GMT, Ben Taylor wrote: > Modernizes ShenandoahLock code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. Looks good to me, but we should give @pengxiaolong a heads up because this will likely cause merge conflicts with https://github.com/openjdk/jdk/pull/29543. ------------- Marked as reviewed by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29658#pullrequestreview-3782165251 From xpeng at openjdk.org Wed Feb 11 09:33:15 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 11 Feb 2026 09:33:15 GMT Subject: RFR: 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic In-Reply-To: References: Message-ID: <87DcKpTTSel4JoKQ4pEoBqxYGoLsggIZTg9dTMP9UZc=.bef0f008-f8b8-41d9-8528-ad66abc5f729@github.com> On Tue, 10 Feb 2026 17:59:56 GMT, Ben Taylor wrote: > Modernizes ShenandoahLock code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. It looks good to me. I will merge the change to my pr once you get this integrated. ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29658#pullrequestreview-3782203852 From tschatzl at openjdk.org Wed Feb 11 09:33:48 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 11 Feb 2026 09:33:48 GMT Subject: RFR: 8377164: G1: Clean up g1BlockOffsetTable.hpp Message-ID: Hi all, please review this cleanup of `g1BlockOffsetTable` files: * fix includes * move non-one-liners to hpp file * move method implementations only referenced in cpp file to cpp file * made some methods static Testing: gha Thanks, Thomas ------------- Commit messages: - 8377164 Changes: https://git.openjdk.org/jdk/pull/29649/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29649&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377164 Stats: 45 lines in 3 files changed: 20 ins; 21 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/29649.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29649/head:pull/29649 PR: https://git.openjdk.org/jdk/pull/29649 From wkemper at openjdk.org Wed Feb 11 09:34:14 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 09:34:14 GMT Subject: RFR: 8377396: GenShen: Consolidate and simplify in place region promotions [v2] In-Reply-To: References: Message-ID: > The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. William Kemper has updated the pull request incrementally with one additional commit since the last revision: Need to include inline headers ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29618/files - new: https://git.openjdk.org/jdk/pull/29618/files/e9dbb7fa..9872788d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29618&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29618&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29618.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29618/head:pull/29618 PR: https://git.openjdk.org/jdk/pull/29618 From syan at openjdk.org Wed Feb 11 09:34:46 2026 From: syan at openjdk.org (SendaoYan) Date: Wed, 11 Feb 2026 09:34:46 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: References: Message-ID: > Hi all, > > Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. > The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. > > This PR change include: > > 1. the -Xmx seted to 64G > 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. > > The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. SendaoYan has updated the pull request incrementally with one additional commit since the last revision: Remove unnecessary try-catch(OOME) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29601/files - new: https://git.openjdk.org/jdk/pull/29601/files/de5fd628..e7296f96 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29601&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29601&range=01-02 Stats: 5 lines in 1 file changed: 0 ins; 3 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29601.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29601/head:pull/29601 PR: https://git.openjdk.org/jdk/pull/29601 From duke at openjdk.org Wed Feb 11 09:46:06 2026 From: duke at openjdk.org (luben karavelov) Date: Wed, 11 Feb 2026 09:46:06 GMT Subject: RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v12] In-Reply-To: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> References: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> Message-ID: On Wed, 5 Feb 2025 13:40:59 GMT, Ivan Walulya wrote: >> Hi all, >> >> Please review this change to assign multiple collection candidate regions to a single instance of a G1CardSet. Currently, we maintain a 1:1 mapping of old-gen regions and G1CardSet instances, assuming these regions are collected independently. However, regions are collected in batches for performance reasons to meet the G1MixedGCCountTarget. >> >> In this change, at the end of the Remark phase, we batch regions that we anticipate will be collected together into a collection group while selecting remembered set rebuild candidates. Regions in a collection group should be evacuated at the same time because they are assigned to the same G1CardSet instances. This implies that we do not need to maintain cross-region remembered set entries for regions within the same collection group. >> >> The benefit is a reduction in the memory overhead of the remembered set and the remembered set merge time during the collection pause. One disadvantage is that this approach decreases the flexibility during evacuation: you can only evacuate all regions that share a particular G1CardSet at the same time. Another downside is that pinned regions that are part of a collection group have to be partially evacuated when the collection group is selected for evacuation. This removes the optimization in the mainline implementation where the pinned regions are skipped to allow for potential unpinning before evacuation. >> >> In this change, we make significant changes to the collection set implementation as we switch to group selection instead of region selection. Consequently, many of the changes in the PR are about switching from region-centered collection set selection to a group-centered approach. >> >> Note: The batching is based on the sort order by reclaimable bytes which may change the evacuation order in which regions would have been evacuated when sorted by gc efficiency. >> >> We have not observed any regressions on internal performance testing platforms. Memory comparisons for the Cachestress benchmark for different heap sizes are attached below. >> >> Testing: Mach5 Tier1-6 >> >> ![16GB](https://github.com/user-attachments/assets/3224c2f1-172d-4d76-ba28-bf483b1b1c95) >> ![32G](https://github.com/user-attachments/assets/abd10537-41a9-4cf9-b668-362af12fe949) >> ![64GB](https://github.com/user-attachments/assets/fa87eefc-cf8a-4fb5-9fc4-e7151498bf73) >> ![128GB](https://github.com/user-attachments/assets/c3a59e32-6bd7-43e3-a3e4-c472f71aa544) > > Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision: > > space I think it's better @cxzl25 to file the bug report as he found the issue and has all the details - they are in the above mentioned issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22015#issuecomment-3881724084 From btaylor at openjdk.org Wed Feb 11 09:46:24 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 09:46:24 GMT Subject: Integrated: 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic Message-ID: Modernizes ShenandoahSharedVariables code by replacing AtomicAccess methods with Atomic types. Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. ------------- Commit messages: - Fix whitespace - 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic Changes: https://git.openjdk.org/jdk/pull/29594/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29594&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377200 Stats: 46 lines in 1 file changed: 0 ins; 14 del; 32 mod Patch: https://git.openjdk.org/jdk/pull/29594.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29594/head:pull/29594 PR: https://git.openjdk.org/jdk/pull/29594 From wkemper at openjdk.org Wed Feb 11 09:46:38 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 09:46:38 GMT Subject: Integrated: 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic In-Reply-To: References: Message-ID: <3WHCjn2lTN6SDJosetu8Awsn-uf97w5fg81sF8iRwkI=.74bc0a93-d60e-4c50-9340-daa8fc003e9f@github.com> On Thu, 5 Feb 2026 21:18:05 GMT, Ben Taylor wrote: > Modernizes ShenandoahSharedVariables code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. Looks good, one spot where indentation looks off. Thank you for the changes. src/hotspot/share/gc/shenandoah/shenandoahSharedVariables.hpp line 134: > 132: ShenandoahSharedValue mask_val = (ShenandoahSharedValue) mask; > 133: while (true) { > 134: ShenandoahSharedValue ov = value.load_acquire(); Indentation a little off here? src/hotspot/share/gc/shenandoah/shenandoahSharedVariables.hpp line 186: > 184: } > 185: > 186: volatile ShenandoahSharedValue* addr_of() { I take it nobody is using this? ------------- Changes requested by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29594#pullrequestreview-3765667166 Marked as reviewed by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29594#pullrequestreview-3782352641 PR Review Comment: https://git.openjdk.org/jdk/pull/29594#discussion_r2776513147 PR Review Comment: https://git.openjdk.org/jdk/pull/29594#discussion_r2776514072 From xpeng at openjdk.org Wed Feb 11 09:46:42 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 11 Feb 2026 09:46:42 GMT Subject: Integrated: 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 21:18:05 GMT, Ben Taylor wrote: > Modernizes ShenandoahSharedVariables code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. LGTM! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29594#pullrequestreview-3780330241 From btaylor at openjdk.org Wed Feb 11 09:46:51 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 09:46:51 GMT Subject: Integrated: 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic In-Reply-To: <3WHCjn2lTN6SDJosetu8Awsn-uf97w5fg81sF8iRwkI=.74bc0a93-d60e-4c50-9340-daa8fc003e9f@github.com> References: <3WHCjn2lTN6SDJosetu8Awsn-uf97w5fg81sF8iRwkI=.74bc0a93-d60e-4c50-9340-daa8fc003e9f@github.com> Message-ID: On Sat, 7 Feb 2026 00:22:15 GMT, William Kemper wrote: >> Modernizes ShenandoahSharedVariables code by replacing AtomicAccess methods with Atomic types. >> >> Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. > > src/hotspot/share/gc/shenandoah/shenandoahSharedVariables.hpp line 186: > >> 184: } >> 185: >> 186: volatile ShenandoahSharedValue* addr_of() { > > I take it nobody is using this? Correct. There are no uses of this method, and after this change it would break encapsulation on the `Atomic`, so it seemed best to remove it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29594#discussion_r2784137925 From btaylor at openjdk.org Wed Feb 11 09:46:54 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 09:46:54 GMT Subject: Integrated: 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic In-Reply-To: References: Message-ID: On Thu, 5 Feb 2026 21:18:05 GMT, Ben Taylor wrote: > Modernizes ShenandoahSharedVariables code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. This pull request has now been integrated. Changeset: 8455b668 Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/8455b668104f97bc152985299a7814646c9fb1fd Stats: 46 lines in 1 file changed: 0 ins; 14 del; 32 mod 8377200: Shenandoah: Convert shenandoahSharedVariables and related code to use Atomic Reviewed-by: wkemper, xpeng ------------- PR: https://git.openjdk.org/jdk/pull/29594 From aboldtch at openjdk.org Wed Feb 11 12:49:28 2026 From: aboldtch at openjdk.org (Axel Boldt-Christmas) Date: Wed, 11 Feb 2026 12:49:28 GMT Subject: RFR: 8372244: ZGC: Split ZTest into a VM and not VM test fixture [v4] In-Reply-To: References: Message-ID: <9vulvcY7wohy1zSOJAszbsP8Nekt_m8oyTFlGc9Zck0=.1fd2a4f8-dc01-44a1-b337-3222b9815856@github.com> > The `ZTest` GTest fixture is used for both VM and not VM tests, however the implementation requires VM. The not VM tests which use it are only interested in a sub-set of its features. > > I propose we split `ZTest` into a hierarchy of fixtures, one for not VM tests, and the other for VM tests. > > I could not find an easy way to identity which category of test a fixture is used in, so for now we just have to be diligent to use the appropriate fixture. > > We do have an assumption here that `os::next_random` is fine to call without having setup the VM. If this is changes in future we would have to add a not VM dependent prng function. > > Also the VMless fixture do not test if the OS is supported, as it might require VM features to work. But tests which run without VM should not be dependent if the VM is OS is supported. Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit: ZGC: Split ZTest into a VM and not VM test fixture ------------- Changes: https://git.openjdk.org/jdk/pull/28414/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28414&range=03 Stats: 47 lines in 10 files changed: 16 ins; 9 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/28414.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28414/head:pull/28414 PR: https://git.openjdk.org/jdk/pull/28414 From duke at openjdk.org Wed Feb 11 12:53:11 2026 From: duke at openjdk.org (cxzl25) Date: Wed, 11 Feb 2026 12:53:11 GMT Subject: RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v12] In-Reply-To: References: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> Message-ID: On Tue, 10 Feb 2026 09:10:32 GMT, Ivan Walulya wrote: >> Looks that this causes intermittent data corruption when using zstd-jni. Reported in https://github.com/luben/zstd-jni/issues/377 > > @luben, could you please file an issue at https://bugreport.java.com/ or send an email to hotspot-gc-dev at openjdk.org so we can follow up on this outside of the current PR? When filing, please include any relevant hs_err logs or logs with verification enabled to help with diagnosing the issue. Additionally, could you test with JDK 26 to confirm whether the issue persists in later versions? @walulyai Following your advice, I began to attempt validation testing on JDK 26, and ultimately found that this bug was resolved by the ticket JDK-8370807. However, it has not been backported to JDK 25, and its type is Enhancement. Do I still need to send an email to report this issue? --- 8370807: G1: Improve region attribute table method naming https://bugs.openjdk.org/browse/JDK-8370807 Fix Version/s: 26 Resolved In Build:b22 https://github.com/openjdk/jdk/pull/28038 --- I suspect that `r->has_pinned_objects()` is the key fix. Image ------------- PR Comment: https://git.openjdk.org/jdk/pull/22015#issuecomment-3884190970 From kevinw at openjdk.org Wed Feb 11 13:54:54 2026 From: kevinw at openjdk.org (Kevin Walls) Date: Wed, 11 Feb 2026 13:54:54 GMT Subject: RFR: 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java [v2] In-Reply-To: <3pxWosqynbCpFwE_ka1kYLtMWKLkuybs8HxuneY1fTA=.1041f2d9-2ccf-4172-8196-2ca97feedb93@github.com> References: <3pxWosqynbCpFwE_ka1kYLtMWKLkuybs8HxuneY1fTA=.1041f2d9-2ccf-4172-8196-2ca97feedb93@github.com> Message-ID: On Mon, 9 Feb 2026 21:27:47 GMT, Albert Mingkun Yang wrote: >> Remove the `if (isTenuredParallelGC) {` path in `JstatGcCapacityResults.java` because ParallelGC ensures `NGC == S0C + S1C + EC` like other GCs nowadays. >> >> Test: tier1-5 > > Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - copyright > - Merge branch 'master' into pgc-svc-remove-if-check > - pgc-svc-remove-if-check Looks good! ------------- Marked as reviewed by kevinw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29562#pullrequestreview-3784953413 From ayang at openjdk.org Wed Feb 11 14:06:09 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 11 Feb 2026 14:06:09 GMT Subject: RFR: 8377561: ParallelGC in JDK26-ea intermittently fails to expand heap, causing Full GC storm on macOS Message-ID: `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561). Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing. The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix. Test: tier1-5 ------------- Commit messages: - pgc-young-gen-alloc-threshold Changes: https://git.openjdk.org/jdk/pull/29673/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29673&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377561 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29673.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29673/head:pull/29673 PR: https://git.openjdk.org/jdk/pull/29673 From duke at openjdk.org Wed Feb 11 14:05:06 2026 From: duke at openjdk.org (Yuming Wang) Date: Wed, 11 Feb 2026 14:05:06 GMT Subject: RFR: 8370807: G1: Improve region attribute table method naming [v5] In-Reply-To: References: <5MByrpesDIs5r_GYWIECbildQ8_zlVDlUcRAd_gkN3g=.457602c4-0d03-4ce4-92f6-e1d4fd8c4e06@github.com> Message-ID: On Thu, 30 Oct 2025 07:33:12 GMT, Thomas Schatzl wrote: >> Change looks good, but the bug-title could be updated to reflect that this is not just a change to a comment. > > Thanks @kstefanj @walulyai @albertnetymk for your reviews @tschatzl Is it possible to backport this patch to JDK 25? It appears to fix data corruption issues when using Java 25 with G1. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28038#issuecomment-3884630322 From iwalulya at openjdk.org Wed Feb 11 14:09:58 2026 From: iwalulya at openjdk.org (Ivan Walulya) Date: Wed, 11 Feb 2026 14:09:58 GMT Subject: RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v12] In-Reply-To: References: <3ru13KcIWif1mzPnCckRryxaW6g3AkrIJvTBIaaCRNQ=.6c12262e-7b05-40df-8341-ae8141983237@github.com> Message-ID: On Wed, 11 Feb 2026 12:42:36 GMT, cxzl25 wrote: >> @luben, could you please file an issue at https://bugreport.java.com/ or send an email to hotspot-gc-dev at openjdk.org so we can follow up on this outside of the current PR? When filing, please include any relevant hs_err logs or logs with verification enabled to help with diagnosing the issue. Additionally, could you test with JDK 26 to confirm whether the issue persists in later versions? > > @walulyai Following your advice, I began to attempt validation testing on JDK 26, and ultimately found that this bug was resolved by the ticket JDK-8370807. However, it has not been backported to JDK 25, and its type is Enhancement. > > Do I still need to send an email to report this issue? > > --- > 8370807: G1: Improve region attribute table method naming > https://bugs.openjdk.org/browse/JDK-8370807 > Fix Version/s: 26 > Resolved In Build:b22 > https://github.com/openjdk/jdk/pull/28038 > > --- > I suspect that `r->has_pinned_objects()` is the key fix. > > Image > > --- > > I have cherry?picked commit 17fd801b onto 86cec4ea, and it has been verified in the production environment that this fixes the zstd?jni data corruption issue. > > https://github.com/cxzl25/jdk/commits/test_g1/ @cxzl25, thank you for the investigation. There is no need to send the email at this time; we will look into how to backport the fix to 25. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22015#issuecomment-3884658022 From ayang at openjdk.org Wed Feb 11 14:24:33 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 11 Feb 2026 14:24:33 GMT Subject: RFR: 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java [v2] In-Reply-To: <3pxWosqynbCpFwE_ka1kYLtMWKLkuybs8HxuneY1fTA=.1041f2d9-2ccf-4172-8196-2ca97feedb93@github.com> References: <3pxWosqynbCpFwE_ka1kYLtMWKLkuybs8HxuneY1fTA=.1041f2d9-2ccf-4172-8196-2ca97feedb93@github.com> Message-ID: <6yiRFeAOK_huSgH1ufFIGkuw_7TWkhelbkgtZMIc9v0=.9e3b0c97-b053-475b-87ec-1a293cea46c1@github.com> On Mon, 9 Feb 2026 21:27:47 GMT, Albert Mingkun Yang wrote: >> Remove the `if (isTenuredParallelGC) {` path in `JstatGcCapacityResults.java` because ParallelGC ensures `NGC == S0C + S1C + EC` like other GCs nowadays. >> >> Test: tier1-5 > > Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: > > - copyright > - Merge branch 'master' into pgc-svc-remove-if-check > - pgc-svc-remove-if-check Thanks for review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29562#issuecomment-3884744790 From ayang at openjdk.org Wed Feb 11 14:26:47 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 11 Feb 2026 14:26:47 GMT Subject: Integrated: 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java In-Reply-To: References: Message-ID: <4zQC4pEkHH4ej_S-8GO_8pmhZFNG3xSl12gqSCAShT0=.4d84829e-66c1-4b8b-8efa-8139140d0f5c@github.com> On Wed, 4 Feb 2026 08:03:59 GMT, Albert Mingkun Yang wrote: > Remove the `if (isTenuredParallelGC) {` path in `JstatGcCapacityResults.java` because ParallelGC ensures `NGC == S0C + S1C + EC` like other GCs nowadays. > > Test: tier1-5 This pull request has now been integrated. Changeset: b3fc013b Author: Albert Mingkun Yang URL: https://git.openjdk.org/jdk/commit/b3fc013b4f8171c8ee735d6fdcad696ae6e431ee Stats: 31 lines in 1 file changed: 0 ins; 26 del; 5 mod 8377143: Parallel: Remove special treatment in JstatGcCapacityResults.java Reviewed-by: kevinw, tschatzl ------------- PR: https://git.openjdk.org/jdk/pull/29562 From ayang at openjdk.org Wed Feb 11 14:42:45 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Wed, 11 Feb 2026 14:42:45 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 09:34:46 GMT, SendaoYan wrote: >> Hi all, >> >> Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. >> The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. >> >> This PR change include: >> >> 1. the -Xmx seted to 64G >> 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. >> >> The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary try-catch(OOME) > ... With the original count 100, the jfr event numbers couned to zero intermittely. Is that also observed with 64M heap size, or just the original 32M heap size? ------------- PR Comment: https://git.openjdk.org/jdk/pull/29601#issuecomment-3884864245 From duke at openjdk.org Wed Feb 11 15:40:29 2026 From: duke at openjdk.org (duke) Date: Wed, 11 Feb 2026 15:40:29 GMT Subject: RFR: 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 17:59:56 GMT, Ben Taylor wrote: > Modernizes ShenandoahLock code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. @benty-amzn Your change (at version cee8a7ede8d93df45589522083c7438c2a6cd21b) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29658#issuecomment-3885240231 From tschatzl at openjdk.org Wed Feb 11 15:48:31 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Wed, 11 Feb 2026 15:48:31 GMT Subject: RFR: 8377561: Parallel: Large allocations cause Full GC storm without heap expansion In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 13:57:02 GMT, Albert Mingkun Yang wrote: > `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561). > > Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing. > > The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix. > > Test: tier1-5 Marked as reviewed by tschatzl (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29673#pullrequestreview-3785642660 From btaylor at openjdk.org Wed Feb 11 17:05:13 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 17:05:13 GMT Subject: Integrated: 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 17:59:56 GMT, Ben Taylor wrote: > Modernizes ShenandoahLock code by replacing AtomicAccess methods with Atomic types. > > Tier1 test results on x86_64 linux are the same before and after this change when running with TEST_VM_OPTS=-XX:+UseShenandoahGC. This pull request has now been integrated. Changeset: 708970a1 Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/708970a1a6f9c05f21d15918066a07d7f896a04a Stats: 20 lines in 2 files changed: 1 ins; 1 del; 18 mod 8377045: Shenandoah: Convert ShenandoahLock related code to use Atomic Reviewed-by: wkemper, xpeng ------------- PR: https://git.openjdk.org/jdk/pull/29658 From kdnilsen at openjdk.org Wed Feb 11 17:53:57 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 17:53:57 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed Message-ID: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. ------------- Commit messages: - polish comments - Add comments to explain delicate balance between promo-reserve and mutation budget - Revert gratuitous formatting changes - Fix calculation of old_reserve when memory in short supply - Merge remote-tracking branch 'jdk/master' into fix-share-reserves-assert-error - Shrink old reserve when memory is in short supply - Add debug logs to help diagnose reproducer Changes: https://git.openjdk.org/jdk/pull/29621/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29621&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377142 Stats: 115 lines in 1 file changed: 60 ins; 31 del; 24 mod Patch: https://git.openjdk.org/jdk/pull/29621.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29621/head:pull/29621 PR: https://git.openjdk.org/jdk/pull/29621 From kdnilsen at openjdk.org Wed Feb 11 17:53:58 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 17:53:58 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed In-Reply-To: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: On Sat, 7 Feb 2026 00:50:59 GMT, Kelvin Nilsen wrote: > In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. This is marked as draft because the fix is not yet implemented. I am publishing the code in draft form in hopes of reproducing the original error with debug instrumentation in place. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29621#issuecomment-3863207195 From wkemper at openjdk.org Wed Feb 11 18:16:08 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 18:16:08 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed In-Reply-To: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: On Sat, 7 Feb 2026 00:50:59 GMT, Kelvin Nilsen wrote: > In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. I'd prefer more meaningful assertion messages. I feel it gives you a leg up when debugging. src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 685: > 683: } > 684: } > 685: assert(reserve_for_mixed + reserve_for_promo <= max_old_reserve, "sanity"); Suggestion: assert(reserve_for_mixed + reserve_for_promo <= max_old_reserve, "Reserve for mixed (%zu) and reserve for promotions (%zu) must be less than maximum old reserve (%zu)", reserve_for_mixed, reserve_for_promo, max_old_reserve); src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 771: > 769: young_available -= old_region_deficit * region_size_bytes; > 770: > 771: assert(old_available < old_reserve, "sanity"); Suggestion: assert(old_available < old_reserve, "Old available (%zu) must be less than old reserve (%zu)", old_available, old_reserve); src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 787: > 785: } > 786: > 787: assert(old_region_deficit == 0 || old_region_surplus == 0, "Only surplus or deficit, never both"); Suggestion: assert(old_region_deficit == 0 || old_region_surplus == 0, "Only surplus (%zu) or deficit (%zu), never both", old_region_surplus, old_region_deficit); ------------- Changes requested by wkemper (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29621#pullrequestreview-3786395944 PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2794712634 PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2794728306 PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2794747812 From wkemper at openjdk.org Wed Feb 11 18:16:10 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 18:16:10 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed In-Reply-To: References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: On Wed, 11 Feb 2026 18:07:09 GMT, William Kemper wrote: >> In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. > > src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 771: > >> 769: young_available -= old_region_deficit * region_size_bytes; >> 770: >> 771: assert(old_available < old_reserve, "sanity"); > > Suggestion: > > assert(old_available < old_reserve, "Old available (%zu) must be less than old reserve (%zu)", old_available, old_reserve); I understand what these variables represent, but their names make this comparison feel backward. Shouldn't the reserve rather be limited by what is available? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2794742800 From btaylor at openjdk.org Wed Feb 11 18:21:28 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 18:21:28 GMT Subject: RFR: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic Message-ID: Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` ------------- Commit messages: - 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic Changes: https://git.openjdk.org/jdk/pull/29676/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29676&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377044 Stats: 23 lines in 4 files changed: 1 ins; 0 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/29676.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29676/head:pull/29676 PR: https://git.openjdk.org/jdk/pull/29676 From wkemper at openjdk.org Wed Feb 11 18:43:06 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 18:43:06 GMT Subject: RFR: 8377396: GenShen: Consolidate and simplify in place region promotions [v3] In-Reply-To: References: Message-ID: > The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. William Kemper has updated the pull request incrementally with one additional commit since the last revision: Add new line ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29618/files - new: https://git.openjdk.org/jdk/pull/29618/files/9872788d..c1cf97ad Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29618&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29618&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29618.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29618/head:pull/29618 PR: https://git.openjdk.org/jdk/pull/29618 From shade at openjdk.org Wed Feb 11 19:08:02 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Wed, 11 Feb 2026 19:08:02 GMT Subject: RFR: 8377396: GenShen: Consolidate and simplify in place region promotions [v3] In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:43:06 GMT, William Kemper wrote: >> The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. > > William Kemper has updated the pull request incrementally with one additional commit since the last revision: > > Add new line Marked as reviewed by shade (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29618#pullrequestreview-3786716486 From wkemper at openjdk.org Wed Feb 11 20:14:41 2026 From: wkemper at openjdk.org (William Kemper) Date: Wed, 11 Feb 2026 20:14:41 GMT Subject: Integrated: 8377396: GenShen: Consolidate and simplify in place region promotions In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 22:32:58 GMT, William Kemper wrote: > The logic to select and execute in place region promotions is spread out across different files. This is a mechanical refactoring to simplify the code and encapsulate the abstraction. This pull request has now been integrated. Changeset: e515c10f Author: William Kemper URL: https://git.openjdk.org/jdk/commit/e515c10f3a092955c847c88dcadebb763a807852 Stats: 702 lines in 6 files changed: 407 ins; 279 del; 16 mod 8377396: GenShen: Consolidate and simplify in place region promotions Reviewed-by: shade, kdnilsen ------------- PR: https://git.openjdk.org/jdk/pull/29618 From kdnilsen at openjdk.org Wed Feb 11 23:01:03 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 23:01:03 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v3] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: <0Ez9zE3Rf1m-DYUEbBNsqALWP8uschFntNST_JUQS9w=.a07320e1-a33e-4294-b2f0-b65634a9156c@github.com> On Wed, 4 Feb 2026 00:58:58 GMT, Xiaolong Peng wrote: >> This fix the problem causing following 3 jtreg tests with tlab disabled to fail: >> >> gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all >> >> >> >> The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. >> >> The fix is to call assert_bounds only when boundaries have changed: >> 1. When retire a region; >> 2. When a the object is allocated in a new region - one region became non-empty. >> >> There is also minor improvement to the if-else code in the PR. >> >> Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. >> >> Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) >> >> ### Tests >> - [x] hotspot_gc_shenandoah >> - [x] GHA > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > code format Changes requested by kdnilsen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29537#pullrequestreview-3787923182 From kdnilsen at openjdk.org Wed Feb 11 23:01:06 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Wed, 11 Feb 2026 23:01:06 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Wed, 4 Feb 2026 00:30:18 GMT, Xiaolong Peng wrote: >> This fix the problem causing following 3 jtreg tests with tlab disabled to fail: >> >> gc/shenandoah/TestRetainObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab 8361099 generic-all >> gc/shenandoah/TestSieveObjects.java#no-tlab-genshen 8361099 generic-all >> >> >> >> The problem is assert_bounds is always called from function ShenandoahFreeSet::try_allocate_in, no matter the boundaries have changed or not after the allocation, this is new behavior introduced by https://bugs.openjdk.org/browse/JDK-8365880, before which assert_bounds was only called after retiring a region. >> >> The fix is to call assert_bounds only when boundaries have changed: >> 1. When retire a region; >> 2. When a the object is allocated in a new region - one region became non-empty. >> >> There is also minor improvement to the if-else code in the PR. >> >> Overall the change should be safe and only affect Shenandoah related tests, I have run Shenandoah test suite on MacOS. >> >> Profiler data from the problematic jtreg test: [jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html](https://github.com/user-attachments/files/25027324/jtreg-gc_shenandoah_TestRetainObjects_no_tlab.html) >> >> ### Tests >> - [x] hotspot_gc_shenandoah >> - [x] GHA > > Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: > > Add assert_bounds_not_changed as Kelvin suggested src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1198: > 1196: } > 1197: > 1198: inline void ShenandoahRegionPartitions::assert_bounds_not_changed() { One more suggestion. Let's call this assert_bounds_sanity() and add a comment that says "this checks certain sanity conditions related to the bounds with much less effort than is required to more rigorously enforce correctness as is done by assert_bounds()." Strictly, we are not really asserting that the bounds have not changed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2795955331 From xpeng at openjdk.org Wed Feb 11 23:08:07 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Wed, 11 Feb 2026 23:08:07 GMT Subject: RFR: 8377011: Shenandoah: assert_bounds should be only called when boundaries have changed [v2] In-Reply-To: References: <8ouDpZSQ5PMoSTH_nLgt9jTYHOBYrpDVGZ5O6uDjoE0=.7e1f8a47-2c28-4cd8-9b61-963bc57c7564@github.com> Message-ID: On Wed, 11 Feb 2026 22:58:25 GMT, Kelvin Nilsen wrote: >> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision: >> >> Add assert_bounds_not_changed as Kelvin suggested > > src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 1198: > >> 1196: } >> 1197: >> 1198: inline void ShenandoahRegionPartitions::assert_bounds_not_changed() { > > One more suggestion. Let's call this assert_bounds_sanity() and add a comment that says "this checks certain sanity conditions related to the bounds with much less effort than is required to more rigorously enforce correctness as is done by assert_bounds()." > > Strictly, we are not really asserting that the bounds have not changed. Sure, I'll rename it and update the comment for the function, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29537#discussion_r2795982732 From btaylor at openjdk.org Wed Feb 11 23:21:57 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Wed, 11 Feb 2026 23:21:57 GMT Subject: RFR: 8377701: Shenandoah: Convert shenandoahEvacOOMHandler and related to Atomic Message-ID: Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` ------------- Commit messages: - 8377701: Shenandoah: Convert shenandoahEvacOOMHandler and related to Atomic Changes: https://git.openjdk.org/jdk/pull/29681/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29681&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377701 Stats: 11 lines in 3 files changed: 1 ins; 1 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/29681.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29681/head:pull/29681 PR: https://git.openjdk.org/jdk/pull/29681 From syan at openjdk.org Thu Feb 12 03:05:51 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 12 Feb 2026 03:05:51 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 14:39:45 GMT, Albert Mingkun Yang wrote: > > ... With the original count 100, the jfr event numbers couned to zero intermittely. > > Is that also observed with 64M heap size, or just the original 32M heap size? This observed both with 64M and 32M heap size. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29601#issuecomment-3888407376 From ayang at openjdk.org Thu Feb 12 07:45:05 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Thu, 12 Feb 2026 07:45:05 GMT Subject: RFR: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 15:06:57 GMT, Ramkumar Sunderbabu wrote: > Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. > The test is susceptible to issues like JDK-8299023 and JDK-8323635 > > Testing: > Local testing with and without flags > all higher tiers that run hotspot_gc group Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29656#pullrequestreview-3789167866 From ayang at openjdk.org Thu Feb 12 07:48:52 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Thu, 12 Feb 2026 07:48:52 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 09:34:46 GMT, SendaoYan wrote: >> Hi all, >> >> Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. >> The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. >> >> This PR change include: >> >> 1. the -Xmx seted to 64G >> 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. >> >> The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary try-catch(OOME) > This observed both with 64M and 32M heap size. I see. Others with more ZGC/JFR expertise might have other suggestions. ------------- Marked as reviewed by ayang (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29601#pullrequestreview-3789181240 From syan at openjdk.org Thu Feb 12 09:05:04 2026 From: syan at openjdk.org (SendaoYan) Date: Thu, 12 Feb 2026 09:05:04 GMT Subject: RFR: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 15:06:57 GMT, Ramkumar Sunderbabu wrote: > Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. > The test is susceptible to issues like JDK-8299023 and JDK-8323635 > > Testing: > Local testing with and without flags > all higher tiers that run hotspot_gc group LGTM ------------- Marked as reviewed by syan (Committer). PR Review: https://git.openjdk.org/jdk/pull/29656#pullrequestreview-3789599745 From rsunderbabu at openjdk.org Thu Feb 12 09:08:12 2026 From: rsunderbabu at openjdk.org (Ramkumar Sunderbabu) Date: Thu, 12 Feb 2026 09:08:12 GMT Subject: RFR: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 09:19:18 GMT, Thomas Schatzl wrote: >> Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. >> The test is susceptible to issues like JDK-8299023 and JDK-8323635 >> >> Testing: >> Local testing with and without flags >> all higher tiers that run hotspot_gc group > > Marked as reviewed by tschatzl (Reviewer). Thanks @tschatzl , @albertnetymk , @sendaoYan for the review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29656#issuecomment-3889629936 From rsunderbabu at openjdk.org Thu Feb 12 09:10:01 2026 From: rsunderbabu at openjdk.org (Ramkumar Sunderbabu) Date: Thu, 12 Feb 2026 09:10:01 GMT Subject: Integrated: 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 15:06:57 GMT, Ramkumar Sunderbabu wrote: > Marking gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless as they ignore VM flags. > The test is susceptible to issues like JDK-8299023 and JDK-8323635 > > Testing: > Local testing with and without flags > all higher tiers that run hotspot_gc group This pull request has now been integrated. Changeset: 6c8d5daa Author: Ramkumar Sunderbabu URL: https://git.openjdk.org/jdk/commit/6c8d5daad1f388dc9fc8af6c9b3674846050dc7e Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod 8373041: Mark gc/g1/TestCodeCacheUnloadDuringConcCycle.java as flagless Reviewed-by: tschatzl, ayang, syan ------------- PR: https://git.openjdk.org/jdk/pull/29656 From stefank at openjdk.org Thu Feb 12 10:24:38 2026 From: stefank at openjdk.org (Stefan Karlsson) Date: Thu, 12 Feb 2026 10:24:38 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: References: Message-ID: <32X6gC9E2pxojt0B8BzsO6aOD7bFEt7b7-z5mZy3KgM=.7df7585a-1e6c-4ebb-8909-43d8b625bd3f@github.com> On Wed, 11 Feb 2026 09:34:46 GMT, SendaoYan wrote: >> Hi all, >> >> Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. >> The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. >> >> This PR change include: >> >> 1. the -Xmx seted to 64G >> 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. >> >> The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. > > SendaoYan has updated the pull request incrementally with one additional commit since the last revision: > > Remove unnecessary try-catch(OOME) This looks good to me. The summary says "seted to 64G". It should probably say "set to 64M". ------------- Marked as reviewed by stefank (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29601#pullrequestreview-3790036832 From eastigeevich at openjdk.org Thu Feb 12 14:07:06 2026 From: eastigeevich at openjdk.org (Evgeny Astigeevich) Date: Thu, 12 Feb 2026 14:07:06 GMT Subject: RFR: 8370947: Mitigate Neoverse-N1 erratum 1542419 negative impact on GCs and JIT performance [v25] In-Reply-To: References: <2uxJ878ad4WcN8WCX5Jmx8ARrvgJGdQD5TUdDWSgnLE=.2d94b3e7-3a01-4c3e-bed6-2f445752db45@github.com> Message-ID: On Tue, 10 Feb 2026 13:10:44 GMT, Andrew Haley wrote: >>> > > @theRealAph @shipilev @fisk Any other tests to run in addition to the suggested tests above? >>> > >>> > >>> > It all goes back to the question I asked before. If we run this test on all Neoverse N1, not just the affected stepping, would there be any disadvantage? >>> >>> Sorry, i mean if we run the same workaround code on all Neoverse N1. Why not? Would it be slower? >> >> I don't have unaffected N1 to check. Out of curiosity, does unaffected N1 exist in any cloud? >> >> I think it would not be slower. >> >> Unaffected N1 will be running the following code, as V1 and V2, once per patched nmethod: >> >> dsb ish >> isb >> >> >> [Graviton 3(Neoverse V1) results](https://github.com/openjdk/jdk/pull/28328#issuecomment-3585923078) show benefits of the deferred invalidation as well. So should unaffected N1. An explanation of the improvement is in the comment: https://github.com/openjdk/jdk/pull/28328#issuecomment-3585923078. > >> I don't have unaffected N1 to check. Out of curiosity, does unaffected N1 exist in any cloud? >> >> I think it would not be slower. > > Right, so let's turn this on for all N1. Then we can be sure that it gets tested. @theRealAph @shipilev @fisk I ran jcstress with ZGC used on Graviton 2. 100% tests passed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28328#issuecomment-3891149711 From kdnilsen at openjdk.org Thu Feb 12 15:51:31 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 12 Feb 2026 15:51:31 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed In-Reply-To: References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: <_xxFGqgDBqDH2iTZc8lUUQrw4N3OWsyHTVzUWTUJ9G4=.7df9dd84-dabf-4e95-bb45-71d3772aca98@github.com> On Wed, 11 Feb 2026 18:03:33 GMT, William Kemper wrote: >> In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. > > src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 685: > >> 683: } >> 684: } >> 685: assert(reserve_for_mixed + reserve_for_promo <= max_old_reserve, "sanity"); > > Suggestion: > > assert(reserve_for_mixed + reserve_for_promo <= max_old_reserve, "Reserve for mixed (%zu) and reserve for promotions (%zu) must be less than maximum old reserve (%zu)", reserve_for_mixed, reserve_for_promo, max_old_reserve); Thanks. Making this change. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2799644794 From kdnilsen at openjdk.org Thu Feb 12 16:06:33 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 12 Feb 2026 16:06:33 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed [v2] In-Reply-To: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: > In ShenandoahGenerationalHeap::compute_old_generation_balance(), adjust old_available and young_available when regions are transferred between young and old generations. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Respond to reviewer suggestions ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29621/files - new: https://git.openjdk.org/jdk/pull/29621/files/276f170b..67e99178 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29621&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29621&range=00-01 Stats: 63 lines in 1 file changed: 12 ins; 0 del; 51 mod Patch: https://git.openjdk.org/jdk/pull/29621.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29621/head:pull/29621 PR: https://git.openjdk.org/jdk/pull/29621 From btaylor at openjdk.org Thu Feb 12 16:39:51 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Thu, 12 Feb 2026 16:39:51 GMT Subject: RFR: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic Message-ID: Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC ------------- Commit messages: - 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic Changes: https://git.openjdk.org/jdk/pull/29698/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29698&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377704 Stats: 6 lines in 2 files changed: 1 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/29698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29698/head:pull/29698 PR: https://git.openjdk.org/jdk/pull/29698 From shade at openjdk.org Thu Feb 12 17:18:49 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 12 Feb 2026 17:18:49 GMT Subject: RFR: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 16:32:25 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC Looks fine, thanks. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29698#pullrequestreview-3792415838 From shade at openjdk.org Thu Feb 12 17:19:57 2026 From: shade at openjdk.org (Aleksey Shipilev) Date: Thu, 12 Feb 2026 17:19:57 GMT Subject: RFR: 8377701: Shenandoah: Convert shenandoahEvacOOMHandler and related to Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 23:14:59 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` Looks fine. ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29681#pullrequestreview-3792422587 From kdnilsen at openjdk.org Thu Feb 12 17:31:42 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 12 Feb 2026 17:31:42 GMT Subject: RFR: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:12:58 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` Marked as reviewed by kdnilsen (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29676#pullrequestreview-3792505026 From kdnilsen at openjdk.org Thu Feb 12 17:52:35 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 12 Feb 2026 17:52:35 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed [v2] In-Reply-To: References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: On Wed, 11 Feb 2026 18:10:26 GMT, William Kemper wrote: >> src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 771: >> >>> 769: young_available -= old_region_deficit * region_size_bytes; >>> 770: >>> 771: assert(old_available < old_reserve, "sanity"); >> >> Suggestion: >> >> assert(old_available < old_reserve, "Old available (%zu) must be less than old reserve (%zu)", old_available, old_reserve); > > I understand what these variables represent, but their names make this comparison feel backward. Shouldn't the reserve rather be limited by what is available? Making this change to the assert as well. In an attempt to improve readability of code, I'm renaming old_available to old_currently_available, reserve_for_promo to proposed_reserve_for_promo, reserve_for_mixed to proposed_reserve_for_mixed, old_reserve to proposed_old_reserve. At this point in the code, we've discovered that old_currently_available is smaller than proposed_old_reserve. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2800254016 From xpeng at openjdk.org Thu Feb 12 17:54:43 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Thu, 12 Feb 2026 17:54:43 GMT Subject: RFR: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic In-Reply-To: References: Message-ID: <26r_G1r-BEW1si6o90A7kCuJvnf2PRXhOwFhTrv9tnA=.c4d0b77f-27bb-4563-a6a9-41f8d9d63bae@github.com> On Thu, 12 Feb 2026 16:32:25 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC Looks good, thanks! ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29698#pullrequestreview-3792659046 From kdnilsen at openjdk.org Thu Feb 12 17:56:02 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Thu, 12 Feb 2026 17:56:02 GMT Subject: RFR: 8377142: Jtreg test gc/shenandoah/oom/TestThreadFailure.java triggers assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available) failed [v2] In-Reply-To: References: <6hL_1FWB7OdfvchoSDzXWwzUSgokvGBgB6XlPIGY8vY=.56919f52-9ebc-4600-89a6-e7eedbff47f4@github.com> Message-ID: On Wed, 11 Feb 2026 18:11:40 GMT, William Kemper wrote: >> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: >> >> Respond to reviewer suggestions > > src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp line 787: > >> 785: } >> 786: >> 787: assert(old_region_deficit == 0 || old_region_surplus == 0, "Only surplus or deficit, never both"); > > Suggestion: > > assert(old_region_deficit == 0 || old_region_surplus == 0, "Only surplus (%zu) or deficit (%zu), never both", old_region_surplus, old_region_deficit); I've made this change as well. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29621#discussion_r2800269234 From xpeng at openjdk.org Thu Feb 12 17:56:52 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Thu, 12 Feb 2026 17:56:52 GMT Subject: RFR: 8377701: Shenandoah: Convert shenandoahEvacOOMHandler and related to Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 23:14:59 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` LGTM, but you need to update the title of PR to match JBS. ------------- Marked as reviewed by xpeng (Committer). PR Review: https://git.openjdk.org/jdk/pull/29681#pullrequestreview-3792674091 From xpeng at openjdk.org Thu Feb 12 17:58:04 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Thu, 12 Feb 2026 17:58:04 GMT Subject: RFR: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:12:58 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` Marked as reviewed by xpeng (Committer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29676#pullrequestreview-3792683521 From wkemper at openjdk.org Thu Feb 12 19:48:46 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 12 Feb 2026 19:48:46 GMT Subject: RFR: 8377701: Shenandoah: Convert ShenandoahEvacOOMHandler to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 23:14:59 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` Marked as reviewed by wkemper (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29681#pullrequestreview-3793271913 From wkemper at openjdk.org Thu Feb 12 19:48:47 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 12 Feb 2026 19:48:47 GMT Subject: RFR: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:12:58 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` Marked as reviewed by wkemper (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29676#pullrequestreview-3793268590 From wkemper at openjdk.org Thu Feb 12 19:51:14 2026 From: wkemper at openjdk.org (William Kemper) Date: Thu, 12 Feb 2026 19:51:14 GMT Subject: RFR: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 16:32:25 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC Marked as reviewed by wkemper (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29698#pullrequestreview-3793277910 From mbeckwit at openjdk.org Fri Feb 13 02:07:30 2026 From: mbeckwit at openjdk.org (Monica Beckwith) Date: Fri, 13 Feb 2026 02:07:30 GMT Subject: RFR: 8213198: G1: Periodic GC should trigger concurrent mark for StringTable cleanup Message-ID: <2z4YikjC6dj5MvfE_lE3WOxEagBf0fmPeYCnf5fkVWk=.d1909d85-b1a2-4a7d-8631-e9f29cf5b042@github.com> This PR implements [JDK-8213198](https://bugs.openjdk.org/browse/JDK-8213198). ## Problem G1's StringTable can grow unbounded because concurrent marking (which cleans up dead string table entries) only occurs when IHOP is triggered. Applications with large heaps that create many interned strings but have low heap occupancy may never trigger IHOP, causing the StringTable to bloat indefinitely. ## Solution Add ergonomic periodic concurrent marking. When `G1PeriodicGCInterval` is not explicitly set on the command line, the new `G1PeriodicGCErgonomicInterval` flag triggers concurrent marks at a configurable interval, enabling StringTable cleanup without user configuration. ## Changes - Add `G1PeriodicGCErgonomicInterval` experimental flag - Use `FLAG_IS_DEFAULT()` to distinguish cmdline vs runtime flag settings - Add behavior table documentation covering all 6 configuration cases - Add helper predicates for cleaner decision logic - Consolidate duplicate methods into single `should_use_concurrent_periodic_gc()` ## Testing - tier1 tests pass - New JTReg tests: - `TestPeriodicGCBehaviorTable` - validates all 6 behavior table cases - `TestPeriodicGCStringTableCleanup` - validates ergonomic StringTable cleanup scenario - SPECjbb2015 Composite validation: tested ergonomic periodic GC, disabled mode, load-threshold gated configurations, and small intervals (500ms). No performance regression for typical configurations; aggressive intervals show expected overhead proportional to concurrent cycle frequency. ------------- Commit messages: - 8213198: G1: Periodic GC should trigger concurrent mark for StringTable cleanup Changes: https://git.openjdk.org/jdk/pull/29704/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29704&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8213198 Stats: 650 lines in 6 files changed: 625 ins; 3 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/29704.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29704/head:pull/29704 PR: https://git.openjdk.org/jdk/pull/29704 From syan at openjdk.org Fri Feb 13 03:36:01 2026 From: syan at openjdk.org (SendaoYan) Date: Fri, 13 Feb 2026 03:36:01 GMT Subject: RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME [v3] In-Reply-To: <32X6gC9E2pxojt0B8BzsO6aOD7bFEt7b7-z5mZy3KgM=.7df7585a-1e6c-4ebb-8909-43d8b625bd3f@github.com> References: <32X6gC9E2pxojt0B8BzsO6aOD7bFEt7b7-z5mZy3KgM=.7df7585a-1e6c-4ebb-8909-43d8b625bd3f@github.com> Message-ID: <4hq1xLCfzOgSJyGMbJRJ0B6ssTIXaBK9KOcttmKBhpQ=.c490a51f-720e-4416-ae27-8608c6c10559@github.com> On Thu, 12 Feb 2026 10:21:41 GMT, Stefan Karlsson wrote: > This looks good to me. The summary says "seted to 64G". It should probably say "set to 64M". Sorry for the typo. Thanks @albertnetymk @stefank for the suggestions and reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29601#issuecomment-3894627667 From syan at openjdk.org Fri Feb 13 03:36:02 2026 From: syan at openjdk.org (SendaoYan) Date: Fri, 13 Feb 2026 03:36:02 GMT Subject: Integrated: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME In-Reply-To: References: Message-ID: On Fri, 6 Feb 2026 10:11:43 GMT, SendaoYan wrote: > Hi all, > > Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. > The max memory heap was seted to 32M, this seems too small for ZGC to workly normally on some specific machines, The gc log shows that ZGC unable to recliam the heap memory. > > This PR change include: > > 1. the -Xmx seted to 64M > 2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely. > > The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR. This pull request has now been integrated. Changeset: 0842782b Author: SendaoYan URL: https://git.openjdk.org/jdk/commit/0842782b7ab9e57028fa527073c8f2523137f612 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME Reviewed-by: ayang, stefank ------------- PR: https://git.openjdk.org/jdk/pull/29601 From tschatzl at openjdk.org Fri Feb 13 08:31:59 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 13 Feb 2026 08:31:59 GMT Subject: RFR: 8377008: [REDO] G1: Convert remaining volatiles in G1ConcurrentMark to Atomic Message-ID: Hi all, please review this change that reverts the backout from https://bugs.openjdk.org/browse/JDK-8377000 (first commit) and adds a simple fix to make TAMSes be initialized properly (second commit) and removes an obsolete assert (third commit). After https://bugs.openjdk.org/browse/JDK-8371720 TAMSes are reinitialized when starting up concurrent mark at the first GC, losing all previously generated information for previously allocated memory. The change just adds initialization of all the TAMSes for all active regions. In a follow-up I am preparing a more comprehensive change/cleanup that limits TAMS use to the marking process only so that we can initialize concurrent mark data structures even more lazily. Testing: gha, tier1-5 Thanks, Thomas ------------- Commit messages: - * remove unnecessary/wrong (now) assert - * fix TAMS initialization - Revert "8377000: [BACKOUT] JDK-8376126 G1: Convert remaining volatiles in G1ConcurrentMark to Atomic" Changes: https://git.openjdk.org/jdk/pull/29653/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29653&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377008 Stats: 73 lines in 7 files changed: 13 ins; 4 del; 56 mod Patch: https://git.openjdk.org/jdk/pull/29653.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29653/head:pull/29653 PR: https://git.openjdk.org/jdk/pull/29653 From tschatzl at openjdk.org Fri Feb 13 09:49:37 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 13 Feb 2026 09:49:37 GMT Subject: RFR: 8377008: [REDO] G1: Convert remaining volatiles in G1ConcurrentMark to Atomic In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 12:20:52 GMT, Thomas Schatzl wrote: > Hi all, > > please review this change that reverts the backout from https://bugs.openjdk.org/browse/JDK-8377000 (first commit) and adds a simple fix to make TAMSes be initialized properly (second commit) and removes an obsolete assert (third commit). > > After https://bugs.openjdk.org/browse/JDK-8371720 TAMSes are reinitialized when starting up concurrent mark at the first GC, losing all previously generated information for previously allocated memory. > > The change just adds initialization of all the TAMSes for all active regions. In a follow-up I am preparing a more comprehensive change/cleanup that limits TAMS use to the marking process only so that we can initialize concurrent mark data structures even more lazily. > > Testing: gha, tier1-5 > > Thanks, > Thomas src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 932: > 930: _cm->update_top_at_mark_start(r); > 931: } else { > 932: _cm->reset_top_at_mark_start(r); This is new: the lazy initialization of concurrent mark change may have cleared all TAMSes that were built up until now. They need to be recreated. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29653#discussion_r2803282920 From tschatzl at openjdk.org Fri Feb 13 09:59:49 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 13 Feb 2026 09:59:49 GMT Subject: RFR: 8377008: [REDO] G1: Convert remaining volatiles in G1ConcurrentMark to Atomic [v2] In-Reply-To: References: Message-ID: > Hi all, > > please review this change that reverts the backout from https://bugs.openjdk.org/browse/JDK-8377000 (first commit) and adds a simple fix to make TAMSes be initialized properly (second commit) and removes an obsolete assert (third commit). > > After https://bugs.openjdk.org/browse/JDK-8371720 TAMSes are reinitialized when starting up concurrent mark at the first GC, losing all previously generated information for previously allocated memory. > > The change just adds initialization of all the TAMSes for all active regions. In a follow-up I am preparing a more comprehensive change/cleanup that limits TAMS use to the marking process only so that we can initialize concurrent mark data structures even more lazily. > > Testing: gha, tier1-5 > > Thanks, > Thomas Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: * remove debugging logs in tests ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29653/files - new: https://git.openjdk.org/jdk/pull/29653/files/5cd0fc87..bd5b7daf Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29653&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29653&range=00-01 Stats: 3 lines in 2 files changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/29653.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29653/head:pull/29653 PR: https://git.openjdk.org/jdk/pull/29653 From tschatzl at openjdk.org Fri Feb 13 10:07:22 2026 From: tschatzl at openjdk.org (Thomas Schatzl) Date: Fri, 13 Feb 2026 10:07:22 GMT Subject: RFR: 8377008: [REDO] G1: Convert remaining volatiles in G1ConcurrentMark to Atomic [v3] In-Reply-To: References: Message-ID: > Hi all, > > please review this change that reverts the backout from https://bugs.openjdk.org/browse/JDK-8377000 (first commit) and adds a simple fix to make TAMSes be initialized properly (second commit) and removes an obsolete assert (third commit). > > After https://bugs.openjdk.org/browse/JDK-8371720 TAMSes are reinitialized when starting up concurrent mark at the first GC, losing all previously generated information for previously allocated memory. > > The change just adds initialization of all the TAMSes for all active regions. In a follow-up I am preparing a more comprehensive change/cleanup that limits TAMS use to the marking process only so that we can initialize concurrent mark data structures even more lazily. > > Testing: gha, tier1-5 > > Thanks, > Thomas Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision: * re-add some logging ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29653/files - new: https://git.openjdk.org/jdk/pull/29653/files/bd5b7daf..ae27510a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29653&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29653&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29653.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29653/head:pull/29653 PR: https://git.openjdk.org/jdk/pull/29653 From duke at openjdk.org Sat Feb 14 01:39:17 2026 From: duke at openjdk.org (duke) Date: Sat, 14 Feb 2026 01:39:17 GMT Subject: Withdrawn: 8361716 : GCTraceCPUTime may report incorrect times during high load from JNI code In-Reply-To: <0XuPtyHEMMylip-V-HW7xFfZ6iR9EK1o8zTr5Xv4BNY=.112e82d2-f84a-41ec-8291-d668b52b142c@github.com> References: <0XuPtyHEMMylip-V-HW7xFfZ6iR9EK1o8zTr5Xv4BNY=.112e82d2-f84a-41ec-8291-d668b52b142c@github.com> Message-ID: On Mon, 15 Dec 2025 12:50:55 GMT, Jonas Norlinder wrote: > GCTraceCPUTime is used by Serial, Parallel and G1 to estimate GC CPU time spent during safepoints. It estimates CPU time by sampling the CPU time for entire process by using `os::getTimesSecs`. > > This will not be correct if native code from e.g. JNI is used and is incurring a high load on the machine as native code is not paused during safepoints. > > A minimal example: > > public static void main(String[] args) { > // Initial GC that clean up start-up garbage etc. > System.gc(); > > for (int i = 1; i <= 128; i++) { > addLoad(); // Creates 128 threads, that spins in a loop > try { > Thread.sleep(2000); > } catch (InterruptedException e) {} > System.gc(); > } > System.exit(0); > } > > where addLoad() is a native call to a C++ program that create 128 pthreads that busy-spin forever with the largest nice value allowed. > > In such scenario we can observe using G1 > > > [0.026s][info][gc,cpu] GC(0) User=0.00s Sys=0.00s Real=0.01s > [2.103s][info][gc,cpu] GC(1) User=0.89s Sys=0.00s Real=0.03s > [4.129s][info][gc,cpu] GC(2) User=0.51s Sys=0.00s Real=0.01s > [6.195s][info][gc,cpu] GC(3) User=1.72s Sys=0.00s Real=0.06s > [8.244s][info][gc,cpu] GC(4) User=1.46s Sys=0.00s Real=0.05s > ... > [201.191s][info][gc,cpu] GC(76) User=37.91s Sys=0.00s Real=1.19s > [205.064s][info][gc,cpu] GC(77) User=52.44s Sys=0.00s Real=1.64s > [208.068s][info][gc,cpu] GC(78) User=23.49s Sys=0.00s Real=0.74s > [211.795s][info][gc,cpu] GC(79) User=46.96s Sys=0.00s Real=1.47s > > > Since the Java code does not do anything the time should be close to 0. > > # Implementation Comment > > Total CPU time for GC operations on the VM thread is obtained by cumulatively adding to a counter. Since system time is calculated (on Linux) with `total - user` is value contains a small error delta. If we continuously increment a value this error would grow to an unacceptable level. Therefore, the implementation will rely on the fact that no other VM operation may run during GC safepoint, making it safe to query the VM thread for it's detailed CPU time at the start and end of GC pause. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/28824 From xpeng at openjdk.org Sat Feb 14 01:41:46 2026 From: xpeng at openjdk.org (Xiaolong Peng) Date: Sat, 14 Feb 2026 01:41:46 GMT Subject: RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v60] In-Reply-To: References: Message-ID: > Shenandoah always allocates memory with heap lock, we have observed heavy heap lock contention on memory allocation path in performance analysis of some service in which we tried to adopt Shenandoah. This change is to propose an optimization for the code path of memory allocation to improve heap lock contention, along with the optimization, a better OOD is also done to Shenandoah memory allocation to reuse the majority of the code: > > * ShenandoahAllocator: base class of the allocators, most of the allocation code is in this class. > * ShenandoahMutatorAllocator: allocator for mutator, inherit from ShenandoahAllocator, only override methods `alloc_start_index`, `verify`, `_alloc_region_count` and `_yield_to_safepoint` to customize the allocator for mutator. > * ShenandoahCollectorAllocator: allocator for collector allocation in Collector partition, similar to ShenandoahMutatorAllocator, only few lines of code to customize the allocator for Collector. > * ShenandoahOldCollectorAllocator: allocator for mutator collector allocation in OldCollector partition, it doesn't inherit the logic from ShenandoahAllocator for now, the `allocate` method has been overridden to delegate to `FreeSet::allocate_for_collector` due to the special allocation considerations for `plab` in old gen. We will rewrite this part later and move the code out of `FreeSet::allocate_for_collector` > > I'm not expecting significant performance impact for most of the cases since in most case the contention on heap lock it not high enough to cause performance issue, but in some cases it may improve the latency/performance: > > 1. Dacapo lusearch test on EC2 host with 96 CPU cores, p90 is improved from 500+us to less than 150us, p99 from 1000+us to ~200us. > > java -XX:-TieredCompilation -XX:+AlwaysPreTouch -Xms31G -Xmx31G -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-ShenandoahUncommit -XX:ShenandoahGCMode=generational -XX:+UseTLAB -jar ~/tools/dacapo/dacapo-23.11-MR2-chopin.jar -n 10 lusearch | grep "metered full smoothing" > > > Openjdk TIP: > > ===== DaCapo tail latency, metered full smoothing: 50% 241098 usec, 90% 402356 usec, 99% 411065 usec, 99.9% 411763 usec, 99.99% 415531 usec, max 428584 usec, measured over 524288 events ===== > ===== DaCapo tail latency, metered full smoothing: 50% 902 usec, 90% 3713 usec, 99% 5898 usec, 99.9% 6488 usec, 99.99% 7081 usec, max 8048 usec, measured over 524288 events ===== > ===== DaCapo tail latency, metered full smoothing: 50% 2... Xiaolong Peng has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 330 commits: - Fix build failure merging tip - Merge branch 'master' into cas-alloc-1 - Merge branch 'master' into cas-alloc-1 - Add assert to functions new_top & set_new_top; fix typo - Update ProblemList to enable the tests affected by the change for accounting update - Fix crash after merging from tip(due to the new free-set rebuild calls) - Fix build error after merging tip - Merge branch 'master' into cas-alloc-1 - FullGC should not update accounting when release alloc regions - Not update accounting if no region is unretired to partition - ... and 320 more: https://git.openjdk.org/jdk/compare/1920983e...dfddaaff ------------- Changes: https://git.openjdk.org/jdk/pull/26171/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26171&range=59 Stats: 1841 lines in 28 files changed: 1467 ins; 240 del; 134 mod Patch: https://git.openjdk.org/jdk/pull/26171.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26171/head:pull/26171 PR: https://git.openjdk.org/jdk/pull/26171 From ayang at openjdk.org Mon Feb 16 08:05:10 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 16 Feb 2026 08:05:10 GMT Subject: RFR: 8377164: G1: Clean up g1BlockOffsetTable.hpp In-Reply-To: References: Message-ID: On Tue, 10 Feb 2026 10:38:45 GMT, Thomas Schatzl wrote: > Hi all, > > please review this cleanup of `g1BlockOffsetTable` files: > > * fix includes > * move non-one-liners to hpp file > * move method implementations only referenced in cpp file to cpp file > * made some methods static > > Testing: gha > > Thanks, > Thomas Marked as reviewed by ayang (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29649#pullrequestreview-3807146495 From jsikstro at openjdk.org Mon Feb 16 12:05:35 2026 From: jsikstro at openjdk.org (Joel =?UTF-8?B?U2lrc3Ryw7Zt?=) Date: Mon, 16 Feb 2026 12:05:35 GMT Subject: RFR: 8377561: Parallel: Large allocations cause Full GC storm without heap expansion In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 13:57:02 GMT, Albert Mingkun Yang wrote: > `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561). > > Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing. > > The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix. > > Test: tier1-5 Looks good. ------------- Marked as reviewed by jsikstro (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/29673#pullrequestreview-3808248012 From ayang at openjdk.org Mon Feb 16 14:40:39 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 16 Feb 2026 14:40:39 GMT Subject: RFR: 8377561: Parallel: Large allocations cause Full GC storm without heap expansion In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 13:57:02 GMT, Albert Mingkun Yang wrote: > `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561). > > Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing. > > The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix. > > Test: tier1-5 Thanks for review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29673#issuecomment-3908833002 From ayang at openjdk.org Mon Feb 16 14:40:41 2026 From: ayang at openjdk.org (Albert Mingkun Yang) Date: Mon, 16 Feb 2026 14:40:41 GMT Subject: Integrated: 8377561: Parallel: Large allocations cause Full GC storm without heap expansion In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 13:57:02 GMT, Albert Mingkun Yang wrote: > `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561). > > Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing. > > The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix. > > Test: tier1-5 This pull request has now been integrated. Changeset: f5e1e313 Author: Albert Mingkun Yang URL: https://git.openjdk.org/jdk/commit/f5e1e313dab2aa63711c6a64d363e88409bff4ba Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod 8377561: Parallel: Large allocations cause Full GC storm without heap expansion Reviewed-by: tschatzl, jsikstro ------------- PR: https://git.openjdk.org/jdk/pull/29673 From duke at openjdk.org Mon Feb 16 17:50:06 2026 From: duke at openjdk.org (duke) Date: Mon, 16 Feb 2026 17:50:06 GMT Subject: RFR: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:12:58 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` @benty-amzn Your change (at version 3c96217034f58ecaf5d0815b2f4314e584455bed) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29676#issuecomment-3909769989 From duke at openjdk.org Mon Feb 16 17:50:07 2026 From: duke at openjdk.org (duke) Date: Mon, 16 Feb 2026 17:50:07 GMT Subject: RFR: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 16:32:25 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC @benty-amzn Your change (at version 49ca3724ed258b9e0da776d60546b219907cab80) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29698#issuecomment-3909771330 From wkemper at openjdk.org Mon Feb 16 18:30:44 2026 From: wkemper at openjdk.org (William Kemper) Date: Mon, 16 Feb 2026 18:30:44 GMT Subject: RFR: 8376839: GenShen: Improve performance of evacuations into the old generation [v5] In-Reply-To: References: Message-ID: > When GenShen evacuates an object into the old generation, it also dirties the card for that object and updates the offsets of the first and last object in the card. In many cases, the same card may dirtied repeatedly and the object starts updated unnecessarily. We can reduce the total amount of work by moving these operations into a separate phase of the cycle which allows them to be batched. William Kemper has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 36 commits: - Fix merge error - Merge remote-tracking branch 'jdk/master' into more-precise-rset-rebuild - Force parallelism for update card table - Avoid update call when there is no work to be done - Merge branch 'more-precise-rset-rebuild' into dirty-all-the-cards - Clear card table for young regions when full gc rebuilds remembered set - Dirty all the cards en masse This might be faster if less precise. - Search for interesting pointers in objects that span into the next card - Reset card table for old regions when they are recycled Instead of when they are allocated. This covers the case of in-place-promotions having potentially stale card table entries above top after being promoted. - Do not iterate objects on cards that are already dirty - ... and 26 more: https://git.openjdk.org/jdk/compare/c7ef631b...f8566321 ------------- Changes: https://git.openjdk.org/jdk/pull/29511/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29511&range=04 Stats: 284 lines in 15 files changed: 193 ins; 68 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/29511.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29511/head:pull/29511 PR: https://git.openjdk.org/jdk/pull/29511 From btaylor at openjdk.org Mon Feb 16 20:57:24 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Mon, 16 Feb 2026 20:57:24 GMT Subject: Integrated: 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic In-Reply-To: References: Message-ID: On Wed, 11 Feb 2026 18:12:58 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with `-XX:+UseShenandoahGC` This pull request has now been integrated. Changeset: 2925eb8c Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/2925eb8cfbddb0abdcabf735d8f0585132b4baf9 Stats: 23 lines in 4 files changed: 1 ins; 0 del; 22 mod 8377044: Shenandoah: Convert ShenandoahHeap related code to use Atomic Reviewed-by: kdnilsen, xpeng, wkemper ------------- PR: https://git.openjdk.org/jdk/pull/29676 From btaylor at openjdk.org Mon Feb 16 20:59:31 2026 From: btaylor at openjdk.org (Ben Taylor) Date: Mon, 16 Feb 2026 20:59:31 GMT Subject: Integrated: 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic In-Reply-To: References: Message-ID: On Thu, 12 Feb 2026 16:32:25 GMT, Ben Taylor wrote: > Modernizes the code as has been done in other areas of Shenandoah and G1 GCs. > > The same tier1 tests pass before and after this change on x86_64 and aarch64 linux when run with -XX:+UseShenandoahGC This pull request has now been integrated. Changeset: fbc705d2 Author: Ben Taylor Committer: Xiaolong Peng URL: https://git.openjdk.org/jdk/commit/fbc705d2cc251153a69ca76788462e00861d3f60 Stats: 6 lines in 2 files changed: 1 ins; 0 del; 5 mod 8377704: Shenandoah: Convert ShenandoahNMethod to use Atomic Reviewed-by: shade, xpeng, wkemper ------------- PR: https://git.openjdk.org/jdk/pull/29698 From kdnilsen at openjdk.org Mon Feb 16 21:01:34 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 16 Feb 2026 21:01:34 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v26] In-Reply-To: References: Message-ID: <4_I_B9cPrGVFLHSs3kWTJ6dPLBjGS3A7Ja8QNaPStNc=.f0a8a04a-69d8-479c-8efb-43edfb98ce63@github.com> > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Remove deprecated code ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/8a96de04..5d3b6145 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=25 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=24-25 Stats: 9 lines in 1 file changed: 0 ins; 9 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From kdnilsen at openjdk.org Mon Feb 16 21:28:01 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 16 Feb 2026 21:28:01 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v27] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Rename variable and improve comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/5d3b6145..75d6708f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=26 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=25-26 Stats: 13 lines in 2 files changed: 1 ins; 0 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From kdnilsen at openjdk.org Mon Feb 16 23:33:31 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 16 Feb 2026 23:33:31 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v28] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with two additional commits since the last revision: - Remove dead code and unused variables and rename one function - fix spelling errors in comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/75d6708f..d85193f9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=27 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=26-27 Stats: 52 lines in 6 files changed: 0 ins; 41 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039 From kdnilsen at openjdk.org Mon Feb 16 23:58:30 2026 From: kdnilsen at openjdk.org (Kelvin Nilsen) Date: Mon, 16 Feb 2026 23:58:30 GMT Subject: RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v29] In-Reply-To: References: Message-ID: > After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements: > > 1. Track trends in GC times rather than always using the average GC time plus standard deviation. In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory. > 2. Sample allocation rates more frequently than once every 100 ms. > 3. Track trends in allocation rates. In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload. > 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate. Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision: Improve comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29039/files - new: https://git.openjdk.org/jdk/pull/29039/files/d85193f9..6bd4c9e1 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=28 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=27-28 Stats: 10 lines in 2 files changed: 1 ins; 1 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/29039.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039 PR: https://git.openjdk.org/jdk/pull/29039