Allocate G1ParScanThreadState at the start of GC and only deallocate at the end of GC. This automatically keeps the current PLAB intact without flushing it (and loosing lots of memory) for every reallocation.
Reviewed-by: david, mgerdin
Remember for every generation whether the memory for that generation has already been exhausted. If so, do not try to get a new region for these generations. Further, if the last generation is full, early exit from copy_to_survivor_space.
Reviewed-by: jmasa, brutisso
Remove direct access to private members of G1CollectedHeap from G1Allocator and G1ArchiveAllocator. Allows removal of friend delcarations.
Reviewed-by: kbarrett, jmasa, jwilhelm
Some PLAB related flags' validation can happen after heap creation. Introduced additional stage of validation check.
Reviewed-by: coleenp, dholmes, kbarrett, gziemski, ecaspole, ddmitriev
Use the regular task queue during evacuation failure and allow per-thread preserved header queues to remove the global lock during evacuation failure.
Reviewed-by: mgerdin, jmasa
G1Allocator::_summary_bytes_used fits better in G1CollectedHeap since we added the archive allocator. Move it back to the original location.
Reviewed-by: mgerdin, tbenson
Remove "include_young" parameter from GenCollectedHeap::no_allocs_since_save_marks() since all existing uses pass true to always rescan young gen.
Reviewed-by: jmasa, kbarrett
Calculate the desired PLAB value for a single thread and then return desired PLAB size according to the current number of threads when needed
Reviewed-by: jmasa, tschatzl
To improve performance of self-forwarding fixup during evacuation failure, coalesce the work done for dead objects.
Reviewed-by: mgerdin, tbenson, tonyp
In JDK-8042668 we introduced a custom fill threshold for G1. This leads to CollectedHeap::fill_with_objects create too large objects in G1 when using it in 32 bit mode, as the code to create multiple filler objects is IFDEF'ed out on 32 bit. Enable this code on 32 bit too.
Reviewed-by: tonyp, mgerdin, tbenson
After refactoring of the relevant code in JDK-8060025 the survivor alignment had been applied to any allocation within PLABs. Only do that for survivor allocations again. Improve the related tests to have less variance.
Reviewed-by: jmasa, fzhinkin
Validate the arguments to all JVM command-line flags so as to avoid crashes, and ensure that appropriate error messages are displayed when they are invalid.
Reviewed-by: ddmitriev, dholmes, kbarrett, drwhite, brutisso, coleenp
CMSClassUnloadingEnabled and ExplicitGCInvokesConcurrentAndUnloadsClasses should be disabled when -Xnoclassgc is specified
Reviewed-by: jmasa, kbarrett