RFR: 8274191: Improve g1 evacuation failure injector performance
Thomas Schatzl
tschatzl at openjdk.java.net
Thu Sep 23 13:33:12 UTC 2021
Hi all,
can I have reviews for this change that improves evacuation failure injector performance to be usable for pinned region performance work?
The suspected reason I think why performance is so bad (image in the CR), is that the unsynchronized reads and writes to `G1YoungGCEvacFailureInjector::_evacuation_failure_object_count` cause massive performance issue if done millions of times.
This change makes that counter thread-local, fixing that issue completely.
I initially had a prototype using a `THREAD_LOCAL`, but when testing I had the feeling that this is/was slightly slower and I thought that adding a variable to every thread where most do not use them seems to be a waste.
Testing: local testing, GHA
Thanks,
Thomas
-------------
Commit messages:
- Fixes
- Make injector counter local
Changes: https://git.openjdk.java.net/jdk/pull/5650/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5650&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8274191
Stats: 34 lines in 5 files changed: 17 ins; 8 del; 9 mod
Patch: https://git.openjdk.java.net/jdk/pull/5650.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5650/head:pull/5650
PR: https://git.openjdk.java.net/jdk/pull/5650
More information about the hotspot-gc-dev
mailing list