< prev index next >

src/hotspot/share/aot/aotLoader.cpp

Print this page

        

*** 22,32 **** */ #include "precompiled.hpp" #include "aot/aotCodeHeap.hpp" #include "aot/aotLoader.inline.hpp" - #include "classfile/javaClasses.hpp" #include "jvm.h" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/compressedOops.hpp" #include "oops/method.hpp" --- 22,31 ----
*** 318,343 **** guarantee(caller_heap != NULL, "CodeHeap not found"); bool success = caller_heap->reconcile_dynamic_invoke(aot, holder, index, adapter_method, appendix_klass); vmassert(success || thread->last_frame().sender(&map).is_deoptimized_frame(), "caller not deoptimized on failure"); return success; } - - - // This should be called very early during startup before any of the AOTed methods that use boxes can deoptimize. - // Deoptimization machinery expects the caches to be present and populated. - void AOTLoader::initialize_box_caches(TRAPS) { - if (!UseAOT || libraries_count() == 0) { - return; - } - TraceTime timer("AOT initialization of box caches", TRACETIME_LOG(Info, aot, startuptime)); - Symbol* box_classes[] = { java_lang_Boolean::symbol(), java_lang_Byte_ByteCache::symbol(), - java_lang_Short_ShortCache::symbol(), java_lang_Character_CharacterCache::symbol(), - java_lang_Integer_IntegerCache::symbol(), java_lang_Long_LongCache::symbol() }; - - for (unsigned i = 0; i < sizeof(box_classes) / sizeof(Symbol*); i++) { - Klass* k = SystemDictionary::resolve_or_fail(box_classes[i], true, CHECK); - InstanceKlass* ik = InstanceKlass::cast(k); - if (ik->is_not_initialized()) { - ik->initialize(CHECK); - } - } - } --- 317,321 ----
< prev index next >