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

Save/load nmethod without going through CodeBuffer #27

Draft
wants to merge 1 commit into
base: premain
Choose a base branch
from

Conversation

ashu-mehra
Copy link
Collaborator

@ashu-mehra ashu-mehra commented Dec 11, 2024

This is the prototype for storing and loading nmethods without going through the CodeBuffer.
The new implementation is protected by the flag -XX:+UseNewCode2.

Some numbers using this implementation:
spring-boot-getting-started [0] shows startup improvement of ~ 7.5%% and quarkus-getting-started [1] shows improvement of around ~3.5%.

Numbers for Springboot

Old build = /home/asmehra/data/ashu-mehra/leyden/build/nmethod-single-copy-load-release/images/jdk with options -XX:+UnlockDiagnosticVMOptions -XX:-UseNewCode2
New build = /home/asmehra/data/ashu-mehra/leyden/build/nmethod-single-copy-load-release/images/jdk with options -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode2
Run,Old CDS + AOT,New CDS + AOT
1,544,512
2,554,525
3,550,508
4,571,515
5,550,506
6,552,515
7,568,510
8,554,517
9,551,506
10,556,508
Geomean,554.94,512.17
Stdev,7.90,5.65

Numbers for Quarkus:

Old build = /home/asmehra/data/ashu-mehra/leyden/build/nmethod-single-copy-load-release/images/jdk with options -XX:+UnlockDiagnosticVMOptions -XX:-UseNewCode2
New build = /home/asmehra/data/ashu-mehra/leyden/build/nmethod-single-copy-load-release/images/jdk with options -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode2
Run,Old CDS + AOT,New CDS + AOT
1,359,346
2,360,353
3,373,357
4,376,356
5,366,353
6,360,356
7,361,361
8,347,349
9,355,336
10,374,342
Geomean,363.00,350.82
Stdev,8.70,7.27

-Xlog:init logs the load time from AOT code cache at JVM exit.
For spring-boot-getting-started without UseNewCode2:

[3.459s][info][init]     SC Load Time:           0.202 s
[3.459s][info][init]       nmethod register:       0.135 s
[3.459s][info][init]       find cached code:       0.007 s

For spring-boot-getting-started with UseNewCode2:

[3.192s][info][init] 
[3.192s][info][init]     SC Load Time:           0.138 s
[3.192s][info][init]       nmethod register:       0.111 s
[3.192s][info][init]       find cached code:       0.006 s

For quarkus-getting-started without UseNewCode2

[0.392s][info][init]     SC Load Time:           0.060 s
[0.392s][info][init]       nmethod register:       0.039 s
[0.392s][info][init]       find cached code:       0.002 s

For quarkus-getting-started with UseNewCode2

[0.386s][info][init]     SC Load Time:           0.033 s
[0.386s][info][init]       nmethod register:       0.027 s
[0.386s][info][init]       find cached code:       0.002 s

[0] https://github.com/openjdk/leyden/tree/premain/test/hotspot/jtreg/premain/spring-boot-getting-started
[1] https://github.com/openjdk/leyden/tree/premain/test/hotspot/jtreg/premain/quarkus-getting-started


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/leyden/pull/27.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 11, 2024

👋 Welcome back asmehra! A progress list of the required criteria for merging this PR into premain 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 Dec 11, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@ashu-mehra
Copy link
Collaborator Author

@adinn @vnkozlov fyi

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

Successfully merging this pull request may close these issues.

1 participant