diff --git a/ddprof-lib/src/main/cpp/j9Ext.h b/ddprof-lib/src/main/cpp/j9Ext.h index 028d0aa7..ef4efa88 100644 --- a/ddprof-lib/src/main/cpp/j9Ext.h +++ b/ddprof-lib/src/main/cpp/j9Ext.h @@ -1,6 +1,6 @@ /* * Copyright 2022 Andrei Pangin - * Copyright 2024 Datadog, Inc + * Copyright 2024, 2025 Datadog, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ class J9Ext { static bool can_use_ASGCT() { // as of 21.0.6 the use of ASGCT will lead to almost immediate crash // or livelock on J9 - return (VM::java_version() == 8 && VM::java_update_version() >= 362) || + return (VM::java_version() == 8 && VM::java_update_version() >= 361) || (VM::java_version() == 11 && VM::java_update_version() >= 18) || (VM::java_version() == 17 && VM::java_update_version() >= 6) || (VM::java_version() >= 18 && VM::java_version() < 21); diff --git a/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/JfrDumpTest.java b/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/JfrDumpTest.java index 7fe223c8..210842af 100644 --- a/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/JfrDumpTest.java +++ b/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/JfrDumpTest.java @@ -16,10 +16,14 @@ public void runTest(String eventName) throws Exception { } public void runTest(String eventName, String ... patterns) throws Exception { + runTest(eventName, 10, patterns); + } + + public void runTest(String eventName, int dumpCnt, String ... patterns) throws Exception { Assumptions.assumeTrue(Platform.isJavaVersionAtLeast(11)); Assumptions.assumeFalse(Platform.isJ9()); - for (int j = 0; j < 10; j++) { + for (int j = 0; j < dumpCnt; j++) { Path recording = Files.createTempFile("dump-", ".jfr"); try { for (int i = 0; i < 50; i++) { diff --git a/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/ObjectSampleDumpSmokeTest.java b/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/ObjectSampleDumpSmokeTest.java index 9cc1df59..8582783a 100644 --- a/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/ObjectSampleDumpSmokeTest.java +++ b/ddprof-test/src/test/java/com/datadoghq/profiler/jfr/ObjectSampleDumpSmokeTest.java @@ -21,6 +21,6 @@ protected String getProfilerCommand() { @RetryingTest(5) @Timeout(value = 300) public void test() throws Exception { - runTest("datadog.ObjectSample", "method3"); + runTest("datadog.ObjectSample", 3, "method3"); } }