Skip to content
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

8293020: jmod should not be treated as "small" tool for large modules #10062

Closed
wants to merge 3 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Aug 29, 2022

This is similar to JDK-8245168, but the blanket change to allow all modules be compiled with default options is a net loss. Instead, we can hand-pick the major offenders (large modules) where running jmod with normal tool options improves performance.

I instrumented the jmod to tell me the times it needs to create individual modules, and hand-picked three top modules that take multiple seconds to run.

Motivational make clean-images images times:

# x86_64 Server, release

# Baseline
real	0m12.040s
user	1m4.872s
sys	0m10.805s

# Patched
real	0m10.785s  ; <--- 1.2s faster
user	1m7.031s
sys	0m10.985s

# x86_64 Server, fastdebug

# Baseline
real	0m19.263s
user	2m42.317s
sys	0m18.537s

# Patched
real	0m17.911s ;  <--- 1.1s faster
user	2m52.810s
sys	0m19.092s


# x86_64 Server, slowdebug

# Baseline
real	0m44.799s
user	10m7.106s
sys	0m17.578s

# Patched
real	0m46.975s   ; <--- 2.5 sec slower
user	11m1.155s
sys	0m17.060s

I think we can accept the slowdebug regression in favor of improvements on release and fastdebug that most people seem to be building every day.


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-8293020: jmod should not be treated as "small" tool for large modules

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10062

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 29, 2022

👋 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 openjdk bot added the rfr Pull request is ready for review label Aug 29, 2022
@openjdk
Copy link

openjdk bot commented Aug 29, 2022

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

  • build

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 build build-dev@openjdk.org label Aug 29, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 29, 2022

Webrevs

make/CreateJmods.gmk Outdated Show resolved Hide resolved
@openjdk
Copy link

openjdk bot commented Aug 29, 2022

@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:

8293020: jmod should not be treated as "small" tool for large modules

Reviewed-by: erikj, ihse, alanb

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 23 new commits pushed to the master branch:

  • 6e24827: 8292878: x86: Make scratch register usage explicit in assembler code
  • f5ebbf3: 8292657: Calling GetLocalXXX from virtual thread with thread parameter set to NULL returns carrier locals
  • 550e5d7: 4958071: (spec) confusing exception list for javax.crypto.Cipher.init(...) for
  • d3d2e66: 8293009: Remove unused field 'millisPerHour' in DateFormatSymbols
  • f3ebb42: 8293036: x86_64: Move Continuation-related stub methods to MacroAssembler
  • 1576f99: 8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-overread
  • f285cea: 8293037: Remove DebuggerBase.writeBytes() and related code from SA
  • 343333a: 8293004: (fs) FileChannel.transferXXX use of copy_file_range needs fallback handling for ENOSYS
  • b3450e9: 8292850: Unused field 'expiredTimersKey' in javax.swing.TimerQueue
  • 6b7d4b1: 8293028: Remove GenCollectedHeap::handle_failed_promotion
  • ... and 13 more: https://git.openjdk.org/jdk/compare/a476ec5c81968e9a8cf7fb02f61cc4a5c8c2d520...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 ready Pull request is ready to be integrated label Aug 29, 2022
make/CreateJmods.gmk Outdated Show resolved Hide resolved
@shipilev
Copy link
Member Author

/label core-libs

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Aug 30, 2022
@openjdk
Copy link

openjdk bot commented Aug 30, 2022

@shipilev
The core-libs label was successfully added.

@shipilev
Copy link
Member Author

If anyone from core-libs crowd wants to chime in, welcome. Otherwise, I'll integrate soon.

@shipilev
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Aug 31, 2022

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

  • 923c952: 8293098: GHA: Harmonize GCC version handling for host and cross builds
  • 38377d5: 8291649: multiple tests failing with -Xcomp after JDK-8290034
  • 2d7792c: 8293065: Zero build failure on AArch64 and RISCV64 after JDK-8293007
  • c3380c0: 8292995: improve the SA page cache
  • 1cf245d: 8292590: Product JVM crashes with FLAG_SET_XXX on non-product Flag
  • 6335150: 6205692: (spec) javax.crypto.MacSpi.engineUpdate(ByteBuffer input): NPE should be specified
  • 622be79: 8293090: Remove unused par_oop_since_save_marks_iterate_done
  • 3d0ab2b: 8292858: G1: Remove redundant check in G1FlushHumongousCandidateRemSets
  • 6e24827: 8292878: x86: Make scratch register usage explicit in assembler code
  • f5ebbf3: 8292657: Calling GetLocalXXX from virtual thread with thread parameter set to NULL returns carrier locals
  • ... and 21 more: https://git.openjdk.org/jdk/compare/a476ec5c81968e9a8cf7fb02f61cc4a5c8c2d520...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 31, 2022

@shipilev Pushed as commit d2eed07.

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

@shipilev shipilev deleted the JDK-8293020-jmod-nonsmall branch September 5, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants