< prev index next >

src/share/vm/gc/cms/compactibleFreeListSpace.hpp

Print this page
rev 12906 : [mq]: gc_interface


  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_CMS_COMPACTIBLEFREELISTSPACE_HPP
  26 #define SHARE_VM_GC_CMS_COMPACTIBLEFREELISTSPACE_HPP
  27 
  28 #include "gc/cms/adaptiveFreeList.hpp"
  29 #include "gc/cms/promotionInfo.hpp"
  30 #include "gc/shared/blockOffsetTable.hpp"

  31 #include "gc/shared/space.hpp"
  32 #include "logging/log.hpp"
  33 #include "memory/binaryTreeDictionary.hpp"
  34 #include "memory/freeList.hpp"
  35 
  36 // Classes in support of keeping track of promotions into a non-Contiguous
  37 // space, in this case a CompactibleFreeListSpace.
  38 
  39 // Forward declarations
  40 class CMSCollector;
  41 class CompactibleFreeListSpace;
  42 class ConcurrentMarkSweepGeneration;
  43 class BlkClosure;
  44 class BlkClosureCareful;
  45 class FreeChunk;
  46 class UpwardsObjectClosure;
  47 class ObjectClosureCareful;
  48 class Klass;
  49 
  50 class LinearAllocBlock VALUE_OBJ_CLASS_SPEC {


 413   void safe_object_iterate(ObjectClosure* blk);
 414 
 415   // Iterate over all objects that intersect with mr, calling "cl->do_object"
 416   // on each.  There is an exception to this: if this closure has already
 417   // been invoked on an object, it may skip such objects in some cases.  This is
 418   // Most likely to happen in an "upwards" (ascending address) iteration of
 419   // MemRegions.
 420   void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl);
 421 
 422   // Requires that "mr" be entirely within the space.
 423   // Apply "cl->do_object" to all objects that intersect with "mr".
 424   // If the iteration encounters an unparseable portion of the region,
 425   // terminate the iteration and return the address of the start of the
 426   // subregion that isn't done.  Return of "NULL" indicates that the
 427   // iteration completed.
 428   HeapWord* object_iterate_careful_m(MemRegion mr,
 429                                      ObjectClosureCareful* cl);
 430 
 431   // Override: provides a DCTO_CL specific to this kind of space.
 432   DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
 433                                      CardTableModRefBS::PrecisionStyle precision,
 434                                      HeapWord* boundary,
 435                                      bool parallel);
 436 
 437   void blk_iterate(BlkClosure* cl);
 438   void blk_iterate_careful(BlkClosureCareful* cl);
 439   HeapWord* block_start_const(const void* p) const;
 440   HeapWord* block_start_careful(const void* p) const;
 441   size_t block_size(const HeapWord* p) const;
 442   size_t block_size_no_stall(HeapWord* p, const CMSCollector* c) const;
 443   bool block_is_obj(const HeapWord* p) const;
 444   bool obj_is_alive(const HeapWord* p) const;
 445   size_t block_size_nopar(const HeapWord* p) const;
 446   bool block_is_obj_nopar(const HeapWord* p) const;
 447 
 448   // Iteration support for promotion
 449   void save_marks();
 450   bool no_allocs_since_save_marks();
 451 
 452   // Iteration support for sweeping
 453   void save_sweep_limit() {




  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_CMS_COMPACTIBLEFREELISTSPACE_HPP
  26 #define SHARE_VM_GC_CMS_COMPACTIBLEFREELISTSPACE_HPP
  27 
  28 #include "gc/cms/adaptiveFreeList.hpp"
  29 #include "gc/cms/promotionInfo.hpp"
  30 #include "gc/shared/blockOffsetTable.hpp"
  31 #include "gc/shared/cardTable.hpp"
  32 #include "gc/shared/space.hpp"
  33 #include "logging/log.hpp"
  34 #include "memory/binaryTreeDictionary.hpp"
  35 #include "memory/freeList.hpp"
  36 
  37 // Classes in support of keeping track of promotions into a non-Contiguous
  38 // space, in this case a CompactibleFreeListSpace.
  39 
  40 // Forward declarations
  41 class CMSCollector;
  42 class CompactibleFreeListSpace;
  43 class ConcurrentMarkSweepGeneration;
  44 class BlkClosure;
  45 class BlkClosureCareful;
  46 class FreeChunk;
  47 class UpwardsObjectClosure;
  48 class ObjectClosureCareful;
  49 class Klass;
  50 
  51 class LinearAllocBlock VALUE_OBJ_CLASS_SPEC {


 414   void safe_object_iterate(ObjectClosure* blk);
 415 
 416   // Iterate over all objects that intersect with mr, calling "cl->do_object"
 417   // on each.  There is an exception to this: if this closure has already
 418   // been invoked on an object, it may skip such objects in some cases.  This is
 419   // Most likely to happen in an "upwards" (ascending address) iteration of
 420   // MemRegions.
 421   void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl);
 422 
 423   // Requires that "mr" be entirely within the space.
 424   // Apply "cl->do_object" to all objects that intersect with "mr".
 425   // If the iteration encounters an unparseable portion of the region,
 426   // terminate the iteration and return the address of the start of the
 427   // subregion that isn't done.  Return of "NULL" indicates that the
 428   // iteration completed.
 429   HeapWord* object_iterate_careful_m(MemRegion mr,
 430                                      ObjectClosureCareful* cl);
 431 
 432   // Override: provides a DCTO_CL specific to this kind of space.
 433   DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
 434                                      CardTable::PrecisionStyle precision,
 435                                      HeapWord* boundary,
 436                                      bool parallel);
 437 
 438   void blk_iterate(BlkClosure* cl);
 439   void blk_iterate_careful(BlkClosureCareful* cl);
 440   HeapWord* block_start_const(const void* p) const;
 441   HeapWord* block_start_careful(const void* p) const;
 442   size_t block_size(const HeapWord* p) const;
 443   size_t block_size_no_stall(HeapWord* p, const CMSCollector* c) const;
 444   bool block_is_obj(const HeapWord* p) const;
 445   bool obj_is_alive(const HeapWord* p) const;
 446   size_t block_size_nopar(const HeapWord* p) const;
 447   bool block_is_obj_nopar(const HeapWord* p) const;
 448 
 449   // Iteration support for promotion
 450   void save_marks();
 451   bool no_allocs_since_save_marks();
 452 
 453   // Iteration support for sweeping
 454   void save_sweep_limit() {


< prev index next >