src/hotspot/share/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff src/hotspot/share/memory

src/hotspot/share/memory/universe.cpp

Print this page




 769   log_info(gc)("Using %s", _collectedHeap->name());
 770 
 771   ThreadLocalAllocBuffer::set_max_size(Universe::heap()->max_tlab_size());
 772 
 773 #ifdef _LP64
 774   if (UseCompressedOops) {
 775     // Subtract a page because something can get allocated at heap base.
 776     // This also makes implicit null checking work, because the
 777     // memory+1 page below heap_base needs to cause a signal.
 778     // See needs_explicit_null_check.
 779     // Only set the heap base for compressed oops because it indicates
 780     // compressed oops for pstack code.
 781     if ((uint64_t)Universe::heap()->reserved_region().end() > UnscaledOopHeapMax) {
 782       // Didn't reserve heap below 4Gb.  Must shift.
 783       Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
 784     }
 785     if ((uint64_t)Universe::heap()->reserved_region().end() <= OopEncodingHeapMax) {
 786       // Did reserve heap below 32Gb. Can use base == 0;
 787       Universe::set_narrow_oop_base(0);
 788     }

 789 
 790     Universe::set_narrow_ptrs_base(Universe::narrow_oop_base());
 791 
 792     LogTarget(Info, gc, heap, coops) lt;
 793     if (lt.is_enabled()) {
 794       ResourceMark rm;
 795       LogStream ls(lt);
 796       Universe::print_compressed_oops_mode(&ls);
 797     }
 798 
 799     // Tell tests in which mode we run.
 800     Arguments::PropertyList_add(new SystemProperty("java.vm.compressedOopsMode",
 801                                                    narrow_oop_mode_to_string(narrow_oop_mode()),
 802                                                    false));
 803   }
 804   // Universe::narrow_oop_base() is one page below the heap.
 805   assert((intptr_t)Universe::narrow_oop_base() <= (intptr_t)(Universe::heap()->base() -
 806          os::vm_page_size()) ||
 807          Universe::narrow_oop_base() == NULL, "invalid value");
 808   assert(Universe::narrow_oop_shift() == LogMinObjAlignmentInBytes ||




 769   log_info(gc)("Using %s", _collectedHeap->name());
 770 
 771   ThreadLocalAllocBuffer::set_max_size(Universe::heap()->max_tlab_size());
 772 
 773 #ifdef _LP64
 774   if (UseCompressedOops) {
 775     // Subtract a page because something can get allocated at heap base.
 776     // This also makes implicit null checking work, because the
 777     // memory+1 page below heap_base needs to cause a signal.
 778     // See needs_explicit_null_check.
 779     // Only set the heap base for compressed oops because it indicates
 780     // compressed oops for pstack code.
 781     if ((uint64_t)Universe::heap()->reserved_region().end() > UnscaledOopHeapMax) {
 782       // Didn't reserve heap below 4Gb.  Must shift.
 783       Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
 784     }
 785     if ((uint64_t)Universe::heap()->reserved_region().end() <= OopEncodingHeapMax) {
 786       // Did reserve heap below 32Gb. Can use base == 0;
 787       Universe::set_narrow_oop_base(0);
 788     }
 789     AOTLoader::set_narrow_oop_shift();
 790 
 791     Universe::set_narrow_ptrs_base(Universe::narrow_oop_base());
 792 
 793     LogTarget(Info, gc, heap, coops) lt;
 794     if (lt.is_enabled()) {
 795       ResourceMark rm;
 796       LogStream ls(lt);
 797       Universe::print_compressed_oops_mode(&ls);
 798     }
 799 
 800     // Tell tests in which mode we run.
 801     Arguments::PropertyList_add(new SystemProperty("java.vm.compressedOopsMode",
 802                                                    narrow_oop_mode_to_string(narrow_oop_mode()),
 803                                                    false));
 804   }
 805   // Universe::narrow_oop_base() is one page below the heap.
 806   assert((intptr_t)Universe::narrow_oop_base() <= (intptr_t)(Universe::heap()->base() -
 807          os::vm_page_size()) ||
 808          Universe::narrow_oop_base() == NULL, "invalid value");
 809   assert(Universe::narrow_oop_shift() == LogMinObjAlignmentInBytes ||


src/hotspot/share/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File