src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-gc.pslb Sdiff src/share/vm/gc_implementation/parallelScavenge

src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp

Print this page




2321   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
2322   PSParallelCompact::FollowStackClosure follow_stack_closure(cm);
2323 
2324   // Need new claim bits before marking starts.
2325   ClassLoaderDataGraph::clear_claimed_marks();
2326 
2327   {
2328     TraceTime tm_m("par mark", print_phases(), true, gclog_or_tty);
2329     ParallelScavengeHeap::ParStrongRootsScope psrs;
2330 
2331     GCTaskQueue* q = GCTaskQueue::create();
2332 
2333     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::universe));
2334     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jni_handles));
2335     // We scan the thread roots in parallel
2336     Threads::create_thread_roots_marking_tasks(q);
2337     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::object_synchronizer));
2338     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::flat_profiler));
2339     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management));
2340     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary));

2341     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti));
2342     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache));
2343 
2344     if (active_gc_threads > 1) {
2345       for (uint j = 0; j < active_gc_threads; j++) {
2346         q->enqueue(new StealMarkingTask(&terminator));
2347       }
2348     }
2349 
2350     gc_task_manager()->execute_and_wait(q);
2351   }
2352 
2353   // Process reference objects found during marking
2354   {
2355     TraceTime tm_r("reference processing", print_phases(), true, gclog_or_tty);
2356     if (ref_processor()->processing_is_mt()) {
2357       RefProcTaskExecutor task_executor;
2358       ref_processor()->process_discovered_references(
2359         is_alive_closure(), &mark_and_push_closure, &follow_stack_closure,
2360         &task_executor);




2321   PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
2322   PSParallelCompact::FollowStackClosure follow_stack_closure(cm);
2323 
2324   // Need new claim bits before marking starts.
2325   ClassLoaderDataGraph::clear_claimed_marks();
2326 
2327   {
2328     TraceTime tm_m("par mark", print_phases(), true, gclog_or_tty);
2329     ParallelScavengeHeap::ParStrongRootsScope psrs;
2330 
2331     GCTaskQueue* q = GCTaskQueue::create();
2332 
2333     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::universe));
2334     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jni_handles));
2335     // We scan the thread roots in parallel
2336     Threads::create_thread_roots_marking_tasks(q);
2337     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::object_synchronizer));
2338     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::flat_profiler));
2339     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::management));
2340     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::system_dictionary));
2341     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::class_loader_data));
2342     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::jvmti));
2343     q->enqueue(new MarkFromRootsTask(MarkFromRootsTask::code_cache));
2344 
2345     if (active_gc_threads > 1) {
2346       for (uint j = 0; j < active_gc_threads; j++) {
2347         q->enqueue(new StealMarkingTask(&terminator));
2348       }
2349     }
2350 
2351     gc_task_manager()->execute_and_wait(q);
2352   }
2353 
2354   // Process reference objects found during marking
2355   {
2356     TraceTime tm_r("reference processing", print_phases(), true, gclog_or_tty);
2357     if (ref_processor()->processing_is_mt()) {
2358       RefProcTaskExecutor task_executor;
2359       ref_processor()->process_discovered_references(
2360         is_alive_closure(), &mark_and_push_closure, &follow_stack_closure,
2361         &task_executor);


src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File