RFR: Save/load nmethod without going through CodeBuffer [v2]
Ashutosh Mehra
asmehra at openjdk.org
Mon Mar 17 11:53:32 UTC 2025
> 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/op...
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
Minor cleanup
Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
-------------
Changes:
- all: https://git.openjdk.org/leyden/pull/27/files
- new: https://git.openjdk.org/leyden/pull/27/files/04b77eab..417a4450
Webrevs:
- full: https://webrevs.openjdk.org/?repo=leyden&pr=27&range=01
- incr: https://webrevs.openjdk.org/?repo=leyden&pr=27&range=00-01
Stats: 8 lines in 2 files changed: 0 ins; 1 del; 7 mod
Patch: https://git.openjdk.org/leyden/pull/27.diff
Fetch: git fetch https://git.openjdk.org/leyden.git pull/27/head:pull/27
PR: https://git.openjdk.org/leyden/pull/27
More information about the leyden-dev
mailing list