Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5cac27d
8359868: Shenandoah: Free threshold heuristic does not use SoftMaxHea…
Feb 20, 2026
f51b93e
8376688: Gtest os.attempt_reserve_memory_between_small_range_fill_hol…
MBaesken Feb 20, 2026
57ea04c
8367302: New test jdk/jfr/event/profiling/TestCPUTimeSampleQueueAutoS…
parttimenerd Feb 20, 2026
6a95907
8369335: Two sun/java2d/OpenGL tests fail on Windows after JDK-8358058
rm-gh-8 Feb 20, 2026
321fa97
8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java int…
Feb 21, 2026
1371f0a
8361894: sun/security/krb5/config/native/TestDynamicStore.java ensure…
rm-gh-8 Feb 23, 2026
43421bb
8369516: Delete duplicate imaging test
rm-gh-8 Feb 23, 2026
a359a73
8360160: ubuntu-22-04 machine is failing client tests
rm-gh-8 Feb 23, 2026
1f4603c
8373931: Test javax/sound/sampled/Clip/AutoCloseTimeCheck.java timed out
rm-gh-8 Feb 23, 2026
137677d
8371364: Refactor javax/swing/JFileChooser/FileSizeCheck.java to use …
rm-gh-8 Feb 23, 2026
a3d7cbc
8373716: Refactor further java/util tests from TestNG to JUnit
rm-gh-8 Feb 23, 2026
ef56a49
8373101: JdkClient and JdkServer test classes ignore namedGroups field
rm-gh-8 Feb 23, 2026
4a75038
8375231: Refactor util/ServiceLoader tests to use JUnit
rm-gh-8 Feb 23, 2026
3c40578
8375742: Test java/lang/invoke/MethodHandleProxies/Driver.java does n…
rm-gh-8 Feb 23, 2026
2472163
8372012: java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos…
rm-gh-8 Feb 23, 2026
d7156c9
8378113: Add sun/java2d/OpenGL/ScaleParamsOOB.java to the ProblemList…
rm-gh-8 Feb 23, 2026
a12f2a7
8068378: [TEST_BUG]The java/awt/Modal/PrintDialogsTest/PrintDialogsTe…
rm-gh-8 Feb 23, 2026
d1025e5
8367271: Add parsing tests to DateFormat JMH benchmark
rm-gh-8 Feb 23, 2026
dfc5c7d
8373632: Some sound tests failing in CI due to lack of sound key
rm-gh-8 Feb 23, 2026
5a59dfa
8372710: Update ProcessBuilder/Basic regex
rm-gh-8 Feb 23, 2026
cae18ed
8371349: Update NSS library to 3.117
rm-gh-8 Feb 23, 2026
78ae7bd
8360702: runtime/Thread/AsyncExceptionTest.java timed out
rm-gh-8 Feb 23, 2026
30a962c
8375999: com/sun/jndi/ldap/LdapPoolTimeoutTest.java fails sporadicall…
rm-gh-8 Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,7 @@ void ShenandoahAdaptiveHeuristics::adjust_spike_threshold(double amount) {
}

size_t ShenandoahAdaptiveHeuristics::min_free_threshold() {
// Note that soft_max_capacity() / 100 * min_free_threshold is smaller than max_capacity() / 100 * min_free_threshold.
// We want to behave conservatively here, so use max_capacity(). By returning a larger value, we cause the GC to
// trigger when the remaining amount of free shrinks below the larger threshold.
return _space_info->max_capacity() / 100 * ShenandoahMinFreeThreshold;
return ShenandoahHeap::heap()->soft_max_capacity() / 100 * ShenandoahMinFreeThreshold;
}

