< prev index next >

src/share/vm/oops/instanceKlass.cpp

Print this page




  61 #include "runtime/thread.inline.hpp"
  62 #include "services/classLoadingService.hpp"
  63 #include "services/threadService.hpp"
  64 #include "utilities/dtrace.hpp"
  65 #include "utilities/macros.hpp"
  66 #if INCLUDE_ALL_GCS
  67 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
  68 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  69 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
  70 #include "gc_implementation/g1/g1RemSet.inline.hpp"
  71 #include "gc_implementation/g1/heapRegionManager.inline.hpp"
  72 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
  73 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
  74 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
  75 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
  76 #include "oops/oop.pcgc.inline.hpp"
  77 #endif // INCLUDE_ALL_GCS
  78 #ifdef COMPILER1
  79 #include "c1/c1_Compiler.hpp"
  80 #endif




  81 
  82 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  83 
  84 #ifdef DTRACE_ENABLED
  85 
  86 #ifndef USDT2
  87 
  88 HS_DTRACE_PROBE_DECL4(hotspot, class__initialization__required,
  89   char*, intptr_t, oop, intptr_t);
  90 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__recursive,
  91   char*, intptr_t, oop, intptr_t, int);
  92 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__concurrent,
  93   char*, intptr_t, oop, intptr_t, int);
  94 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__erroneous,
  95   char*, intptr_t, oop, intptr_t, int);
  96 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__super__failed,
  97   char*, intptr_t, oop, intptr_t, int);
  98 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__clinit,
  99   char*, intptr_t, oop, intptr_t, int);
 100 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__error,


2509       set_in_error_state();
2510     }
2511   }
2512 
2513   return (old_state != is_in_error_state());
2514 }
2515 
2516 static void clear_all_breakpoints(Method* m) {
2517   m->clear_all_breakpoints();
2518 }
2519 
2520 
2521 void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
2522   // notify the debugger
2523   if (JvmtiExport::should_post_class_unload()) {
2524     JvmtiExport::post_class_unload(ik);
2525   }
2526 
2527   // notify ClassLoadingService of class unload
2528   ClassLoadingService::notify_class_unloaded(ik);








2529 }
2530 
2531 void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) {
2532   // Clean up C heap
2533   ik->release_C_heap_structures();
2534   ik->constants()->release_C_heap_structures();
2535 }
2536 
2537 void InstanceKlass::release_C_heap_structures() {
2538 
2539   // Can't release the constant pool here because the constant pool can be
2540   // deallocated separately from the InstanceKlass for default methods and
2541   // redefine classes.
2542 
2543   // Deallocate oop map cache
2544   if (_oop_map_cache != NULL) {
2545     delete _oop_map_cache;
2546     _oop_map_cache = NULL;
2547   }
2548 




  61 #include "runtime/thread.inline.hpp"
  62 #include "services/classLoadingService.hpp"
  63 #include "services/threadService.hpp"
  64 #include "utilities/dtrace.hpp"
  65 #include "utilities/macros.hpp"
  66 #if INCLUDE_ALL_GCS
  67 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
  68 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  69 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
  70 #include "gc_implementation/g1/g1RemSet.inline.hpp"
  71 #include "gc_implementation/g1/heapRegionManager.inline.hpp"
  72 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
  73 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
  74 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
  75 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
  76 #include "oops/oop.pcgc.inline.hpp"
  77 #endif // INCLUDE_ALL_GCS
  78 #ifdef COMPILER1
  79 #include "c1/c1_Compiler.hpp"
  80 #endif
  81 #if INCLUDE_JFR
  82 #include "jfr/jfrEvents.hpp"
  83 #endif
  84 
  85 
  86 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  87 
  88 #ifdef DTRACE_ENABLED
  89 
  90 #ifndef USDT2
  91 
  92 HS_DTRACE_PROBE_DECL4(hotspot, class__initialization__required,
  93   char*, intptr_t, oop, intptr_t);
  94 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__recursive,
  95   char*, intptr_t, oop, intptr_t, int);
  96 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__concurrent,
  97   char*, intptr_t, oop, intptr_t, int);
  98 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__erroneous,
  99   char*, intptr_t, oop, intptr_t, int);
 100 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__super__failed,
 101   char*, intptr_t, oop, intptr_t, int);
 102 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__clinit,
 103   char*, intptr_t, oop, intptr_t, int);
 104 HS_DTRACE_PROBE_DECL5(hotspot, class__initialization__error,


2513       set_in_error_state();
2514     }
2515   }
2516 
2517   return (old_state != is_in_error_state());
2518 }
2519 
2520 static void clear_all_breakpoints(Method* m) {
2521   m->clear_all_breakpoints();
2522 }
2523 
2524 
2525 void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
2526   // notify the debugger
2527   if (JvmtiExport::should_post_class_unload()) {
2528     JvmtiExport::post_class_unload(ik);
2529   }
2530 
2531   // notify ClassLoadingService of class unload
2532   ClassLoadingService::notify_class_unloaded(ik);
2533 
2534 #if INCLUDE_JFR
2535   assert(ik != NULL, "invariant");
2536   EventClassUnload event;
2537   event.set_unloadedClass(ik);
2538   event.set_definingClassLoader(ik->class_loader_data());
2539   event.commit();
2540 #endif
2541 }
2542 
2543 void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) {
2544   // Clean up C heap
2545   ik->release_C_heap_structures();
2546   ik->constants()->release_C_heap_structures();
2547 }
2548 
2549 void InstanceKlass::release_C_heap_structures() {
2550 
2551   // Can't release the constant pool here because the constant pool can be
2552   // deallocated separately from the InstanceKlass for default methods and
2553   // redefine classes.
2554 
2555   // Deallocate oop map cache
2556   if (_oop_map_cache != NULL) {
2557     delete _oop_map_cache;
2558     _oop_map_cache = NULL;
2559   }
2560 


< prev index next >