RFR(S): Handle Java heap initialization and expansion failure
Aleksey Shipilev
shade at redhat.com
Thu Aug 10 20:51:21 UTC 2017
On 08/10/2017 10:34 PM, Zhengyu Gu wrote:
> Java heap initialization and expansion may not always success.
>
> Fail to initialize Java heap should result JVM to exit with OOM error, and fail to expand Java heap
> should not result fatal crash.
>
> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/handle_heap_expansion_failure/webrev.00/
Looks okay.
*) The option seems Shenandoah-specific, so should be predicated by "Shenandoah"?
321 develop(int, FailHeapExpansionAfter, -1, \
*) Not SIZE_FORMAT_HEX, but SIZE_FORMAT here, no?
1697 log_trace(gc, region)("Expanded storage by "SIZE_FORMAT_HEX" bytes, for "SIZE_FORMAT" new
regions", expand_size, new_regions);
1699 log_warning(gc, region)("Failed to expand storage by "SIZE_FORMAT_HEX" bytes, for
"SIZE_FORMAT" new regions", expand_size, new_regions);
*) I think the commit path in new code for region commit/uncommit should be handled too. Can be done
separately.
*) AllocALotObjects should store the objects on heap -- e.g. in the volatile field, to avoid
compiler optimizations trimming the loop down. For example, OSR *may* compile this without side-effects?
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list