Mercurial > hg > truffle
comparison src/share/vm/memory/threadLocalAllocBuffer.cpp @ 18697:ee26b8eb1601
Check for overzeroing in the TLAB
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 16 Dec 2014 13:28:33 -0800 |
parents | 52b4284cb496 |
children | 8f2fb6bec986 |
comparison
equal
deleted
inserted
replaced
18696:b2859128b76a | 18697:ee26b8eb1601 |
---|---|
40 unsigned ThreadLocalAllocBuffer::_target_refills = 0; | 40 unsigned ThreadLocalAllocBuffer::_target_refills = 0; |
41 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats = NULL; | 41 GlobalTLABStats* ThreadLocalAllocBuffer::_global_stats = NULL; |
42 | 42 |
43 void ThreadLocalAllocBuffer::clear_before_allocation() { | 43 void ThreadLocalAllocBuffer::clear_before_allocation() { |
44 _slow_refill_waste += (unsigned)remaining(); | 44 _slow_refill_waste += (unsigned)remaining(); |
45 // In debug mode we expect the storage above top to be uninitialized | |
46 // or filled with a padding object. | |
47 assert(top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected"); | |
45 make_parsable(true); // also retire the TLAB | 48 make_parsable(true); // also retire the TLAB |
46 } | 49 } |
47 | 50 |
48 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() { | 51 void ThreadLocalAllocBuffer::accumulate_statistics_before_gc() { |
49 global_stats()->initialize(); | 52 global_stats()->initialize(); |