提交 8e8cdb04 编写于 作者: T thartmann

8156207: Resource allocated BitMaps are often cleared unnecessarily

Summary: Removed unnecessary clearing of BitMap.
Reviewed-by: kbarrett, kvn, thartmann
Contributed-by: NChristian Hagedorn <christian.hagedorn@oracle.com>
上级 ad6715bb
......@@ -994,8 +994,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) {
initialize(allocator, new_size_in_bits);
}
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) {
......
......@@ -319,8 +319,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.
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册