8231270: ZGC: Remove ZAddressSpace* and ZAddressReserved*

Reviewed-by: stefank, eosterlund
This commit is contained in:
Per Lidén 2019-09-24 17:08:19 +02:00
parent 68f811cd61
commit f740058c3d
10 changed files with 3 additions and 92 deletions

View File

@ -135,26 +135,6 @@
// * 63-48 Fixed (16-bits, always zero)
//
uintptr_t ZPlatformAddressSpaceStart() {
const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
const size_t min_address_offset = 0;
return first_heap_view_address + min_address_offset;
}
uintptr_t ZPlatformAddressSpaceEnd() {
const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
return last_heap_view_address + max_address_offset;
}
uintptr_t ZPlatformAddressReservedStart() {
return ZPlatformAddressSpaceStart();
}
uintptr_t ZPlatformAddressReservedEnd() {
return ZPlatformAddressSpaceEnd();
}
uintptr_t ZPlatformAddressBase() {
return 0;
}

View File

@ -40,10 +40,6 @@ const size_t ZPlatformMaxHeapSizeShift = 46; // 16TB
const size_t ZPlatformNMethodDisarmedOffset = 4;
const size_t ZPlatformCacheLineSize = 64;
uintptr_t ZPlatformAddressSpaceStart();
uintptr_t ZPlatformAddressSpaceEnd();
uintptr_t ZPlatformAddressReservedStart();
uintptr_t ZPlatformAddressReservedEnd();
uintptr_t ZPlatformAddressBase();
size_t ZPlatformAddressOffsetBits();
size_t ZPlatformAddressMetadataShift();

View File

@ -135,26 +135,6 @@
// * 63-48 Fixed (16-bits, always zero)
//
uintptr_t ZPlatformAddressSpaceStart() {
const uintptr_t first_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 0);
const size_t min_address_offset = 0;
return first_heap_view_address + min_address_offset;
}
uintptr_t ZPlatformAddressSpaceEnd() {
const uintptr_t last_heap_view_address = (uintptr_t)1 << (ZPlatformAddressMetadataShift() + 2);
const size_t max_address_offset = (size_t)1 << ZPlatformAddressOffsetBits();
return last_heap_view_address + max_address_offset;
}
uintptr_t ZPlatformAddressReservedStart() {
return ZPlatformAddressSpaceStart();
}
uintptr_t ZPlatformAddressReservedEnd() {
return ZPlatformAddressSpaceEnd();
}
uintptr_t ZPlatformAddressBase() {
return 0;
}

View File

@ -40,10 +40,6 @@ const size_t ZPlatformMaxHeapSizeShift = 46; // 16TB
const size_t ZPlatformNMethodDisarmedOffset = 4;
const size_t ZPlatformCacheLineSize = 64;
uintptr_t ZPlatformAddressSpaceStart();
uintptr_t ZPlatformAddressSpaceEnd();
uintptr_t ZPlatformAddressReservedStart();
uintptr_t ZPlatformAddressReservedEnd();
uintptr_t ZPlatformAddressBase();
size_t ZPlatformAddressOffsetBits();
size_t ZPlatformAddressMetadataShift();

View File

@ -104,8 +104,7 @@ typedef ZAttachedArray<ZForwarding, ZForwardingEntry> ZAttachedArrayForForwardin
declare_constant(ZAddressOffsetShift) \
declare_constant(ZAddressOffsetBits) \
declare_constant(ZAddressOffsetMask) \
declare_constant(ZAddressOffsetMax) \
declare_constant(ZAddressSpaceStart)
declare_constant(ZAddressOffsetMax)
#define VM_TYPES_ZGC(declare_type, declare_toplevel_type, declare_integer_type) \
declare_toplevel_type(ZGlobalsForVMStructs) \

View File

