< prev index next >

src/share/vm/gc/parallel/psCompactionManager.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_HPP
  27 

  28 #include "memory/allocation.hpp"
  29 #include "utilities/stack.hpp"
  30 #include "utilities/taskqueue.hpp"
  31 
  32 class MutableSpace;
  33 class PSOldGen;
  34 class ParCompactionManager;
  35 class ObjectStartArray;
  36 class ParallelCompactData;
  37 class ParMarkBitMap;
  38 
  39 class ParCompactionManager : public CHeapObj<mtGC> {
  40   friend class ParallelTaskTerminator;
  41   friend class ParMarkBitMap;
  42   friend class PSParallelCompact;
  43   friend class StealRegionCompactionTask;
  44   friend class UpdateAndFillClosure;
  45   friend class RefProcTaskExecutor;
  46   friend class IdleGCTask;
  47 
  48  public:
  49 
  50 // ------------------------  Don't putback if not needed


 223    private:
 224     MarkAndPushClosure* _mark_and_push_closure;
 225    public:
 226     FollowKlassClosure(MarkAndPushClosure* mark_and_push_closure) :
 227         _mark_and_push_closure(mark_and_push_closure) { }
 228     void do_klass(Klass* klass);
 229   };
 230 };
 231 
 232 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
 233   assert(_manager_array != NULL, "access of NULL manager_array");
 234   assert(index >= 0 && index <= (int)ParallelGCThreads,
 235     "out of range manager_array access");
 236   return _manager_array[index];
 237 }
 238 
 239 bool ParCompactionManager::marking_stacks_empty() const {
 240   return _marking_stack.is_empty() && _objarray_stack.is_empty();
 241 }
 242 
 243 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_HPP


   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 #ifndef SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_HPP
  26 #define SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_HPP
  27 
  28 #include "gc/shared/taskqueue.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "utilities/stack.hpp"

  31 
  32 class MutableSpace;
  33 class PSOldGen;
  34 class ParCompactionManager;
  35 class ObjectStartArray;
  36 class ParallelCompactData;
  37 class ParMarkBitMap;
  38 
  39 class ParCompactionManager : public CHeapObj<mtGC> {
  40   friend class ParallelTaskTerminator;
  41   friend class ParMarkBitMap;
  42   friend class PSParallelCompact;
  43   friend class StealRegionCompactionTask;
  44   friend class UpdateAndFillClosure;
  45   friend class RefProcTaskExecutor;
  46   friend class IdleGCTask;
  47 
  48  public:
  49 
  50 // ------------------------  Don't putback if not needed


 223    private:
 224     MarkAndPushClosure* _mark_and_push_closure;
 225    public:
 226     FollowKlassClosure(MarkAndPushClosure* mark_and_push_closure) :
 227         _mark_and_push_closure(mark_and_push_closure) { }
 228     void do_klass(Klass* klass);
 229   };
 230 };
 231 
 232 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
 233   assert(_manager_array != NULL, "access of NULL manager_array");
 234   assert(index >= 0 && index <= (int)ParallelGCThreads,
 235     "out of range manager_array access");
 236   return _manager_array[index];
 237 }
 238 
 239 bool ParCompactionManager::marking_stacks_empty() const {
 240   return _marking_stack.is_empty() && _objarray_stack.is_empty();
 241 }
 242 
 243 #endif // SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_HPP
< prev index next >