< prev index next >
src/share/vm/prims/jvmtiRedefineClasses.cpp
Print this page
rev 12859 : 8184323: compile-time guard some UseSharedSpaces-only coding with the INCLUDE_CDS macro
@@ -171,10 +171,11 @@
}
void VM_RedefineClasses::doit() {
Thread *thread = Thread::current();
+#if INCLUDE_CDS
if (UseSharedSpaces) {
// Sharing is enabled so we remap the shared readonly space to
// shared readwrite, private just in case we need to redefine
// a shared class. We do the remap during the doit() phase of
// the safepoint to be safer.
@@ -182,10 +183,11 @@
log_info(redefine, class, load)("failed to remap shared readonly space to readwrite, private");
_res = JVMTI_ERROR_INTERNAL;
return;
}
}
+#endif
// Mark methods seen on stack and everywhere else so old methods are not
// cleaned up if they're on the stack.
MetadataOnStackMark md_on_stack(true);
HandleMark hm(thread); // make sure any handles created are deleted
< prev index next >