From 99b4fd045898277167b2a5674412b43f2aca3266 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Fri, 1 Aug 2025 13:38:12 -0400 Subject: [PATCH 1/2] Exclude ContendedWallclockSamplesTest on graal/aarch64 --- .../src/main/java/com/datadoghq/profiler/Platform.java | 5 +++++ .../profiler/wallclock/ContendedWallclockSamplesTest.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ddprof-lib/src/main/java/com/datadoghq/profiler/Platform.java b/ddprof-lib/src/main/java/com/datadoghq/profiler/Platform.java index 51c72132a..51d7df3fe 100644 --- a/ddprof-lib/src/main/java/com/datadoghq/profiler/Platform.java +++ b/ddprof-lib/src/main/java/com/datadoghq/profiler/Platform.java @@ -309,6 +309,11 @@ public static boolean isZing() { return System.getProperty("java.vm.name").contains("Zing"); } + public static boolean isGraal() { + String vendor = System.getProperty("java.vendor.version"); + return vendor != null && vendor.contains(" GraalVM "); + } + public static String getLangVersion() { return String.valueOf(JAVA_VERSION.major); } diff --git a/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java b/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java index 0adbfd812..6942035fb 100644 --- a/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java +++ b/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java @@ -52,9 +52,11 @@ public void after() { @ValueSource(strings = {"vm", "vmx", "fp", "dwarf"}) public void test(@CStack String cstack) { // Skip test entirely on unsupported JVMs (don't use assumeFalse which gets retried) - if (Platform.isZing() || Platform.isJ9()) { + if (Platform.isZing() || Platform.isJ9() || + (Platform.isGraal() && Platform.isAarch64() && "vm".equals(cstack))) { return; } + // Running vm stackwalker tests on JVMCI (Graal), JDK 24, aarch64 and with a sanitizer is crashing in a weird place // This looks like the sanitizer instrumentation is breaking the longjump based crash recovery :( String config = System.getProperty("ddprof_test.config"); From 8db4e096665e8a7f6dd758ca751ecb934e64484f Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Fri, 8 Aug 2025 09:01:09 -0400 Subject: [PATCH 2/2] Jaroslav's comments --- .../profiler/wallclock/ContendedWallclockSamplesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java b/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java index 6942035fb..44b7e3628 100644 --- a/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java +++ b/ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/ContendedWallclockSamplesTest.java @@ -53,7 +53,7 @@ public void after() { public void test(@CStack String cstack) { // Skip test entirely on unsupported JVMs (don't use assumeFalse which gets retried) if (Platform.isZing() || Platform.isJ9() || - (Platform.isGraal() && Platform.isAarch64() && "vm".equals(cstack))) { + (isInCI() && isAsan() && Platform.isGraal() && Platform.isAarch64() && "vm".equals(cstack))) { return; }