Integrated: 8299061: Using lambda to optimize GraphKit::compute_stack_effects()
Xin Liu
xliu at openjdk.org
Wed Dec 21 16:51:57 UTC 2022
On Tue, 20 Dec 2022 07:18:05 GMT, Xin Liu <xliu at openjdk.org> wrote:
> Some bytecodes donot need rsize in GraphKit::compute_stack_effects().
> This change defines rsize as a lambda and avoid computation if it's not in use.
>
> We utilize CTW($openjdk/test/hotspot/jtreg/testlibrary/ctw/dist) to test this patch.
> We compile 2 builtin modules: java.base and jdk.compiler(javac).
>
>
> JAVA_OPTIONS="-XX:+CITime -XX:-TieredCompilation" ./ctw.sh modules:java.base
> JAVA_OPTIONS="-XX:+CITime -XX:-TieredCompilation" ./ctw.sh modules:jdk.compiler
>
> For jdk.compiler module, the average compilation speed increases from 13236 bytes/s to 13303 bytes/s, or +0.51%.
> For java.base module, the average compilation speed is almost same(+0.3%)
>
>
> | java.base | before | after | diff |
> |---------------------------|-----------|-----------|-------|
> | C2 Compile Time(s) | 341.218 | 339.75 | |
> | Parse Time(s) | 125.403 | 125.034 | |
> | ratio of parse | 36.75% | 36.80% | |
> | throughput(bytes/s) | 11841.628* | 11876.831 | 0.30% |
> | Average compilation speed | 11779 | 11816 | 0.31% |
> | Total compiled methods | 58148 | 58158 | |
> | | | | |
>
>
> | jdk.compiler | before | after | |
> |---------------------------|-----------|-----------|-------|
> | C2 Compile Time(s) | 66.486 | 66.087 | |
> | Parse Time(s) | 21.877 | 21.731 | |
> | ratio of parse | 32.90% | 32.88% | |
> | throughput(bytes/s) | 14342.883 | 14436.494 | 0.65% |
> | Average compilation speed | 13236 | 13303 | 0.51% |
> | Total compiled methods | 13734 | 13730 | |
> | | | | |
>
>
> *Throughtput is reported from Tier4 row. It's very close to 'Average compilation speed' but not exactly same. eg. here is from java.base module.
>
>
> before:
> Tier4 {speed: 11841.628 bytes/s; standard: 339.754 s, 4014210 bytes, 58115 methods; osr: 0.345 s, 13109 bytes, 33 methods; nmethods_size: 52147560 bytes; nmethods_code_size: 32146360 bytes}
> after:
> Tier4 {speed: 11876.831 bytes/s; standard: 338.350 s, 4009949 bytes, 58126 methods; osr: 0.368 s, 12951 bytes, 32 methods; nmethods_size: 52122744 bytes; nmethods_code_size: 32124952 bytes}
This pull request has now been integrated.
Changeset: 10d62fa2
Author: Xin Liu <xliu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/10d62fa2183c0ed252ad0a9a743ae6a7710f9a95
Stats: 17 lines in 1 file changed: 6 ins; 6 del; 5 mod
8299061: Using lambda to optimize GraphKit::compute_stack_effects()
Reviewed-by: kbarrett, thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/11737
More information about the hotspot-compiler-dev
mailing list