RFR: 8020277: Young GC could be extremely slow due to assertion in ObjectStartArray::object_starts_in_range (original) (raw)

Stefan Johansson stefan.johansson at oracle.com
Tue Jan 21 13:17:20 UTC 2014


Hi,

Can I have a couple of reviews for this fix for: https://bugs.openjdk.java.net/browse/JDK-8020277

Webrev: http://cr.openjdk.java.net/~sjohanss/8020277/webrev.00/

Summary: There have been a couple of bugs filed about varying/slow gc times for ParallelScavenge in debug builds. The reason for the slow down is an assertion in object_starts_in_range() that tries to verify that the range (mapping to one card) really doesn't have any objects starting in it. The assertion uses object_start() to find the first object starting before the end of the range. The reason for this being really slow is that object_start() won't stop looking for an object until it finds it, even if it's out of the range we're currently verifying. So on a heap with many large objects that span more than one card, a lot of extra work is done.

My proposed fix is to just remove this assertion. An alternative would be to limit the verification to just check the range we are interested in. I started looking at doing this but realized that such a limitation would end up being very similar to what is currently done in object_starts_in_range() and with this in mind I think we can just remove the assertion. I checked JBS to see if there were many bugs reported with this assertion as cause, but I only found this bug and 8009462 which also lists this assertion as the reason for slow GC times.

Testing:

Thanks, Stefan



More information about the hotspot-gc-dev mailing list