Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8255810: Zero: build fails without JVMTI
Reviewed-by: stuefe
Backport-of: ca216ba
  • Loading branch information
shipilev committed Jul 5, 2021
1 parent 3f03476 commit fdaa4f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/hotspot/share/memory/metaspaceShared.cpp
Expand Up @@ -563,6 +563,7 @@ static void rewrite_nofast_bytecodes_and_calculate_fingerprints() {
}
}

#if INCLUDE_JVMTI
static void relocate_cached_class_file() {
for (int i = 0; i < _global_klass_objects->length(); i++) {
Klass* k = _global_klass_objects->at(i);
Expand All @@ -579,6 +580,7 @@ static void relocate_cached_class_file() {
}
}
}
#endif // INCLUDE_JVMTI

NOT_PRODUCT(
static void assert_not_anonymous_class(InstanceKlass* k) {
Expand Down Expand Up @@ -1440,7 +1442,7 @@ void VM_PopulateDumpSharedSpace::doit() {
_md_region.pack(&_od_region);

// Relocate the archived class file data into the od region
relocate_cached_class_file();
JVMTI_ONLY(relocate_cached_class_file();)
_od_region.pack();

// The 5 core spaces are allocated consecutively mc->rw->ro->md->od, so there total size
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/vmStructs.cpp
Expand Up @@ -1982,8 +1982,8 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
declare_integer_type(AccessFlags) /* FIXME: wrong type (not integer) */\
declare_toplevel_type(address) /* FIXME: should this be an integer type? */\
declare_integer_type(BasicType) /* FIXME: wrong type (not integer) */\
declare_toplevel_type(BreakpointInfo) \
declare_toplevel_type(BreakpointInfo*) \
JVMTI_ONLY(declare_toplevel_type(BreakpointInfo)) \
JVMTI_ONLY(declare_toplevel_type(BreakpointInfo*)) \
declare_toplevel_type(CodeBlob*) \
declare_toplevel_type(RuntimeBlob*) \
declare_toplevel_type(CompressedWriteStream*) \
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/services/diagnosticCommand.cpp
Expand Up @@ -299,6 +299,7 @@ void JVMTIDataDumpDCmd::execute(DCmdSource source, TRAPS) {
}

#if INCLUDE_SERVICES
#if INCLUDE_JVMTI
JVMTIAgentLoadDCmd::JVMTIAgentLoadDCmd(outputStream* output, bool heap) :
DCmdWithParser(output, heap),
_libpath("library path", "Absolute path of the JVMTI agent to load.",
Expand Down Expand Up @@ -358,6 +359,7 @@ int JVMTIAgentLoadDCmd::num_arguments() {
return 0;
}
}
#endif // INCLUDE_JVMTI
#endif // INCLUDE_SERVICES

void PrintSystemPropertiesDCmd::execute(DCmdSource source, TRAPS) {
Expand Down

1 comment on commit fdaa4f0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.