Skip to content

KLUT #24587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 101 commits into
base: master
Choose a base branch
from
Draft

KLUT #24587

Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
83c6d7b
KLUTE
tstuefe Jan 7, 2025
d43cfa1
revert printouts
tstuefe Mar 24, 2025
8a20430
remove precompiled
tstuefe Mar 24, 2025
26b8c3a
move KLUT init forward to init_globals
tstuefe Apr 2, 2025
7264f16
make KLUT work with CDS (late init for now :( )
tstuefe Apr 2, 2025
a669cdd
wip
tstuefe Apr 3, 2025
e23d21e
wip
tstuefe Apr 3, 2025
c08234f
allow-latereg-only-when-built-with-cds
tstuefe Apr 3, 2025
3cc05ea
WIP
tstuefe Apr 4, 2025
8280cee
wip
tstuefe Apr 5, 2025
b1bef16
remove narrowKlass argument
tstuefe Apr 7, 2025
217345f
ObjArrayKlass iteration functions can be static
tstuefe Apr 7, 2025
62a63ab
get_entry->lookup
tstuefe Apr 7, 2025
4ea5556
klute() returns class not uint32
tstuefe Apr 7, 2025
6e601b6
statistics, also during error report and VM.info
tstuefe Apr 7, 2025
4b65b77
table allocation
tstuefe Apr 7, 2025
2acacb5
fix build prob
tstuefe Apr 7, 2025
3abace3
remove klass arg from iterate_backwards
tstuefe Apr 7, 2025
41d5c55
max shift 10
tstuefe Apr 7, 2025
d55b558
always set klute in klass etc
tstuefe Apr 7, 2025
41dda35
wip - CLD kram
tstuefe Apr 8, 2025
4a5c74a
fix merge error
tstuefe Apr 8, 2025
043a7a0
perma-cld
tstuefe Apr 8, 2025
61b4979
make KLUT work with Coleens abstract/interface-not-in-ccs-change
tstuefe Apr 8, 2025
6281f35
Fix
tstuefe Apr 8, 2025
b98aa27
rework klute for arrays
tstuefe Apr 9, 2025
81bf9a4
oop iteration fully uses KLUT now
tstuefe Apr 9, 2025
47b3478
fix macos build error
tstuefe Apr 9, 2025
9559617
Dispatch class: remove non-klut variants
tstuefe Apr 9, 2025
71bc71f
fix build errors on windows
tstuefe Apr 9, 2025
51a5beb
iterator
tstuefe Apr 9, 2025
3f2efbe
fix wrong assert for -ccp
tstuefe Apr 9, 2025
6161267
fix crashes in InstanceKlass::print_on
tstuefe Apr 9, 2025
726adee
fix for hidden classes clds
tstuefe Apr 10, 2025
cc010c7
fix for minimal build
tstuefe Apr 10, 2025
a08aeb1
reduce diff
tstuefe Apr 10, 2025
602bf83
remove older iteration dispatch functions
tstuefe Apr 10, 2025
b117689
comment
tstuefe Apr 10, 2025
2d47c2e
remove UseKLUT completely
tstuefe Apr 10, 2025
2dce1e5
wip
tstuefe Apr 10, 2025
55f0f42
Fix crash in logging after InstanceKlass creation
tstuefe Apr 10, 2025
6e84514
Fix mirror klass iteration for -UseCompressedOops
tstuefe Apr 11, 2025
351b145
reduce diff to master
tstuefe Apr 11, 2025
c27ddb2
remove accidental debug output and fix release build
tstuefe Apr 11, 2025
5e8b542
remove obsolete iteration functions (ICLK, IMK)
tstuefe Apr 11, 2025
be48ca5
remove obsolete iteration functions (IRK)
tstuefe Apr 11, 2025
be359bf
ISCK
tstuefe Apr 11, 2025
f202089
Revert experimental class loader chunk size policy change
tstuefe Apr 11, 2025
3619e73
fix CompressedClassPointersEncodingScheme
tstuefe Apr 11, 2025
4169e11
IK, TAK, OAK
tstuefe Apr 16, 2025
93bd703
rename slow variants of invoke
tstuefe Apr 17, 2025
e104bfb
split ak_wordsize_given_oop in TAK and OAK version
tstuefe Apr 17, 2025
c6ff61e
HeaderMode enum for use in templates
tstuefe Apr 18, 2025
042d164
New templatized variants of oopDesc::get_klute(), klass()
tstuefe Apr 18, 2025
4b12553
use HeaderMode template parameter for klute size calc functions
tstuefe Apr 18, 2025
0b1e9bb
IK oop iteration functions reshuffling, simplification
tstuefe Apr 19, 2025
a770cd0
iterator.inline T->OopType
tstuefe Apr 20, 2025
0637011
iteration dispatch: specify template arg OopClosureType explicitly
tstuefe Apr 22, 2025
0790a3e
fix whitespaces
tstuefe Apr 22, 2025
b05064e
arrayOopDesc, objArrayOopDesc, templatized versions of length/base etc
tstuefe Apr 22, 2025
1aaa091
rework ObjArrayKlass partial iteration
tstuefe Apr 23, 2025
d74b219
Fix crash for uncompressed class pointers
tstuefe Apr 23, 2025
ad1bf81
fixes
tstuefe Apr 23, 2025
12b9125
diff reduction
tstuefe Apr 23, 2025
a98b625
make PrintKLUTStatistics diagnostic
tstuefe Apr 23, 2025
57dc839
delete unnecessary include
tstuefe Apr 24, 2025
3dac8c9
reduce diffs in ISCK IMK
tstuefe Apr 24, 2025
72bda7c
constexpr
tstuefe Apr 24, 2025
e1dc0e5
AOTLinkedClassBulkLoader: register cld
tstuefe Apr 24, 2025
56654c0
reduce diff in IRK
tstuefe Apr 24, 2025
be5a1d8
small fix to Klass::print_on
tstuefe Apr 24, 2025
6ed0464
Make CLD handling for late-registered CDS/AOT classes more robust
tstuefe Apr 24, 2025
e13cf0c
comments
tstuefe Apr 24, 2025
5119745
Comments
tstuefe Apr 24, 2025
1152f58
comment
tstuefe Apr 24, 2025
07f9bc1
iterator simplifications
tstuefe Apr 25, 2025
7509ebf
fix make error
tstuefe Apr 26, 2025
c131cc1
change tak/oak length fast functions to use the correct oopDesc ttype
tstuefe Apr 26, 2025
c9a75b6
move checks up to calculate_size_for_object_fast
tstuefe Apr 26, 2025
2fc4451
move KlassKind out of Klass
tstuefe Apr 26, 2025
8a96277
Remove Klass printing function changes
tstuefe Apr 28, 2025
2006f85
Add missing header
tstuefe Apr 28, 2025
8df0c74
Code grooming, diff reduction
tstuefe Apr 28, 2025
802eee1
fix bug in objArray oop iteration
tstuefe Apr 29, 2025
083dfc9
AK KLUTE: 8bit per header size and elem size
tstuefe Apr 30, 2025
a42a022
klute const - make KlassLUTEntry dumber and fix instruction bloat
tstuefe May 2, 2025
c6e4a68
fix non-cds build
tstuefe May 3, 2025
311d364
scan CDS archive range instead of late register
tstuefe May 5, 2025
17fb2c7
IK metadata iteration: With AOT, CLD can be null :-( - dont call clos…
tstuefe May 5, 2025
a1efdbf
In Archivebuilder, move klute validity check up to before remove_unsh…
tstuefe May 6, 2025
11ae2a3
Static assert that oop closures used in oop iteration derive from Oop…
tstuefe May 6, 2025
c291cb8
Rework KlassLUTEntry::verify_against_klass() to tolerate aot unlinked…
tstuefe May 6, 2025
a30333e
generally allow for Klass->CLD to be null
tstuefe May 7, 2025
36f1f6d
remove late_register code since we now scan CDS range for Klasses eag…
tstuefe May 7, 2025
70c7108
renaming cdt_index
tstuefe May 7, 2025
58f44fe
remove stray NULL -> nullptr
tstuefe May 8, 2025
17eb502
log without need for resourcemark
tstuefe May 8, 2025
b807fba
registration stats
tstuefe May 8, 2025
e533f47
oopDesc::klute() should assert for invalid klute also if not using COH
tstuefe May 8, 2025
d6ed1c3
GC.class_statistics should print more Klass information
tstuefe May 12, 2025
2c7e952
preferred classes (CDS off only for now)
tstuefe May 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/hotspot/share/cds/aotLinkedClassBulkLoader.cpp
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/klassInfoLUT.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"

@@ -176,6 +177,7 @@ void AOTLinkedClassBulkLoader::load_classes_impl(AOTLinkedClassCategory class_ca
}

ClassLoaderData* loader_data = ClassLoaderData::class_loader_data(loader());
KlassInfoLUT::register_cld_if_needed(loader_data);

for (int i = 0; i < classes->length(); i++) {
InstanceKlass* ik = classes->at(i);
7 changes: 6 additions & 1 deletion src/hotspot/share/cds/archiveBuilder.cpp
Original file line number Diff line number Diff line change
@@ -52,6 +52,7 @@
#include "memory/resourceArea.hpp"
#include "oops/compressedKlass.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassInfoLUTEntry.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oopHandle.inline.hpp"
@@ -771,13 +772,17 @@ void ArchiveBuilder::make_klasses_shareable() {
int unreg_unlinked = 0;

for (int i = 0; i < klasses()->length(); i++) {
Klass* k = get_buffered_addr(klasses()->at(i));
// Some of the code in ConstantPool::remove_unshareable_info() requires the classes
// to be in linked state, so it must be call here before the next loop, which returns
// all classes to unlinked state.
Klass* k = get_buffered_addr(klasses()->at(i));
if (k->is_instance_klass()) {
InstanceKlass::cast(k)->constants()->remove_unshareable_info();
}
// Every archived Klass must carry a valid klute. That is because every archived Klass
// would have been created via the usual dynamic class loading or - generation, which should
// have registered the Klass with klut.
DEBUG_ONLY(KlassLUTEntry(k->klute()).verify_against_klass(k));
}

for (int i = 0; i < klasses()->length(); i++) {
9 changes: 9 additions & 0 deletions src/hotspot/share/cds/metaspaceShared.cpp
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@
#include "oops/compressedKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/klassInfoLUT.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oopHandle.hpp"
@@ -1437,6 +1438,14 @@ MapArchiveResult MetaspaceShared::map_archives(FileMapInfo* static_mapinfo, File
}
CompressedKlassPointers::establish_protection_zone(encoding_base, prot_zone_size);

// Initialize KLUT
KlassInfoLUT::initialize();

// Scan the CDS klass range for already existing Klass structures
const address start = (address)align_up(archive_space_rs.base() + prot_zone_size, CompressedKlassPointers::klass_alignment_in_bytes());
const address end = (address)archive_space_rs.base() + archive_space_rs.size();
KlassInfoLUT::scan_klass_range_update_lut(start, end);

// map_or_load_heap_region() compares the current narrow oop and klass encodings
// with the archived ones, so it must be done after all encodings are determined.
static_mapinfo->map_or_load_heap_region();
2 changes: 2 additions & 0 deletions src/hotspot/share/classfile/classFileParser.cpp
Original file line number Diff line number Diff line change
@@ -5240,6 +5240,8 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik,
// in order for it to not be destroyed in the ClassFileParser destructor.
set_klass_to_deallocate(nullptr);

ik->register_with_klut();

// it's official
set_klass(ik);

3 changes: 3 additions & 0 deletions src/hotspot/share/classfile/systemDictionaryShared.cpp
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@
#include "oops/compressedKlass.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/klassInfoLUT.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -170,6 +171,7 @@ InstanceKlass* SystemDictionaryShared::acquire_class_for_current_thread(

// No other thread has acquired this yet, so give it to *this thread*
ik->set_class_loader_data(loader_data);
KlassInfoLUT::shared_klass_cld_changed(ik);
}

// No longer holding SharedDictionary_lock
@@ -430,6 +432,7 @@ InstanceKlass* SystemDictionaryShared::find_or_load_shared_class(
if (k != nullptr) {
SharedClassLoadingMark slm(THREAD, k);
k = find_or_define_instance_class(name, class_loader, k, CHECK_NULL);
k->register_with_klut();
}
}
}
3 changes: 2 additions & 1 deletion src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@
#include "gc/shared/continuationGCSupport.inline.hpp"
#include "gc/shared/preservedMarks.inline.hpp"
#include "gc/shared/stringdedup/stringDedup.hpp"
#include "memory/iterator.inline.hpp"
#include "oops/access.inline.hpp"
#include "oops/compressedOops.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -108,7 +109,7 @@ void G1FullGCMarker::follow_array_chunk(objArrayOop array, int index) {
push_objarray(array, end_index);
}

array->oop_iterate_range(mark_closure(), beg_index, end_index);
OopIteratorClosureDispatch::oop_oop_iterate_range(array, mark_closure(), beg_index, end_index);
}

inline void G1FullGCMarker::follow_object(oop obj) {
14 changes: 9 additions & 5 deletions src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@
#include "gc/shared/stringdedup/stringDedup.hpp"
#include "gc/shared/taskqueue.inline.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/iterator.inline.hpp"
#include "oops/access.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
@@ -232,9 +233,10 @@ void G1ParScanThreadState::do_partial_array(PartialArrayState* state, bool stole
G1HeapRegionAttr dest_attr = _g1h->region_attr(to_array);
G1SkipCardEnqueueSetter x(&_scanner, dest_attr.is_new_survivor());
// Process claimed task.
to_array->oop_iterate_range(&_scanner,
checked_cast<int>(claim._start),
checked_cast<int>(claim._end));
OopIteratorClosureDispatch::oop_oop_iterate_range(to_array,
&_scanner,
checked_cast<int>(claim._start),
checked_cast<int>(claim._end));
}

MAYBE_INLINE_EVACUATION
@@ -254,7 +256,9 @@ void G1ParScanThreadState::start_partial_objarray(oop from_obj,
// Process the initial chunk. No need to process the type in the
// klass, as it will already be handled by processing the built-in
// module.
to_array->oop_iterate_range(&_scanner, 0, checked_cast<int>(initial_chunk_size));
OopIteratorClosureDispatch::oop_oop_iterate_range(to_array,
&_scanner,
0, checked_cast<int>(initial_chunk_size));
}

MAYBE_INLINE_EVACUATION
@@ -452,7 +456,7 @@ void G1ParScanThreadState::do_iterate_object(oop const obj,
}

assert(_scanner.skip_card_enqueue_set(), "must be");
obj->oop_iterate_backwards(&_scanner, klass);
obj->oop_iterate_backwards(&_scanner);
}

// Private inline function, for direct internal use and providing the
11 changes: 6 additions & 5 deletions src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@
#include "logging/log.hpp"
#include "memory/iterator.inline.hpp"
#include "oops/access.inline.hpp"
#include "oops/klassInfoLUTEntry.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/prefetch.inline.hpp"
@@ -114,19 +115,19 @@ class PSPushContentsClosure: public BasicOopIterateClosure {
// order of these function calls.
//
template <>
inline void InstanceRefKlass::oop_oop_iterate_reverse<oop, PSPushContentsClosure>(oop obj, PSPushContentsClosure* closure) {
inline void InstanceRefKlass::oop_oop_iterate_reverse<oop, PSPushContentsClosure>(oop obj, PSPushContentsClosure* closure, klute_raw_t klute) {
oop_oop_iterate_ref_processing<oop>(obj, closure);
InstanceKlass::oop_oop_iterate_reverse<oop>(obj, closure);
InstanceKlass::oop_oop_iterate_reverse<oop>(obj, closure, klute);
}

template <>
inline void InstanceRefKlass::oop_oop_iterate_reverse<narrowOop, PSPushContentsClosure>(oop obj, PSPushContentsClosure* closure) {
inline void InstanceRefKlass::oop_oop_iterate_reverse<narrowOop, PSPushContentsClosure>(oop obj, PSPushContentsClosure* closure, klute_raw_t klute) {
oop_oop_iterate_ref_processing<narrowOop>(obj, closure);
InstanceKlass::oop_oop_iterate_reverse<narrowOop>(obj, closure);
InstanceKlass::oop_oop_iterate_reverse<narrowOop>(obj, closure, klute);
}

inline void PSPromotionManager::push_contents(oop obj) {
if (!obj->klass()->is_typeArray_klass()) {
if (!obj->is_typeArray()) {
PSPushContentsClosure pcc(this);
obj->oop_iterate_backwards(&pcc);
}
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/serial/serialFullGC.cpp
Original file line number Diff line number Diff line change
@@ -412,7 +412,7 @@ void SerialFullGC::follow_array_chunk(objArrayOop array, int index) {
const int stride = MIN2(len - beg_index, (int) ObjArrayMarkingStride);
const int end_index = beg_index + stride;

array->oop_iterate_range(&mark_and_push_closure, beg_index, end_index);
OopIteratorClosureDispatch::oop_oop_iterate_range(array, &mark_and_push_closure, beg_index, end_index);

if (end_index < len) {
SerialFullGC::push_objarray(array, end_index); // Push the continuation.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahMark.inline.hpp
Original file line number Diff line number Diff line change
@@ -167,7 +167,7 @@ inline void ShenandoahMark::do_chunked_array_start(ShenandoahObjToScanQueue* q,

if (len <= (int) ObjArrayMarkingStride*2) {
// A few slices only, process directly
array->oop_iterate_range(cl, 0, len);
OopIteratorClosureDispatch::oop_oop_iterate_range(array, cl, 0, len);
} else {
int bits = log2i_graceful(len);
// Compensate for non-power-of-two arrays, cover the array in excess:
@@ -216,7 +216,7 @@ inline void ShenandoahMark::do_chunked_array_start(ShenandoahObjToScanQueue* q,
// Process the irregular tail, if present
int from = last_idx;
if (from < len) {
array->oop_iterate_range(cl, from, len);
OopIteratorClosureDispatch::oop_oop_iterate_range(array, cl, from, len);
}
}
}
@@ -248,7 +248,7 @@ inline void ShenandoahMark::do_chunked_array(ShenandoahObjToScanQueue* q, T* cl,
assert (0 < to && to <= len, "to is sane: %d/%d", to, len);
#endif

array->oop_iterate_range(cl, from, to);
OopIteratorClosureDispatch::oop_oop_iterate_range(array, cl, from, to);
}

template <ShenandoahGenerationType GENERATION>
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/z/zIterator.inline.hpp
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ void ZIterator::oop_iterate(oop obj, OopClosureT* cl) {
template <typename OopClosureT>
void ZIterator::oop_iterate_range(objArrayOop obj, OopClosureT* cl, int start, int end) {
assert(!is_invisible_object_array(obj), "not safe");
obj->oop_iterate_range(cl, start, end);
OopIteratorClosureDispatch::oop_oop_iterate_range(obj, cl, start, end);
}

template <typename Function>
1 change: 1 addition & 0 deletions src/hotspot/share/logging/logTag.hpp
Original file line number Diff line number Diff line change
@@ -110,6 +110,7 @@ class outputStream;
LOG_TAG(jni) \
LOG_TAG(jvmci) \
LOG_TAG(jvmti) \
LOG_TAG(klut) \
LOG_TAG(lambda) \
LOG_TAG(library) \
LOG_TAG(link) \
4 changes: 2 additions & 2 deletions src/hotspot/share/memory/allocation.cpp
Original file line number Diff line number Diff line change
@@ -75,15 +75,15 @@ void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
MetaspaceObj::Type type, TRAPS) throw() {
// Klass has its own operator new
assert(type != ClassType, "class has its own operator new");
return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, THREAD);
return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, /* preferred */ false, THREAD);
}

void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data,
size_t word_size,
MetaspaceObj::Type type) throw() {
assert(!Thread::current()->is_Java_thread(), "only allowed by non-Java thread");
assert(type != ClassType, "class has its own operator new");
return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false);
return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, /* preferred */ false);
}

bool MetaspaceObj::is_valid(const MetaspaceObj* p) {
2 changes: 1 addition & 1 deletion src/hotspot/share/memory/classLoaderMetaspace.cpp
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ ClassLoaderMetaspace::ClassLoaderMetaspace(Mutex* lock, Metaspace::MetaspaceType
"class arena");
}

UL2(debug, "born (nonclass arena: " PTR_FORMAT ", class arena: " PTR_FORMAT ".",
UL2(debug, "born (nonclass arena: " PTR_FORMAT ", class arena: " PTR_FORMAT ").",
p2i(_non_class_space_arena), p2i(_class_space_arena));
}

12 changes: 8 additions & 4 deletions src/hotspot/share/memory/heapInspection.cpp
Original file line number Diff line number Diff line change
@@ -97,21 +97,24 @@ const char* KlassInfoEntry::name() const {

void KlassInfoEntry::print_on(outputStream* st) const {
ResourceMark rm;
const narrowKlass nk = CompressedKlassPointers::is_encodable(_klass) ? CompressedKlassPointers::encode(_klass) : 0;

// simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
ModuleEntry* module = _klass->module();
if (module->is_named()) {
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s (%s%s%s)",
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " " PTR_FORMAT " %u %s (%s%s%s)",
(int64_t)_instance_count,
(uint64_t)_instance_words * HeapWordSize,
p2i(_klass), nk,
name(),
module->name()->as_C_string(),
module->version() != nullptr ? "@" : "",
module->version() != nullptr ? module->version()->as_C_string() : "");
} else {
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s",
st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " " PTR_FORMAT " %u %s",
(int64_t)_instance_count,
(uint64_t)_instance_words * HeapWordSize,
p2i(_klass), nk,
name());
}
}
@@ -492,8 +495,9 @@ void KlassHierarchy::print_class(outputStream* st, KlassInfoEntry* cie, bool pri
}

void KlassInfoHisto::print_histo_on(outputStream* st) {
st->print_cr(" num #instances #bytes class name (module)");
st->print_cr("-------------------------------------------------------");
int len_divider = 0;
st->print_cr(" num #instances #bytes Klass nKlass class name (module)");
st->print_cr(" ---------------------------------------------------------------------------------------");
print_elements(st);
}

9 changes: 6 additions & 3 deletions src/hotspot/share/memory/iterator.hpp
Original file line number Diff line number Diff line change
@@ -314,9 +314,12 @@ class CompareClosure : public Closure {

class OopIteratorClosureDispatch {
public:
template <typename OopClosureType> static void oop_oop_iterate(OopClosureType* cl, oop obj, Klass* klass);
template <typename OopClosureType> static void oop_oop_iterate(OopClosureType* cl, oop obj, Klass* klass, MemRegion mr);
template <typename OopClosureType> static void oop_oop_iterate_backwards(OopClosureType* cl, oop obj, Klass* klass);
template <typename OopClosureType> inline static void oop_oop_iterate (oop obj, OopClosureType* cl);
template <typename OopClosureType> inline static void oop_oop_iterate_reverse (oop obj, OopClosureType* cl);
template <typename OopClosureType> inline static void oop_oop_iterate_bounded (oop obj, OopClosureType* cl, MemRegion mr);
template <typename OopClosureType> inline static size_t oop_oop_iterate_size (oop obj, OopClosureType* cl);
template <typename OopClosureType> inline static size_t oop_oop_iterate_bounded_size (oop obj, OopClosureType* cl, MemRegion mr);
template <typename OopClosureType> inline static void oop_oop_iterate_range (objArrayOop obj, OopClosureType* cl, int start, int end);
};

#endif // SHARE_MEMORY_ITERATOR_HPP
Loading