ShenandoahAllocationRate::ShenandoahAllocationRate() :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void ShenandoahGlobalHeuristics::choose_global_collection_set(ShenandoahCollecti
size_t cur_young_garbage) const {
auto heap = ShenandoahGenerationalHeap::heap();
size_t region_size_bytes = ShenandoahHeapRegion::region_size_bytes();
size_t capacity = heap->young_generation()->max_capacity();
size_t capacity = heap->soft_max_capacity();
size_t garbage_threshold = region_size_bytes * ShenandoahGarbageThreshold / 100;
size_t ignore_threshold = region_size_bytes * ShenandoahIgnoreGarbageThreshold / 100;

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool ShenandoahMetricsSnapshot::is_good_progress(ShenandoahGeneration* generatio
// ShenandoahCriticalFreeThreshold is expressed as a percentage. We multiple this percentage by 1/100th
// of the generation capacity to determine whether the available memory within the generation exceeds the
// critical threshold.
size_t free_expected = (generation->max_capacity() / 100) * ShenandoahCriticalFreeThreshold;
size_t free_expected = (ShenandoahHeap::heap()->soft_max_capacity() / 100) * ShenandoahCriticalFreeThreshold;

bool prog_free = free_actual >= free_expected;
log_info(gc, ergo)("%s progress for free space: %zu%s, need %zu%s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ class JfrCPUSamplerThread : public NonJavaThread {
volatile bool _is_async_processing_of_cpu_time_jfr_requests_triggered;
volatile bool _warned_about_timer_creation_failure;
volatile bool _signal_handler_installed;
DEBUG_ONLY(volatile bool _out_of_stack_walking_enabled;)
DEBUG_ONLY(volatile u8 _out_of_stack_walking_iterations;)
DEBUG_ONLY(volatile bool _out_of_stack_walking_enabled = true;)

static const u4 STOP_SIGNAL_BIT = 0x80000000;

Expand Down Expand Up @@ -284,10 +283,6 @@ class JfrCPUSamplerThread : public NonJavaThread {
void set_out_of_stack_walking_enabled(bool runnable) {
Atomic::release_store(&_out_of_stack_walking_enabled, runnable);
}

u8 out_of_stack_walking_iterations() const {
return Atomic::load(&_out_of_stack_walking_iterations);
}
#endif
};

Expand Down Expand Up @@ -395,7 +390,6 @@ void JfrCPUSamplerThread::run() {
}
DEBUG_ONLY(if (Atomic::load_acquire(&_out_of_stack_walking_enabled)) {)
if (Atomic::cmpxchg(&_is_async_processing_of_cpu_time_jfr_requests_triggered, true, false)) {
DEBUG_ONLY(Atomic::inc(&_out_of_stack_walking_iterations);)
stackwalk_threads_in_native();
}
DEBUG_ONLY(})
Expand Down Expand Up @@ -589,18 +583,14 @@ void JfrCPUTimeThreadSampling::handle_timer_signal(siginfo_t* info, void* contex
}

#ifdef ASSERT
void JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(bool runnable) {
bool JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(bool runnable) {
if (_instance != nullptr && _instance->_sampler != nullptr) {
_instance->_sampler->set_out_of_stack_walking_enabled(runnable);
return true;
} else {
return false;
}
}

u8 JfrCPUTimeThreadSampling::out_of_stack_walking_iterations() {
if (_instance != nullptr && _instance->_sampler != nullptr) {
return _instance->_sampler->out_of_stack_walking_iterations();
}
return 0;
}
#endif

void JfrCPUSamplerThread::sample_thread(JfrSampleRequest& request, void* ucontext, JavaThread* jt, JfrThreadLocal* tl, JfrTicks& now) {
Expand Down Expand Up @@ -873,8 +863,9 @@ void JfrCPUTimeThreadSampling::on_javathread_terminate(JavaThread* thread) {
}

#ifdef ASSERT
static void set_out_of_stack_walking_enabled(bool runnable) {
bool JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(bool runnable) {
warn();
return false;
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ class JfrCPUTimeThreadSampling : public JfrCHeapObj {

static void trigger_async_processing_of_cpu_time_jfr_requests();

DEBUG_ONLY(static void set_out_of_stack_walking_enabled(bool runnable);)

DEBUG_ONLY(static u8 out_of_stack_walking_iterations();)
DEBUG_ONLY(static bool set_out_of_stack_walking_enabled(bool runnable);)
};

#else
Expand All @@ -162,8 +160,7 @@ class JfrCPUTimeThreadSampling : public JfrCHeapObj {

static void on_javathread_create(JavaThread* thread);
static void on_javathread_terminate(JavaThread* thread);
DEBUG_ONLY(static void set_out_of_stack_walking_enabled(bool runnable));
DEBUG_ONLY(static u8 out_of_stack_walking_iterations();)
DEBUG_ONLY(static bool set_out_of_stack_walking_enabled(bool runnable));
};

#endif // defined(LINUX)
Expand Down
16 changes: 3 additions & 13 deletions src/hotspot/share/prims/whitebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,7 @@ WB_ENTRY(void, WB_WaitUnsafe(JNIEnv* env, jobject wb, jint time))
os::naked_short_sleep(time);
WB_END

WB_ENTRY(void, WB_BusyWait(JNIEnv* env, jobject wb, jint time))
WB_ENTRY(void, WB_BusyWaitCPUTime(JNIEnv* env, jobject wb, jint time))
ThreadToNativeFromVM ttn(thread);
u8 start = os::current_thread_cpu_time();
u8 target_duration = time * (u8)1000000;
Expand All @@ -2707,21 +2707,12 @@ WB_END

WB_ENTRY(jboolean, WB_CPUSamplerSetOutOfStackWalking(JNIEnv* env, jobject wb, jboolean enable))
#if defined(ASSERT) && INCLUDE_JFR && defined(LINUX)
JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(enable == JNI_TRUE);
return JNI_TRUE;
return JfrCPUTimeThreadSampling::set_out_of_stack_walking_enabled(enable == JNI_TRUE) ? JNI_TRUE : JNI_FALSE;
#else
return JNI_FALSE;
#endif
WB_END

WB_ENTRY(jlong, WB_CPUSamplerOutOfStackWalkingIterations(JNIEnv* env, jobject wb))
#if defined(ASSERT) && INCLUDE_JFR && defined(LINUX)
return (jlong)JfrCPUTimeThreadSampling::out_of_stack_walking_iterations();
#else
return 0;
#endif
WB_END

WB_ENTRY(jstring, WB_GetLibcName(JNIEnv* env, jobject o))
ThreadToNativeFromVM ttn(thread);
jstring info_string = env->NewStringUTF(XSTR(LIBC));
Expand Down Expand Up @@ -3072,9 +3063,8 @@ static JNINativeMethod methods[] = {

{CC"isJVMTIIncluded", CC"()Z", (void*)&WB_IsJVMTIIncluded},
{CC"waitUnsafe", CC"(I)V", (void*)&WB_WaitUnsafe},
{CC"busyWait", CC"(I)V", (void*)&WB_BusyWait},
{CC"busyWaitCPUTime", CC"(I)V", (void*)&WB_BusyWaitCPUTime},
{CC"cpuSamplerSetOutOfStackWalking", CC"(Z)Z", (void*)&WB_CPUSamplerSetOutOfStackWalking},
{CC"cpuSamplerOutOfStackWalkingIterations", CC"()J",(void*)&WB_CPUSamplerOutOfStackWalkingIterations},
{CC"getLibcName", CC"()Ljava/lang/String;", (void*)&WB_GetLibcName},

{CC"pinObject", CC"(Ljava/lang/Object;)V", (void*)&WB_PinObject},
Expand Down
3 changes: 3 additions & 0 deletions test/hotspot/gtest/runtime/test_os_reserve_between.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ TEST_VM(os, attempt_reserve_memory_randomization_cornercases) {

// Test that, regardless where the hole is in the [min, max) range, if we probe nonrandomly, we will fill that hole
// as long as the range size is smaller than the number of probe attempts
// On AIX, the allocation granularity is too large and not well suited for 'small' holes, so we avoid the test
#if !defined(_AIX)
TEST_VM(os, attempt_reserve_memory_between_small_range_fill_hole) {
const size_t ps = os::vm_page_size();
const size_t ag = allocation_granularity();
Expand All @@ -348,3 +350,4 @@ TEST_VM(os, attempt_reserve_memory_between_small_range_fill_hole) {
}
}
}
#endif
41 changes: 22 additions & 19 deletions test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ public class AsyncExceptionOnMonitorEnter extends Thread {
public static native int exitRawMonitor();
public static native void destroyRawMonitor();

// Avoid using CountDownLatch or similar objects that require unparking the
// main thread. Otherwise, if the main thread is run as a virtual thread, the
// async exception could be sent while the target is still executing FJP logic.
public volatile boolean started = false;
public volatile boolean gotMonitor = false;

private static Object o1 = new Object();
private static boolean firstWorker = true;
private static Semaphore sem = new Semaphore(0);

@Override
public void run() {
Expand All @@ -59,11 +63,9 @@ public void run() {

public void testWithJavaMonitor() {
try {
started = true;
synchronized (o1) {
if (firstWorker) {
firstWorker = false;
sem.release();
}
gotMonitor = true;
Thread.sleep(1000);
}
} catch (ThreadDeath td) {
Expand All @@ -74,20 +76,16 @@ public void testWithJavaMonitor() {


public void testWithJVMTIRawMonitor() {
boolean savedFirst = false;
try {
started = true;
int retCode = enterRawMonitor();
if (retCode != 0 && firstWorker) {
if (retCode != 0) {
throw new RuntimeException("error in JVMTI RawMonitorEnter: retCode=" + retCode);
}
if (firstWorker) {
firstWorker = false;
savedFirst = true;
sem.release();
}
Thread.sleep(1000);
gotMonitor = true;
Thread.sleep(500);
retCode = exitRawMonitor();
if (retCode != 0 && savedFirst) {
if (retCode != 0) {
throw new RuntimeException("error in JVMTI RawMonitorExit: retCode=" + retCode);
}
} catch (ThreadDeath td) {
Expand Down Expand Up @@ -133,15 +131,18 @@ public static void main(String[] args) {
AsyncExceptionOnMonitorEnter worker2 = new AsyncExceptionOnMonitorEnter();

try {
// Start firstWorker worker and wait until monitor is acquired
firstWorker = true;
// Start first worker and wait until monitor is acquired
worker1.start();
sem.acquire();
while (!worker1.gotMonitor) {
Thread.sleep(1);
}

// Start second worker and allow some time for target to block on monitorenter
// before executing Thread.stop()
worker2.start();
Thread.sleep(300);
while (!worker2.started) {
Thread.sleep(10);
}

while (true) {
JVMTIUtils.stopThread(worker2);
Expand All @@ -150,6 +151,8 @@ public static void main(String[] args) {
// not released worker2 will deadlock on enter
JVMTIUtils.stopThread(worker1);
}
// Give time to throw exception
Thread.sleep(10);

if (!worker1.isAlive() && !worker2.isAlive()) {
// Done with Thread.stop() calls since
Expand Down
23 changes: 11 additions & 12 deletions test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ public class AsyncExceptionTest extends Thread {
private final static int DEF_TIME_MAX = 30; // default max # secs to test
private final static String PROG_NAME = "AsyncExceptionTest";

public CountDownLatch startSyncObj = new CountDownLatch(1);
// Avoid using CountDownLatch or similar objects that require unparking the
// main thread. Otherwise, if the main thread is run as a virtual thread, the
// async exception could be sent while the target is still executing FJP logic.
public volatile boolean started = false;

private boolean firstEntry = true;
private boolean receivedThreadDeathinInternal1 = false;
private boolean receivedThreadDeathinInternal2 = false;
private volatile RuntimeException error = null;
Expand All @@ -77,6 +79,7 @@ public void run() {

public void internalRun1() {
try {
started = true;
while (!receivedThreadDeathinInternal2) {
internalRun2();
}
Expand All @@ -87,16 +90,10 @@ public void internalRun1() {

public void internalRun2() {
try {
Integer myLocalCount = 1;
Integer myLocalCount2 = 1;
int myLocalCount = 1;
int myLocalCount2 = 1;

if (firstEntry) {
// Tell main thread we have started.
startSyncObj.countDown();
firstEntry = false;
}

while(myLocalCount > 0) {
while (myLocalCount > 0) {
myLocalCount2 = (myLocalCount % 3) / 2;
myLocalCount -= 1;
}
Expand Down Expand Up @@ -128,7 +125,9 @@ public static void main(String[] args) {
thread.start();
try {
// Wait for the worker thread to get going.
thread.startSyncObj.await();
while (!thread.started) {
Thread.sleep(1);
}
// Send async exception and wait until it is thrown
JVMTIUtils.stopThread(thread);
thread.join();
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/java2d/DirectX/OverriddenInsetsTest/OverriddenInsetsTest.java 8196102 generic-all
sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.java 8196180 windows-all,macosx-all
sun/java2d/OpenGL/OpaqueDest.java#id1 8367574 macosx-all
sun/java2d/OpenGL/ScaleParamsOOB.java#id0 8377908 linux-all
sun/java2d/SunGraphics2D/EmptyClipRenderingTest.java 8144029 macosx-all,linux-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-all
sun/java2d/SunGraphics2D/PolyVertTest.java 6986565 generic-all
Expand Down Expand Up @@ -794,7 +795,6 @@ java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_1.java 7131438,802
java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java 7131438,8022539 generic-all
java/awt/Modal/WsDisabledStyle/CloseBlocker/CloseBlocker.java 7187741 linux-all,macosx-all
java/awt/xembed/server/TestXEmbedServerJava.java 8001150,8004031 generic-all
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
java/awt/image/VolatileImage/VolatileImageConfigurationTest.java 8171069 macosx-all,linux-all
java/awt/Modal/InvisibleParentTest/InvisibleParentTest.java 8172245 linux-all
java/awt/Frame/FrameStateTest/FrameStateTest.java 8203920 macosx-all,linux-all
Expand Down
3 changes: 2 additions & 1 deletion test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -131,6 +131,7 @@ private static void attemptConnect(Hashtable<Object, Object> env) throws Excepti
|| msg.contains("No route to host")
|| msg.contains("Timed out waiting for lock")
|| msg.contains("Connect timed out")
|| msg.contains("Connection timed out")
|| msg.contains("Timeout exceeded while waiting for a connection"))) {
// got the expected exception
System.out.println("Received expected NamingException with message: " + msg);
Expand Down
Loading
Loading