Skip to content

Conversation

@shipilev
Copy link
Member

@shipilev shipilev commented Feb 12, 2025

Noticed this in manual CTW runs after JDK-8348570 that lots and lots of methods are compiled at level 2 instead of requested level 3:

...
[97] javax.enterprise.deploy.shared.ActionType::getValue() WARNING compilation level = 2, but not 3
[97] javax.enterprise.deploy.shared.ActionType::getOffset() WARNING compilation level = 2, but not 3
[97] javax.enterprise.deploy.shared.ActionType::getEnumValueTable() WARNING compilation level = 2, but not 3
[97] javax.enterprise.deploy.shared.ActionType::getStringTable() WARNING compilation level = 2, but not 3
[97] javax.enterprise.deploy.shared.ActionType::getActionType(int) WARNING compilation level = 2, but not 3
[97] javax.enterprise.deploy.shared.ActionType::toString() WARNING compilation level = 2, but not 3
[99] javax.enterprise.deploy.shared.DConfigBeanVersionType
[98] javax.enterprise.deploy.shared.CommandType::toString() WARNING compilation level = 2, but not 3
[98] javax.enterprise.deploy.shared.CommandType::getOffset() WARNING compilation level = 2, but not 3
...

I narrowed it down to level downgrade in compilation policy here:

max_task->set_comp_level(CompLevel_limited_profile);

JDK-8348570 enters here, because we mark all methods as having profiles to extend the CTW scope. So now is_method_profiled(max_method_h) is true and downgrade happens. There is already check for !Arguments::is_compiler_only() there, so I think we better exclude CTW from this downgrade as well.

I looked at possibly making this kind of downgrade fatal in CTW runner, but the error propagation there is not simple. I filed JDK-8349917 if anyone want to take a stab on it.

I looked at other set_comp_level() uses in Hotspot, and this is the only place where it is called. So I presume we have caught all places where this downgrade can happen.

Additional testing:

  • Linux x86_64 server fastdebug, eyeballing some manual CTW run results
  • Linux x86_64 server fastdebug, applications/ctw/modules passes

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8349915: CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570 (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23589/head:pull/23589
$ git checkout pull/23589

Update a local copy of the PR:
$ git checkout pull/23589
$ git pull https://git.openjdk.org/jdk.git pull/23589/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23589

View PR using the GUI difftool:
$ git pr show -t 23589

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23589.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 12, 2025

👋 Welcome back shade! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 12, 2025

@shipilev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8349915: CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570

Reviewed-by: kvn, chagedorn

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 42 new commits pushed to the master branch:

  • b6443f6: 8348347: Cleanup JavaThread subclass support in SA
  • ba6c965: 8348595: GenShen: Fix generational free-memory no-progress check
  • 3832240: 8348594: Shenandoah: Do not penalize for degeneration when not the fault of triggering heuristic
  • 2a90b90: 8346117: Add test annotation
  • 0414dce: 8349812: (fs) Files.newByteChannel with empty path name and CREATE_NEW throws unexpected exception
  • 9ea81d9: 8349351: Combine Screen Inset Tests into a Single File
  • 742e735: 8349858: Print compilation task before blocking compiler thread for shutdown
  • db42a48: 8350011: Convert jpackage test lib tests in JUnit format
  • 19c0ce4: 8349751: AIX build failure after upgrade pipewire to 1.3.81
  • fa1bd23: 8343802: Prevent NULL usage backsliding
  • ... and 32 more: https://git.openjdk.org/jdk/compare/08f4c1c801c8c3553c1380e1d019a487bd0a25ea...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 12, 2025
@openjdk
Copy link

openjdk bot commented Feb 12, 2025

@shipilev The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Feb 12, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 12, 2025

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just ignore this task selection for CTW? And just use FIFO.
I assume we not go here for ciReplay and JVMCI bootstrap. Which are blocking too.

@shipilev
Copy link
Member Author

Should we just ignore this task selection for CTW? And just use FIFO. I assume we not go here for ciReplay and JVMCI bootstrap. Which are blocking too.

Actually, yes! We should probably just accept the first task with compile_reason() == Whitebox. Would probably make CTW marginally faster, like we have seen with SCC tasks in Leyden.

@shipilev
Copy link
Member Author

Actually, yes! We should probably just accept the first task with compile_reason() == Whitebox. Would probably make CTW marginally faster, like we have seen with SCC tasks in Leyden.

Done in new commit. Still fixes the issue, and the fix is arguably cleaner than overloading the already complicated predicate with another check.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 12, 2025
@shipilev
Copy link
Member Author

Thanks! I think I need a second Reviewer for this to go in :)

@shipilev
Copy link
Member Author

@eme64, @chhagedorn -- could you take a look as well? There is a recent hole in CTW testing that I want to plug before weekend runs start :)

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry only seen this now. Looks good to me, too!

@shipilev
Copy link
Member Author

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Feb 15, 2025

Going to push as commit 6234536.
Since your change was applied there have been 42 commits pushed to the master branch:

  • b6443f6: 8348347: Cleanup JavaThread subclass support in SA
  • ba6c965: 8348595: GenShen: Fix generational free-memory no-progress check
  • 3832240: 8348594: Shenandoah: Do not penalize for degeneration when not the fault of triggering heuristic
  • 2a90b90: 8346117: Add test annotation
  • 0414dce: 8349812: (fs) Files.newByteChannel with empty path name and CREATE_NEW throws unexpected exception
  • 9ea81d9: 8349351: Combine Screen Inset Tests into a Single File
  • 742e735: 8349858: Print compilation task before blocking compiler thread for shutdown
  • db42a48: 8350011: Convert jpackage test lib tests in JUnit format
  • 19c0ce4: 8349751: AIX build failure after upgrade pipewire to 1.3.81
  • fa1bd23: 8343802: Prevent NULL usage backsliding
  • ... and 32 more: https://git.openjdk.org/jdk/compare/08f4c1c801c8c3553c1380e1d019a487bd0a25ea...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 15, 2025
@openjdk openjdk bot closed this Feb 15, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 15, 2025
@openjdk
Copy link

openjdk bot commented Feb 15, 2025

@shipilev Pushed as commit 6234536.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@AlanBateman
Copy link
Contributor

compiler/tiered/Level2RecompilationTest.java is now failing, tracked by JDK-8350159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants