< prev index next >

src/hotspot/share/services/management.cpp

Print this page




 161     if (k == NULL) {
 162       vm_exit_during_initialization("Management agent initialization failure: "
 163           "class jdk.internal.agent.Agent not found.");
 164     }
 165 
 166     JavaValue result(T_VOID);
 167     JavaCalls::call_static(&result,
 168                            k,
 169                            vmSymbols::startAgent_name(),
 170                            vmSymbols::void_method_signature(),
 171                            CHECK);
 172   }
 173 }
 174 
 175 void Management::get_optional_support(jmmOptionalSupport* support) {
 176   memcpy(support, &_optional_support, sizeof(jmmOptionalSupport));
 177 }
 178 
 179 InstanceKlass* Management::load_and_initialize_klass(Symbol* sh, TRAPS) {
 180   Klass* k = SystemDictionary::resolve_or_fail(sh, true, CHECK_NULL);
 181   return initialize_klass(k, CHECK_NULL);
 182 }
 183 
 184 InstanceKlass* Management::load_and_initialize_klass_or_null(Symbol* sh, TRAPS) {
 185   Klass* k = SystemDictionary::resolve_or_null(sh, CHECK_NULL);
 186   if (k == NULL) {
 187      return NULL;
 188   }
 189   return initialize_klass(k, CHECK_NULL);
 190 }
 191 
 192 InstanceKlass* Management::initialize_klass(Klass* k, TRAPS) {
 193   InstanceKlass* ik = InstanceKlass::cast(k);
 194   if (ik->should_be_initialized()) {
 195     ik->initialize(CHECK_NULL);
 196   }
 197   // If these classes change to not be owned by the boot loader, they need
 198   // to be walked to keep their class loader alive in oops_do.
 199   assert(ik->class_loader() == NULL, "need to follow in oops_do");
 200   return ik;
 201 }
 202 
 203 void Management::record_vm_startup_time(jlong begin, jlong duration) {
 204   // if the performance counter is not initialized,
 205   // then vm initialization failed; simply return.
 206   if (_begin_vm_creation_time == NULL) return;
 207 
 208   _begin_vm_creation_time->set_value(begin);
 209   _end_vm_creation_time->set_value(begin + duration);




 161     if (k == NULL) {
 162       vm_exit_during_initialization("Management agent initialization failure: "
 163           "class jdk.internal.agent.Agent not found.");
 164     }
 165 
 166     JavaValue result(T_VOID);
 167     JavaCalls::call_static(&result,
 168                            k,
 169                            vmSymbols::startAgent_name(),
 170                            vmSymbols::void_method_signature(),
 171                            CHECK);
 172   }
 173 }
 174 
 175 void Management::get_optional_support(jmmOptionalSupport* support) {
 176   memcpy(support, &_optional_support, sizeof(jmmOptionalSupport));
 177 }
 178 
 179 InstanceKlass* Management::load_and_initialize_klass(Symbol* sh, TRAPS) {
 180   Klass* k = SystemDictionary::resolve_or_fail(sh, true, CHECK_NULL);
 181   return initialize_klass(k, THREAD);
 182 }
 183 
 184 InstanceKlass* Management::load_and_initialize_klass_or_null(Symbol* sh, TRAPS) {
 185   Klass* k = SystemDictionary::resolve_or_null(sh, CHECK_NULL);
 186   if (k == NULL) {
 187      return NULL;
 188   }
 189   return initialize_klass(k, THREAD);
 190 }
 191 
 192 InstanceKlass* Management::initialize_klass(Klass* k, TRAPS) {
 193   InstanceKlass* ik = InstanceKlass::cast(k);
 194   if (ik->should_be_initialized()) {
 195     ik->initialize(CHECK_NULL);
 196   }
 197   // If these classes change to not be owned by the boot loader, they need
 198   // to be walked to keep their class loader alive in oops_do.
 199   assert(ik->class_loader() == NULL, "need to follow in oops_do");
 200   return ik;
 201 }
 202 
 203 void Management::record_vm_startup_time(jlong begin, jlong duration) {
 204   // if the performance counter is not initialized,
 205   // then vm initialization failed; simply return.
 206   if (_begin_vm_creation_time == NULL) return;
 207 
 208   _begin_vm_creation_time->set_value(begin);
 209   _end_vm_creation_time->set_value(begin + duration);


< prev index next >