< prev index next >

src/hotspot/share/gc/shared/space.inline.hpp

Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com


  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_GC_SHARED_SPACE_INLINE_HPP
  26 #define SHARE_GC_SHARED_SPACE_INLINE_HPP
  27 
  28 #include "gc/shared/blockOffsetTable.inline.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shared/generation.hpp"
  31 #include "gc/shared/space.hpp"
  32 #include "gc/shared/spaceDecorator.hpp"
  33 #include "oops/oopsHierarchy.hpp"
  34 #include "oops/oop.inline.hpp"

  35 #include "runtime/prefetch.inline.hpp"
  36 #include "runtime/safepoint.hpp"
  37 #if INCLUDE_SERIALGC
  38 #include "gc/serial/markSweep.inline.hpp"
  39 #endif
  40 
  41 inline HeapWord* Space::block_start(const void* p) {
  42   return block_start_const(p);
  43 }
  44 
  45 inline HeapWord* OffsetTableContigSpace::allocate(size_t size) {
  46   HeapWord* res = ContiguousSpace::allocate(size);
  47   if (res != NULL) {
  48     _offsets.alloc_block(res, size);
  49   }
  50   return res;
  51 }
  52 
  53 // Because of the requirement of keeping "_offsets" up to date with the
  54 // allocations, we sequentialize these with a lock.  Therefore, best if




  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_GC_SHARED_SPACE_INLINE_HPP
  26 #define SHARE_GC_SHARED_SPACE_INLINE_HPP
  27 
  28 #include "gc/shared/blockOffsetTable.inline.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shared/generation.hpp"
  31 #include "gc/shared/space.hpp"
  32 #include "gc/shared/spaceDecorator.hpp"
  33 #include "oops/oopsHierarchy.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "runtime/mutexLocker.inline.hpp"
  36 #include "runtime/prefetch.inline.hpp"
  37 #include "runtime/safepoint.hpp"
  38 #if INCLUDE_SERIALGC
  39 #include "gc/serial/markSweep.inline.hpp"
  40 #endif
  41 
  42 inline HeapWord* Space::block_start(const void* p) {
  43   return block_start_const(p);
  44 }
  45 
  46 inline HeapWord* OffsetTableContigSpace::allocate(size_t size) {
  47   HeapWord* res = ContiguousSpace::allocate(size);
  48   if (res != NULL) {
  49     _offsets.alloc_block(res, size);
  50   }
  51   return res;
  52 }
  53 
  54 // Because of the requirement of keeping "_offsets" up to date with the
  55 // allocations, we sequentialize these with a lock.  Therefore, best if


< prev index next >