< prev index next >

src/hotspot/share/code/codeCache.cpp

Print this page

 934 #endif
 935   assert(CodeCacheSegmentSize >= sizeof(jdouble),    "CodeCacheSegmentSize must be large enough to align constants");
 936   // This was originally just a check of the alignment, causing failure, instead, round
 937   // the code cache to the page size.  In particular, Solaris is moving to a larger
 938   // default page size.
 939   CodeCacheExpansionSize = align_up(CodeCacheExpansionSize, os::vm_page_size());
 940 
 941   if (SegmentedCodeCache) {
 942     // Use multiple code heaps
 943     initialize_heaps();
 944   } else {
 945     // Use a single code heap
 946     FLAG_SET_ERGO(NonNMethodCodeHeapSize, 0);
 947     FLAG_SET_ERGO(ProfiledCodeHeapSize, 0);
 948     FLAG_SET_ERGO(NonProfiledCodeHeapSize, 0);
 949     ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
 950     add_heap(rs, "CodeCache", CodeBlobType::All);
 951   }
 952 
 953   // Initialize ICache flush mechanism
 954   // This service is needed for os::register_code_area
 955   icache_init();
 956 
 957   // Give OS a chance to register generated code area.
 958   // This is used on Windows 64 bit platforms to register
 959   // Structured Exception Handlers for our generated code.
 960   os::register_code_area((char*)low_bound(), (char*)high_bound());
 961 }
 962 
 963 void codeCache_init() {
 964   CodeCache::initialize();
 965   // Load AOT libraries and add AOT code heaps.
 966   AOTLoader::initialize();
 967 }
 968 
 969 //------------------------------------------------------------------------------------------------
 970 
 971 int CodeCache::number_of_nmethods_with_dependencies() {
 972   return _number_of_nmethods_with_dependencies;
 973 }
 974 
 975 void CodeCache::clear_inline_caches() {
 976   assert_locked_or_safepoint(CodeCache_lock);
 977   CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
 978   while(iter.next()) {
 979     iter.method()->clear_inline_caches();
 980   }

 934 #endif
 935   assert(CodeCacheSegmentSize >= sizeof(jdouble),    "CodeCacheSegmentSize must be large enough to align constants");
 936   // This was originally just a check of the alignment, causing failure, instead, round
 937   // the code cache to the page size.  In particular, Solaris is moving to a larger
 938   // default page size.
 939   CodeCacheExpansionSize = align_up(CodeCacheExpansionSize, os::vm_page_size());
 940 
 941   if (SegmentedCodeCache) {
 942     // Use multiple code heaps
 943     initialize_heaps();
 944   } else {
 945     // Use a single code heap
 946     FLAG_SET_ERGO(NonNMethodCodeHeapSize, 0);
 947     FLAG_SET_ERGO(ProfiledCodeHeapSize, 0);
 948     FLAG_SET_ERGO(NonProfiledCodeHeapSize, 0);
 949     ReservedCodeSpace rs = reserve_heap_memory(ReservedCodeCacheSize);
 950     add_heap(rs, "CodeCache", CodeBlobType::All);
 951   }
 952 
 953   // Initialize ICache flush mechanism

 954   icache_init();





 955 }
 956 
 957 void codeCache_init() {
 958   CodeCache::initialize();
 959   // Load AOT libraries and add AOT code heaps.
 960   AOTLoader::initialize();
 961 }
 962 
 963 //------------------------------------------------------------------------------------------------
 964 
 965 int CodeCache::number_of_nmethods_with_dependencies() {
 966   return _number_of_nmethods_with_dependencies;
 967 }
 968 
 969 void CodeCache::clear_inline_caches() {
 970   assert_locked_or_safepoint(CodeCache_lock);
 971   CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
 972   while(iter.next()) {
 973     iter.method()->clear_inline_caches();
 974   }
< prev index next >