src/share/vm/aot/aotLoader.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/aot/aotLoader.cpp	Thu Nov  3 04:05:42 2016
--- new/src/share/vm/aot/aotLoader.cpp	Thu Nov  3 04:05:42 2016

*** 21,47 **** --- 21,46 ---- * questions. */ #include "precompiled.hpp" + #include "aot/aotCodeHeap.hpp" + #include "aot/aotLoader.inline.hpp" #include "jvmci/jvmciRuntime.hpp" #include "oops/method.hpp" #include "aot/aotLoader.hpp" #include "aot/aotCodeHeap.hpp" #include <dlfcn.h> #include <stdio.h> GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true); // Iterate over all AOT CodeHeaps #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap) ! void AOTLoader::load_for_klass(const instanceKlassHandle& kh, Thread* thread) { + if (UseAOT) { FOR_ALL_AOT_HEAPS(heap) { (*heap)->load_klass_data(kh, thread); } + } } uint64_t AOTLoader::get_saved_fingerprint(InstanceKlass* ik) { FOR_ALL_AOT_HEAPS(heap) { AOTKlassData* klass_data = (*heap)->find_klass(ik);
*** 68,103 **** --- 67,102 ---- } } return false; } AOTCompiledMethod* AOTLoader::find_aot(address p) { // NMT can walk the stack before heap array is created if (heaps() != NULL) { FOR_ALL_AOT_HEAPS(heap) { if ((*heap)->contains(p)) { return (*heap)->find_aot(p); } } } return NULL; } void AOTLoader::oops_do(OopClosure* f) { + if (UseAOT) { FOR_ALL_AOT_HEAPS(heap) { (*heap)->oops_do(f); } + } } void AOTLoader::metadata_do(void f(Metadata*)) { + if (UseAOT) { FOR_ALL_AOT_HEAPS(heap) { (*heap)->metadata_do(f); } + } + } + + address AOTLoader::exception_begin(JavaThread* thread, CodeBlob* blob, address return_address) { + assert(blob->is_aot(), "sanity"); + AOTCompiledMethod* aotm = (AOTCompiledMethod*)blob; + // Set flag if return address is a method handle call site. + thread->set_is_method_handle_return(aotm->is_method_handle_return(return_address)); + return aotm->exception_begin(); } // Flushing and deoptimization in case of evolution ! void AOTLoader::flush_evol_dependents_on(const instanceKlassHandle& dependee) { // make non entrant and mark for deoptimization FOR_ALL_AOT_HEAPS(heap) { (*heap)->flush_evol_dependents_on(dependee); } Deoptimization::deoptimize_dependents();

src/share/vm/aot/aotLoader.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File