--- old/make/lib/JvmFeatures.gmk 2016-11-03 04:05:36.296943564 -0700 +++ new/make/lib/JvmFeatures.gmk 2016-11-03 04:05:36.212939837 -0700 @@ -151,6 +151,6 @@ JVM_CFLAGS_FEATURES += -DINCLUDE_AOT else JVM_EXCLUDE_FILES += \ - compiledIC_aot_x86_64.cpp \ + compiledIC_aot_x86_64.cpp compilerRuntime.cpp \ aotCodeHeap.cpp aotCompiledMethod.cpp aotLoader.cpp compiledIC_aot.cpp endif --- old/src/cpu/aarch64/vm/compiledIC_aarch64.cpp 2016-11-03 04:05:36.783965177 -0700 +++ new/src/cpu/aarch64/vm/compiledIC_aarch64.cpp 2016-11-03 04:05:36.700961493 -0700 @@ -76,7 +76,7 @@ return 4; // 3 in emit_to_interp_stub + 1 in emit_call } -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(false /* is_aot */); guarantee(stub != NULL, "stub not found"); --- old/src/cpu/ppc/vm/compiledIC_ppc.cpp 2016-11-03 04:05:37.270986789 -0700 +++ new/src/cpu/ppc/vm/compiledIC_ppc.cpp 2016-11-03 04:05:37.186983061 -0700 @@ -163,7 +163,7 @@ return 5; } -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); --- old/src/cpu/s390/vm/compiledIC_s390.cpp 2016-11-03 04:05:37.756008312 -0700 +++ new/src/cpu/s390/vm/compiledIC_s390.cpp 2016-11-03 04:05:37.673004629 -0700 @@ -90,7 +90,7 @@ return 5; // 4 in emit_java_to_interp + 1 in Java_Static_Call } -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); --- old/src/cpu/sparc/vm/compiledIC_sparc.cpp 2016-11-03 04:05:38.248030146 -0700 +++ new/src/cpu/sparc/vm/compiledIC_sparc.cpp 2016-11-03 04:05:38.163026374 -0700 @@ -85,7 +85,7 @@ return 10; // 4 in emit_java_to_interp + 1 in Java_Static_Call } -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(/*is_aot*/ false); guarantee(stub != NULL, "stub not found"); --- old/src/cpu/x86/vm/compiledIC_aot_x86_64.cpp 2016-11-03 04:05:38.736051803 -0700 +++ new/src/cpu/x86/vm/compiledIC_aot_x86_64.cpp 2016-11-03 04:05:38.653048120 -0700 @@ -22,10 +22,10 @@ */ #include "aot/compiledIC_aot.hpp" -#include "memory/resourceArea.hpp" #include "code/codeCache.hpp" +#include "memory/resourceArea.hpp" -void CompiledDirectStaticCall::set_to_far(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_far(const methodHandle& callee, address entry) { address stub = find_stub(true /* is_far */); guarantee(stub != NULL, "stub not found"); @@ -55,7 +55,7 @@ set_destination_mt_safe(stub); } -void CompiledPltStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledPltStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(); guarantee(stub != NULL, "stub not found"); if (TraceICs) { --- old/src/cpu/x86/vm/compiledIC_x86.cpp 2016-11-03 04:05:39.224073460 -0700 +++ new/src/cpu/x86/vm/compiledIC_x86.cpp 2016-11-03 04:05:39.141069777 -0700 @@ -138,7 +138,7 @@ } #endif // INCLUDE_AOT -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { address stub = find_stub(false /* is_aot */); guarantee(stub != NULL, "stub not found"); --- old/src/cpu/zero/vm/compiledIC_zero.cpp 2016-11-03 04:05:39.713095161 -0700 +++ new/src/cpu/zero/vm/compiledIC_zero.cpp 2016-11-03 04:05:39.629091433 -0700 @@ -60,7 +60,7 @@ return 0; } -void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) { +void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) { ShouldNotReachHere(); // Only needed for COMPILER2. } --- old/src/share/vm/aot/aotCodeHeap.cpp 2016-11-03 04:05:40.202116862 -0700 +++ new/src/share/vm/aot/aotCodeHeap.cpp 2016-11-03 04:05:40.116113046 -0700 @@ -22,14 +22,14 @@ */ #include "precompiled.hpp" + +#include "aot/aotLoader.hpp" +#include "aot/aotCodeHeap.hpp" #include "gc/g1/heapRegion.hpp" #include "gc/shared/gcLocker.hpp" #include "jvmci/compilerRuntime.hpp" #include "jvmci/jvmciRuntime.hpp" #include "oops/method.hpp" -#include "aot/aotLoader.hpp" -#include "aot/aotCodeHeap.hpp" - #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vm_operations.hpp" @@ -80,14 +80,14 @@ } TempNewSymbol sym = SymbolTable::probe(name, len); if (sym == NULL) { - log_debug(aotclassresolve)("Probe failed for AOT class %s", name); + log_debug(aot, class, resolve)("Probe failed for AOT class %s", name); return NULL; } Klass* k = SystemDictionary::find_instance_or_array_klass(sym, loader, protection_domain, thread); assert(!thread->has_pending_exception(), "should not throw"); if (k != NULL) { - log_info(aotclassresolve)("%s %s (lookup)", caller->method_holder()->external_name(), k->external_name()); + log_info(aot, class, resolve)("%s %s (lookup)", caller->method_holder()->external_name(), k->external_name()); } return k; } @@ -267,7 +267,7 @@ } } -void AOTCodeHeap::publish_aot(instanceKlassHandle kh, methodHandle mh, AOTMethodData* method_data, int code_id) { +void AOTCodeHeap::publish_aot(const methodHandle& mh, AOTMethodData* method_data, int code_id) { // The method may be explicitly excluded by the user. if (CompilerOracle::should_exclude(mh)) { return; @@ -631,7 +631,7 @@ } } -bool AOTCodeHeap::load_klass_data(instanceKlassHandle kh, Thread* thread) { +bool AOTCodeHeap::load_klass_data(const instanceKlassHandle& kh, Thread* thread) { ResourceMark rm; NOT_PRODUCT( klasses_seen++; ) @@ -643,7 +643,7 @@ if (!kh->has_passed_fingerprint_check()) { NOT_PRODUCT( aot_klasses_fp_miss++; ) - log_trace(aotclassfingerprint)("class %s%s has bad fingerprint in %s tid=" INTPTR_FORMAT, + log_trace(aot, class, fingerprint)("class %s%s has bad fingerprint in %s tid=" INTPTR_FORMAT, kh->internal_name(), kh->is_shared() ? " (shared)" : "", _name, p2i(thread)); sweep_dependent_methods(klass_data); @@ -653,7 +653,7 @@ assert(klass_data->_class_id < _class_count, "invalid class id"); AOTClass* aot_class = &_classes[klass_data->_class_id]; if (aot_class->_classloader != NULL && aot_class->_classloader != kh->class_loader_data()) { - log_trace(aotclassload)("class %s in %s already loaded for classloader %p vs %p tid=" INTPTR_FORMAT, + log_trace(aot, class, load)("class %s in %s already loaded for classloader %p vs %p tid=" INTPTR_FORMAT, kh->internal_name(), _name, aot_class->_classloader, kh->class_loader_data(), p2i(thread)); NOT_PRODUCT( aot_klasses_cl_miss++; ) return false; @@ -661,7 +661,7 @@ NOT_PRODUCT( aot_klasses_found++; ) - log_trace(aotclassload)("found %s in %s for classloader %p tid=" INTPTR_FORMAT, kh->internal_name(), _name, kh->class_loader_data(), p2i(thread)); + log_trace(aot, class, load)("found %s in %s for classloader %p tid=" INTPTR_FORMAT, kh->internal_name(), _name, kh->class_loader_data(), p2i(thread)); aot_class->_classloader = kh->class_loader_data(); // Set klass's Resolve (second) got cell. @@ -698,7 +698,7 @@ if (mh->code() != NULL) { // Does it have already compiled code? continue; // Don't overwrite } - publish_aot(kh, mh, method_data, code_id); + publish_aot(mh, method_data, code_id); } } return true; @@ -833,7 +833,7 @@ } #endif -void AOTCodeHeap::flush_evol_dependents_on(instanceKlassHandle dependee) { +void AOTCodeHeap::flush_evol_dependents_on(const instanceKlassHandle& dependee) { for (int index = 0; index < _method_count; index++) { if (_code_to_aot[index]._state != in_use) { continue; // Skip uninitialized entries. --- old/src/share/vm/aot/aotCodeHeap.hpp 2016-11-03 04:05:40.697138830 -0700 +++ new/src/share/vm/aot/aotCodeHeap.hpp 2016-11-03 04:05:40.612135057 -0700 @@ -185,7 +185,7 @@ void link_global_lib_symbols(); void link_primitive_array_klasses(); - void publish_aot(instanceKlassHandle kh, methodHandle mh, AOTMethodData* method_data, int code_id); + void publish_aot(const methodHandle& mh, AOTMethodData* method_data, int code_id); address load_symbol(const char *name); @@ -214,7 +214,7 @@ virtual void* next(void *p) const; AOTKlassData* find_klass(InstanceKlass* ik); - bool load_klass_data(instanceKlassHandle kh, Thread* thread); + bool load_klass_data(const instanceKlassHandle& kh, Thread* thread); Klass* get_klass_from_got(const char* klass_name, int klass_len, const Method* method); void sweep_dependent_methods(AOTKlassData* klass_data); bool is_dependent_method(Klass* dependee, AOTCompiledMethod* aot); @@ -262,7 +262,7 @@ DEBUG_ONLY( int verify_icholder_relocations(); ) - void flush_evol_dependents_on(instanceKlassHandle dependee); + void flush_evol_dependents_on(const instanceKlassHandle& dependee); void alive_methods_do(void f(CompiledMethod* nm)); --- old/src/share/vm/aot/aotCompiledMethod.cpp 2016-11-03 04:05:41.185160486 -0700 +++ new/src/share/vm/aot/aotCompiledMethod.cpp 2016-11-03 04:05:41.098156625 -0700 @@ -23,6 +23,9 @@ #include "precompiled.hpp" +#include "aot/aotCodeHeap.hpp" +#include "aot/aotLoader.hpp" +#include "aot/compiledIC_aot.hpp" #include "code/codeCache.hpp" #include "code/compiledIC.hpp" #include "code/nativeInst.hpp" @@ -33,10 +36,6 @@ #include "jvmci/compilerRuntime.hpp" #include "jvmci/jvmciRuntime.hpp" #include "oops/method.hpp" -#include "aot/aotCompiledMethod.hpp" -#include "aot/aotLoader.hpp" -#include "aot/aotCodeHeap.hpp" -#include "aot/compiledIC_aot.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" @@ -400,7 +399,7 @@ } } -void PltNativeCallWrapper::set_to_interpreted(methodHandle method, CompiledICInfo& info) { +void PltNativeCallWrapper::set_to_interpreted(const methodHandle& method, CompiledICInfo& info) { assert(!info.to_aot(), "only for nmethod"); CompiledPltStaticCall* csc = CompiledPltStaticCall::at(instruction_address()); csc->set_to_interpreted(method, info.entry()); --- old/src/share/vm/aot/aotCompiledMethod.hpp 2016-11-03 04:05:41.674182187 -0700 +++ new/src/share/vm/aot/aotCompiledMethod.hpp 2016-11-03 04:05:41.588178371 -0700 @@ -24,9 +24,11 @@ #ifndef SHARE_VM_AOT_AOTCOMPILEDMETHOD_HPP #define SHARE_VM_AOT_AOTCOMPILEDMETHOD_HPP +#include "code/codeCache.hpp" +#include "code/compiledIC.hpp" +#include "code/compiledMethod.hpp" #include "code/pcDesc.hpp" #include "code/relocInfo.hpp" -#include "code/compiledIC.hpp" class AOTCodeHeap; @@ -302,7 +304,7 @@ virtual address return_address() const { return _call->return_address(); } virtual address get_resolve_call_stub(bool is_optimized) const { return _call->plt_resolve_call(); } virtual void set_destination_mt_safe(address dest) { _call->set_destination_mt_safe(dest); } - virtual void set_to_interpreted(methodHandle method, CompiledICInfo& info); + virtual void set_to_interpreted(const methodHandle& method, CompiledICInfo& info); virtual void verify() const { _call->verify(); } virtual void verify_resolve_call(address dest) const; --- old/src/share/vm/aot/aotLoader.cpp 2016-11-03 04:05:42.161203800 -0700 +++ new/src/share/vm/aot/aotLoader.cpp 2016-11-03 04:05:42.076200027 -0700 @@ -23,22 +23,21 @@ #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 -#include GrowableArray* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray (2, true); // Iterate over all AOT CodeHeaps #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator heap = heaps()->begin(); heap != heaps()->end(); ++heap) -void AOTLoader::load_for_klass(instanceKlassHandle kh, Thread* thread) { - FOR_ALL_AOT_HEAPS(heap) { - (*heap)->load_klass_data(kh, thread); +void AOTLoader::load_for_klass(const instanceKlassHandle& kh, Thread* thread) { + if (UseAOT) { + FOR_ALL_AOT_HEAPS(heap) { + (*heap)->load_klass_data(kh, thread); + } } } @@ -70,32 +69,32 @@ return false; } -AOTCompiledMethod* AOTLoader::find_aot(address p) { - // NMT can walk the stack before heap array is created - if (heaps() != NULL) { +void AOTLoader::oops_do(OopClosure* f) { + if (UseAOT) { FOR_ALL_AOT_HEAPS(heap) { - if ((*heap)->contains(p)) { - return (*heap)->find_aot(p); - } + (*heap)->oops_do(f); } } - return NULL; } -void AOTLoader::oops_do(OopClosure* f) { - 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); + } } } -void AOTLoader::metadata_do(void f(Metadata*)) { - 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(instanceKlassHandle dependee) { +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); --- old/src/share/vm/aot/aotLoader.hpp 2016-11-03 04:05:42.652225590 -0700 +++ new/src/share/vm/aot/aotLoader.hpp 2016-11-03 04:05:42.566221773 -0700 @@ -24,13 +24,16 @@ #ifndef SHARE_VM_AOT_AOTLOADER_HPP #define SHARE_VM_AOT_AOTLOADER_HPP +#include "runtime/globals_extension.hpp" -#include "classfile/classFileParser.hpp" -#include "memory/iterator.hpp" -#include "oops/metadata.hpp" -#if INCLUDE_AOT -#include "aot/aotCompiledMethod.hpp" -#endif +class AOTCodeHeap; +class CodeBlob; +template class GrowableArray; +class instanceKlassHandle; +class InstanceKlass; +class JavaThread; +class Metadata; +class OopClosure; class AOTLoader { private: @@ -41,29 +44,27 @@ public: #if INCLUDE_AOT - static GrowableArray* heaps() { return _heaps; } - static int heaps_count() { return heaps()->length(); } - static void add_heap(AOTCodeHeap *heap) { heaps()->append(heap); } + static GrowableArray* heaps(); + static int heaps_count(); + static void add_heap(AOTCodeHeap *heap); #endif static void initialize() NOT_AOT({ FLAG_SET_ERGO(bool, UseAOT, false); }); static void universe_init() NOT_AOT_RETURN; static void set_narrow_klass_shift() NOT_AOT_RETURN; static bool contains(address p) NOT_AOT({ return false; }); -#if INCLUDE_AOT - static AOTCompiledMethod* find_aot(address p); -#endif - static void load_for_klass(instanceKlassHandle kh, Thread* thread) NOT_AOT_RETURN; + static void load_for_klass(const instanceKlassHandle& kh, Thread* thread) NOT_AOT_RETURN; static bool find_klass(InstanceKlass* ik) NOT_AOT({ return false; }); static uint64_t get_saved_fingerprint(InstanceKlass* ik) NOT_AOT({ return 0; }); static void oops_do(OopClosure* f) NOT_AOT_RETURN; static void metadata_do(void f(Metadata*)) NOT_AOT_RETURN; + static address exception_begin(JavaThread* thread, CodeBlob* blob, address return_address) NOT_AOT({ return NULL; }); NOT_PRODUCT( static void print_statistics() NOT_AOT_RETURN; ) #ifdef HOTSWAP // Flushing and deoptimization in case of evolution - static void flush_evol_dependents_on(instanceKlassHandle dependee) NOT_AOT_RETURN; + static void flush_evol_dependents_on(const instanceKlassHandle& dependee) NOT_AOT_RETURN; #endif // HOTSWAP }; --- old/src/share/vm/aot/compiledIC_aot.hpp 2016-11-03 04:05:43.139247202 -0700 +++ new/src/share/vm/aot/compiledIC_aot.hpp 2016-11-03 04:05:43.054243430 -0700 @@ -24,17 +24,17 @@ #ifndef SHARE_VM_AOT_COMPILEDIC_AOT_HPP #define SHARE_VM_AOT_COMPILEDIC_AOT_HPP +#include "code/compiledIC.hpp" #include "code/nativeInst.hpp" #include "interpreter/linkResolver.hpp" #include "oops/compiledICHolder.hpp" -#include "code/compiledIC.hpp" class CompiledPltStaticCall: public CompiledStaticCall { friend class CompiledIC; friend class PltNativeCallWrapper; // Also used by CompiledIC - void set_to_interpreted(methodHandle callee, address entry); + void set_to_interpreted(const methodHandle& callee, address entry); address instruction_address() const { return _call->instruction_address(); } void set_destination_mt_safe(address dest) { _call->set_destination_mt_safe(dest); } @@ -76,7 +76,7 @@ protected: virtual address resolve_call_stub() const { return _call->plt_resolve_call(); } - virtual void set_to_far(methodHandle callee, address entry) { set_to_compiled(entry); } + virtual void set_to_far(const methodHandle& callee, address entry) { set_to_compiled(entry); } virtual const char* name() const { return "CompiledPltStaticCall"; } }; --- old/src/share/vm/classfile/classFileParser.cpp 2016-11-03 04:05:43.637269303 -0700 +++ new/src/share/vm/classfile/classFileParser.cpp 2016-11-03 04:05:43.544265176 -0700 @@ -22,15 +22,16 @@ * */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/classFileParser.hpp" #include "classfile/classFileStream.hpp" #include "classfile/classLoader.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/defaultMethods.hpp" +#include "classfile/dictionary.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/moduleEntry.hpp" #include "classfile/symbolTable.hpp" -#include "classfile/dictionary.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/verificationType.hpp" #include "classfile/verifier.hpp" @@ -72,7 +73,6 @@ #if INCLUDE_CDS #include "classfile/systemDictionaryShared.hpp" #endif -#include "aot/aotLoader.hpp" // We generally try to create the oops directly when parsing, rather than // allocating temporary data structures and copying the bytes twice. A @@ -5200,7 +5200,7 @@ ik->set_has_passed_fingerprint_check(true); } else { ResourceMark rm; - log_info(classfingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, + log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, _stream->compute_fingerprint()); } } --- old/src/share/vm/classfile/systemDictionary.cpp 2016-11-03 04:05:44.193293977 -0700 +++ new/src/share/vm/classfile/systemDictionary.cpp 2016-11-03 04:05:44.102289939 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/classFileParser.hpp" #include "classfile/classFileStream.hpp" #include "classfile/classLoader.hpp" @@ -81,7 +82,6 @@ #if INCLUDE_TRACE #include "trace/tracing.hpp" #endif -#include "aot/aotLoader.hpp" Dictionary* SystemDictionary::_dictionary = NULL; PlaceholderTable* SystemDictionary::_placeholders = NULL; @@ -1427,7 +1427,7 @@ ik->set_has_passed_fingerprint_check(true); } else { ResourceMark rm; - log_info(classfingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp); + log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp); } } return ik; --- old/src/share/vm/code/codeCache.cpp 2016-11-03 04:05:44.721317409 -0700 +++ new/src/share/vm/code/codeCache.cpp 2016-11-03 04:05:44.632313460 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "code/codeBlob.hpp" #include "code/codeCache.hpp" #include "code/compiledIC.hpp" @@ -59,7 +60,6 @@ #include "opto/compile.hpp" #include "opto/node.hpp" #endif -#include "aot/aotLoader.hpp" // Helper class for printing in CodeCache class CodeBlob_sizes { --- old/src/share/vm/code/compiledIC.hpp 2016-11-03 04:05:45.227339865 -0700 +++ new/src/share/vm/code/compiledIC.hpp 2016-11-03 04:05:45.141336048 -0700 @@ -148,7 +148,7 @@ virtual address return_address() const = 0; virtual address get_resolve_call_stub(bool is_optimized) const = 0; virtual void set_destination_mt_safe(address dest) = 0; - virtual void set_to_interpreted(methodHandle method, CompiledICInfo& info) = 0; + virtual void set_to_interpreted(const methodHandle& method, CompiledICInfo& info) = 0; virtual void verify() const = 0; virtual void verify_resolve_call(address dest) const = 0; @@ -374,9 +374,9 @@ virtual address resolve_call_stub() const = 0; virtual void set_destination_mt_safe(address dest) = 0; #if INCLUDE_AOT - virtual void set_to_far(methodHandle callee, address entry) = 0; + virtual void set_to_far(const methodHandle& callee, address entry) = 0; #endif - virtual void set_to_interpreted(methodHandle callee, address entry) = 0; + virtual void set_to_interpreted(const methodHandle& callee, address entry) = 0; virtual const char* name() const = 0; void set_to_compiled(address entry); @@ -388,9 +388,9 @@ friend class DirectNativeCallWrapper; // Also used by CompiledIC - void set_to_interpreted(methodHandle callee, address entry); + void set_to_interpreted(const methodHandle& callee, address entry); #if INCLUDE_AOT - void set_to_far(methodHandle callee, address entry); + void set_to_far(const methodHandle& callee, address entry); #endif address instruction_address() const { return _call->instruction_address(); } void set_destination_mt_safe(address dest) { _call->set_destination_mt_safe(dest); } --- old/src/share/vm/code/nmethod.cpp 2016-11-03 04:05:45.732362276 -0700 +++ new/src/share/vm/code/nmethod.cpp 2016-11-03 04:05:45.644358371 -0700 @@ -2762,7 +2762,7 @@ _call->set_destination_mt_safe(dest); } - virtual void set_to_interpreted(methodHandle method, CompiledICInfo& info) { + virtual void set_to_interpreted(const methodHandle& method, CompiledICInfo& info) { CompiledDirectStaticCall* csc = CompiledDirectStaticCall::at(instruction_address()); #if INCLUDE_AOT if (info.to_aot()) { --- old/src/share/vm/gc/g1/g1RootProcessor.cpp 2016-11-03 04:05:46.255385487 -0700 +++ new/src/share/vm/gc/g1/g1RootProcessor.cpp 2016-11-03 04:05:46.168381626 -0700 @@ -24,6 +24,7 @@ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/stringTable.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" @@ -37,7 +38,6 @@ #include "gc/g1/g1RootProcessor.hpp" #include "gc/g1/heapRegion.inline.hpp" #include "memory/allocation.inline.hpp" -#include "aot/aotLoader.hpp" #include "runtime/fprofiler.hpp" #include "runtime/mutex.hpp" #include "services/management.hpp" --- old/src/share/vm/gc/parallel/pcTasks.cpp 2016-11-03 04:05:46.755407676 -0700 +++ new/src/share/vm/gc/parallel/pcTasks.cpp 2016-11-03 04:05:46.669403859 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "gc/parallel/parallelScavengeHeap.hpp" @@ -38,7 +39,6 @@ #include "oops/objArrayKlass.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/jvmtiExport.hpp" -#include "aot/aotLoader.hpp" #include "runtime/fprofiler.hpp" #include "runtime/jniHandles.hpp" #include "runtime/thread.hpp" @@ -128,9 +128,7 @@ case code_cache: // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(&mark_and_push_closure)); - if (UseAOT) { - AOTLoader::oops_do(&mark_and_push_closure); - } + AOTLoader::oops_do(&mark_and_push_closure); break; default: --- old/src/share/vm/gc/parallel/psMarkSweep.cpp 2016-11-03 04:05:47.257429954 -0700 +++ new/src/share/vm/gc/parallel/psMarkSweep.cpp 2016-11-03 04:05:47.170426093 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" @@ -48,7 +49,6 @@ #include "gc/shared/spaceDecorator.hpp" #include "logging/log.hpp" #include "oops/oop.inline.hpp" -#include "aot/aotLoader.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/fprofiler.hpp" #include "runtime/safepoint.hpp" @@ -516,9 +516,7 @@ ClassLoaderDataGraph::always_strong_cld_do(follow_cld_closure()); // Do not treat nmethods as strong roots for mark/sweep, since we can unload them. //CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure(mark_and_push_closure())); - if (UseAOT) { - AOTLoader::oops_do(mark_and_push_closure()); - } + AOTLoader::oops_do(mark_and_push_closure()); } // Flush marking stack. @@ -615,9 +613,7 @@ CodeBlobToOopClosure adjust_from_blobs(adjust_pointer_closure(), CodeBlobToOopClosure::FixRelocations); CodeCache::blobs_do(&adjust_from_blobs); - if (UseAOT) { - AOTLoader::oops_do(adjust_pointer_closure()); - } + AOTLoader::oops_do(adjust_pointer_closure()); StringTable::oops_do(adjust_pointer_closure()); ref_processor()->weak_oops_do(adjust_pointer_closure()); PSScavenge::reference_processor()->weak_oops_do(adjust_pointer_closure()); --- old/src/share/vm/gc/parallel/psParallelCompact.cpp 2016-11-03 04:05:47.771452765 -0700 +++ new/src/share/vm/gc/parallel/psParallelCompact.cpp 2016-11-03 04:05:47.683448860 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" @@ -57,7 +58,6 @@ #include "oops/methodData.hpp" #include "oops/objArrayKlass.inline.hpp" #include "oops/oop.inline.hpp" -#include "aot/aotLoader.hpp" #include "runtime/atomic.hpp" #include "runtime/fprofiler.hpp" #include "runtime/safepoint.hpp" @@ -2184,9 +2184,7 @@ CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations); CodeCache::blobs_do(&adjust_from_blobs); - if (UseAOT) { - AOTLoader::oops_do(&oop_closure); - } + AOTLoader::oops_do(&oop_closure); StringTable::oops_do(&oop_closure); ref_processor()->weak_oops_do(&oop_closure); // Roots were visited so references into the young gen in roots --- old/src/share/vm/gc/parallel/psTasks.cpp 2016-11-03 04:05:48.301476286 -0700 +++ new/src/share/vm/gc/parallel/psTasks.cpp 2016-11-03 04:05:48.215472469 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "gc/parallel/cardTableExtension.hpp" @@ -37,7 +38,6 @@ #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/oop.inline.hpp" -#include "aot/aotLoader.hpp" #include "runtime/fprofiler.hpp" #include "runtime/thread.hpp" #include "runtime/vmThread.hpp" @@ -102,9 +102,7 @@ { MarkingCodeBlobClosure each_scavengable_code_blob(&roots_to_old_closure, CodeBlobToOopClosure::FixRelocations); CodeCache::scavenge_root_nmethods_do(&each_scavengable_code_blob); - if (UseAOT) { - AOTLoader::oops_do(&roots_closure); - } + AOTLoader::oops_do(&roots_closure); } break; --- old/src/share/vm/gc/shared/genCollectedHeap.cpp 2016-11-03 04:05:48.809498830 -0700 +++ new/src/share/vm/gc/shared/genCollectedHeap.cpp 2016-11-03 04:05:48.722494970 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" @@ -44,7 +45,6 @@ #include "memory/filemap.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" -#include "aot/aotLoader.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/fprofiler.hpp" #include "runtime/handles.hpp" --- old/src/share/vm/jvmci/compilerRuntime.cpp 2016-11-03 04:05:49.317521375 -0700 +++ new/src/share/vm/jvmci/compilerRuntime.cpp 2016-11-03 04:05:49.231517558 -0700 @@ -25,9 +25,9 @@ #include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "jvmci/compilerRuntime.hpp" -#include "runtime/interfaceSupport.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" +#include "runtime/interfaceSupport.hpp" // Resolve and allocate String JRT_BLOCK_ENTRY(void, CompilerRuntime::resolve_string_by_symbol(JavaThread *thread, void* string_result, const char* name)) --- old/src/share/vm/jvmci/vmStructs_compiler_runtime.hpp 2016-11-03 04:05:49.815543476 -0700 +++ new/src/share/vm/jvmci/vmStructs_compiler_runtime.hpp 2016-11-03 04:05:49.729539659 -0700 @@ -24,6 +24,7 @@ #ifndef SHARE_VM_JVMCI_VMSTRUCTS_COMPILER_RUNTIME_HPP #define SHARE_VM_JVMCI_VMSTRUCTS_COMPILER_RUNTIME_HPP +#if INCLUDE_AOT #include "jvmci/compilerRuntime.hpp" #define VM_ADDRESSES_COMPILER_RUNTIME(declare_address, declare_preprocessor_address, declare_function) \ @@ -34,4 +35,10 @@ declare_function(CompilerRuntime::invocation_event) \ declare_function(CompilerRuntime::backedge_event) +#else // INCLUDE_AOT + +#define VM_ADDRESSES_COMPILER_RUNTIME(declare_address, declare_preprocessor_address, declare_function) + +#endif // INCLUDE_AOT + #endif // SHARE_VM_AOT_VMSTRUCTS_COMPILER_RUNTIME_HPP --- old/src/share/vm/logging/logTag.hpp 2016-11-03 04:05:50.309565399 -0700 +++ new/src/share/vm/logging/logTag.hpp 2016-11-03 04:05:50.222561538 -0700 @@ -35,9 +35,7 @@ LOG_TAG(add) \ LOG_TAG(age) \ LOG_TAG(alloc) \ - LOG_TAG(aotclassfingerprint) \ - LOG_TAG(aotclassload) \ - LOG_TAG(aotclassresolve) \ + LOG_TAG(aot) \ LOG_TAG(annotation) \ LOG_TAG(arguments) \ LOG_TAG(attach) \ @@ -48,7 +46,6 @@ LOG_TAG(breakpoint) \ LOG_TAG(census) \ LOG_TAG(class) \ - LOG_TAG(classfingerprint) \ LOG_TAG(classhisto) \ LOG_TAG(cleanup) \ LOG_TAG(compaction) \ @@ -63,6 +60,7 @@ LOG_TAG(ergo) \ LOG_TAG(exceptions) \ LOG_TAG(exit) \ + LOG_TAG(fingerprint) \ LOG_TAG(freelist) \ LOG_TAG(gc) \ LOG_TAG(hashtables) \ --- old/src/share/vm/memory/metaspace.cpp 2016-11-03 04:05:50.813587766 -0700 +++ new/src/share/vm/memory/metaspace.cpp 2016-11-03 04:05:50.723583772 -0700 @@ -22,6 +22,7 @@ * */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectorPolicy.hpp" #include "gc/shared/gcLocker.hpp" @@ -48,7 +49,6 @@ #include "utilities/copy.hpp" #include "utilities/debug.hpp" #include "utilities/macros.hpp" -#include "aot/aotLoader.hpp" typedef BinaryTreeDictionary > BlockTreeDictionary; typedef BinaryTreeDictionary > ChunkTreeDictionary; --- old/src/share/vm/memory/universe.cpp 2016-11-03 04:05:51.347611465 -0700 +++ new/src/share/vm/memory/universe.cpp 2016-11-03 04:05:51.257607471 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/classLoader.hpp" #include "classfile/classLoaderData.hpp" #include "classfile/javaClasses.hpp" @@ -55,7 +56,6 @@ #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/typeArrayKlass.hpp" -#include "aot/aotLoader.hpp" #include "runtime/arguments.hpp" #include "runtime/atomic.hpp" #include "runtime/commandLineFlagConstraintList.hpp" --- old/src/share/vm/memory/virtualspace.hpp 2016-11-03 04:05:51.847633654 -0700 +++ new/src/share/vm/memory/virtualspace.hpp 2016-11-03 04:05:51.756629616 -0700 @@ -184,10 +184,13 @@ char* low_boundary() const { return _low_boundary; } char* high_boundary() const { return _high_boundary; } +#if INCLUDE_AOT + // Set boundaries for code section in AOT library. void set_low_boundary(char *p) { _low_boundary = p; } void set_high_boundary(char *p) { _high_boundary = p; } void set_low(char *p) { _low = p; } void set_high(char *p) { _high = p; } +#endif bool special() const { return _special; } --- old/src/share/vm/oops/instanceKlass.cpp 2016-11-03 04:05:52.339655489 -0700 +++ new/src/share/vm/oops/instanceKlass.cpp 2016-11-03 04:05:52.248651450 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/classFileParser.hpp" #include "classfile/classFileStream.hpp" #include "classfile/classLoader.hpp" @@ -58,7 +59,6 @@ #include "prims/jvmtiRedefineClasses.hpp" #include "prims/jvmtiThreadState.hpp" #include "prims/methodComparator.hpp" -#include "aot/aotLoader.hpp" #include "runtime/atomic.hpp" #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" @@ -790,10 +790,8 @@ } - if (UseAOT) { - // Look for aot compiled methods for this klass, including class initializer. - AOTLoader::load_for_klass(this_k, THREAD); - } + // Look for aot compiled methods for this klass, including class initializer. + AOTLoader::load_for_klass(this_k, THREAD); // Step 8 { @@ -1961,7 +1959,7 @@ bool InstanceKlass::supers_have_passed_fingerprint_checks() { if (java_super() != NULL && !java_super()->has_passed_fingerprint_check()) { ResourceMark rm; - log_trace(classfingerprint)("%s : super %s not fingerprinted", external_name(), java_super()->external_name()); + log_trace(class, fingerprint)("%s : super %s not fingerprinted", external_name(), java_super()->external_name()); return false; } @@ -1972,7 +1970,7 @@ InstanceKlass* intf = InstanceKlass::cast(local_interfaces->at(i)); if (!intf->has_passed_fingerprint_check()) { ResourceMark rm; - log_trace(classfingerprint)("%s : interface %s not fingerprinted", external_name(), intf->external_name()); + log_trace(class, fingerprint)("%s : interface %s not fingerprinted", external_name(), intf->external_name()); return false; } } @@ -2023,7 +2021,7 @@ Bytes::put_native_u8(adr, (u8)fingerprint); // adr may not be 64-bit aligned ResourceMark rm; - log_trace(classfingerprint)("stored as " PTR64_FORMAT " for class %s", fingerprint, external_name()); + log_trace(class, fingerprint)("stored as " PTR64_FORMAT " for class %s", fingerprint, external_name()); } static void remove_unshareable_in_class(Klass* k) { --- old/src/share/vm/oops/methodCounters.hpp 2016-11-03 04:05:52.857678478 -0700 +++ new/src/share/vm/oops/methodCounters.hpp 2016-11-03 04:05:52.771674661 -0700 @@ -34,7 +34,9 @@ friend class VMStructs; friend class JVMCIVMStructs; private: +#if INCLUDE_AOT Method* _method; // Back link to Method +#endif #if defined(COMPILER2) || INCLUDE_JVMCI int _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered) u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting @@ -65,7 +67,10 @@ u1 _highest_osr_comp_level; // Same for OSR level #endif - MethodCounters(methodHandle mh) : _method(mh()), + MethodCounters(methodHandle mh) : +#if INCLUDE_AOT + _method(mh()), +#endif _nmethod_age(INT_MAX) #ifdef TIERED , _rate(0), @@ -109,7 +114,7 @@ void deallocate_contents(ClassLoaderData* loader_data) {} DEBUG_ONLY(bool on_stack() { return false; }) // for template - Method* method() const { return _method; } + AOT_ONLY(Method* method() const { return _method; }) static int size() { return sizeof(MethodCounters) / wordSize; } --- old/src/share/vm/runtime/globals.hpp 2016-11-03 04:05:53.367701111 -0700 +++ new/src/share/vm/runtime/globals.hpp 2016-11-03 04:05:53.266696628 -0700 @@ -3678,17 +3678,21 @@ product(intx, Tier3AOTInvocationThreshold, 10000, \ "Compile if number of method invocations crosses this " \ "threshold if coming from AOT") \ + range(0, max_jint) \ \ product(intx, Tier3AOTMinInvocationThreshold, 1000, \ "Minimum invocation to compile at tier 3 if coming from AOT") \ + range(0, max_jint) \ \ product(intx, Tier3AOTCompileThreshold, 15000, \ "Threshold at which tier 3 compilation is invoked (invocation " \ "minimum must be satisfied) if coming from AOT") \ + range(0, max_jint) \ \ product(intx, Tier3AOTBackEdgeThreshold, 120000, \ "Back edge threshold at which tier 3 OSR compilation is invoked " \ "if coming from AOT") \ + range(0, max_jint) \ \ product(intx, Tier4InvocationThreshold, 5000, \ "Compile if number of method invocations crosses this " \ --- old/src/share/vm/runtime/java.cpp 2016-11-03 04:05:53.890724321 -0700 +++ new/src/share/vm/runtime/java.cpp 2016-11-03 04:05:53.803720460 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/classLoader.hpp" #include "classfile/stringTable.hpp" #include "classfile/systemDictionary.hpp" @@ -87,7 +88,6 @@ #include "opto/indexSet.hpp" #include "opto/runtime.hpp" #endif -#include "aot/aotLoader.hpp" GrowableArray* collected_profiled_methods; --- old/src/share/vm/runtime/sharedRuntime.cpp 2016-11-03 04:05:54.384746245 -0700 +++ new/src/share/vm/runtime/sharedRuntime.cpp 2016-11-03 04:05:54.294742251 -0700 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "aot/aotLoader.hpp" #include "classfile/stringTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" @@ -44,7 +45,6 @@ #include "oops/klass.hpp" #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" -#include "aot/aotLoader.hpp" #include "prims/forte.hpp" #include "prims/jvmtiExport.hpp" #include "prims/methodHandles.hpp" @@ -506,6 +506,13 @@ } } +#if INCLUDE_AOT + if (UseAOT && blob->is_aot()) { + // AOT Compiled code + return AOTLoader::exception_begin(thread, blob, return_address); + } +#endif + // Entry code if (StubRoutines::returns_to_call_stub(return_address)) { return StubRoutines::catch_exception_entry(); @@ -515,16 +522,6 @@ return Interpreter::rethrow_exception_entry(); } -#if INCLUDE_AOT - // AOT Compiled code - if (UseAOT && AOTLoader::contains(return_address)) { - AOTCompiledMethod* aotm = AOTLoader::find_aot((address) return_address); - // 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(); - } -#endif - guarantee(blob == NULL || !blob->is_runtime_stub(), "caller should have skipped stub"); guarantee(!VtableStubs::contains(return_address), "NULL exceptions in vtables should have been handled already!"); --- old/test/compiler/aot/fingerprint/SelfChanged.java 2016-11-03 04:05:54.895768923 -0700 +++ new/test/compiler/aot/fingerprint/SelfChanged.java 2016-11-03 04:05:54.808765062 -0700 @@ -39,15 +39,15 @@ * @run main/othervm * compiler.aot.fingerprint.SelfChanged TEST-UNMODIFIED * @run main/othervm -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSelfChanged.so - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.SelfChanged TEST-UNMODIFIED - * + * * @run main * compiler.aot.fingerprint.SelfChanged WRITE-MODIFIED-CLASS * @run main * compiler.aot.fingerprint.SelfChanged TEST-MODIFIED * @run main/othervm -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSelfChanged.so - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.SelfChanged TEST-MODIFIED */ --- old/test/compiler/aot/fingerprint/SelfChangedCDS.java 2016-11-03 04:05:55.379790402 -0700 +++ new/test/compiler/aot/fingerprint/SelfChangedCDS.java 2016-11-03 04:05:55.292786541 -0700 @@ -45,7 +45,7 @@ * -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSelfChanged.so * -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=SelfChangedCDS.jsa * -Xshare:auto -XX:+UnlockCommercialFeatures -XX:+UseAppCDS -showversion - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.Blah TEST-UNMODIFIED * * @run main @@ -59,6 +59,6 @@ * -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSelfChanged.so * -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=SelfChangedCDS.jsa * -Xshare:auto -XX:+UnlockCommercialFeatures -XX:+UseAppCDS -showversion - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.Blah TEST-MODIFIED */ --- old/test/compiler/aot/fingerprint/SuperChanged.java 2016-11-03 04:05:55.863811882 -0700 +++ new/test/compiler/aot/fingerprint/SuperChanged.java 2016-11-03 04:05:55.776808021 -0700 @@ -39,7 +39,7 @@ * @run main * compiler.aot.fingerprint.SuperChanged TEST-UNMODIFIED * @run main/othervm -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSuperChanged.so - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.SuperChanged TEST-UNMODIFIED * * @run main @@ -47,7 +47,7 @@ * @run main * compiler.aot.fingerprint.SuperChanged TEST-MODIFIED * @run main/othervm -XX:+UseAOT -XX:+PrintAOT -XX:AOTLibrary=./libSuperChanged.so - * -Xlog:aotclassfingerprint=trace -Xlog:aotclassload=trace + * -Xlog:aot+class+fingerprint=trace -Xlog:aot+class+load=trace * compiler.aot.fingerprint.SuperChanged TEST-MODIFIED */ --- /dev/null 2016-05-31 09:42:47.975716356 -0700 +++ new/src/share/vm/aot/aotLoader.inline.hpp 2016-11-03 04:05:56.263829634 -0700 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#ifndef SHARE_VM_AOT_AOTLOADER_INLLINE_HPP +#define SHARE_VM_AOT_AOTLOADER_INLLINE_HPP + +#include "aot/aotLoader.hpp" +#include "utilities/growableArray.hpp" + +#if INCLUDE_AOT +GrowableArray* AOTLoader::heaps() { return _heaps; } +int AOTLoader::heaps_count() { return heaps()->length(); } +void AOTLoader::add_heap(AOTCodeHeap *heap) { heaps()->append(heap); } +#endif + +#endif // SHARE_VM_AOT_AOTLOADER_INLLINE_HPP