mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8014339: Improve assert and remove some dead code from parMarkBitMap.hpp/cpp
Reviewed-by: stefank, tschatzl
This commit is contained in:
parent
9cfde1acc3
commit
d3a0a48fbb
4 changed files with 12 additions and 138 deletions
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
|
||||
#include "gc_implementation/parallelScavenge/parMarkBitMap.inline.hpp"
|
||||
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
|
@ -108,31 +107,6 @@ ParMarkBitMap::mark_obj(HeapWord* addr, size_t size)
|
|||
return false;
|
||||
}
|
||||
|
||||
size_t
|
||||
ParMarkBitMap::live_words_in_range(HeapWord* beg_addr, HeapWord* end_addr) const
|
||||
{
|
||||
assert(beg_addr <= end_addr, "bad range");
|
||||
|
||||
idx_t live_bits = 0;
|
||||
|
||||
// The bitmap routines require the right boundary to be word-aligned.
|
||||
const idx_t end_bit = addr_to_bit(end_addr);
|
||||
const idx_t range_end = BitMap::word_align_up(end_bit);
|
||||
|
||||
idx_t beg_bit = find_obj_beg(addr_to_bit(beg_addr), range_end);
|
||||
while (beg_bit < end_bit) {
|
||||
idx_t tmp_end = find_obj_end(beg_bit, range_end);
|
||||
if (tmp_end < end_bit) {
|
||||
live_bits += tmp_end - beg_bit + 1;
|
||||
beg_bit = find_obj_beg(tmp_end + 1, range_end);
|
||||
} else {
|
||||
live_bits += end_bit - beg_bit; // No + 1 here; end_bit is not counted.
|
||||
return bits_to_words(live_bits);
|
||||
}
|
||||
}
|
||||
return bits_to_words(live_bits);
|
||||
}
|
||||
|
||||
size_t ParMarkBitMap::live_words_in_range(HeapWord* beg_addr, oop end_obj) const
|
||||
{
|
||||
assert(beg_addr <= (HeapWord*)end_obj, "bad range");
|
||||
|
@ -244,13 +218,6 @@ ParMarkBitMap::iterate(ParMarkBitMapClosure* live_closure,
|
|||
return complete;
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ParMarkBitMap::reset_counters()
|
||||
{
|
||||
_cas_tries = _cas_retries = _cas_by_another = 0;
|
||||
}
|
||||
#endif // #ifndef PRODUCT
|
||||
|
||||
#ifdef ASSERT
|
||||
void ParMarkBitMap::verify_clear() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue