RFR: 8257189: Handle concurrent updates of MH.form better [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Wed Dec 2 11:42:16 UTC 2020
> Concurrent updates may lead to redundant LambdaForms created and unnecessary class loading when those are compiled.
>
> Most notably, it severely affects MethodHandle customization: when a MethodHandle is called from multiple threads, every thread starts customization which takes enough time for other threads to join, but only one of those customizations will be picked.
>
> Coordination between threads requesting the updates and letting a single thread proceed avoids the aforementioned problem. Moreover, there's no need to wait until the update in-flight is over: all other threads (except the one performing the update) can just proceed with the invocation using the existing MH.form.
>
> Testing:
> - manually monitored the behavior on a stress test from [JDK-8252049](https://bugs.openjdk.java.net/browse/JDK-8252049)
> - tier1-4
Vladimir Ivanov 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 three additional commits since the last revision:
- Minor cleanups
- Merge branch 'master' into 8257189.mh.customization.concurrent
- Improve concurrent LF customization
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1472/files
- new: https://git.openjdk.java.net/jdk/pull/1472/files/1780f57f..9cf759ed
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1472&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1472&range=00-01
Stats: 23494 lines in 558 files changed: 13055 ins; 3034 del; 7405 mod
Patch: https://git.openjdk.java.net/jdk/pull/1472.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1472/head:pull/1472
PR: https://git.openjdk.java.net/jdk/pull/1472
More information about the hotspot-compiler-dev
mailing list