8151991: jvmti diagnostics commands requires INCLUDE_SERVICES
Guard jvmti diagnostic commands by appropriate defines Reviewed-by: sspitsyn, dholmes, gadams
This commit is contained in:
parent
d676c6233e
commit
a02f8f2d30
hotspot/src/share/vm
@ -2315,6 +2315,8 @@ void JvmtiExport::transition_pending_onload_raw_monitors() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if INCLUDE_SERVICES
|
||||
// Attach is disabled if SERVICES is not included
|
||||
|
||||
// type for the Agent_OnAttach entry point
|
||||
extern "C" {
|
||||
@ -2416,6 +2418,7 @@ jint JvmtiExport::load_agent_library(const char *agent, const char *absParam,
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // INCLUDE_SERVICES
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Setup current current thread for event collection.
|
||||
|
@ -377,9 +377,11 @@ class JvmtiExport : public AllStatic {
|
||||
|
||||
static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
// attach support
|
||||
static jint load_agent_library(const char *agent, const char *absParam, const char *options, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
|
||||
static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
|
||||
#endif
|
||||
|
||||
// SetNativeMethodPrefix support
|
||||
static char** get_all_native_method_prefixes(int* count_ptr) NOT_JVMTI_RETURN_(NULL);
|
||||
|
@ -61,17 +61,19 @@ void DCmdRegistrant::register_dcmds(){
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
|
||||
#if INCLUDE_SERVICES // Heap dumping/inspection supported
|
||||
#if INCLUDE_SERVICES
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassStatsDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHierarchyDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SymboltableDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<StringtableDCmd>(full_export, true, false));
|
||||
#if INCLUDE_JVMTI // Both JVMTI and SERVICES have to be enabled to have this dcmd
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
|
||||
#endif // INCLUDE_JVMTI
|
||||
#endif // INCLUDE_SERVICES
|
||||
#if INCLUDE_JVMTI
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIDataDumpDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<JVMTIAgentLoadDCmd>(full_export, true, false));
|
||||
#endif // INCLUDE_JVMTI
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(full_export, true, false));
|
||||
DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassLoaderStatsDCmd>(full_export, true, false));
|
||||
@ -255,6 +257,7 @@ void JVMTIDataDumpDCmd::execute(DCmdSource source, TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
JVMTIAgentLoadDCmd::JVMTIAgentLoadDCmd(outputStream* output, bool heap) :
|
||||
DCmdWithParser(output, heap),
|
||||
_libpath("library path", "Absolute path of the JVMTI agent to load.",
|
||||
@ -314,6 +317,7 @@ int JVMTIAgentLoadDCmd::num_arguments() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_SERVICES
|
||||
|
||||
void PrintSystemPropertiesDCmd::execute(DCmdSource source, TRAPS) {
|
||||
// load sun.misc.VMSupport
|
||||
|
@ -174,6 +174,8 @@ public:
|
||||
virtual void execute(DCmdSource source, TRAPS);
|
||||
};
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
#if INCLUDE_JVMTI
|
||||
class JVMTIAgentLoadDCmd : public DCmdWithParser {
|
||||
protected:
|
||||
DCmdArgument<char*> _libpath;
|
||||
@ -193,6 +195,8 @@ public:
|
||||
static int num_arguments();
|
||||
virtual void execute(DCmdSource source, TRAPS);
|
||||
};
|
||||
#endif // INCLUDE_JVMTI
|
||||
#endif // INCLUDE_SERVICES
|
||||
|
||||
class VMDynamicLibrariesDCmd : public DCmd {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user