< prev index next >

src/hotspot/share/prims/jvmtiRedefineClasses.cpp

Print this page




 220   }
 221 
 222   // Disable any dependent concurrent compilations
 223   SystemDictionary::notice_modification();
 224 
 225   // Set flag indicating that some invariants are no longer true.
 226   // See jvmtiExport.hpp for detailed explanation.
 227   JvmtiExport::set_has_redefined_a_class();
 228 
 229   // check_class() is optionally called for product bits, but is
 230   // always called for non-product bits.
 231 #ifdef PRODUCT
 232   if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
 233 #endif
 234     log_trace(redefine, class, obsolete, metadata)("calling check_class");
 235     CheckClass check_class(thread);
 236     ClassLoaderDataGraph::classes_do(&check_class);
 237 #ifdef PRODUCT
 238   }
 239 #endif



 240 }
 241 
 242 void VM_RedefineClasses::doit_epilogue() {
 243   unlock_classes();
 244 
 245   // Free os::malloc allocated memory.
 246   os::free(_scratch_classes);
 247 
 248   // Reset the_class to null for error printing.
 249   _the_class = NULL;
 250 
 251   if (log_is_enabled(Info, redefine, class, timer)) {
 252     // Used to have separate timers for "doit" and "all", but the timer
 253     // overhead skewed the measurements.
 254     julong doit_time = _timer_rsc_phase1.milliseconds() +
 255                        _timer_rsc_phase2.milliseconds();
 256     julong all_time = _timer_vm_op_prologue.milliseconds() + doit_time;
 257 
 258     log_info(redefine, class, timer)
 259       ("vm_op: all=" JULONG_FORMAT "  prologue=" JULONG_FORMAT "  doit=" JULONG_FORMAT,




 220   }
 221 
 222   // Disable any dependent concurrent compilations
 223   SystemDictionary::notice_modification();
 224 
 225   // Set flag indicating that some invariants are no longer true.
 226   // See jvmtiExport.hpp for detailed explanation.
 227   JvmtiExport::set_has_redefined_a_class();
 228 
 229   // check_class() is optionally called for product bits, but is
 230   // always called for non-product bits.
 231 #ifdef PRODUCT
 232   if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
 233 #endif
 234     log_trace(redefine, class, obsolete, metadata)("calling check_class");
 235     CheckClass check_class(thread);
 236     ClassLoaderDataGraph::classes_do(&check_class);
 237 #ifdef PRODUCT
 238   }
 239 #endif
 240 
 241   // Clean up any metadata now unreferenced while MetadataOnStackMark is set.
 242   ClassLoaderDataGraph::clean_deallocate_lists(false);
 243 }
 244 
 245 void VM_RedefineClasses::doit_epilogue() {
 246   unlock_classes();
 247 
 248   // Free os::malloc allocated memory.
 249   os::free(_scratch_classes);
 250 
 251   // Reset the_class to null for error printing.
 252   _the_class = NULL;
 253 
 254   if (log_is_enabled(Info, redefine, class, timer)) {
 255     // Used to have separate timers for "doit" and "all", but the timer
 256     // overhead skewed the measurements.
 257     julong doit_time = _timer_rsc_phase1.milliseconds() +
 258                        _timer_rsc_phase2.milliseconds();
 259     julong all_time = _timer_vm_op_prologue.milliseconds() + doit_time;
 260 
 261     log_info(redefine, class, timer)
 262       ("vm_op: all=" JULONG_FORMAT "  prologue=" JULONG_FORMAT "  doit=" JULONG_FORMAT,


< prev index next >