< prev index next >

src/hotspot/share/gc/shared/vmGCOperations.cpp

Print this page




  29 #include "gc/shared/gcId.hpp"
  30 #include "gc/shared/gcLocker.inline.hpp"
  31 #include "gc/shared/genCollectedHeap.hpp"
  32 #include "gc/shared/vmGCOperations.hpp"
  33 #include "interpreter/oopMapCache.hpp"
  34 #include "logging/log.hpp"
  35 #include "memory/oopFactory.hpp"
  36 #include "runtime/handles.inline.hpp"
  37 #include "runtime/init.hpp"
  38 #include "runtime/interfaceSupport.hpp"
  39 #include "utilities/dtrace.hpp"
  40 #include "utilities/macros.hpp"
  41 #include "utilities/preserveException.hpp"
  42 #if INCLUDE_ALL_GCS
  43 #include "gc/g1/g1CollectedHeap.inline.hpp"
  44 #include "gc/g1/g1Policy.hpp"
  45 #endif // INCLUDE_ALL_GCS
  46 
  47 VM_GC_Operation::~VM_GC_Operation() {
  48   CollectedHeap* ch = Universe::heap();
  49   ch->collector_policy()->set_all_soft_refs_clear(false);
  50 }
  51 
  52 // The same dtrace probe can't be inserted in two different files, so we
  53 // have to call it here, so it's only in one file.  Can't create new probes
  54 // for the other file anymore.   The dtrace probes have to remain stable.
  55 void VM_GC_Operation::notify_gc_begin(bool full) {
  56   HOTSPOT_GC_BEGIN(
  57                    full);
  58   HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
  59 }
  60 
  61 void VM_GC_Operation::notify_gc_end() {
  62   HOTSPOT_GC_END();
  63   HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
  64 }
  65 
  66 // Allocations may fail in several threads at about the same time,
  67 // resulting in multiple gc requests.  We only want to do one of them.
  68 // In case a GC locker is active and the need for a GC is already signaled,
  69 // we want to skip this GC attempt altogether, without doing a futile




  29 #include "gc/shared/gcId.hpp"
  30 #include "gc/shared/gcLocker.inline.hpp"
  31 #include "gc/shared/genCollectedHeap.hpp"
  32 #include "gc/shared/vmGCOperations.hpp"
  33 #include "interpreter/oopMapCache.hpp"
  34 #include "logging/log.hpp"
  35 #include "memory/oopFactory.hpp"
  36 #include "runtime/handles.inline.hpp"
  37 #include "runtime/init.hpp"
  38 #include "runtime/interfaceSupport.hpp"
  39 #include "utilities/dtrace.hpp"
  40 #include "utilities/macros.hpp"
  41 #include "utilities/preserveException.hpp"
  42 #if INCLUDE_ALL_GCS
  43 #include "gc/g1/g1CollectedHeap.inline.hpp"
  44 #include "gc/g1/g1Policy.hpp"
  45 #endif // INCLUDE_ALL_GCS
  46 
  47 VM_GC_Operation::~VM_GC_Operation() {
  48   CollectedHeap* ch = Universe::heap();
  49   ch->soft_ref_policy()->set_all_soft_refs_clear(false);
  50 }
  51 
  52 // The same dtrace probe can't be inserted in two different files, so we
  53 // have to call it here, so it's only in one file.  Can't create new probes
  54 // for the other file anymore.   The dtrace probes have to remain stable.
  55 void VM_GC_Operation::notify_gc_begin(bool full) {
  56   HOTSPOT_GC_BEGIN(
  57                    full);
  58   HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
  59 }
  60 
  61 void VM_GC_Operation::notify_gc_end() {
  62   HOTSPOT_GC_END();
  63   HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
  64 }
  65 
  66 // Allocations may fail in several threads at about the same time,
  67 // resulting in multiple gc requests.  We only want to do one of them.
  68 // In case a GC locker is active and the need for a GC is already signaled,
  69 // we want to skip this GC attempt altogether, without doing a futile


< prev index next >