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 


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




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


 167 
 168   // Process tasks remaining on any stack
 169   void drain_region_stacks();
 170 
 171   // Debugging support
 172 #ifdef ASSERT
 173   bool stacks_have_been_allocated();
 174 #endif
 175 };
 176 
 177 inline ParCompactionManager* ParCompactionManager::manager_array(int index) {
 178   assert(_manager_array != NULL, "access of NULL manager_array");
 179   assert(index >= 0 && index <= (int)ParallelGCThreads,
 180     "out of range manager_array access");
 181   return _manager_array[index];
 182 }
 183 
 184 bool ParCompactionManager::marking_stacks_empty() const {
 185   return _marking_stack.is_empty() && _objarray_stack.is_empty();
 186 }
 187 
 188 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSCOMPACTIONMANAGER_HPP