src/hotspot/share/gc/shared/space.inline.hpp
changeset 49982 9042ffe5b7fe
parent 49722 a47d1e21b3f1
child 50034 01a88f825a84
equal deleted inserted replaced
49981:bd0a95bec96b 49982:9042ffe5b7fe
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_VM_GC_SHARED_SPACE_INLINE_HPP
    25 #ifndef SHARE_VM_GC_SHARED_SPACE_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_SPACE_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_SPACE_INLINE_HPP
    27 
    27 
    28 #include "gc/serial/markSweep.inline.hpp"
       
    29 #include "gc/shared/collectedHeap.hpp"
    28 #include "gc/shared/collectedHeap.hpp"
    30 #include "gc/shared/generation.hpp"
    29 #include "gc/shared/generation.hpp"
    31 #include "gc/shared/space.hpp"
    30 #include "gc/shared/space.hpp"
    32 #include "gc/shared/spaceDecorator.hpp"
    31 #include "gc/shared/spaceDecorator.hpp"
    33 #include "memory/universe.hpp"
    32 #include "memory/universe.hpp"
    34 #include "oops/oopsHierarchy.hpp"
    33 #include "oops/oopsHierarchy.hpp"
    35 #include "oops/oop.inline.hpp"
    34 #include "oops/oop.inline.hpp"
    36 #include "runtime/prefetch.inline.hpp"
    35 #include "runtime/prefetch.inline.hpp"
    37 #include "runtime/safepoint.hpp"
    36 #include "runtime/safepoint.hpp"
       
    37 #if INCLUDE_SERIALGC
       
    38 #include "gc/serial/markSweep.inline.hpp"
       
    39 #endif
    38 
    40 
    39 inline HeapWord* Space::block_start(const void* p) {
    41 inline HeapWord* Space::block_start(const void* p) {
    40   return block_start_const(p);
    42   return block_start_const(p);
    41 }
    43 }
    42 
    44 
    74 }
    76 }
    75 
    77 
    76 size_t CompactibleSpace::obj_size(const HeapWord* addr) const {
    78 size_t CompactibleSpace::obj_size(const HeapWord* addr) const {
    77   return oop(addr)->size();
    79   return oop(addr)->size();
    78 }
    80 }
       
    81 
       
    82 #if INCLUDE_SERIALGC
    79 
    83 
    80 class DeadSpacer : StackObj {
    84 class DeadSpacer : StackObj {
    81   size_t _allowed_deadspace_words;
    85   size_t _allowed_deadspace_words;
    82   bool _active;
    86   bool _active;
    83   CompactibleSpace* _space;
    87   CompactibleSpace* _space;
   345   }
   349   }
   346 
   350 
   347   clear_empty_region(space);
   351   clear_empty_region(space);
   348 }
   352 }
   349 
   353 
       
   354 #endif // INCLUDE_SERIALGC
       
   355 
   350 size_t ContiguousSpace::scanned_block_size(const HeapWord* addr) const {
   356 size_t ContiguousSpace::scanned_block_size(const HeapWord* addr) const {
   351   return oop(addr)->size();
   357   return oop(addr)->size();
   352 }
   358 }
   353 
   359 
   354 #endif // SHARE_VM_GC_SHARED_SPACE_INLINE_HPP
   360 #endif // SHARE_VM_GC_SHARED_SPACE_INLINE_HPP