RFR: 8299061: Using lambda to optimize GraphKit::compute_stack_effects() [v2]
Xin Liu
xliu at openjdk.org
Tue Dec 20 19:55:31 UTC 2022
> 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 java.base module, the average compilation speed increases from 12011 bytes/s to 12301 bytes/s, or +2.41%.
> For jdk.compiler module, the average compilation speed is almost same(+0.16%)
>
>
> | java.base | before | after |diff |
> |---------------------------|-----------|-----------|-------|
> | C2 Compile Time(s) | 333.767 | 325.939 | |
> | Parse Time(s) | 123.076 | 120.976 | |
> | ratio | 36.87% | 37.12% | |
> | throughput(bytes/s)* | 12073.418 | 12368.028 | 2.44% |
> | Average compilation speed | 12011 | 12301 | 2.41% |
> | Total compiled methods | 58151 | 58145 | |
>
>
> | jdk.compiler | before | after |diff |
> |---------------------------|-----------|-----------|-------|
> | C2 Compile Time(s) | 66.313 | 66.196 | |
> | Parse Time(s) | 21.681 | 21.445 | |
> | ratio | 32.69% | 32.40% | |
> | throughput(bytes/s) | 14350.804 | 14399.76 | 0.34% |
> | Average compilation speed | 13255 | 13276 | 0.16% |
> | Total compiled methods | 13729 | 13733 | |
>
>
> *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: 12073.418 bytes/s; standard: 332.362 s, 4004535 bytes, 58121 methods; osr: 0.327 s, 12154 bytes, 30 methods; nmethods_size: 52104768 bytes; nmethods_code_size: 32117912 bytes}
> after:
> Tier4 {speed: 12368.028 bytes/s; standard: 324.500 s, 4004111 bytes, 58113 methods; osr: 0.344 s, 13565 bytes, 32 methods; nmethods_size: 52110000 bytes; nmethods_code_size: 32118984 bytes}
Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
further simplify the lambda based on the feedbacks of reviewers.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11737/files
- new: https://git.openjdk.org/jdk/pull/11737/files/77c09f3f..6928d36e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11737&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11737&range=00-01
Stats: 8 lines in 1 file changed: 0 ins; 5 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/11737.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11737/head:pull/11737
PR: https://git.openjdk.org/jdk/pull/11737
More information about the hotspot-compiler-dev
mailing list