RFR (S): Fix MXBean Full GC notifications
Aleksey Shipilev
shade at redhat.com
Wed Dec 14 12:45:41 UTC 2016
On 12/14/2016 12:38 PM, Roman Kennke wrote:
> Am Mittwoch, den 14.12.2016, 12:04 +0100 schrieb Aleksey Shipilev:
>> Hi,
>>
>> In JMH gc profiler, we have both "alloc" (actual allocations) and
>> "churn" (space
>> freed by collections) counters. For Shenandoah, these counters
>> disagree wildly,
>> because Shenandoah borks notifying MXBeans about Full GCs.
>>
>> Fix:
>> http://cr.openjdk.java.net/~shade/shenandoah/mx-fullgc-
>> notify/webrev.01/
>
>
> Yep.
Of course the test started failing intermittently after I pushed it... This is a
follow-up:
diff -r a2d3be7f08ad test/gc/shenandoah/MXNotificationsFullGC.java
--- a/test/gc/shenandoah/MXNotificationsFullGC.java Wed Dec 14 12:56:20 2016 +0100
+++ b/test/gc/shenandoah/MXNotificationsFullGC.java Wed Dec 14 13:26:22 2016 +0100
@@ -54,6 +54,9 @@
sink = new int[100_000];
}
+ // GC notifications are asynchronous, wait a little
+ Thread.sleep(1000);
+
if (!notified) {
throw new IllegalStateException("Should have been notified");
}
Does not fail after 50 runs.
Ok?
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list