-
Notifications
You must be signed in to change notification settings - Fork 937
Add corretto-8 to test matrix #1274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
out = p.profile("-d 3 -e cpu -o collapsed --safe-mode 31"); | ||
Assert.isGreater(out.ratio("unknown_Java"), 0.1); | ||
Assert.isGreater(out.ratio("unknown_Java"), 0.05); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 0.1
have any special meaning? The smallest value I've seen so far is 0.08
, but this feels like it should be a simple > 0
unless we have a specific value in mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show profile when the test fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 4
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 1
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg;java/lang/Integer.doubleValue 5
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg;java/lang/Float.doubleValue 1
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 53
[unknown_Java] 27
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg;java/lang/Integer.doubleValue 6
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg;java/lang/Long.doubleValue 23
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 54
test/recovery/Numbers.main;test/recovery/Numbers.loop 47
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 52
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg;java/lang/Long.doubleValue 15
test/recovery/Numbers.main;test/recovery/Numbers.loop 7
test/recovery/Numbers.main;test/recovery/Numbers.loop;test/recovery/Numbers.avg 4
@apangin do you have any other input on the changes in this PR? |
test/test/jfr/JfrTests.java
Outdated
@Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,alloc=100,file=%f.jfr", os = Os.LINUX) | ||
@Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,file=%f.jfr", os = Os.MACOS, arch = Arch.ARM64) | ||
@Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,lock=10ms,file=%f.jfr", os = Os.MACOS, arch = Arch.ARM64) | ||
@Test(mainClass = JfrMultiModeProfiling.class, agentArgs = "start,all,file=%f.jfr", os = Os.LINUX, jvmVer = {11, Integer.MAX_VALUE}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 11+? Is it because of live
profiling not supported on JDK 8?
I think --all
should still work on JDK 8, although without live object profiling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, failure here: https://github.com/async-profiler/async-profiler/actions/runs/15116002786/job/42486783966#step:10:113
I'll fix the failure in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments addressed |
src/profiler.cpp
Outdated
|
||
if (_event_mask & EM_ALLOC) { | ||
if (args._all && VM::hotspot_version() < 11) { | ||
Log::debug("'live' option was quietly removed, only supported on OpenJDK 11+"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurate: _live
is also supported with OpenJ9.
Why not checking _all
in AllocTracer::check
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/test/jfr/JfrTests.java
Outdated
private static boolean checkJdkVersionEarlierThan11() { | ||
String javaVersion = System.getProperty("java.version"); | ||
return javaVersion.startsWith("1.") || Integer.parseInt(javaVersion.split("\\.")[0]) < 11; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returns the version of the host JDK (test runner), which may differ from the JDK version used by the test itself.
You may find the version from the JFR recording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/allocTracer.cpp
Outdated
if (args._live) { | ||
// This engine is only going to be selected in Profiler::selectAllocEngine | ||
// when can_generate_sampled_object_alloc_events is not available, i.e. | ||
// JDK<11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just came across this yesterday: https://lkml.org/lkml/2020/5/29/1038
I'm fully with Linus on this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From one extreme to another :)
There are no strict requirements how long a line should be. Just keep it in a shape that looks fine and reads fine.
// This engine is only going to be selected in Profiler::selectAllocEngine
// when can_generate_sampled_object_alloc_events is not available, i.e. JDK<11.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
In this PR I extend the test matrix to run Java integration tests on JDK 8.
Related issues
Fixes #1213
Motivation and context
We should test JDK 8 as well.
How has this been tested?
GHA
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.