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 13:30:50 UTC 2020


On Wed, 28 Oct 2020 13:15:10 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> 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.
>
> Changes requested by kbarrett (Reviewer).

I had some offline discussions with StefanK. He would like to keep the stringStream that we have today, so that he can print the precious GC log from a debugger with less effort. He has an entirely different alternative. So I am going to close this PR, in favour of Stefan's solution.

-------------

PR: https://git.openjdk.java.net/jdk/pull/900



More information about the hotspot-gc-dev mailing list