src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp

Print this page




   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 // Move to some global location
  26 #define HAS_BEEN_MOVED 0x1501d01d
  27 // End move to some global location
  28 
  29 
  30 class MutableSpace;
  31 class PSOldGen;
  32 class ParCompactionManager;
  33 class ObjectStartArray;
  34 class ParallelCompactData;
  35 class ParMarkBitMap;
  36 
  37 class ParCompactionManager : public CHeapObj {
  38   friend class ParallelTaskTerminator;
  39   friend class ParMarkBitMap;
  40   friend class PSParallelCompact;
  41   friend class StealRegionCompactionTask;
  42   friend class UpdateAndFillClosure;
  43   friend class RefProcTaskExecutor;
  44 


 150 
 151   // Process tasks remaining on any marking stack
 152   void follow_marking_stacks();
 153   inline bool marking_stacks_empty() const;
 154 
 155   // Process tasks remaining on any stack
 156   void drain_region_stacks();
 157 
 158 };
 159 
 160 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
 161   assert(_manager_array != NULL, "access of NULL manager_array");
 162   assert(index >= 0 && index <= (int)ParallelGCThreads,
 163     "out of range manager_array access");
 164   return _manager_array[index];
 165 }
 166 
 167 bool ParCompactionManager::marking_stacks_empty() const {
 168   return _marking_stack.is_empty() && _objarray_stack.is_empty();
 169 }




   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 // Move to some global location
  33 #define HAS_BEEN_MOVED 0x1501d01d
  34 // End move to some global location
  35 
  36 
  37 class MutableSpace;
  38 class PSOldGen;
  39 class ParCompactionManager;
  40 class ObjectStartArray;
  41 class ParallelCompactData;
  42 class ParMarkBitMap;
  43 
  44 class ParCompactionManager : public CHeapObj {
  45   friend class ParallelTaskTerminator;
  46   friend class ParMarkBitMap;
  47   friend class PSParallelCompact;
  48   friend class StealRegionCompactionTask;
  49   friend class UpdateAndFillClosure;
  50   friend class RefProcTaskExecutor;
  51 


 157 
 158   // Process tasks remaining on any marking stack
 159   void follow_marking_stacks();
 160   inline bool marking_stacks_empty() const;
 161 
 162   // Process tasks remaining on any stack
 163   void drain_region_stacks();
 164 
 165 };
 166 
 167 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
 168   assert(_manager_array != NULL, "access of NULL manager_array");
 169   assert(index >= 0 && index <= (int)ParallelGCThreads,
 170     "out of range manager_array access");
 171   return _manager_array[index];
 172 }
 173 
 174 bool ParCompactionManager::marking_stacks_empty() const {
 175   return _marking_stack.is_empty() && _objarray_stack.is_empty();
 176 }
 177 
 178 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_HPP