13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderDataGraph.hpp"
27 #include "code/codeCache.hpp"
28 #include "gc/g1/g1BarrierSet.hpp"
29 #include "gc/g1/g1CollectedHeap.inline.hpp"
30 #include "gc/g1/g1CollectorState.hpp"
31 #include "gc/g1/g1ConcurrentMark.inline.hpp"
32 #include "gc/g1/g1ConcurrentMarkThread.inline.hpp"
33 #include "gc/g1/g1HeapVerifier.hpp"
34 #include "gc/g1/g1OopClosures.inline.hpp"
35 #include "gc/g1/g1Policy.hpp"
36 #include "gc/g1/g1RegionMarkStatsCache.inline.hpp"
37 #include "gc/g1/g1StringDedup.hpp"
38 #include "gc/g1/g1ThreadLocalData.hpp"
39 #include "gc/g1/heapRegion.inline.hpp"
40 #include "gc/g1/heapRegionRemSet.hpp"
41 #include "gc/g1/heapRegionSet.inline.hpp"
42 #include "gc/shared/gcId.hpp"
43 #include "gc/shared/gcTimer.hpp"
44 #include "gc/shared/gcTrace.hpp"
45 #include "gc/shared/gcTraceTime.inline.hpp"
46 #include "gc/shared/gcVMOperations.hpp"
47 #include "gc/shared/genOopClosures.inline.hpp"
48 #include "gc/shared/referencePolicy.hpp"
49 #include "gc/shared/strongRootsScope.hpp"
50 #include "gc/shared/suspendibleThreadSet.hpp"
51 #include "gc/shared/taskqueue.inline.hpp"
52 #include "gc/shared/weakProcessor.inline.hpp"
355 G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap* g1h,
356 G1RegionToSpaceMapper* prev_bitmap_storage,
357 G1RegionToSpaceMapper* next_bitmap_storage) :
358 // _cm_thread set inside the constructor
359 _g1h(g1h),
360 _completed_initialization(false),
361
362 _mark_bitmap_1(),
363 _mark_bitmap_2(),
364 _prev_mark_bitmap(&_mark_bitmap_1),
365 _next_mark_bitmap(&_mark_bitmap_2),
366
367 _heap(_g1h->reserved_region()),
368
369 _root_regions(_g1h->max_regions()),
370
371 _global_mark_stack(),
372
373 // _finger set in set_non_marking_state
374
375 _worker_id_offset(DirtyCardQueueSet::num_par_ids() + G1ConcRefinementThreads),
376 _max_num_tasks(ParallelGCThreads),
377 // _num_active_tasks set in set_non_marking_state()
378 // _tasks set inside the constructor
379
380 _task_queues(new G1CMTaskQueueSet((int) _max_num_tasks)),
381 _terminator((int) _max_num_tasks, _task_queues),
382
383 _first_overflow_barrier_sync(),
384 _second_overflow_barrier_sync(),
385
386 _has_overflown(false),
387 _concurrent(false),
388 _has_aborted(false),
389 _restart_for_overflow(false),
390 _gc_timer_cm(new (ResourceObj::C_HEAP, mtGC) ConcurrentGCTimer()),
391 _gc_tracer_cm(new (ResourceObj::C_HEAP, mtGC) G1OldTracer()),
392
393 // _verbose_level set below
394
395 _init_times(),
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoaderDataGraph.hpp"
27 #include "code/codeCache.hpp"
28 #include "gc/g1/g1BarrierSet.hpp"
29 #include "gc/g1/g1CollectedHeap.inline.hpp"
30 #include "gc/g1/g1CollectorState.hpp"
31 #include "gc/g1/g1ConcurrentMark.inline.hpp"
32 #include "gc/g1/g1ConcurrentMarkThread.inline.hpp"
33 #include "gc/g1/g1DirtyCardQueue.hpp"
34 #include "gc/g1/g1HeapVerifier.hpp"
35 #include "gc/g1/g1OopClosures.inline.hpp"
36 #include "gc/g1/g1Policy.hpp"
37 #include "gc/g1/g1RegionMarkStatsCache.inline.hpp"
38 #include "gc/g1/g1StringDedup.hpp"
39 #include "gc/g1/g1ThreadLocalData.hpp"
40 #include "gc/g1/heapRegion.inline.hpp"
41 #include "gc/g1/heapRegionRemSet.hpp"
42 #include "gc/g1/heapRegionSet.inline.hpp"
43 #include "gc/shared/gcId.hpp"
44 #include "gc/shared/gcTimer.hpp"
45 #include "gc/shared/gcTrace.hpp"
46 #include "gc/shared/gcTraceTime.inline.hpp"
47 #include "gc/shared/gcVMOperations.hpp"
48 #include "gc/shared/genOopClosures.inline.hpp"
49 #include "gc/shared/referencePolicy.hpp"
50 #include "gc/shared/strongRootsScope.hpp"
51 #include "gc/shared/suspendibleThreadSet.hpp"
52 #include "gc/shared/taskqueue.inline.hpp"
53 #include "gc/shared/weakProcessor.inline.hpp"
356 G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap* g1h,
357 G1RegionToSpaceMapper* prev_bitmap_storage,
358 G1RegionToSpaceMapper* next_bitmap_storage) :
359 // _cm_thread set inside the constructor
360 _g1h(g1h),
361 _completed_initialization(false),
362
363 _mark_bitmap_1(),
364 _mark_bitmap_2(),
365 _prev_mark_bitmap(&_mark_bitmap_1),
366 _next_mark_bitmap(&_mark_bitmap_2),
367
368 _heap(_g1h->reserved_region()),
369
370 _root_regions(_g1h->max_regions()),
371
372 _global_mark_stack(),
373
374 // _finger set in set_non_marking_state
375
376 _worker_id_offset(G1DirtyCardQueueSet::num_par_ids() + G1ConcRefinementThreads),
377 _max_num_tasks(ParallelGCThreads),
378 // _num_active_tasks set in set_non_marking_state()
379 // _tasks set inside the constructor
380
381 _task_queues(new G1CMTaskQueueSet((int) _max_num_tasks)),
382 _terminator((int) _max_num_tasks, _task_queues),
383
384 _first_overflow_barrier_sync(),
385 _second_overflow_barrier_sync(),
386
387 _has_overflown(false),
388 _concurrent(false),
389 _has_aborted(false),
390 _restart_for_overflow(false),
391 _gc_timer_cm(new (ResourceObj::C_HEAP, mtGC) ConcurrentGCTimer()),
392 _gc_tracer_cm(new (ResourceObj::C_HEAP, mtGC) G1OldTracer()),
393
394 // _verbose_level set below
395
396 _init_times(),
|