src/hotspot/share/gc/parallel/pcTasks.hpp
changeset 50071 758deedaae84
parent 50058 f7e564cacfbc
child 50606 8f1d5d706bdd
equal deleted inserted replaced
50070:c036b84c6bbf 50071:758deedaae84
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 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.
   130 
   130 
   131   virtual void do_it(GCTaskManager* manager, uint which);
   131   virtual void do_it(GCTaskManager* manager, uint which);
   132 };
   132 };
   133 
   133 
   134 
   134 
   135 
       
   136 //
       
   137 // RefEnqueueTaskProxy
       
   138 //
       
   139 // This task is used as a proxy to parallel reference processing tasks .
       
   140 //
       
   141 
       
   142 class RefEnqueueTaskProxy: public GCTask {
       
   143   typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
       
   144   EnqueueTask& _enq_task;
       
   145   uint         _work_id;
       
   146 
       
   147 public:
       
   148   RefEnqueueTaskProxy(EnqueueTask& enq_task, uint work_id)
       
   149     : _enq_task(enq_task),
       
   150       _work_id(work_id)
       
   151   { }
       
   152 
       
   153   virtual char* name() { return (char *)"Enqueue reference objects in parallel"; }
       
   154   virtual void do_it(GCTaskManager* manager, uint which)
       
   155   {
       
   156     _enq_task.work(_work_id);
       
   157   }
       
   158 };
       
   159 
       
   160 
       
   161 //
   135 //
   162 // RefProcTaskExecutor
   136 // RefProcTaskExecutor
   163 //
   137 //
   164 // Task executor is an interface for the reference processor to run
   138 // Task executor is an interface for the reference processor to run
   165 // tasks using GCTaskManager.
   139 // tasks using GCTaskManager.
   166 //
   140 //
   167 
   141 
   168 class RefProcTaskExecutor: public AbstractRefProcTaskExecutor {
   142 class RefProcTaskExecutor: public AbstractRefProcTaskExecutor {
   169   virtual void execute(ProcessTask& task);
   143   virtual void execute(ProcessTask& task);
   170   virtual void execute(EnqueueTask& task);
       
   171 };
   144 };
   172 
   145 
   173 
   146 
   174 //
   147 //
   175 // StealMarkingTask
   148 // StealMarkingTask