8173608: Separate JDK management agent from java.management module
Reviewed-by: dfuchs, dholmes, erikj
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Wed Jul 05 22:46:23 2017 +0200
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Tue Jan 31 20:06:42 2017 -0800
@@ -590,11 +590,11 @@
template(java_lang_management_ThreadState, "java/lang/management/ThreadState") \
template(java_lang_management_MemoryUsage, "java/lang/management/MemoryUsage") \
template(java_lang_management_ThreadInfo, "java/lang/management/ThreadInfo") \
+ template(jdk_internal_agent_Agent, "jdk/internal/agent/Agent") \
template(sun_management_Sensor, "sun/management/Sensor") \
- template(sun_management_Agent, "sun/management/Agent") \
+ template(sun_management_ManagementFactoryHelper, "sun/management/ManagementFactoryHelper") \
template(com_sun_management_internal_DiagnosticCommandImpl, "com/sun/management/internal/DiagnosticCommandImpl") \
template(com_sun_management_internal_GarbageCollectorExtImpl,"com/sun/management/internal/GarbageCollectorExtImpl") \
- template(sun_management_ManagementFactoryHelper, "sun/management/ManagementFactoryHelper") \
template(getDiagnosticCommandMBean_name, "getDiagnosticCommandMBean") \
template(getDiagnosticCommandMBean_signature, "()Lcom/sun/management/DiagnosticCommandMBean;") \
template(getGcInfoBuilder_name, "getGcInfoBuilder") \
--- a/hotspot/src/share/vm/runtime/arguments.cpp Wed Jul 05 22:46:23 2017 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Tue Jan 31 20:06:42 2017 -0800
@@ -3195,8 +3195,8 @@
if (FLAG_SET_CMDLINE(bool, ManagementServer, true) != Flag::SUCCESS) {
return JNI_EINVAL;
}
- // management agent in module java.management
- if (!create_numbered_property("jdk.module.addmods", "java.management", addmods_count++)) {
+ // management agent in module jdk.management.agent
+ if (!create_numbered_property("jdk.module.addmods", "jdk.management.agent", addmods_count++)) {
return JNI_ENOMEM;
}
#else
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp Wed Jul 05 22:46:23 2017 +0200
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp Tue Jan 31 20:06:42 2017 -0800
@@ -748,13 +748,13 @@
ResourceMark rm(THREAD);
HandleMark hm(THREAD);
- // Load and initialize the sun.management.Agent class
+ // Load and initialize the jdk.internal.agent.Agent class
// invoke startRemoteManagementAgent(string) method to start
// the remote management server.
// throw java.lang.NoSuchMethodError if the method doesn't exist
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
- Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK);
+ Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
instanceKlassHandle ik (THREAD, k);
JavaValue result(T_VOID);
@@ -821,13 +821,13 @@
ResourceMark rm(THREAD);
HandleMark hm(THREAD);
- // Load and initialize the sun.management.Agent class
+ // Load and initialize the jdk.internal.agent.Agent class
// invoke startLocalManagementAgent(void) method to start
// the local management server
// throw java.lang.NoSuchMethodError if method doesn't exist
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
- Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK);
+ Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
instanceKlassHandle ik (THREAD, k);
JavaValue result(T_VOID);
@@ -838,13 +838,13 @@
ResourceMark rm(THREAD);
HandleMark hm(THREAD);
- // Load and initialize the sun.management.Agent class
+ // Load and initialize the jdk.internal.agent.Agent class
// invoke stopRemoteManagementAgent method to stop the
// management server
// throw java.lang.NoSuchMethodError if method doesn't exist
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
- Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK);
+ Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
instanceKlassHandle ik (THREAD, k);
JavaValue result(T_VOID);
@@ -860,12 +860,12 @@
ResourceMark rm(THREAD);
HandleMark hm(THREAD);
- // Load and initialize the sun.management.Agent class
+ // Load and initialize the jdk.internal.agent.Agent class
// invoke getManagementAgentStatus() method to generate the status info
// throw java.lang.NoSuchMethodError if method doesn't exist
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
- Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::sun_management_Agent(), loader, Handle(), true, CHECK);
+ Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::jdk_internal_agent_Agent(), loader, Handle(), true, CHECK);
instanceKlassHandle ik (THREAD, k);
JavaValue result(T_OBJECT);
--- a/hotspot/src/share/vm/services/management.cpp Wed Jul 05 22:46:23 2017 +0200
+++ b/hotspot/src/share/vm/services/management.cpp Tue Jan 31 20:06:42 2017 -0800
@@ -145,16 +145,16 @@
ResourceMark rm(THREAD);
HandleMark hm(THREAD);
- // Load and initialize the sun.management.Agent class
+ // Load and initialize the jdk.internal.agent.Agent class
// invoke startAgent method to start the management server
Handle loader = Handle(THREAD, SystemDictionary::java_system_loader());
- Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_management_Agent(),
+ Klass* k = SystemDictionary::resolve_or_null(vmSymbols::jdk_internal_agent_Agent(),
loader,
Handle(),
THREAD);
if (k == NULL) {
vm_exit_during_initialization("Management agent initialization failure: "
- "class sun.management.Agent not found.");
+ "class jdk.internal.agent.Agent not found.");
}
instanceKlassHandle ik (THREAD, k);