Skip to content

Commit f2968b3

Browse files
author
Matias Saavedra Silva
committedAug 29, 2024
8339020: Remove unused HeapShared::calculate_oopmap
Reviewed-by: coleenp
1 parent a4962ac commit f2968b3

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed
 

‎src/hotspot/share/cds/heapShared.cpp

-24
Original file line numberDiff line numberDiff line change
@@ -1644,30 +1644,6 @@ class FindEmbeddedNonNullPointers: public BasicOopIterateClosure {
16441644
};
16451645
#endif
16461646

1647-
#ifndef PRODUCT
1648-
ResourceBitMap HeapShared::calculate_oopmap(MemRegion region) {
1649-
size_t num_bits = region.byte_size() / (UseCompressedOops ? sizeof(narrowOop) : sizeof(oop));
1650-
ResourceBitMap oopmap(num_bits);
1651-
1652-
HeapWord* p = region.start();
1653-
HeapWord* end = region.end();
1654-
FindEmbeddedNonNullPointers finder((void*)p, &oopmap);
1655-
1656-
int num_objs = 0;
1657-
while (p < end) {
1658-
oop o = cast_to_oop(p);
1659-
o->oop_iterate(&finder);
1660-
p += o->size();
1661-
++ num_objs;
1662-
}
1663-
1664-
log_info(cds, heap)("calculate_oopmap: objects = %6d, oop fields = %7d (nulls = %7d)",
1665-
num_objs, finder.num_total_oops(), finder.num_null_oops());
1666-
return oopmap;
1667-
}
1668-
1669-
#endif // !PRODUCT
1670-
16711647
void HeapShared::count_allocation(size_t size) {
16721648
_total_obj_count ++;
16731649
_total_obj_size += size;

‎src/hotspot/share/cds/heapShared.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,6 @@ class HeapShared: AllStatic {
371371
KlassSubGraphInfo* subgraph_info,
372372
oop orig_obj);
373373

374-
#ifndef PRODUCT
375-
static ResourceBitMap calculate_oopmap(MemRegion region); // marks all the oop pointers
376-
#endif
377374
static void add_to_dumped_interned_strings(oop string);
378375

379376
// Scratch objects for archiving Klass::java_mirror()

0 commit comments

Comments
 (0)
Please sign in to comment.