src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp

Print this page
rev 5032 : 8023033: PPC64 (part 13): basic changes for AIX
Summary: Added AIX includes alpha-sorted before BSD. Fix compilation issues with xlC in shared code. Basic shared platform dependend adaption (vm_version etc.).


  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
  27 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/os.hpp"
  30 #include "utilities/bitMap.inline.hpp"
  31 #include "services/memTracker.hpp"
  32 #ifdef TARGET_OS_FAMILY_linux
  33 # include "os_linux.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_solaris
  36 # include "os_solaris.inline.hpp"
  37 #endif
  38 #ifdef TARGET_OS_FAMILY_windows
  39 # include "os_windows.inline.hpp"
  40 #endif



  41 #ifdef TARGET_OS_FAMILY_bsd
  42 # include "os_bsd.inline.hpp"
  43 #endif
  44 
  45 bool
  46 ParMarkBitMap::initialize(MemRegion covered_region)
  47 {
  48   const idx_t bits = bits_required(covered_region);
  49   // The bits will be divided evenly between two bitmaps; each of them should be
  50   // an integral number of words.
  51   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  52 
  53   const size_t words = bits / BitsPerWord;
  54   const size_t raw_bytes = words * sizeof(idx_t);
  55   const size_t page_sz = os::page_size_for_region(raw_bytes, raw_bytes, 10);
  56   const size_t granularity = os::vm_allocation_granularity();
  57   _reserved_byte_size = align_size_up(raw_bytes, MAX2(page_sz, granularity));
  58 
  59   const size_t rs_align = page_sz == (size_t) os::vm_page_size() ? 0 :
  60     MAX2(page_sz, granularity);




  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
  27 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/os.hpp"
  30 #include "utilities/bitMap.inline.hpp"
  31 #include "services/memTracker.hpp"
  32 #ifdef TARGET_OS_FAMILY_linux
  33 # include "os_linux.inline.hpp"
  34 #endif
  35 #ifdef TARGET_OS_FAMILY_solaris
  36 # include "os_solaris.inline.hpp"
  37 #endif
  38 #ifdef TARGET_OS_FAMILY_windows
  39 # include "os_windows.inline.hpp"
  40 #endif
  41 #ifdef TARGET_OS_FAMILY_aix
  42 # include "os_aix.inline.hpp"
  43 #endif
  44 #ifdef TARGET_OS_FAMILY_bsd
  45 # include "os_bsd.inline.hpp"
  46 #endif
  47 
  48 bool
  49 ParMarkBitMap::initialize(MemRegion covered_region)
  50 {
  51   const idx_t bits = bits_required(covered_region);
  52   // The bits will be divided evenly between two bitmaps; each of them should be
  53   // an integral number of words.
  54   assert(bits % (BitsPerWord * 2) == 0, "region size unaligned");
  55 
  56   const size_t words = bits / BitsPerWord;
  57   const size_t raw_bytes = words * sizeof(idx_t);
  58   const size_t page_sz = os::page_size_for_region(raw_bytes, raw_bytes, 10);
  59   const size_t granularity = os::vm_allocation_granularity();
  60   _reserved_byte_size = align_size_up(raw_bytes, MAX2(page_sz, granularity));
  61 
  62   const size_t rs_align = page_sz == (size_t) os::vm_page_size() ? 0 :
  63     MAX2(page_sz, granularity);