< prev index next >

src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp

Print this page




 119 //  .                                .
 120 //  +--------------------------------+ 0x0000000000000000
 121 //
 122 //   6               4  4  4 4
 123 //   3               8  7  4 3                                               0
 124 //  +------------------+----+-------------------------------------------------+
 125 //  |00000000 00000000 |1111|1111 11111111 11111111 11111111 11111111 11111111|
 126 //  +------------------+----+-------------------------------------------------+
 127 //  |                  |    |
 128 //  |                  |    * 43-0 Object Offset (44-bits, 16TB address space)
 129 //  |                  |
 130 //  |                  * 47-44 Metadata Bits (4-bits)  0001 = Marked0      (Address view 16-32TB)
 131 //  |                                                  0010 = Marked1      (Address view 32-48TB)
 132 //  |                                                  0100 = Remapped     (Address view 64-80TB)
 133 //  |                                                  1000 = Finalizable  (Address view N/A)
 134 //  |
 135 //  * 63-48 Fixed (16-bits, always zero)
 136 //
 137 
 138 size_t ZPlatformAddressOffsetBits() {
 139   const size_t min_address_offset_bits = 42; // 4TB
 140   const size_t max_address_offset_bits = 44; // 16TB
 141   const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
 142   const size_t address_offset_bits = log2_intptr(address_offset);
 143   return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
 144 }
 145 
 146 size_t ZPlatformAddressMetadataShift() {
 147   return ZPlatformAddressOffsetBits();
 148 }


 119 //  .                                .
 120 //  +--------------------------------+ 0x0000000000000000
 121 //
 122 //   6               4  4  4 4
 123 //   3               8  7  4 3                                               0
 124 //  +------------------+----+-------------------------------------------------+
 125 //  |00000000 00000000 |1111|1111 11111111 11111111 11111111 11111111 11111111|
 126 //  +------------------+----+-------------------------------------------------+
 127 //  |                  |    |
 128 //  |                  |    * 43-0 Object Offset (44-bits, 16TB address space)
 129 //  |                  |
 130 //  |                  * 47-44 Metadata Bits (4-bits)  0001 = Marked0      (Address view 16-32TB)
 131 //  |                                                  0010 = Marked1      (Address view 32-48TB)
 132 //  |                                                  0100 = Remapped     (Address view 64-80TB)
 133 //  |                                                  1000 = Finalizable  (Address view N/A)
 134 //  |
 135 //  * 63-48 Fixed (16-bits, always zero)
 136 //
 137 
 138 size_t ZPlatformAddressOffsetBits() {
 139   const size_t max_address_offset_bits = ZAddressBits - 3;
 140   const size_t min_address_offset_bits = max_address_offset_bits - 2;
 141   const size_t address_offset = round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
 142   const size_t address_offset_bits = log2_intptr(address_offset);
 143   return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
 144 }
 145 
 146 size_t ZPlatformAddressMetadataShift() {
 147   return ZPlatformAddressOffsetBits();
 148 }
< prev index next >