src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-gc Sdiff src/share/vm/memory

src/share/vm/memory/genMarkSweep.cpp

Print this page
rev 3849 : imported patch thread.inline.hpp


  26 #include "classfile/javaClasses.hpp"
  27 #include "classfile/symbolTable.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "classfile/vmSymbols.hpp"
  30 #include "code/codeCache.hpp"
  31 #include "code/icBuffer.hpp"
  32 #include "gc_interface/collectedHeap.inline.hpp"
  33 #include "memory/genCollectedHeap.hpp"
  34 #include "memory/genMarkSweep.hpp"
  35 #include "memory/genOopClosures.inline.hpp"
  36 #include "memory/generation.inline.hpp"
  37 #include "memory/modRefBarrierSet.hpp"
  38 #include "memory/referencePolicy.hpp"
  39 #include "memory/space.hpp"
  40 #include "oops/instanceRefKlass.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvmtiExport.hpp"
  43 #include "runtime/fprofiler.hpp"
  44 #include "runtime/handles.inline.hpp"
  45 #include "runtime/synchronizer.hpp"

  46 #include "runtime/vmThread.hpp"
  47 #include "utilities/copy.hpp"
  48 #include "utilities/events.hpp"
  49 #ifdef TARGET_OS_FAMILY_linux
  50 # include "thread_linux.inline.hpp"
  51 #endif
  52 #ifdef TARGET_OS_FAMILY_solaris
  53 # include "thread_solaris.inline.hpp"
  54 #endif
  55 #ifdef TARGET_OS_FAMILY_windows
  56 # include "thread_windows.inline.hpp"
  57 #endif
  58 #ifdef TARGET_OS_FAMILY_bsd
  59 # include "thread_bsd.inline.hpp"
  60 #endif
  61 
  62 void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp,
  63   bool clear_all_softrefs) {
  64   assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
  65 
  66   GenCollectedHeap* gch = GenCollectedHeap::heap();
  67 #ifdef ASSERT
  68   if (gch->collector_policy()->should_clear_all_soft_refs()) {
  69     assert(clear_all_softrefs, "Policy should have been checked earlier");
  70   }
  71 #endif
  72 
  73   // hook up weak ref data so it can be used during Mark-Sweep
  74   assert(ref_processor() == NULL, "no stomping");
  75   assert(rp != NULL, "should be non-NULL");
  76   _ref_processor = rp;
  77   rp->setup_policy(clear_all_softrefs);
  78 
  79   TraceTime t1(GCCauseString("Full GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
  80 




  26 #include "classfile/javaClasses.hpp"
  27 #include "classfile/symbolTable.hpp"
  28 #include "classfile/systemDictionary.hpp"
  29 #include "classfile/vmSymbols.hpp"
  30 #include "code/codeCache.hpp"
  31 #include "code/icBuffer.hpp"
  32 #include "gc_interface/collectedHeap.inline.hpp"
  33 #include "memory/genCollectedHeap.hpp"
  34 #include "memory/genMarkSweep.hpp"
  35 #include "memory/genOopClosures.inline.hpp"
  36 #include "memory/generation.inline.hpp"
  37 #include "memory/modRefBarrierSet.hpp"
  38 #include "memory/referencePolicy.hpp"
  39 #include "memory/space.hpp"
  40 #include "oops/instanceRefKlass.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvmtiExport.hpp"
  43 #include "runtime/fprofiler.hpp"
  44 #include "runtime/handles.inline.hpp"
  45 #include "runtime/synchronizer.hpp"
  46 #include "runtime/thread.inline.hpp"
  47 #include "runtime/vmThread.hpp"
  48 #include "utilities/copy.hpp"
  49 #include "utilities/events.hpp"












  50 
  51 void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp,
  52   bool clear_all_softrefs) {
  53   assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
  54 
  55   GenCollectedHeap* gch = GenCollectedHeap::heap();
  56 #ifdef ASSERT
  57   if (gch->collector_policy()->should_clear_all_soft_refs()) {
  58     assert(clear_all_softrefs, "Policy should have been checked earlier");
  59   }
  60 #endif
  61 
  62   // hook up weak ref data so it can be used during Mark-Sweep
  63   assert(ref_processor() == NULL, "no stomping");
  64   assert(rp != NULL, "should be non-NULL");
  65   _ref_processor = rp;
  66   rp->setup_policy(clear_all_softrefs);
  67 
  68   TraceTime t1(GCCauseString("Full GC", gch->gc_cause()), PrintGC && !PrintGCDetails, true, gclog_or_tty);
  69 


src/share/vm/memory/genMarkSweep.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File