Mercurial > hg > truffle
comparison src/share/vm/memory/universe.cpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | d8041d695d19 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
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 #ifdef _WIN64 | 762 #if defined(_WIN64) || defined(AIX) |
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 | |
819 jint status = Universe::heap()->initialize(); | 821 jint status = Universe::heap()->initialize(); |
820 if (status != JNI_OK) { | 822 if (status != JNI_OK) { |
821 return status; | 823 return status; |
822 } | 824 } |
823 | 825 |
837 } | 839 } |
838 if (((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax)) { | 840 if (((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax)) { |
839 // Can't reserve heap below 32Gb. | 841 // Can't reserve heap below 32Gb. |
840 // keep the Universe::narrow_oop_base() set in Universe::reserve_heap() | 842 // keep the Universe::narrow_oop_base() set in Universe::reserve_heap() |
841 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); | 843 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 | |
842 if (verbose) { | 849 if (verbose) { |
843 tty->print(", %s: "PTR_FORMAT, | 850 tty->print(", %s: "PTR_FORMAT, |
844 narrow_oop_mode_to_string(HeapBasedNarrowOop), | 851 narrow_oop_mode_to_string(HeapBasedNarrowOop), |
845 Universe::narrow_oop_base()); | 852 Universe::narrow_oop_base()); |
846 } | 853 } |
1134 } | 1141 } |
1135 Universe::_pd_implies_cache->init( | 1142 Universe::_pd_implies_cache->init( |
1136 SystemDictionary::ProtectionDomain_klass(), m);; | 1143 SystemDictionary::ProtectionDomain_klass(), m);; |
1137 } | 1144 } |
1138 | 1145 |
1139 // The folowing is initializing converter functions for serialization in | 1146 // The following is initializing converter functions for serialization in |
1140 // JVM.cpp. If we clean up the StrictMath code above we may want to find | 1147 // JVM.cpp. If we clean up the StrictMath code above we may want to find |
1141 // a better solution for this as well. | 1148 // a better solution for this as well. |
1142 initialize_converter_functions(); | 1149 initialize_converter_functions(); |
1143 | 1150 |
1144 // This needs to be done before the first scavenge/gc, since | 1151 // This needs to be done before the first scavenge/gc, since |
1176 assert_lock_strong(Compile_lock); | 1183 assert_lock_strong(Compile_lock); |
1177 | 1184 |
1178 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1185 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1179 | 1186 |
1180 // CodeCache can only be updated by a thread_in_VM and they will all be | 1187 // CodeCache can only be updated by a thread_in_VM and they will all be |
1181 // stopped dring the safepoint so CodeCache will be safe to update without | 1188 // stopped during the safepoint so CodeCache will be safe to update without |
1182 // holding the CodeCache_lock. | 1189 // holding the CodeCache_lock. |
1183 | 1190 |
1184 KlassDepChange changes(dependee); | 1191 KlassDepChange changes(dependee); |
1185 | 1192 |
1186 // Compute the dependent nmethods | 1193 // Compute the dependent nmethods |
1197 assert_lock_strong(Compile_lock); | 1204 assert_lock_strong(Compile_lock); |
1198 | 1205 |
1199 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1206 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1200 | 1207 |
1201 // CodeCache can only be updated by a thread_in_VM and they will all be | 1208 // CodeCache can only be updated by a thread_in_VM and they will all be |
1202 // stopped dring the safepoint so CodeCache will be safe to update without | 1209 // stopped during the safepoint so CodeCache will be safe to update without |
1203 // holding the CodeCache_lock. | 1210 // holding the CodeCache_lock. |
1204 | 1211 |
1205 CallSiteDepChange changes(call_site(), method_handle()); | 1212 CallSiteDepChange changes(call_site(), method_handle()); |
1206 | 1213 |
1207 // Compute the dependent nmethods that have a reference to a | 1214 // Compute the dependent nmethods that have a reference to a |
1228 // --- Compile_lock is not held. However we are at a safepoint. | 1235 // --- Compile_lock is not held. However we are at a safepoint. |
1229 assert_locked_or_safepoint(Compile_lock); | 1236 assert_locked_or_safepoint(Compile_lock); |
1230 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; | 1237 if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; |
1231 | 1238 |
1232 // CodeCache can only be updated by a thread_in_VM and they will all be | 1239 // CodeCache can only be updated by a thread_in_VM and they will all be |
1233 // stopped dring the safepoint so CodeCache will be safe to update without | 1240 // stopped during the safepoint so CodeCache will be safe to update without |
1234 // holding the CodeCache_lock. | 1241 // holding the CodeCache_lock. |
1235 | 1242 |
1236 // Compute the dependent nmethods | 1243 // Compute the dependent nmethods |
1237 if (CodeCache::mark_for_evol_deoptimization(ev_k_h) > 0) { | 1244 if (CodeCache::mark_for_evol_deoptimization(ev_k_h) > 0) { |
1238 // At least one nmethod has been marked for deoptimization | 1245 // At least one nmethod has been marked for deoptimization |