RFR: 8259808: Add JFR event to detect GC locker stall [v4]
Thomas Schatzl
tschatzl at openjdk.java.net
Wed Jan 27 15:31:43 UTC 2021
On Tue, 26 Jan 2021 11:03:15 GMT, Denghui Dong <ddong at openjdk.org> wrote:
>> test/jdk/jdk/jfr/event/gc/detailed/TestGCLockerEvent.java line 116:
>>
>>> 114: ts[i] = new Thread(() -> {
>>> 115: STALL_COUNT_SIGNAL.countDown();
>>> 116: for (int j = 0; j < LOOP; j++) {
>>
>> Since the test already uses WhiteBox, please use whitebox to trigger a gc instead of this dodgy method.
>
> Triggering a GC is not enough, I hope these threads could be stalled by the GC locker(call GCLocker::stall_until_clear) so that a correct assertion of the number of stall count could be added.
> I think it could not be done by WhiteBox::youngGC/fullGC, please correct me if I'm wrong.
I agree, although this is more a theoretical concern since it's not checked. Let's keep this for now as is though.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2088
More information about the hotspot-jfr-dev
mailing list