8156207: Resource allocated BitMaps are often cleared unnecessarily
Removed unnecessary clearing of BitMap. Reviewed-by: kbarrett, kvn, thartmann
This commit is contained in:
parent
b2a9f90a94
commit
3135a96dc0
@ -830,8 +830,8 @@ MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* metho
|
||||
|
||||
#ifdef ASSERT
|
||||
ResourceMark rm;
|
||||
ResourceBitMap g(_gen.size()); g.set_from(_gen);
|
||||
ResourceBitMap k(_kill.size()); k.set_from(_kill);
|
||||
ResourceBitMap g(_gen.size(), false); g.set_from(_gen);
|
||||
ResourceBitMap k(_kill.size(), false); k.set_from(_kill);
|
||||
#endif
|
||||
if (_last_bci != bci || trueInDebug) {
|
||||
ciBytecodeStream bytes(method);
|
||||
|
@ -133,8 +133,8 @@ void BitMap::reinitialize(const Allocator& allocator, idx_t new_size_in_bits, bo
|
||||
initialize(allocator, new_size_in_bits, clear);
|
||||
}
|
||||
|
||||
ResourceBitMap::ResourceBitMap(idx_t size_in_bits)
|
||||
: BitMap(allocate(ResourceBitMapAllocator(), size_in_bits), size_in_bits) {
|
||||
ResourceBitMap::ResourceBitMap(idx_t size_in_bits, bool clear)
|
||||
: BitMap(allocate(ResourceBitMapAllocator(), size_in_bits, clear), size_in_bits) {
|
||||
}
|
||||
|
||||
void ResourceBitMap::resize(idx_t new_size_in_bits) {
|
||||
|
@ -329,8 +329,8 @@ class ResourceBitMap : public BitMap {
|
||||
|
||||
public:
|
||||
ResourceBitMap() : BitMap(NULL, 0) {}
|
||||
// Clears the bitmap memory.
|
||||
ResourceBitMap(idx_t size_in_bits);
|
||||
// Conditionally clears the bitmap memory.
|
||||
ResourceBitMap(idx_t size_in_bits, bool clear = true);
|
||||
|
||||
// Resize the backing bitmap memory.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user