8086053: Address inconsistencies regarding ZeroTLAB

Add zero-initialization to C1 for fast TLAB refills; strenghten C2 conditions for skipping zero-initialization.

Reviewed-by: kvn, thartmann
This commit is contained in:
Zoltan Majo 2016-01-12 09:19:09 +01:00
parent 5be1924e89
commit dfa6539a6a
18 changed files with 215 additions and 128 deletions

View file

@ -105,7 +105,7 @@ void ThreadLocalAllocBuffer::accumulate_statistics() {
// an illusion of a contiguous Eden and optionally retires the tlab.
// Waste accounting should be done in caller as appropriate; see,
// for example, clear_before_allocation().
void ThreadLocalAllocBuffer::make_parsable(bool retire) {
void ThreadLocalAllocBuffer::make_parsable(bool retire, bool zap) {
if (end() != NULL) {
invariants();
@ -113,7 +113,7 @@ void ThreadLocalAllocBuffer::make_parsable(bool retire) {
myThread()->incr_allocated_bytes(used_bytes());
}
CollectedHeap::fill_with_object(top(), hard_end(), retire);
CollectedHeap::fill_with_object(top(), hard_end(), retire && zap);
if (retire || ZeroTLAB) { // "Reset" the TLAB
set_start(NULL);