src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff src/hotspot/share/gc/g1

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page




  62 #include "gc/g1/heapRegion.inline.hpp"
  63 #include "gc/g1/heapRegionRemSet.hpp"
  64 #include "gc/g1/heapRegionSet.inline.hpp"
  65 #include "gc/shared/gcBehaviours.hpp"
  66 #include "gc/shared/gcHeapSummary.hpp"
  67 #include "gc/shared/gcId.hpp"
  68 #include "gc/shared/gcLocker.hpp"
  69 #include "gc/shared/gcTimer.hpp"
  70 #include "gc/shared/gcTrace.hpp"
  71 #include "gc/shared/gcTraceTime.inline.hpp"
  72 #include "gc/shared/generationSpec.hpp"
  73 #include "gc/shared/isGCActiveMark.hpp"
  74 #include "gc/shared/oopStorageParState.hpp"
  75 #include "gc/shared/parallelCleaning.hpp"
  76 #include "gc/shared/preservedMarks.inline.hpp"
  77 #include "gc/shared/suspendibleThreadSet.hpp"
  78 #include "gc/shared/referenceProcessor.inline.hpp"
  79 #include "gc/shared/taskqueue.inline.hpp"
  80 #include "gc/shared/weakProcessor.inline.hpp"
  81 #include "gc/shared/workerPolicy.hpp"
  82 #if INCLUDE_JVMCI
  83 #include "jvmci/jvmci.hpp"
  84 #endif
  85 #include "logging/log.hpp"
  86 #include "memory/allocation.hpp"
  87 #include "memory/iterator.hpp"
  88 #include "memory/resourceArea.hpp"
  89 #include "oops/access.inline.hpp"
  90 #include "oops/compressedOops.inline.hpp"
  91 #include "oops/oop.inline.hpp"
  92 #include "runtime/atomic.hpp"
  93 #include "runtime/flags/flagSetting.hpp"
  94 #include "runtime/handles.inline.hpp"
  95 #include "runtime/init.hpp"
  96 #include "runtime/orderAccess.hpp"
  97 #include "runtime/threadSMR.hpp"
  98 #include "runtime/vmThread.hpp"
  99 #include "utilities/align.hpp"
 100 #include "utilities/globalDefinitions.hpp"
 101 #include "utilities/stack.inline.hpp"
 102 
 103 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
 104 


