RFR: 8373403: [TESTBUG] TestG1ClassUnloadingHWM.java could fail with large G1HeapRegionSize and small InitialHeapSize
Ivan Walulya
iwalulya at openjdk.org
Wed Dec 10 12:05:22 UTC 2025
On Wed, 10 Dec 2025 09:48:44 GMT, Man Cao <manc at openjdk.org> wrote:
> Hi all,
>
> Could anyone review this test-only improvement to make TestG1ClassUnloadingHWM.java more robust in various configurations?
> See https://bugs.openjdk.org/browse/JDK-8373403 for more details.
>
> -Man
The issue appears to be that we compute an IHOP target threshold that is smaller than the G1HeapRegionSize. So after the "Pause Full (Metadata GC Threshold)", a concurrent cycle is requested.
Would it be better to fix that as below?
--- a/src/hotspot/share/gc/g1/g1IHOPControl.cpp
+++ b/src/hotspot/share/gc/g1/g1IHOPControl.cpp
@@ -115,7 +115,7 @@ size_t G1IHOPControl::get_conc_mark_start_threshold() {
guarantee(_target_occupancy > 0, "Target occupancy must be initialized");
if (!_is_adaptive || !have_enough_data_for_prediction()) {
- return (size_t)(_initial_ihop_percent * _target_occupancy / 100.0);
+ return MAX2((size_t)(_initial_ihop_percent * _target_occupancy / 100.0), G1HeapRegionSize);
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28738#issuecomment-3636758512
More information about the hotspot-gc-dev
mailing list