src/hotspot/share/gc/g1/g1FullGCReferenceProcessorExecutor.cpp
changeset 50071 758deedaae84
parent 50049 9d17c375dc30
child 50396 7f48bff40a9a
equal deleted inserted replaced
50070:c036b84c6bbf 50071:758deedaae84
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    61                   is_alive,
    61                   is_alive,
    62                   keep_alive,
    62                   keep_alive,
    63                   *marker->stack_closure());
    63                   *marker->stack_closure());
    64 }
    64 }
    65 
    65 
    66 G1FullGCReferenceProcessingExecutor::G1RefEnqueueTaskProxy::G1RefEnqueueTaskProxy(EnqueueTask& enq_task) :
       
    67   AbstractGangTask("G1 reference enqueue task"),
       
    68   _enq_task(enq_task) { }
       
    69 
       
    70 void G1FullGCReferenceProcessingExecutor::G1RefEnqueueTaskProxy::work(uint worker_id) {
       
    71   _enq_task.work(worker_id);
       
    72 }
       
    73 
       
    74 void G1FullGCReferenceProcessingExecutor::run_task(AbstractGangTask* task) {
    66 void G1FullGCReferenceProcessingExecutor::run_task(AbstractGangTask* task) {
    75   G1CollectedHeap::heap()->workers()->run_task(task, _collector->workers());
    67   G1CollectedHeap::heap()->workers()->run_task(task, _collector->workers());
    76 }
    68 }
    77 
    69 
    78 void G1FullGCReferenceProcessingExecutor::execute(ProcessTask& proc_task) {
    70 void G1FullGCReferenceProcessingExecutor::execute(ProcessTask& proc_task) {
    79   G1RefProcTaskProxy proc_task_proxy(proc_task, _collector);
    71   G1RefProcTaskProxy proc_task_proxy(proc_task, _collector);
    80   run_task(&proc_task_proxy);
    72   run_task(&proc_task_proxy);
    81 }
       
    82 
       
    83 // Driver routine for parallel reference processing.
       
    84 void G1FullGCReferenceProcessingExecutor::execute(EnqueueTask& enq_task) {
       
    85   G1RefEnqueueTaskProxy enq_task_proxy(enq_task);
       
    86   run_task(&enq_task_proxy);
       
    87 }
    73 }
    88 
    74 
    89 void G1FullGCReferenceProcessingExecutor::execute(STWGCTimer* timer, G1FullGCTracer* tracer) {
    75 void G1FullGCReferenceProcessingExecutor::execute(STWGCTimer* timer, G1FullGCTracer* tracer) {
    90   GCTraceTime(Debug, gc, phases) debug("Phase 1: Reference Processing", timer);
    76   GCTraceTime(Debug, gc, phases) debug("Phase 1: Reference Processing", timer);
    91   // Process reference objects found during marking.
    77   // Process reference objects found during marking.