equal
deleted
inserted
replaced
4086 AgentLibrary* agent; |
4086 AgentLibrary* agent; |
4087 |
4087 |
4088 JvmtiExport::enter_onload_phase(); |
4088 JvmtiExport::enter_onload_phase(); |
4089 |
4089 |
4090 for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) { |
4090 for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) { |
|
4091 // CDS dumping does not support native JVMTI agent. |
|
4092 // CDS dumping supports Java agent if the AllowArchivingWithJavaAgent diagnostic option is specified. |
|
4093 if (DumpSharedSpaces) { |
|
4094 if(!agent->is_instrument_lib()) { |
|
4095 vm_exit_during_cds_dumping("CDS dumping does not support native JVMTI agent, name", agent->name()); |
|
4096 } else if (!AllowArchivingWithJavaAgent) { |
|
4097 vm_exit_during_cds_dumping( |
|
4098 "Must enable AllowArchivingWithJavaAgent in order to run Java agent during CDS dumping"); |
|
4099 } |
|
4100 } |
|
4101 |
4091 OnLoadEntry_t on_load_entry = lookup_agent_on_load(agent); |
4102 OnLoadEntry_t on_load_entry = lookup_agent_on_load(agent); |
4092 |
4103 |
4093 if (on_load_entry != NULL) { |
4104 if (on_load_entry != NULL) { |
4094 // Invoke the Agent_OnLoad function |
4105 // Invoke the Agent_OnLoad function |
4095 jint err = (*on_load_entry)(&main_vm, agent->options(), NULL); |
4106 jint err = (*on_load_entry)(&main_vm, agent->options(), NULL); |
4098 } |
4109 } |
4099 } else { |
4110 } else { |
4100 vm_exit_during_initialization("Could not find Agent_OnLoad function in the agent library", agent->name()); |
4111 vm_exit_during_initialization("Could not find Agent_OnLoad function in the agent library", agent->name()); |
4101 } |
4112 } |
4102 } |
4113 } |
|
4114 |
4103 JvmtiExport::enter_primordial_phase(); |
4115 JvmtiExport::enter_primordial_phase(); |
4104 } |
4116 } |
4105 |
4117 |
4106 extern "C" { |
4118 extern "C" { |
4107 typedef void (JNICALL *Agent_OnUnload_t)(JavaVM *); |
4119 typedef void (JNICALL *Agent_OnUnload_t)(JavaVM *); |