Mercurial > hg > truffle
comparison src/share/vm/memory/universe.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | d8041d695d19 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
757 } else { | 757 } else { |
758 // Set to a non-NULL value so the ReservedSpace ctor computes | 758 // Set to a non-NULL value so the ReservedSpace ctor computes |
759 // the correct no-access prefix. | 759 // the correct no-access prefix. |
760 // The final value will be set in initialize_heap() below. | 760 // The final value will be set in initialize_heap() below. |
761 Universe::set_narrow_oop_base((address)UnscaledOopHeapMax); | 761 Universe::set_narrow_oop_base((address)UnscaledOopHeapMax); |
762 #if defined(_WIN64) || defined(AIX) | 762 #ifdef _WIN64 |
763 if (UseLargePages) { | 763 if (UseLargePages) { |
764 // Cannot allocate guard pages for implicit checks in indexed | 764 // Cannot allocate guard pages for implicit checks in indexed |
765 // addressing mode when large pages are specified on windows. | 765 // addressing mode when large pages are specified on windows. |
766 Universe::set_narrow_oop_use_implicit_null_checks(false); | 766 Universe::set_narrow_oop_use_implicit_null_checks(false); |
767 } | 767 } |
814 gc_policy->initialize_all(); | 814 gc_policy->initialize_all(); |
815 | 815 |
816 Universe::_collectedHeap = new GenCollectedHeap(gc_policy); | 816 Universe::_collectedHeap = new GenCollectedHeap(gc_policy); |
817 } | 817 } |
818 | 818 |
819 ThreadLocalAllocBuffer::set_max_size(Universe::heap()->max_tlab_size()); | |
820 | |
821 jint status = Universe::heap()->initialize(); | 819 jint status = Universe::heap()->initialize(); |
822 if (status != JNI_OK) { | 820 if (status != JNI_OK) { |
823 return status; | 821 return status; |
824 } | 822 } |
825 | 823 |
839 } | 837 } |
840 if (((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax)) { | 838 if (((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax)) { |
841 // Can't reserve heap below 32Gb. | 839 // Can't reserve heap below 32Gb. |
842 // keep the Universe::narrow_oop_base() set in Universe::reserve_heap() | 840 // keep the Universe::narrow_oop_base() set in Universe::reserve_heap() |
843 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); | 841 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); |
844 #ifdef AIX | |
845 // There is no protected page before the heap. This assures all oops | |
846 // are decoded so that NULL is preserved, so this page will not be accessed. | |
847 Universe::set_narrow_oop_use_implicit_null_checks(false); | |
848 #endif | |
849 if (verbose) { | 842 if (verbose) { |
850 tty->print(", %s: "PTR_FORMAT, | 843 tty->print(", %s: "PTR_FORMAT, |
851 narrow_oop_mode_to_string(HeapBasedNarrowOop), | 844 narrow_oop_mode_to_string(HeapBasedNarrowOop), |
852 Universe::narrow_oop_base()); | 845 Universe::narrow_oop_base()); |
853 } | 846 } |
1141 } | 1134 } |
1142 Universe::_pd_implies_cache->init( | 1135 Universe::_pd_implies_cache->init( |
1143 SystemDictionary::ProtectionDomain_klass(), m);; | 1136 SystemDictionary::ProtectionDomain_klass(), m);; |
1144 } | 1137 } |
1145 | 1138 |
1146 // The following is initializing converter functions for serialization in | 1139 // The folowing is initializing converter functions for serialization in |
1147 // JVM.cpp. If we clean up the StrictMath code above we may want to find | 1140 // JVM.cpp. If we clean up the StrictMath code above we may want to find |
1148 // a better solution for this as well. | 1141 // a better solution for this as well. |
1149 initialize_converter_functions(); | 1142 initialize_converter_functions(); |
1150 | 1143 |
1151 // This needs to be done before the first scavenge/gc, since | 1144 // This needs to be done before the first scavenge/gc, since |
1183 assert_lock_strong(Compile_lock); | 1176 assert_lock_strong(Compile_lock); |
1184 | 1177 |
1185 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1178 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1186 | 1179 |
1187 // CodeCache can only be updated by a thread_in_VM and they will all be | 1180 // CodeCache can only be updated by a thread_in_VM and they will all be |
1188 // stopped during the safepoint so CodeCache will be safe to update without | 1181 // stopped dring the safepoint so CodeCache will be safe to update without |
1189 // holding the CodeCache_lock. | 1182 // holding the CodeCache_lock. |
1190 | 1183 |
1191 KlassDepChange changes(dependee); | 1184 KlassDepChange changes(dependee); |
1192 | 1185 |
1193 // Compute the dependent nmethods | 1186 // Compute the dependent nmethods |
1204 assert_lock_strong(Compile_lock); | 1197 assert_lock_strong(Compile_lock); |
1205 | 1198 |
1206 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1199 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1207 | 1200 |
1208 // CodeCache can only be updated by a thread_in_VM and they will all be | 1201 // CodeCache can only be updated by a thread_in_VM and they will all be |
1209 // stopped during the safepoint so CodeCache will be safe to update without | 1202 // stopped dring the safepoint so CodeCache will be safe to update without |
1210 // holding the CodeCache_lock. | 1203 // holding the CodeCache_lock. |
1211 | 1204 |
1212 CallSiteDepChange changes(call_site(), method_handle()); | 1205 CallSiteDepChange changes(call_site(), method_handle()); |
1213 | 1206 |
1214 // Compute the dependent nmethods that have a reference to a | 1207 // Compute the dependent nmethods that have a reference to a |
1235 // --- Compile_lock is not held. However we are at a safepoint. | 1228 // --- Compile_lock is not held. However we are at a safepoint. |
1236 assert_locked_or_safepoint(Compile_lock); | 1229 assert_locked_or_safepoint(Compile_lock); |
1237 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1230 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1238 | 1231 |
1239 // CodeCache can only be updated by a thread_in_VM and they will all be | 1232 // CodeCache can only be updated by a thread_in_VM and they will all be |
1240 // stopped during the safepoint so CodeCache will be safe to update without | 1233 // stopped dring the safepoint so CodeCache will be safe to update without |
1241 // holding the CodeCache_lock. | 1234 // holding the CodeCache_lock. |
1242 | 1235 |
1243 // Compute the dependent nmethods | 1236 // Compute the dependent nmethods |
1244 if (CodeCache::mark_for_evol_deoptimization(ev_k_h) > 0) { | 1237 if (CodeCache::mark_for_evol_deoptimization(ev_k_h) > 0) { |
1245 // At least one nmethod has been marked for deoptimization | 1238 // At least one nmethod has been marked for deoptimization |