@ -32,14 +32,6 @@ void ZAddress::set_good_mask(uintptr_t mask) {
}
void ZAddress::initialize() {
ZAddressSpaceStart = ZPlatformAddressSpaceStart();
ZAddressSpaceEnd = ZPlatformAddressSpaceEnd();
ZAddressSpaceSize = ZAddressSpaceEnd - ZAddressSpaceStart;
ZAddressReservedStart = ZPlatformAddressReservedStart();
ZAddressReservedEnd = ZPlatformAddressReservedEnd();
ZAddressReservedSize = ZAddressReservedEnd - ZAddressReservedStart;
ZAddressBase = ZPlatformAddressBase();
ZAddressOffsetBits = ZPlatformAddressOffsetBits();

View File

@ -68,8 +68,7 @@ jint ZCollectedHeap::initialize() {
return JNI_ENOMEM;
}
Universe::calculate_verify_data((HeapWord*)ZAddressReservedStart,
(HeapWord*)ZAddressReservedEnd);
Universe::calculate_verify_data((HeapWord*)0, (HeapWord*)UINTPTR_MAX);
return JNI_OK;
}
@ -285,12 +284,7 @@ void ZCollectedHeap::gc_threads_do(ThreadClosure* tc) const {
}
VirtualSpaceSummary ZCollectedHeap::create_heap_space_summary() {
const size_t capacity_in_words = capacity() / HeapWordSize;
const size_t max_capacity_in_words = max_capacity() / HeapWordSize;
HeapWord* const heap_start = (HeapWord*)ZAddressReservedStart;
return VirtualSpaceSummary(heap_start,
heap_start + capacity_in_words,
heap_start + max_capacity_in_words);
return VirtualSpaceSummary((HeapWord*)0, (HeapWord*)capacity(), (HeapWord*)max_capacity());
}
void ZCollectedHeap::safepoint_synchronize_begin() {
@ -312,10 +306,6 @@ void ZCollectedHeap::print_on(outputStream* st) const {
void ZCollectedHeap::print_on_error(outputStream* st) const {
CollectedHeap::print_on_error(st);
st->print_cr("Address Space");
st->print_cr( " Start: " PTR_FORMAT, ZAddressSpaceStart);
st->print_cr( " End: " PTR_FORMAT, ZAddressSpaceEnd);
st->print_cr( " Size: " SIZE_FORMAT_W(-15) " (" PTR_FORMAT ")", ZAddressSpaceSize, ZAddressSpaceSize);
st->print_cr( "Heap");
st->print_cr( " GlobalPhase: %u", ZGlobalPhase);
st->print_cr( " GlobalSeqNum: %u", ZGlobalSeqNum);

View File

@ -126,10 +126,6 @@ end
# Print heap information
define zph
printf "Address Space\n"
printf " Start: 0x%llx\n", ZAddressSpaceStart
printf " End: 0x%llx\n", ZAddressSpaceEnd
printf " Size: %-15llu (0x%llx)\n", ZAddressSpaceSize, ZAddressSpaceSize
printf "Heap\n"
printf " GlobalPhase: %u\n", ZGlobalPhase
printf " GlobalSeqNum: %u\n", ZGlobalSeqNum

View File

@ -48,11 +48,3 @@ uintptr_t ZAddressMetadataMarked0;
uintptr_t ZAddressMetadataMarked1;
uintptr_t ZAddressMetadataRemapped;
uintptr_t ZAddressMetadataFinalizable;
uintptr_t ZAddressSpaceStart;
uintptr_t ZAddressSpaceEnd;
size_t ZAddressSpaceSize;
uintptr_t ZAddressReservedStart;
uintptr_t ZAddressReservedEnd;
size_t ZAddressReservedSize;

View File

@ -112,16 +112,6 @@ extern uintptr_t ZAddressMetadataMarked1;
extern uintptr_t ZAddressMetadataRemapped;
extern uintptr_t ZAddressMetadataFinalizable;
// Address space start/end/size
extern uintptr_t ZAddressSpaceStart;
extern uintptr_t ZAddressSpaceEnd;
extern size_t ZAddressSpaceSize;
// Reserved space start/end
extern uintptr_t ZAddressReservedStart;
extern uintptr_t ZAddressReservedEnd;
extern size_t ZAddressReservedSize;
// NMethod entry barrier
const size_t ZNMethodDisarmedOffset = ZPlatformNMethodDisarmedOffset;