Skip to content

Commit fdaa4f0

Browse files
committed
8255810: Zero: build fails without JVMTI
Reviewed-by: stuefe Backport-of: ca216ba
1 parent 3f03476 commit fdaa4f0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/hotspot/share/memory/metaspaceShared.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ static void rewrite_nofast_bytecodes_and_calculate_fingerprints() {
563563
}
564564
}
565565

566+
#if INCLUDE_JVMTI
566567
static void relocate_cached_class_file() {
567568
for (int i = 0; i < _global_klass_objects->length(); i++) {
568569
Klass* k = _global_klass_objects->at(i);
@@ -579,6 +580,7 @@ static void relocate_cached_class_file() {
579580
}
580581
}
581582
}
583+
#endif // INCLUDE_JVMTI
582584

583585
NOT_PRODUCT(
584586
static void assert_not_anonymous_class(InstanceKlass* k) {
@@ -1440,7 +1442,7 @@ void VM_PopulateDumpSharedSpace::doit() {
14401442
_md_region.pack(&_od_region);
14411443

14421444
// Relocate the archived class file data into the od region
1443-
relocate_cached_class_file();
1445+
JVMTI_ONLY(relocate_cached_class_file();)
14441446
_od_region.pack();
14451447

14461448
// The 5 core spaces are allocated consecutively mc->rw->ro->md->od, so there total size

src/hotspot/share/runtime/vmStructs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,8 +1982,8 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
19821982
declare_integer_type(AccessFlags) /* FIXME: wrong type (not integer) */\
19831983
declare_toplevel_type(address) /* FIXME: should this be an integer type? */\
19841984
declare_integer_type(BasicType) /* FIXME: wrong type (not integer) */\
1985-
declare_toplevel_type(BreakpointInfo) \
1986-
declare_toplevel_type(BreakpointInfo*) \
1985+
JVMTI_ONLY(declare_toplevel_type(BreakpointInfo)) \
1986+
JVMTI_ONLY(declare_toplevel_type(BreakpointInfo*)) \
19871987
declare_toplevel_type(CodeBlob*) \
19881988
declare_toplevel_type(RuntimeBlob*) \
19891989
declare_toplevel_type(CompressedWriteStream*) \

src/hotspot/share/services/diagnosticCommand.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ void JVMTIDataDumpDCmd::execute(DCmdSource source, TRAPS) {
299299
}
300300

301301
#if INCLUDE_SERVICES
302+
#if INCLUDE_JVMTI
302303
JVMTIAgentLoadDCmd::JVMTIAgentLoadDCmd(outputStream* output, bool heap) :
303304
DCmdWithParser(output, heap),
304305
_libpath("library path", "Absolute path of the JVMTI agent to load.",
@@ -358,6 +359,7 @@ int JVMTIAgentLoadDCmd::num_arguments() {
358359
return 0;
359360
}
360361
}
362+
#endif // INCLUDE_JVMTI
361363
#endif // INCLUDE_SERVICES
362364

363365
void PrintSystemPropertiesDCmd::execute(DCmdSource source, TRAPS) {

0 commit comments

Comments
 (0)