Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/concurrentMark.hpp @ 2174:234761c55641
6608385: G1: need to support parallel reference processing
Summary: Implement support for ParallelRefProcEnabled in the reference processing that takes place at the end of G1 concurrent marking.
Reviewed-by: tonyp, ysr
author | johnc |
---|---|
date | Tue, 25 Jan 2011 10:56:22 -0800 |
parents | 0fa27f37d4d4 |
children | 371bbc844bf1 |
comparison
equal
deleted
inserted
replaced
2172:a672e43650cc | 2174:234761c55641 |
---|---|
351 friend class CMGlobalObjectClosure; | 351 friend class CMGlobalObjectClosure; |
352 friend class CMRemarkTask; | 352 friend class CMRemarkTask; |
353 friend class CMConcurrentMarkingTask; | 353 friend class CMConcurrentMarkingTask; |
354 friend class G1ParNoteEndTask; | 354 friend class G1ParNoteEndTask; |
355 friend class CalcLiveObjectsClosure; | 355 friend class CalcLiveObjectsClosure; |
356 friend class G1RefProcTaskProxy; | |
357 friend class G1RefProcTaskExecutor; | |
358 friend class G1CMParKeepAliveAndDrainClosure; | |
359 friend class G1CMParDrainMarkingStackClosure; | |
356 | 360 |
357 protected: | 361 protected: |
358 ConcurrentMarkThread* _cmThread; // the thread doing the work | 362 ConcurrentMarkThread* _cmThread; // the thread doing the work |
359 G1CollectedHeap* _g1h; // the heap. | 363 G1CollectedHeap* _g1h; // the heap. |
360 size_t _parallel_marking_threads; // the number of marking | 364 size_t _parallel_marking_threads; // the number of marking |
934 // used by the work stealing stuff | 938 // used by the work stealing stuff |
935 int _hash_seed; | 939 int _hash_seed; |
936 // if this is true, then the task has aborted for some reason | 940 // if this is true, then the task has aborted for some reason |
937 bool _has_aborted; | 941 bool _has_aborted; |
938 // set when the task aborts because it has met its time quota | 942 // set when the task aborts because it has met its time quota |
939 bool _has_aborted_timed_out; | 943 bool _has_timed_out; |
940 // true when we're draining SATB buffers; this avoids the task | 944 // true when we're draining SATB buffers; this avoids the task |
941 // aborting due to SATB buffers being available (as we're already | 945 // aborting due to SATB buffers being available (as we're already |
942 // dealing with them) | 946 // dealing with them) |
943 bool _draining_satb_buffers; | 947 bool _draining_satb_buffers; |
944 | 948 |
1039 | 1043 |
1040 // The main method of this class which performs a marking step | 1044 // The main method of this class which performs a marking step |
1041 // trying not to exceed the given duration. However, it might exit | 1045 // trying not to exceed the given duration. However, it might exit |
1042 // prematurely, according to some conditions (i.e. SATB buffers are | 1046 // prematurely, according to some conditions (i.e. SATB buffers are |
1043 // available for processing). | 1047 // available for processing). |
1044 void do_marking_step(double target_ms); | 1048 void do_marking_step(double target_ms, bool do_stealing, bool do_termination); |
1045 | 1049 |
1046 // These two calls start and stop the timer | 1050 // These two calls start and stop the timer |
1047 void record_start_time() { | 1051 void record_start_time() { |
1048 _elapsed_time_ms = os::elapsedTime() * 1000.0; | 1052 _elapsed_time_ms = os::elapsedTime() * 1000.0; |
1049 } | 1053 } |
1061 HeapWord* finger() { return _finger; } | 1065 HeapWord* finger() { return _finger; } |
1062 | 1066 |
1063 bool has_aborted() { return _has_aborted; } | 1067 bool has_aborted() { return _has_aborted; } |
1064 void set_has_aborted() { _has_aborted = true; } | 1068 void set_has_aborted() { _has_aborted = true; } |
1065 void clear_has_aborted() { _has_aborted = false; } | 1069 void clear_has_aborted() { _has_aborted = false; } |
1066 bool claimed() { return _claimed; } | 1070 bool has_timed_out() { return _has_timed_out; } |
1071 bool claimed() { return _claimed; } | |
1067 | 1072 |
1068 // Support routines for the partially scanned region that may be | 1073 // Support routines for the partially scanned region that may be |
1069 // recorded as a result of aborting while draining the CMRegionStack | 1074 // recorded as a result of aborting while draining the CMRegionStack |
1070 MemRegion aborted_region() { return _aborted_region; } | 1075 MemRegion aborted_region() { return _aborted_region; } |
1071 void set_aborted_region(MemRegion mr) | 1076 void set_aborted_region(MemRegion mr) |