RFR: 8256274: C2: Optimize copying of the shared type dictionary [v3]
Claes Redestad
redestad at openjdk.java.net
Fri Nov 13 14:40:19 UTC 2020
> - Remove unused (and subtly broken) Dict deep copy constructors
> - Add a fixed, deep copy constructor to Dict which also takes the arena to allocate the copy in
> - Use this new deep copy constructor in Type::Initialize instead of copying by iterating over the shared dict
>
> This reduce the overhead of each C2 compilation by ~32k instructions[1], with a noticeable gain on targeted micros such as `trivialMath_repeat_c2`. Baseline:
> Benchmark Mode Cnt Score Error Units
> SimpleRepeatCompilation.trivialMath_repeat_c2 ss 10 396.004 ± 3.061 ms/op
> Patch:
> Benchmark Mode Cnt Score Error Units
> SimpleRepeatCompilation.trivialMath_repeat_c2 ss 10 354.639 ± 1.929 ms/op
>
> (Each fork does 2000 repeated compilations, so the improvement is somewhere around 20us/compilation)
>
> [1] when instrumenting with valgrind+callgrind
Claes Redestad has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- Merge branch 'master' into copy_shared_dict
- Dict clean-up, remove dead code
- Merge branch 'master' into copy_shared_dict
- Clean-up, copyrights
- 8256274: C2: Optimize copying of the shared type dictionary on compilation setup
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1186/files
- new: https://git.openjdk.java.net/jdk/pull/1186/files/bcd6adb0..d7915366
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1186&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1186&range=01-02
Stats: 9462 lines in 141 files changed: 6048 ins; 1800 del; 1614 mod
Patch: https://git.openjdk.java.net/jdk/pull/1186.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1186/head:pull/1186
PR: https://git.openjdk.java.net/jdk/pull/1186
More information about the hotspot-compiler-dev
mailing list