< prev index next >

src/share/vm/gc/shared/genCollectedHeap.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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  *


 261   // the block is an object. Assumes (and verifies in non-product
 262   // builds) that addr is in the allocated part of the heap and is
 263   // the start of a chunk.
 264   virtual bool block_is_obj(const HeapWord* addr) const;
 265 
 266   // Section on TLAB's.
 267   virtual bool supports_tlab_allocation() const;
 268   virtual size_t tlab_capacity(Thread* thr) const;
 269   virtual size_t tlab_used(Thread* thr) const;
 270   virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
 271   virtual HeapWord* allocate_new_tlab(size_t size);
 272 
 273   // Can a compiler initialize a new object without store barriers?
 274   // This permission only extends from the creation of a new object
 275   // via a TLAB up to the first subsequent safepoint.
 276   virtual bool can_elide_tlab_store_barriers() const {
 277     return true;
 278   }
 279 
 280   virtual bool card_mark_must_follow_store() const {




 281     return UseConcMarkSweepGC;
 282   }
 283 
 284   // We don't need barriers for stores to objects in the
 285   // young gen and, a fortiori, for initializing stores to
 286   // objects therein. This applies to DefNew+Tenured and ParNew+CMS
 287   // only and may need to be re-examined in case other
 288   // kinds of collectors are implemented in the future.
 289   virtual bool can_elide_initializing_store_barrier(oop new_obj) {
 290     return is_in_young(new_obj);
 291   }
 292 
 293   // The "requestor" generation is performing some garbage collection
 294   // action for which it would be useful to have scratch space.  The
 295   // requestor promises to allocate no more than "max_alloc_words" in any
 296   // older generation (via promotion say.)   Any blocks of space that can
 297   // be provided are returned as a list of ScratchBlocks, sorted by
 298   // decreasing size.
 299   ScratchBlock* gather_scratch(Generation* requestor, size_t max_alloc_words);
 300   // Allow each generation to reset any scratch space that it has


   1 /*
   2  * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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  *


 261   // the block is an object. Assumes (and verifies in non-product
 262   // builds) that addr is in the allocated part of the heap and is
 263   // the start of a chunk.
 264   virtual bool block_is_obj(const HeapWord* addr) const;
 265 
 266   // Section on TLAB's.
 267   virtual bool supports_tlab_allocation() const;
 268   virtual size_t tlab_capacity(Thread* thr) const;
 269   virtual size_t tlab_used(Thread* thr) const;
 270   virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
 271   virtual HeapWord* allocate_new_tlab(size_t size);
 272 
 273   // Can a compiler initialize a new object without store barriers?
 274   // This permission only extends from the creation of a new object
 275   // via a TLAB up to the first subsequent safepoint.
 276   virtual bool can_elide_tlab_store_barriers() const {
 277     return true;
 278   }
 279 
 280   virtual bool card_mark_must_follow_store() const {
 281     return UseConcMarkSweepGC;
 282   }
 283 
 284   virtual bool needs_reference_pending_list_locker_thread() const {
 285     return UseConcMarkSweepGC;
 286   }
 287 
 288   // We don't need barriers for stores to objects in the
 289   // young gen and, a fortiori, for initializing stores to
 290   // objects therein. This applies to DefNew+Tenured and ParNew+CMS
 291   // only and may need to be re-examined in case other
 292   // kinds of collectors are implemented in the future.
 293   virtual bool can_elide_initializing_store_barrier(oop new_obj) {
 294     return is_in_young(new_obj);
 295   }
 296 
 297   // The "requestor" generation is performing some garbage collection
 298   // action for which it would be useful to have scratch space.  The
 299   // requestor promises to allocate no more than "max_alloc_words" in any
 300   // older generation (via promotion say.)   Any blocks of space that can
 301   // be provided are returned as a list of ScratchBlocks, sorted by
 302   // decreasing size.
 303   ScratchBlock* gather_scratch(Generation* requestor, size_t max_alloc_words);
 304   // Allow each generation to reset any scratch space that it has


< prev index next >