3260 
3261         p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec);
3262         p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts);
3263       }
3264 
3265       assert(pss->queue_is_empty(), "should be empty");
3266 
3267       // Close the inner scope so that the ResourceMark and HandleMark
3268       // destructors are executed here and are included as part of the
3269       // "GC Worker Time".
3270     }
3271     _g1h->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime());
3272   }
3273 };
3274 
3275 void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive,
3276                                         bool class_unloading_occurred) {
3277   uint num_workers = workers()->active_workers();
3278   ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false);
3279   workers()->run_task(&unlink_task);
3280 #if INCLUDE_JVMCI
3281   // No parallel processing of JVMCI metadata handles for now.
3282   JVMCI::do_unloading(is_alive, class_unloading_occurred);
3283 #endif
3284 }
3285 
3286 // Clean string dedup data structures.
3287 // Ideally we would prefer to use a StringDedupCleaningTask here, but we want to
3288 // record the durations of the phases. Hence the almost-copy.
3289 class G1StringDedupCleaningTask : public AbstractGangTask {
3290   BoolObjectClosure* _is_alive;
3291   OopClosure* _keep_alive;
3292   G1GCPhaseTimes* _phase_times;
3293 
3294 public:
3295   G1StringDedupCleaningTask(BoolObjectClosure* is_alive,
3296                             OopClosure* keep_alive,
3297                             G1GCPhaseTimes* phase_times) :
3298     AbstractGangTask("Partial Cleaning Task"),
3299     _is_alive(is_alive),
3300     _keep_alive(keep_alive),
3301     _phase_times(phase_times)
3302   {
3303     assert(G1StringDedup::is_enabled(), "String deduplication disabled.");




  62 #include "gc/g1/heapRegion.inline.hpp"
  63 #include "gc/g1/heapRegionRemSet.hpp"
  64 #include "gc/g1/heapRegionSet.inline.hpp"
  65 #include "gc/shared/gcBehaviours.hpp"
  66 #include "gc/shared/gcHeapSummary.hpp"
  67 #include "gc/shared/gcId.hpp"
  68 #include "gc/shared/gcLocker.hpp"
  69 #include "gc/shared/gcTimer.hpp"
  70 #include "gc/shared/gcTrace.hpp"
  71 #include "gc/shared/gcTraceTime.inline.hpp"
  72 #include "gc/shared/generationSpec.hpp"
  73 #include "gc/shared/isGCActiveMark.hpp"
  74 #include "gc/shared/oopStorageParState.hpp"
  75 #include "gc/shared/parallelCleaning.hpp"
  76 #include "gc/shared/preservedMarks.inline.hpp"
  77 #include "gc/shared/suspendibleThreadSet.hpp"
  78 #include "gc/shared/referenceProcessor.inline.hpp"
  79 #include "gc/shared/taskqueue.inline.hpp"
  80 #include "gc/shared/weakProcessor.inline.hpp"
  81 #include "gc/shared/workerPolicy.hpp"



  82 #include "logging/log.hpp"
  83 #include "memory/allocation.hpp"
  84 #include "memory/iterator.hpp"
  85 #include "memory/resourceArea.hpp"
  86 #include "oops/access.inline.hpp"
  87 #include "oops/compressedOops.inline.hpp"
  88 #include "oops/oop.inline.hpp"
  89 #include "runtime/atomic.hpp"
  90 #include "runtime/flags/flagSetting.hpp"
  91 #include "runtime/handles.inline.hpp"
  92 #include "runtime/init.hpp"
  93 #include "runtime/orderAccess.hpp"
  94 #include "runtime/threadSMR.hpp"
  95 #include "runtime/vmThread.hpp"
  96 #include "utilities/align.hpp"
  97 #include "utilities/globalDefinitions.hpp"
  98 #include "utilities/stack.inline.hpp"
  99 
 100 size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
 101 


3257 
3258         p->record_time_secs(G1GCPhaseTimes::Termination, worker_id, term_sec);
3259         p->record_thread_work_item(G1GCPhaseTimes::Termination, worker_id, evac_term_attempts);
3260       }
3261 
3262       assert(pss->queue_is_empty(), "should be empty");
3263 
3264       // Close the inner scope so that the ResourceMark and HandleMark
3265       // destructors are executed here and are included as part of the
3266       // "GC Worker Time".
3267     }
3268     _g1h->phase_times()->record_time_secs(G1GCPhaseTimes::GCWorkerEnd, worker_id, os::elapsedTime());
3269   }
3270 };
3271 
3272 void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive,
3273                                         bool class_unloading_occurred) {
3274   uint num_workers = workers()->active_workers();
3275   ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false);
3276   workers()->run_task(&unlink_task);




3277 }
3278 
3279 // Clean string dedup data structures.
3280 // Ideally we would prefer to use a StringDedupCleaningTask here, but we want to
3281 // record the durations of the phases. Hence the almost-copy.
3282 class G1StringDedupCleaningTask : public AbstractGangTask {
3283   BoolObjectClosure* _is_alive;
3284   OopClosure* _keep_alive;
3285   G1GCPhaseTimes* _phase_times;
3286 
3287 public:
3288   G1StringDedupCleaningTask(BoolObjectClosure* is_alive,
3289                             OopClosure* keep_alive,
3290                             G1GCPhaseTimes* phase_times) :
3291     AbstractGangTask("Partial Cleaning Task"),
3292     _is_alive(is_alive),
3293     _keep_alive(keep_alive),
3294     _phase_times(phase_times)
3295   {
3296     assert(G1StringDedup::is_enabled(), "String deduplication disabled.");


src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File