< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page
rev 56578 : 8232211: Remove dead code from os.hpp|cpp
Reviewed-by: TBD


1613 
1614   return result;
1615 }
1616 
1617 jint G1CollectedHeap::initialize_concurrent_refinement() {
1618   jint ecode = JNI_OK;
1619   _cr = G1ConcurrentRefine::create(&ecode);
1620   return ecode;
1621 }
1622 
1623 jint G1CollectedHeap::initialize_young_gen_sampling_thread() {
1624   _young_gen_sampling_thread = new G1YoungRemSetSamplingThread();
1625   if (_young_gen_sampling_thread->osthread() == NULL) {
1626     vm_shutdown_during_initialization("Could not create G1YoungRemSetSamplingThread");
1627     return JNI_ENOMEM;
1628   }
1629   return JNI_OK;
1630 }
1631 
1632 jint G1CollectedHeap::initialize() {
1633   os::enable_vtime();
1634 
1635   // Necessary to satisfy locking discipline assertions.
1636 
1637   MutexLocker x(Heap_lock);
1638 
1639   // While there are no constraints in the GC code that HeapWordSize
1640   // be any particular value, there are multiple other areas in the
1641   // system which believe this to be true (e.g. oop->object_size in some
1642   // cases incorrectly returns the size in wordSize units rather than
1643   // HeapWordSize).
1644   guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");
1645 
1646   size_t init_byte_size = InitialHeapSize;
1647   size_t reserved_byte_size = G1Arguments::heap_reserved_size_bytes();
1648 
1649   // Ensure that the sizes are properly aligned.
1650   Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap");
1651   Universe::check_alignment(reserved_byte_size, HeapRegion::GrainBytes, "g1 heap");
1652   Universe::check_alignment(reserved_byte_size, HeapAlignment, "g1 heap");
1653 




1613 
1614   return result;
1615 }
1616 
1617 jint G1CollectedHeap::initialize_concurrent_refinement() {
1618   jint ecode = JNI_OK;
1619   _cr = G1ConcurrentRefine::create(&ecode);
1620   return ecode;
1621 }
1622 
1623 jint G1CollectedHeap::initialize_young_gen_sampling_thread() {
1624   _young_gen_sampling_thread = new G1YoungRemSetSamplingThread();
1625   if (_young_gen_sampling_thread->osthread() == NULL) {
1626     vm_shutdown_during_initialization("Could not create G1YoungRemSetSamplingThread");
1627     return JNI_ENOMEM;
1628   }
1629   return JNI_OK;
1630 }
1631 
1632 jint G1CollectedHeap::initialize() {

1633 
1634   // Necessary to satisfy locking discipline assertions.
1635 
1636   MutexLocker x(Heap_lock);
1637 
1638   // While there are no constraints in the GC code that HeapWordSize
1639   // be any particular value, there are multiple other areas in the
1640   // system which believe this to be true (e.g. oop->object_size in some
1641   // cases incorrectly returns the size in wordSize units rather than
1642   // HeapWordSize).
1643   guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");
1644 
1645   size_t init_byte_size = InitialHeapSize;
1646   size_t reserved_byte_size = G1Arguments::heap_reserved_size_bytes();
1647 
1648   // Ensure that the sizes are properly aligned.
1649   Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap");
1650   Universe::check_alignment(reserved_byte_size, HeapRegion::GrainBytes, "g1 heap");
1651   Universe::check_alignment(reserved_byte_size, HeapAlignment, "g1 heap");
1652 


< prev index next >