8076541: Parallel GC registers Java heap twice to NMT
Summary: Remove the superfluous call to MemTracker::record_virtual_memory_type() and also a superfluous check whether the space has been successfully reserved.
Reviewed-by: pliden, jmasa
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Tue Apr 21 16:49:39 2015 +0000
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Wed Apr 22 09:39:38 2015 +0200
@@ -57,17 +57,11 @@
const size_t heap_size = _collector_policy->max_heap_byte_size();
ReservedSpace heap_rs = Universe::reserve_heap(heap_size, _collector_policy->heap_alignment());
- MemTracker::record_virtual_memory_type((address)heap_rs.base(), mtJavaHeap);
os::trace_page_sizes("ps main", _collector_policy->min_heap_byte_size(),
heap_size, generation_alignment(),
heap_rs.base(),
heap_rs.size());
- if (!heap_rs.is_reserved()) {
- vm_shutdown_during_initialization(
- "Could not reserve enough space for object heap");
- return JNI_ENOMEM;
- }
initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));