RFR: 8254877: GCLogPrecious::_lock rank constrains what locks you are allowed to have when crashing
Erik Österlund
eosterlund at openjdk.java.net
Wed Oct 28 11:42:55 UTC 2020
Today, when you crash, the GCLogPrecious::_lock is taken. This effectively limits you to only get clean crash reports if you crash or assert without holding a lock of rank tty or lower. It is arguably difficult to know what locks you are going to have when crashing. Therefore, I don't think the precious GC log should constrain possible crashing contexts in that fashion.
This patch inserts the precious GC lines into a linked list instead, that can be traversed concurrently, without holding any locks. This allows you to crash in contexts where "low" ranked locks are held.
I have manually verified that the hs_err precious GC log looks identical before and after my change.
-------------
Commit messages:
- 8254877: GCLogPrecious::_lock rank constrains what locks you are allowed to have when crashing
Changes: https://git.openjdk.java.net/jdk/pull/900/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=900&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8254877
Stats: 50 lines in 2 files changed: 41 ins; 2 del; 7 mod
Patch: https://git.openjdk.java.net/jdk/pull/900.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/900/head:pull/900
PR: https://git.openjdk.java.net/jdk/pull/900
More information about the hotspot-gc-dev
mailing list