< prev index next >

src/share/vm/gc/g1/concurrentMark.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_G1_CONCURRENTMARK_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP
  27 
  28 #include "classfile/javaClasses.hpp"
  29 #include "gc_implementation/g1/heapRegionSet.hpp"
  30 #include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
  31 #include "gc_implementation/shared/gcId.hpp"
  32 #include "utilities/taskqueue.hpp"
  33 
  34 class G1CollectedHeap;
  35 class CMBitMap;
  36 class CMTask;
  37 class ConcurrentMark;
  38 typedef GenericTaskQueue<oop, mtGC>            CMTaskQueue;
  39 typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet;
  40 
  41 // Closure used by CM during concurrent reference discovery
  42 // and reference processing (during remarking) to determine
  43 // if a particular object is alive. It is primarily used
  44 // to determine if referents of discovered reference objects
  45 // are alive. An instance is also embedded into the
  46 // reference processor as the _is_alive_non_header field
  47 class G1CMIsAliveClosure: public BoolObjectClosure {
  48   G1CollectedHeap* _g1;
  49  public:
  50   G1CMIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) { }
  51 
  52   bool do_object_b(oop obj);


1207     }
1208   }
1209 
1210   static double bytes_to_mb(size_t val) {
1211     return (double) val / (double) M;
1212   }
1213 
1214   // See the .cpp file.
1215   size_t get_hum_bytes(size_t* hum_bytes);
1216   void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes,
1217                      size_t* prev_live_bytes, size_t* next_live_bytes);
1218 
1219 public:
1220   // The header and footer are printed in the constructor and
1221   // destructor respectively.
1222   G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name);
1223   virtual bool doHeapRegion(HeapRegion* r);
1224   ~G1PrintRegionLivenessInfoClosure();
1225 };
1226 
1227 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_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_G1_CONCURRENTMARK_HPP
  26 #define SHARE_VM_GC_G1_CONCURRENTMARK_HPP
  27 
  28 #include "classfile/javaClasses.hpp"
  29 #include "gc/g1/g1RegionToSpaceMapper.hpp"
  30 #include "gc/g1/heapRegionSet.hpp"
  31 #include "gc/shared/gcId.hpp"
  32 #include "gc/shared/taskqueue.hpp"
  33 
  34 class G1CollectedHeap;
  35 class CMBitMap;
  36 class CMTask;
  37 class ConcurrentMark;
  38 typedef GenericTaskQueue<oop, mtGC>            CMTaskQueue;
  39 typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet;
  40 
  41 // Closure used by CM during concurrent reference discovery
  42 // and reference processing (during remarking) to determine
  43 // if a particular object is alive. It is primarily used
  44 // to determine if referents of discovered reference objects
  45 // are alive. An instance is also embedded into the
  46 // reference processor as the _is_alive_non_header field
  47 class G1CMIsAliveClosure: public BoolObjectClosure {
  48   G1CollectedHeap* _g1;
  49  public:
  50   G1CMIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) { }
  51 
  52   bool do_object_b(oop obj);


1207     }
1208   }
1209 
1210   static double bytes_to_mb(size_t val) {
1211     return (double) val / (double) M;
1212   }
1213 
1214   // See the .cpp file.
1215   size_t get_hum_bytes(size_t* hum_bytes);
1216   void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes,
1217                      size_t* prev_live_bytes, size_t* next_live_bytes);
1218 
1219 public:
1220   // The header and footer are printed in the constructor and
1221   // destructor respectively.
1222   G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name);
1223   virtual bool doHeapRegion(HeapRegion* r);
1224   ~G1PrintRegionLivenessInfoClosure();
1225 };
1226 
1227 #endif // SHARE_VM_GC_G1_CONCURRENTMARK_HPP
< prev index next >