8382135: AArch64: HotCodeCollectorMoveFunction.java fails intermittently#31157
8382135: AArch64: HotCodeCollectorMoveFunction.java fails intermittently#31157chadrako wants to merge 3 commits into
Conversation
|
👋 Welcome back crakoczy! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Webrevs
|
|
Thanks for your fix. Not a code review.
|
| while (System.currentTimeMillis() - start < FUNC_RUN_MILLIS) { | ||
| for (int i = 0; i < Integer.MAX_VALUE; i++) { | ||
| num += i; | ||
| } |
There was a problem hiding this comment.
A compiler can optimize this loop away. It's the Gauss formula for the sum of the first n
consecutive positive integers.
Maybe
int count = 0, num = 1;
do {
count++, num *= 69069;
} while (num != 1);
blackhole(count);
or blackhole(i) in the loop, perhaps?
JDK-8382135
HotCodeCollectorMoveFunctionfailed on Nvidia Grace because all samples collected were forSystem.currentTimeMillis()which lives outside of the code cache. The test expects that at least one sample comes fromHotCodeCollectorMoveFunction::func().The fix for this is to run more code inside of
funcso that the computation is not dominated by the JNI call.I also proactively fixed a potential race condition in the sampler where
CodeCache::find_blobcould return nullptr even though it was guarded byCodeCache::contains(pc). This change is low risk.Before the patch I was able to get the test failure to reproduce every run. I no longer see the failure after the patch.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31157/head:pull/31157$ git checkout pull/31157Update a local copy of the PR:
$ git checkout pull/31157$ git pull https://git.openjdk.org/jdk.git pull/31157/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31157View PR using the GUI difftool:
$ git pr show -t 31157Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31157.diff
Using Webrev
Link to Webrev Comment