RFR: 8256274: C2: Optimize copying of the shared type dictionary [v3]
Nils Eliasson
neliasso at openjdk.java.net
Fri Nov 13 14:40:22 UTC 2020
On Fri, 13 Nov 2020 14:37:37 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> - 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
Still good!
-------------
Marked as reviewed by neliasso (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1186
More information about the hotspot-compiler-dev
mailing list