--- old/src/hotspot/share/aot/aotCodeHeap.cpp 2018-03-02 08:11:38.179736233 -0500 +++ new/src/hotspot/share/aot/aotCodeHeap.cpp 2018-03-02 08:11:37.506777764 -0500 @@ -34,7 +34,7 @@ #include "interpreter/abstractInterpreter.hpp" #include "jvmci/compilerRuntime.hpp" #include "jvmci/jvmciRuntime.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/vm_operations.hpp" --- old/src/hotspot/share/aot/aotCompiledMethod.cpp 2018-03-02 08:11:39.566312596 -0500 +++ new/src/hotspot/share/aot/aotCompiledMethod.cpp 2018-03-02 08:11:38.962166252 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -35,7 +35,7 @@ #include "gc/shared/gcLocker.hpp" #include "jvmci/compilerRuntime.hpp" #include "jvmci/jvmciRuntime.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" --- old/src/hotspot/share/ci/ciEnv.cpp 2018-03-02 08:11:41.456158534 -0500 +++ new/src/hotspot/share/ci/ciEnv.cpp 2018-03-02 08:11:40.791844082 -0500 @@ -46,6 +46,9 @@ #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" +#include "oops/constantPool.inline.hpp" +#include "oops/cpCache.inline.hpp" +#include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" --- old/src/hotspot/share/ci/ciMethod.cpp 2018-03-02 08:11:43.463113162 -0500 +++ new/src/hotspot/share/ci/ciMethod.cpp 2018-03-02 08:11:42.765899430 -0500 @@ -42,6 +42,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/generateOopMap.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/nativeLookup.hpp" #include "runtime/deoptimization.hpp" --- old/src/hotspot/share/ci/ciReplay.cpp 2018-03-02 08:11:44.982599479 -0500 +++ new/src/hotspot/share/ci/ciReplay.cpp 2018-03-02 08:11:44.368059282 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, 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 @@ -33,6 +33,7 @@ #include "memory/allocation.inline.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "utilities/copy.hpp" #include "utilities/macros.hpp" --- old/src/hotspot/share/classfile/classFileParser.cpp 2018-03-02 08:11:46.400258735 -0500 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2018-03-02 08:11:45.692478546 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -46,6 +46,7 @@ #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" #include "oops/annotations.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/fieldStreams.hpp" #include "oops/instanceKlass.hpp" #include "oops/instanceMirrorKlass.hpp" --- old/src/hotspot/share/classfile/classLoader.cpp 2018-03-02 08:11:48.161810667 -0500 +++ new/src/hotspot/share/classfile/classLoader.cpp 2018-03-02 08:11:47.444672644 -0500 @@ -26,7 +26,7 @@ #include "jvm.h" #include "jimage.hpp" #include "classfile/classFileStream.hpp" -#include "classfile/classLoader.hpp" +#include "classfile/classLoader.inline.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderExt.hpp" #include "classfile/javaClasses.hpp" @@ -51,6 +51,7 @@ #include "memory/universe.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/instanceRefKlass.hpp" +#include "oops/method.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" --- old/src/hotspot/share/classfile/classLoader.hpp 2018-03-02 08:11:49.723598900 -0500 +++ new/src/hotspot/share/classfile/classLoader.hpp 2018-03-02 08:11:49.052833628 -0500 @@ -27,7 +27,6 @@ #include "jimage.hpp" #include "runtime/handles.hpp" -#include "runtime/orderAccess.hpp" #include "runtime/perfData.hpp" #include "utilities/exceptions.hpp" #include "utilities/macros.hpp" @@ -49,13 +48,9 @@ private: ClassPathEntry* volatile _next; public: - // Next entry in class path - ClassPathEntry* next() const { return OrderAccess::load_acquire(&_next); } + ClassPathEntry* next() const; virtual ~ClassPathEntry() {} - void set_next(ClassPathEntry* next) { - // may have unlocked readers, so ensure visibility. - OrderAccess::release_store(&_next, next); - } + void set_next(ClassPathEntry* next); virtual bool is_modules_image() const = 0; virtual bool is_jar_file() const = 0; virtual const char* name() const = 0; @@ -396,25 +391,7 @@ static int compute_Object_vtable(); - static ClassPathEntry* classpath_entry(int n) { - assert(n >= 0, "sanity"); - if (n == 0) { - assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds"); - return ClassLoader::_jrt_entry; - } else { - // The java runtime image is always the first entry - // in the FileMapInfo::_classpath_entry_table. Even though - // the _jrt_entry is not included in the _first_append_entry - // linked list, it must be accounted for when comparing the - // class path vs. the shared archive class path. - ClassPathEntry* e = ClassLoader::_first_append_entry; - while (--n >= 1) { - assert(e != NULL, "Not that many classpath entries."); - e = e->next(); - } - return e; - } - } + static ClassPathEntry* classpath_entry(int n); static bool is_in_patch_mod_entries(Symbol* module_name); @@ -423,38 +400,13 @@ // Helper function used by CDS code to get the number of boot classpath // entries during shared classpath setup time. - static int num_boot_classpath_entries() { - assert(DumpSharedSpaces, "Should only be called at CDS dump time"); - assert(has_jrt_entry(), "must have a java runtime image"); - int num_entries = 1; // count the runtime image - ClassPathEntry* e = ClassLoader::_first_append_entry; - while (e != NULL) { - num_entries ++; - e = e->next(); - } - return num_entries; - } + static int num_boot_classpath_entries(); - static ClassPathEntry* get_next_boot_classpath_entry(ClassPathEntry* e) { - if (e == ClassLoader::_jrt_entry) { - return ClassLoader::_first_append_entry; - } else { - return e->next(); - } - } + static ClassPathEntry* get_next_boot_classpath_entry(ClassPathEntry* e); // Helper function used by CDS code to get the number of app classpath // entries during shared classpath setup time. - static int num_app_classpath_entries() { - assert(DumpSharedSpaces, "Should only be called at CDS dump time"); - int num_entries = 0; - ClassPathEntry* e= ClassLoader::_app_classpath_entries; - while (e != NULL) { - num_entries ++; - e = e->next(); - } - return num_entries; - } + static int num_app_classpath_entries(); static void check_shared_classpath(const char *path); static void finalize_shared_paths_misc_info(); --- old/src/hotspot/share/classfile/classLoaderData.inline.hpp 2018-03-02 08:11:51.157059152 -0500 +++ new/src/hotspot/share/classfile/classLoaderData.inline.hpp 2018-03-02 08:11:50.488548324 -0500 @@ -22,6 +22,9 @@ * */ +#ifndef SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP +#define SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP + #include "classfile/classLoaderData.hpp" #include "classfile/javaClasses.hpp" #include "oops/oop.inline.hpp" @@ -76,3 +79,5 @@ assert(count <= _num_array_classes, "Sanity"); Atomic::sub(count, &_num_array_classes); } + +#endif // SHARE_VM_CLASSFILE_CLASSLOADERDATA_INLINE_HPP --- old/src/hotspot/share/classfile/classLoaderExt.cpp 2018-03-02 08:11:52.700034636 -0500 +++ new/src/hotspot/share/classfile/classLoaderExt.cpp 2018-03-02 08:11:52.030084907 -0500 @@ -26,7 +26,7 @@ #include "classfile/classFileParser.hpp" #include "classfile/classFileStream.hpp" #include "classfile/classListParser.hpp" -#include "classfile/classLoader.hpp" +#include "classfile/classLoader.inline.hpp" #include "classfile/classLoaderExt.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/klassFactory.hpp" --- old/src/hotspot/share/classfile/dictionary.cpp 2018-03-02 08:11:54.314482918 -0500 +++ new/src/hotspot/share/classfile/dictionary.cpp 2018-03-02 08:11:53.609905071 -0500 @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "classfile/classLoaderData.inline.hpp" #include "classfile/sharedClassUtil.hpp" -#include "classfile/dictionary.hpp" +#include "classfile/dictionary.inline.hpp" #include "classfile/protectionDomainCache.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/systemDictionaryShared.hpp" --- old/src/hotspot/share/classfile/dictionary.hpp 2018-03-02 08:11:55.916763422 -0500 +++ new/src/hotspot/share/classfile/dictionary.hpp 2018-03-02 08:11:55.219721372 -0500 @@ -29,7 +29,6 @@ #include "classfile/systemDictionary.hpp" #include "oops/instanceKlass.hpp" #include "oops/oop.hpp" -#include "runtime/orderAccess.hpp" #include "utilities/hashtable.hpp" #include "utilities/ostream.hpp" @@ -170,12 +169,8 @@ ProtectionDomainEntry* pd_set() const { return _pd_set; } void set_pd_set(ProtectionDomainEntry* new_head) { _pd_set = new_head; } - ProtectionDomainEntry* pd_set_acquire() const { - return OrderAccess::load_acquire(&_pd_set); - } - void release_set_pd_set(ProtectionDomainEntry* new_head) { - OrderAccess::release_store(&_pd_set, new_head); - } + ProtectionDomainEntry* pd_set_acquire() const; + void release_set_pd_set(ProtectionDomainEntry* new_head); // Tells whether the initiating class' protection domain can access the klass in this entry bool is_valid_protection_domain(Handle protection_domain) { --- old/src/hotspot/share/classfile/javaClasses.cpp 2018-03-02 08:11:57.783651025 -0500 +++ new/src/hotspot/share/classfile/javaClasses.cpp 2018-03-02 08:11:57.175212489 -0500 @@ -42,7 +42,7 @@ #include "oops/instanceKlass.hpp" #include "oops/instanceMirrorKlass.hpp" #include "oops/klass.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" --- old/src/hotspot/share/classfile/systemDictionary.cpp 2018-03-02 08:11:59.707027908 -0500 +++ new/src/hotspot/share/classfile/systemDictionary.cpp 2018-03-02 08:11:59.127002514 -0500 @@ -56,6 +56,7 @@ #include "oops/instanceKlass.hpp" #include "oops/instanceRefKlass.hpp" #include "oops/klass.inline.hpp" +#include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" --- old/src/hotspot/share/classfile/verifier.cpp 2018-03-02 08:12:01.535841558 -0500 +++ new/src/hotspot/share/classfile/verifier.cpp 2018-03-02 08:12:00.896284119 -0500 @@ -38,6 +38,7 @@ #include "logging/logStream.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/oop.inline.hpp" #include "oops/typeArrayOop.hpp" --- old/src/hotspot/share/code/codeCache.cpp 2018-03-02 08:12:03.471565042 -0500 +++ new/src/hotspot/share/code/codeCache.cpp 2018-03-02 08:12:02.877637466 -0500 @@ -36,7 +36,7 @@ #include "memory/allocation.inline.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/objArrayOop.hpp" #include "oops/oop.inline.hpp" #include "oops/verifyOopClosure.hpp" --- old/src/hotspot/share/code/compiledIC.cpp 2018-03-02 08:12:05.068373822 -0500 +++ new/src/hotspot/share/code/compiledIC.cpp 2018-03-02 08:12:04.379521642 -0500 @@ -34,7 +34,7 @@ #include "memory/metadataFactory.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" #include "runtime/icache.hpp" --- old/src/hotspot/share/code/compiledMethod.cpp 2018-03-02 08:12:06.335053367 -0500 +++ new/src/hotspot/share/code/compiledMethod.cpp 2018-03-02 08:12:05.830517990 -0500 @@ -28,8 +28,9 @@ #include "code/scopeDesc.hpp" #include "code/codeCache.hpp" #include "prims/methodHandles.hpp" -#include "interpreter/bytecode.hpp" +#include "interpreter/bytecode.inline.hpp" #include "memory/resourceArea.hpp" +#include "oops/method.inline.hpp" #include "runtime/mutexLocker.hpp" CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments) --- old/src/hotspot/share/code/compiledMethod.hpp 2018-03-02 08:12:07.879542787 -0500 +++ new/src/hotspot/share/code/compiledMethod.hpp 2018-03-02 08:12:07.377520614 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -54,9 +54,9 @@ void set_pc_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _pc[index] = a; } address handler_at(int index) { assert(index >= 0 && index < count(),""); return _handler[index]; } void set_handler_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _handler[index] = a; } - int count() { return OrderAccess::load_acquire(&_count); } + int count(); // increment_count is only called under lock, but there may be concurrent readers. - void increment_count() { OrderAccess::release_store(&_count, _count + 1); } + void increment_count(); public: @@ -290,7 +290,7 @@ // Note: _exception_cache may be read concurrently. We rely on memory_order_consume here. ExceptionCache* exception_cache() const { return _exception_cache; } void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; } - void release_set_exception_cache(ExceptionCache *ec) { OrderAccess::release_store(&_exception_cache, ec); } + void release_set_exception_cache(ExceptionCache *ec); address handler_for_exception_and_pc(Handle exception, address pc); void add_handler_for_exception_and_pc(Handle exception, address pc, address handler); void clean_exception_cache(BoolObjectClosure* is_alive); --- old/src/hotspot/share/code/compiledMethod.inline.hpp 2018-03-02 08:12:09.439601671 -0500 +++ new/src/hotspot/share/code/compiledMethod.inline.hpp 2018-03-02 08:12:08.838440151 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -38,6 +38,9 @@ ; } +inline void CompiledMethod::release_set_exception_cache(ExceptionCache *ec) { + OrderAccess::release_store(&_exception_cache, ec); +} // ----------------------------------------------------------------------------- // CompiledMethod::get_deopt_original_pc @@ -56,4 +59,13 @@ return NULL; } + +// class ExceptionCache methods + +inline int ExceptionCache::count() { return OrderAccess::load_acquire(&_count); } + +// increment_count is only called under lock, but there may be concurrent readers. +inline void ExceptionCache::increment_count() { OrderAccess::release_store(&_count, _count + 1); } + + #endif //SHARE_VM_CODE_COMPILEDMETHOD_INLINE_HPP --- old/src/hotspot/share/code/nmethod.cpp 2018-03-02 08:12:10.951161487 -0500 +++ new/src/hotspot/share/code/nmethod.cpp 2018-03-02 08:12:10.308027674 -0500 @@ -40,6 +40,7 @@ #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/resourceArea.hpp" +#include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/oop.inline.hpp" #include "prims/jvmtiImpl.hpp" --- old/src/hotspot/share/compiler/compileBroker.cpp 2018-03-02 08:12:12.898236139 -0500 +++ new/src/hotspot/share/compiler/compileBroker.cpp 2018-03-02 08:12:12.319193609 -0500 @@ -39,7 +39,7 @@ #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/methodData.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/nativeLookup.hpp" #include "prims/whitebox.hpp" --- old/src/hotspot/share/interpreter/bytecode.cpp 2018-03-02 08:12:14.871261352 -0500 +++ new/src/hotspot/share/interpreter/bytecode.cpp 2018-03-02 08:12:14.196920067 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -23,9 +23,10 @@ */ #include "precompiled.hpp" -#include "interpreter/bytecode.hpp" +#include "interpreter/bytecode.inline.hpp" #include "interpreter/linkResolver.hpp" #include "oops/constantPool.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/fieldType.hpp" #include "runtime/handles.inline.hpp" --- old/src/hotspot/share/interpreter/bytecode.hpp 2018-03-02 08:12:16.821237681 -0500 +++ new/src/hotspot/share/interpreter/bytecode.hpp 2018-03-02 08:12:16.140508051 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -229,7 +229,7 @@ is_invokedynamic() || is_invokehandle(); } - bool has_appendix() { return cpcache_entry()->has_appendix(); } + bool has_appendix(); int size_of_parameters() const; --- old/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2018-03-02 08:12:18.419603862 -0500 +++ new/src/hotspot/share/interpreter/bytecodeInterpreter.cpp 2018-03-02 08:12:17.726704181 -0500 @@ -33,6 +33,7 @@ #include "interpreter/interpreterRuntime.hpp" #include "logging/log.hpp" #include "memory/resourceArea.hpp" +#include "oops/method.inline.hpp" #include "oops/methodCounters.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" --- old/src/hotspot/share/interpreter/bytecodeTracer.cpp 2018-03-02 08:12:19.943765509 -0500 +++ new/src/hotspot/share/interpreter/bytecodeTracer.cpp 2018-03-02 08:12:19.329256823 -0500 @@ -30,6 +30,7 @@ #include "interpreter/interpreter.hpp" #include "interpreter/interpreterRuntime.hpp" #include "memory/resourceArea.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/methodData.hpp" #include "oops/method.hpp" #include "runtime/mutexLocker.hpp" --- old/src/hotspot/share/interpreter/interpreterRuntime.cpp 2018-03-02 08:12:21.331155015 -0500 +++ new/src/hotspot/share/interpreter/interpreterRuntime.cpp 2018-03-02 08:12:20.701710578 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -39,6 +39,7 @@ #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" #include "oops/constantPool.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/methodData.hpp" #include "oops/objArrayKlass.hpp" --- old/src/hotspot/share/interpreter/linkResolver.cpp 2018-03-02 08:12:22.758908850 -0500 +++ new/src/hotspot/share/interpreter/linkResolver.cpp 2018-03-02 08:12:22.153210179 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -39,6 +39,7 @@ #include "logging/logStream.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/method.hpp" #include "oops/objArrayKlass.hpp" --- old/src/hotspot/share/jvmci/compilerRuntime.cpp 2018-03-02 08:12:24.337472498 -0500 +++ new/src/hotspot/share/jvmci/compilerRuntime.cpp 2018-03-02 08:12:23.627809801 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -26,6 +26,7 @@ #include "classfile/symbolTable.hpp" #include "interpreter/linkResolver.hpp" #include "jvmci/compilerRuntime.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" --- old/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2018-03-02 08:12:26.170546768 -0500 +++ new/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2018-03-02 08:12:25.536304614 -0500 @@ -29,8 +29,10 @@ #include "interpreter/linkResolver.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/generateOopMap.hpp" #include "oops/fieldStreams.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/typeArrayOop.inline.hpp" --- old/src/hotspot/share/jvmci/jvmciEnv.cpp 2018-03-02 08:12:27.739916672 -0500 +++ new/src/hotspot/share/jvmci/jvmciEnv.cpp 2018-03-02 08:12:27.330382221 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2018, 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 @@ -38,6 +38,9 @@ #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" +#include "oops/constantPool.inline.hpp" +#include "oops/cpCache.inline.hpp" +#include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/memory/filemap.cpp 2018-03-02 08:12:29.156018687 -0500 +++ new/src/hotspot/share/memory/filemap.cpp 2018-03-02 08:12:28.441745852 -0500 @@ -24,7 +24,7 @@ #include "precompiled.hpp" #include "jvm.h" -#include "classfile/classLoader.hpp" +#include "classfile/classLoader.inline.hpp" #include "classfile/compactHashtable.inline.hpp" #include "classfile/sharedClassUtil.hpp" #include "classfile/stringTable.hpp" --- old/src/hotspot/share/oops/array.hpp 2018-03-02 08:12:30.447572722 -0500 +++ new/src/hotspot/share/oops/array.hpp 2018-03-02 08:12:30.003124057 -0500 @@ -27,7 +27,6 @@ #include "memory/allocation.hpp" #include "memory/metaspace.hpp" -#include "runtime/orderAccess.hpp" #include "utilities/align.hpp" // Array for metadata allocation @@ -122,8 +121,8 @@ T* adr_at(const int i) { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return &_data[i]; } int find(const T& x) { return index_of(x); } - T at_acquire(const int which) { return OrderAccess::load_acquire(adr_at(which)); } - void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); } + T at_acquire(const int which); + void release_at_put(int which, T contents); static int size(int length) { size_t bytes = align_up(byte_sizeof(length), BytesPerWord); --- old/src/hotspot/share/oops/constantPool.cpp 2018-03-02 08:12:32.236960648 -0500 +++ new/src/hotspot/share/oops/constantPool.cpp 2018-03-02 08:12:31.708138889 -0500 @@ -38,7 +38,9 @@ #include "memory/metaspaceShared.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" -#include "oops/constantPool.hpp" +#include "oops/array.inline.hpp" +#include "oops/constantPool.inline.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/instanceKlass.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" @@ -51,6 +53,10 @@ #include "runtime/vframe.hpp" #include "utilities/copy.hpp" +constantTag ConstantPool::tag_at(int which) const { return (constantTag)tags()->at_acquire(which); } + +void ConstantPool::release_tag_at_put(int which, jbyte t) { tags()->release_at_put(which, t); } + ConstantPool* ConstantPool::allocate(ClassLoaderData* loader_data, int length, TRAPS) { Array* tags = MetadataFactory::new_array(loader_data, length, 0, CHECK_NULL); int size = ConstantPool::size(length); --- old/src/hotspot/share/oops/constantPool.hpp 2018-03-02 08:12:34.032547754 -0500 +++ new/src/hotspot/share/oops/constantPool.hpp 2018-03-02 08:12:33.535755571 -0500 @@ -131,7 +131,7 @@ void set_tags(Array* tags) { _tags = tags; } void tag_at_put(int which, jbyte t) { tags()->at_put(which, t); } - void release_tag_at_put(int which, jbyte t) { tags()->release_at_put(which, t); } + void release_tag_at_put(int which, jbyte t); u1* tag_addr_at(int which) const { return tags()->adr_at(which); } @@ -143,14 +143,7 @@ private: intptr_t* base() const { return (intptr_t*) (((char*) this) + sizeof(ConstantPool)); } - CPSlot slot_at(int which) const { - assert(is_within_bounds(which), "index out of bounds"); - assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool"); - // Uses volatile because the klass slot changes without a lock. - intptr_t adr = OrderAccess::load_acquire(obj_at_addr(which)); - assert(adr != 0 || which == 0, "cp entry for klass should not be zero"); - return CPSlot(adr); - } + CPSlot slot_at(int which) const; void slot_at_put(int which, CPSlot s) const { assert(is_within_bounds(which), "index out of bounds"); @@ -380,7 +373,7 @@ // Tag query - constantTag tag_at(int which) const { return (constantTag)tags()->at_acquire(which); } + constantTag tag_at(int which) const; // Fetching constants @@ -409,16 +402,7 @@ return klass_slot_at(which).name_index(); } - Klass* resolved_klass_at(int which) const { // Used by Compiler - guarantee(tag_at(which).is_klass(), "Corrupted constant pool"); - // Must do an acquire here in case another thread resolved the klass - // behind our back, lest we later load stale values thru the oop. - CPKlassSlot kslot = klass_slot_at(which); - assert(tag_at(kslot.name_index()).is_symbol(), "sanity"); - - Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index()); - return OrderAccess::load_acquire(adr); - } + Klass* resolved_klass_at(int which) const; // Used by Compiler // RedefineClasses() API support: Symbol* klass_at_noresolve(int which) { return klass_name_at(which); } @@ -475,23 +459,11 @@ // Method oops internally created for method handles may also // use pseudo-strings to link themselves to related metaobjects. - bool is_pseudo_string_at(int which) { - assert(tag_at(which).is_string(), "Corrupted constant pool"); - return slot_at(which).is_pseudo_string(); - } + bool is_pseudo_string_at(int which); - oop pseudo_string_at(int which, int obj_index) { - assert(is_pseudo_string_at(which), "must be a pseudo-string"); - oop s = resolved_references()->obj_at(obj_index); - return s; - } + oop pseudo_string_at(int which, int obj_index); - oop pseudo_string_at(int which) { - assert(is_pseudo_string_at(which), "must be a pseudo-string"); - int obj_index = cp_to_object_index(which); - oop s = resolved_references()->obj_at(obj_index); - return s; - } + oop pseudo_string_at(int which); void pseudo_string_at_put(int which, int obj_index, oop x) { assert(tag_at(which).is_string(), "Corrupted constant pool"); --- old/src/hotspot/share/oops/cpCache.cpp 2018-03-02 08:12:35.526743020 -0500 +++ new/src/hotspot/share/oops/cpCache.cpp 2018-03-02 08:12:34.972487200 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, 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 @@ -34,7 +34,8 @@ #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" #include "oops/access.inline.hpp" -#include "oops/cpCache.hpp" +#include "oops/constantPool.inline.hpp" +#include "oops/cpCache.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" --- old/src/hotspot/share/oops/cpCache.hpp 2018-03-02 08:12:37.006019896 -0500 +++ new/src/hotspot/share/oops/cpCache.hpp 2018-03-02 08:12:36.387888987 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, 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 @@ -29,7 +29,6 @@ #include "memory/allocation.hpp" #include "oops/array.hpp" #include "oops/oopHandle.hpp" -#include "runtime/orderAccess.hpp" #include "utilities/align.hpp" #include "utilities/constantTag.hpp" @@ -328,42 +327,36 @@ } // Has this bytecode been resolved? Only valid for invokes and get/put field/static. - bool is_resolved(Bytecodes::Code code) const { - switch (bytecode_number(code)) { - case 1: return (bytecode_1() == code); - case 2: return (bytecode_2() == code); - } - return false; // default: not resolved - } + bool is_resolved(Bytecodes::Code code) const; // Accessors int indices() const { return _indices; } - int indices_ord() const { return OrderAccess::load_acquire(&_indices); } + int indices_ord() const; int constant_pool_index() const { return (indices() & cp_index_mask); } - Bytecodes::Code bytecode_1() const { return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask); } - Bytecodes::Code bytecode_2() const { return Bytecodes::cast((indices_ord() >> bytecode_2_shift) & bytecode_2_mask); } - Metadata* f1_ord() const { return (Metadata *)OrderAccess::load_acquire(&_f1); } - Method* f1_as_method() const { Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), ""); return (Method*)f1; } - Klass* f1_as_klass() const { Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_klass(), ""); return (Klass*)f1; } + Bytecodes::Code bytecode_1() const; + Bytecodes::Code bytecode_2() const; + Metadata* f1_ord() const; + Method* f1_as_method() const; + Klass* f1_as_klass() const; // Use the accessor f1() to acquire _f1's value. This is needed for // example in BytecodeInterpreter::run(), where is_f1_null() is // called to check if an invokedynamic call is resolved. This load // of _f1 must be ordered with the loads performed by // cache->main_entry_index(). - bool is_f1_null() const { Metadata* f1 = f1_ord(); return f1 == NULL; } // classifies a CPC entry as unbound + bool is_f1_null() const; // classifies a CPC entry as unbound int f2_as_index() const { assert(!is_vfinal(), ""); return (int) _f2; } Method* f2_as_vfinal_method() const { assert(is_vfinal(), ""); return (Method*)_f2; } - Method* f2_as_interface_method() const { assert(bytecode_1() == Bytecodes::_invokeinterface, ""); return (Method*)_f2; } - intx flags_ord() const { return (intx)OrderAccess::load_acquire(&_flags); } + Method* f2_as_interface_method() const; + intx flags_ord() const; int field_index() const { assert(is_field_entry(), ""); return (_flags & field_index_mask); } int parameter_size() const { assert(is_method_entry(), ""); return (_flags & parameter_size_mask); } bool is_volatile() const { return (_flags & (1 << is_volatile_shift)) != 0; } bool is_final() const { return (_flags & (1 << is_final_shift)) != 0; } bool is_forced_virtual() const { return (_flags & (1 << is_forced_virtual_shift)) != 0; } bool is_vfinal() const { return (_flags & (1 << is_vfinal_shift)) != 0; } - bool indy_resolution_failed() const { intx flags = flags_ord(); return (flags & (1 << indy_resolution_failed_shift)) != 0; } - bool has_appendix() const { return (!is_f1_null()) && (_flags & (1 << has_appendix_shift)) != 0; } - bool has_method_type() const { return (!is_f1_null()) && (_flags & (1 << has_method_type_shift)) != 0; } + bool indy_resolution_failed() const; + bool has_appendix() const; + bool has_method_type() const; bool is_method_entry() const { return (_flags & (1 << is_field_entry_shift)) == 0; } bool is_field_entry() const { return (_flags & (1 << is_field_entry_shift)) != 0; } bool is_long() const { return flag_state() == ltos; } @@ -440,16 +433,7 @@ ConstantPoolCache(int length, const intStack& inverse_index_map, const intStack& invokedynamic_inverse_index_map, - const intStack& invokedynamic_references_map) : - _length(length), - _constant_pool(NULL) { - CDS_JAVA_HEAP_ONLY(_archived_references = 0;) - initialize(inverse_index_map, invokedynamic_inverse_index_map, - invokedynamic_references_map); - for (int i = 0; i < length; i++) { - assert(entry_at(i)->is_f1_null(), "Failed to clear?"); - } - } + const intStack& invokedynamic_references_map); // Initialization void initialize(const intArray& inverse_index_map, --- old/src/hotspot/share/oops/method.cpp 2018-03-02 08:12:38.349270310 -0500 +++ new/src/hotspot/share/oops/method.cpp 2018-03-02 08:12:37.741823525 -0500 @@ -42,7 +42,7 @@ #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" #include "oops/constMethod.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/oops/method.hpp 2018-03-02 08:12:39.903510169 -0500 +++ new/src/hotspot/share/oops/method.hpp 2018-03-02 08:12:39.204950725 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -136,9 +136,9 @@ static address make_adapters(const methodHandle& mh, TRAPS); - address from_compiled_entry() const { return OrderAccess::load_acquire(&_from_compiled_entry); } + address from_compiled_entry() const; address from_compiled_entry_no_trampoline() const; - address from_interpreted_entry() const{ return OrderAccess::load_acquire(&_from_interpreted_entry); } + address from_interpreted_entry() const; // access flag AccessFlags access_flags() const { return _access_flags; } @@ -333,12 +333,7 @@ return _method_data; } - void set_method_data(MethodData* data) { - // The store into method must be released. On platforms without - // total store order (TSO) the reference may become visible before - // the initialization of data otherwise. - OrderAccess::release_store(&_method_data, data); - } + void set_method_data(MethodData* data); MethodCounters* method_counters() const { return _method_counters; @@ -449,7 +444,7 @@ // nmethod/verified compiler entry address verified_code_entry(); bool check_code() const; // Not inline to avoid circular ref - CompiledMethod* volatile code() const { assert( check_code(), "" ); return OrderAccess::load_acquire(&_code); } + CompiledMethod* volatile code() const; void clear_code(bool acquire_lock = true); // Clear out any compiled code static void set_code(const methodHandle& mh, CompiledMethod* code); void set_adapter_entry(AdapterHandlerEntry* adapter) { @@ -662,7 +657,7 @@ // compiled code support // NOTE: code() is inherently racy as deopt can be clearing code // simultaneously. Use with caution. - bool has_compiled_code() const { return code() != NULL; } + bool has_compiled_code() const; #ifdef TIERED bool has_aot_code() const { return aot_code() != NULL; } --- old/src/hotspot/share/oops/methodData.cpp 2018-03-02 08:12:41.428346343 -0500 +++ new/src/hotspot/share/oops/methodData.cpp 2018-03-02 08:12:40.720387656 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, 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 @@ -31,7 +31,7 @@ #include "memory/heapInspection.hpp" #include "memory/metaspaceClosure.hpp" #include "memory/resourceArea.hpp" -#include "oops/methodData.hpp" +#include "oops/methodData.inline.hpp" #include "prims/jvmtiRedefineClasses.hpp" #include "runtime/arguments.hpp" #include "runtime/compilationPolicy.hpp" --- old/src/hotspot/share/oops/methodData.hpp 2018-03-02 08:12:42.935185060 -0500 +++ new/src/hotspot/share/oops/methodData.hpp 2018-03-02 08:12:42.251918908 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, 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 @@ -29,7 +29,6 @@ #include "memory/universe.hpp" #include "oops/method.hpp" #include "oops/oop.hpp" -#include "runtime/orderAccess.hpp" #include "utilities/align.hpp" #if INCLUDE_JVMCI #include "jvmci/jvmci_globals.hpp" @@ -201,9 +200,7 @@ void set_cell_at(int index, intptr_t value) { _cells[index] = value; } - void release_set_cell_at(int index, intptr_t value) { - OrderAccess::release_store(&_cells[index], value); - } + void release_set_cell_at(int index, intptr_t value); intptr_t cell_at(int index) const { return _cells[index]; } @@ -325,10 +322,7 @@ assert(0 <= index && index < cell_count(), "oob"); data()->set_cell_at(index, value); } - void release_set_intptr_at(int index, intptr_t value) { - assert(0 <= index && index < cell_count(), "oob"); - data()->release_set_cell_at(index, value); - } + void release_set_intptr_at(int index, intptr_t value); intptr_t intptr_at(int index) const { assert(0 <= index && index < cell_count(), "oob"); return data()->cell_at(index); @@ -336,18 +330,14 @@ void set_uint_at(int index, uint value) { set_intptr_at(index, (intptr_t) value); } - void release_set_uint_at(int index, uint value) { - release_set_intptr_at(index, (intptr_t) value); - } + void release_set_uint_at(int index, uint value); uint uint_at(int index) const { return (uint)intptr_at(index); } void set_int_at(int index, int value) { set_intptr_at(index, (intptr_t) value); } - void release_set_int_at(int index, int value) { - release_set_intptr_at(index, (intptr_t) value); - } + void release_set_int_at(int index, int value); int int_at(int index) const { return (int)intptr_at(index); } @@ -1603,12 +1593,7 @@ assert((uint)row < row_limit(), "oob"); set_int_at(bci0_offset + row * ret_row_cell_count, bci); } - void release_set_bci(uint row, int bci) { - assert((uint)row < row_limit(), "oob"); - // 'release' when setting the bci acts as a valid flag for other - // threads wrt bci_count and bci_displacement. - release_set_int_at(bci0_offset + row * ret_row_cell_count, bci); - } + void release_set_bci(uint row, int bci); void set_bci_count(uint row, uint count) { assert((uint)row < row_limit(), "oob"); set_uint_at(count0_offset + row * ret_row_cell_count, count); --- old/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-03-02 08:12:44.933216787 -0500 +++ new/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-03-02 08:12:44.242664354 -0500 @@ -32,6 +32,7 @@ #include "memory/resourceArea.hpp" #include "oops/access.inline.hpp" #include "oops/arrayOop.inline.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/instanceMirrorKlass.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" --- old/src/hotspot/share/prims/methodComparator.cpp 2018-03-02 08:12:47.052846520 -0500 +++ new/src/hotspot/share/prims/methodComparator.cpp 2018-03-02 08:12:46.345759294 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, 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 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "oops/constantPool.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" #include "prims/methodComparator.hpp" --- old/src/hotspot/share/prims/whitebox.cpp 2018-03-02 08:12:48.860972579 -0500 +++ new/src/hotspot/share/prims/whitebox.cpp 2018-03-02 08:12:48.281973386 -0500 @@ -40,7 +40,8 @@ #include "memory/universe.hpp" #include "memory/oopFactory.hpp" #include "oops/array.hpp" -#include "oops/constantPool.hpp" +#include "oops/constantPool.inline.hpp" +#include "oops/method.inline.hpp" #include "oops/objArrayKlass.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp" --- old/src/hotspot/share/runtime/compilationPolicy.cpp 2018-03-02 08:12:50.795228540 -0500 +++ new/src/hotspot/share/runtime/compilationPolicy.cpp 2018-03-02 08:12:50.156267609 -0500 @@ -30,7 +30,7 @@ #include "interpreter/interpreter.hpp" #include "memory/resourceArea.hpp" #include "oops/methodData.hpp" -#include "oops/method.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/nativeLookup.hpp" #include "runtime/advancedThresholdPolicy.hpp" --- old/src/hotspot/share/runtime/javaCalls.cpp 2018-03-02 08:12:52.425029243 -0500 +++ new/src/hotspot/share/runtime/javaCalls.cpp 2018-03-02 08:12:51.843842025 -0500 @@ -30,6 +30,7 @@ #include "interpreter/interpreter.hpp" #include "interpreter/linkResolver.hpp" #include "memory/universe.inline.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "prims/jniCheck.hpp" #include "runtime/compilationPolicy.hpp" --- old/src/hotspot/share/runtime/rframe.cpp 2018-03-02 08:12:54.444173412 -0500 +++ new/src/hotspot/share/runtime/rframe.cpp 2018-03-02 08:12:53.770637322 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "code/codeCache.hpp" #include "interpreter/interpreter.hpp" +#include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" #include "oops/symbol.hpp" #include "runtime/frame.inline.hpp" --- old/src/hotspot/share/runtime/sharedRuntime.cpp 2018-03-02 08:12:55.971188280 -0500 +++ new/src/hotspot/share/runtime/sharedRuntime.cpp 2018-03-02 08:12:55.309915203 -0500 @@ -43,6 +43,7 @@ #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" #include "oops/klass.hpp" +#include "oops/method.inline.hpp" #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/forte.hpp" --- old/src/hotspot/share/runtime/simpleThresholdPolicy.hpp 2018-03-02 08:12:57.436776216 -0500 +++ new/src/hotspot/share/runtime/simpleThresholdPolicy.hpp 2018-03-02 08:12:56.770791548 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2018, 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 @@ -82,13 +82,7 @@ template static inline bool loop_predicate_helper(int i, int b, double scale, Method* method); // Get a compilation level for a given method. - static CompLevel comp_level(Method* method) { - CompiledMethod *nm = method->code(); - if (nm != NULL && nm->is_in_use()) { - return (CompLevel)nm->comp_level(); - } - return CompLevel_none; - } + static CompLevel comp_level(Method* method); virtual void method_invocation_event(const methodHandle& method, const methodHandle& inlinee, CompLevel level, CompiledMethod* nm, JavaThread* thread); virtual void method_back_branch_event(const methodHandle& method, const methodHandle& inlinee, --- old/src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp 2018-03-02 08:12:58.903604780 -0500 +++ new/src/hotspot/share/runtime/simpleThresholdPolicy.inline.hpp 2018-03-02 08:12:58.290882326 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, 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 @@ -26,6 +26,7 @@ #define SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP #include "compiler/compilerOracle.hpp" +#include "oops/method.inline.hpp" #ifdef TIERED @@ -94,6 +95,14 @@ return false; } +inline CompLevel SimpleThresholdPolicy::comp_level(Method* method) { + CompiledMethod *nm = method->code(); + if (nm != NULL && nm->is_in_use()) { + return (CompLevel)nm->comp_level(); + } + return CompLevel_none; +} + #endif // TIERED #endif // SHARE_VM_RUNTIME_SIMPLETHRESHOLDPOLICY_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/classfile/classLoader.inline.hpp 2018-03-02 08:12:59.790692317 -0500 @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2018, 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_CLASSFILE_CLASSLOADER_INLINE_HPP +#define SHARE_VM_CLASSFILE_CLASSLOADER_INLINE_HPP + +#include "classfile/classLoader.hpp" +#include "runtime/orderAccess.inline.hpp" + +// Next entry in class path +inline ClassPathEntry* ClassPathEntry::next() const { return OrderAccess::load_acquire(&_next); } + +inline void ClassPathEntry::set_next(ClassPathEntry* next) { + // may have unlocked readers, so ensure visibility. + OrderAccess::release_store(&_next, next); +} + +inline ClassPathEntry* ClassLoader::classpath_entry(int n) { + assert(n >= 0, "sanity"); + if (n == 0) { + assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds"); + return ClassLoader::_jrt_entry; + } else { + // The java runtime image is always the first entry + // in the FileMapInfo::_classpath_entry_table. Even though + // the _jrt_entry is not included in the _first_append_entry + // linked list, it must be accounted for when comparing the + // class path vs. the shared archive class path. + ClassPathEntry* e = ClassLoader::_first_append_entry; + while (--n >= 1) { + assert(e != NULL, "Not that many classpath entries."); + e = e->next(); + } + return e; + } +} + +#if INCLUDE_CDS + +// Helper function used by CDS code to get the number of boot classpath +// entries during shared classpath setup time. + +inline int ClassLoader::num_boot_classpath_entries() { + assert(DumpSharedSpaces, "Should only be called at CDS dump time"); + assert(has_jrt_entry(), "must have a java runtime image"); + int num_entries = 1; // count the runtime image + ClassPathEntry* e = ClassLoader::_first_append_entry; + while (e != NULL) { + num_entries ++; + e = e->next(); + } + return num_entries; +} + +inline ClassPathEntry* ClassLoader::get_next_boot_classpath_entry(ClassPathEntry* e) { + if (e == ClassLoader::_jrt_entry) { + return ClassLoader::_first_append_entry; + } else { + return e->next(); + } +} + +// Helper function used by CDS code to get the number of app classpath +// entries during shared classpath setup time. +inline int ClassLoader::num_app_classpath_entries() { + assert(DumpSharedSpaces, "Should only be called at CDS dump time"); + int num_entries = 0; + ClassPathEntry* e= ClassLoader::_app_classpath_entries; + while (e != NULL) { + num_entries ++; + e = e->next(); + } + return num_entries; +} + +#endif // INCLUDE_CDS + +#endif // SHARE_VM_CLASSFILE_CLASSLOADER_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/classfile/dictionary.inline.hpp 2018-03-02 08:13:01.408931954 -0500 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2018, 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_CLASSFILE_DICTIONARY_INLINE_HPP +#define SHARE_VM_CLASSFILE_DICTIONARY_INLINE_HPP + +#include "classfile/dictionary.hpp" +#include "runtime/orderAccess.inline.hpp" + +inline ProtectionDomainEntry* DictionaryEntry::pd_set_acquire() const { + return OrderAccess::load_acquire(&_pd_set); +} + +inline void DictionaryEntry::release_set_pd_set(ProtectionDomainEntry* new_head) { + OrderAccess::release_store(&_pd_set, new_head); +} + +#endif // SHARE_VM_CLASSFILE_DICTIONARY_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/interpreter/bytecode.inline.hpp 2018-03-02 08:13:03.019963960 -0500 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018, 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_INTERPRETER_BYTECODE_INLINE_HPP +#define SHARE_VM_INTERPRETER_BYTECODE_INLINE_HPP + +#include "interpreter/bytecode.hpp" +#include "oops/cpCache.inline.hpp" + +inline bool Bytecode_invoke::has_appendix() { return cpcache_entry()->has_appendix(); } + +#endif // SHARE_VM_INTERPRETER_BYTECODE_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/oops/array.inline.hpp 2018-03-02 08:13:04.306456156 -0500 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018, 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_OOPS_ARRAY_INLINE_HPP +#define SHARE_VM_OOPS_ARRAY_INLINE_HPP + +#include "oops/array.hpp" +#include "runtime/orderAccess.inline.hpp" + +template +inline T Array::at_acquire(const int which) { return OrderAccess::load_acquire(adr_at(which)); } + +template +inline void Array::release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); } + +#endif // SHARE_VM_OOPS_ARRAY_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/oops/constantPool.inline.hpp 2018-03-02 08:13:05.852475265 -0500 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018, 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_OOPS_CONSTANTPOOL_INLINE_HPP +#define SHARE_VM_OOPS_CONSTANTPOOL_INLINE_HPP + +#include "oops/constantPool.hpp" +#include "runtime/orderAccess.inline.hpp" + +inline CPSlot ConstantPool::slot_at(int which) const { + assert(is_within_bounds(which), "index out of bounds"); + assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool"); + // Uses volatile because the klass slot changes without a lock. + intptr_t adr = OrderAccess::load_acquire(obj_at_addr(which)); + assert(adr != 0 || which == 0, "cp entry for klass should not be zero"); + return CPSlot(adr); +} + +inline Klass* ConstantPool::resolved_klass_at(int which) const { // Used by Compiler + guarantee(tag_at(which).is_klass(), "Corrupted constant pool"); + // Must do an acquire here in case another thread resolved the klass + // behind our back, lest we later load stale values thru the oop. + CPKlassSlot kslot = klass_slot_at(which); + assert(tag_at(kslot.name_index()).is_symbol(), "sanity"); + + Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index()); + return OrderAccess::load_acquire(adr); +} + +inline bool ConstantPool::is_pseudo_string_at(int which) { + assert(tag_at(which).is_string(), "Corrupted constant pool"); + return slot_at(which).is_pseudo_string(); +} + +inline oop ConstantPool::pseudo_string_at(int which, int obj_index) { + assert(is_pseudo_string_at(which), "must be a pseudo-string"); + oop s = resolved_references()->obj_at(obj_index); + return s; +} + +inline oop ConstantPool::pseudo_string_at(int which) { + assert(is_pseudo_string_at(which), "must be a pseudo-string"); + int obj_index = cp_to_object_index(which); + oop s = resolved_references()->obj_at(obj_index); + return s; +} + +#endif // SHARE_VM_OOPS_CONSTANTPOOL_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/oops/cpCache.inline.hpp 2018-03-02 08:13:07.521474474 -0500 @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2018, 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_OOPS_CPCACHEOOP_INLINE_HPP +#define SHARE_VM_OOPS_CPCACHEOOP_INLINE_HPP + +#include "oops/cpCache.hpp" +#include "runtime/orderAccess.inline.hpp" + +inline int ConstantPoolCacheEntry::indices_ord() const { return OrderAccess::load_acquire(&_indices); } + +inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_1() const { + return Bytecodes::cast((indices_ord() >> bytecode_1_shift) & bytecode_1_mask); +} + +inline Bytecodes::Code ConstantPoolCacheEntry::bytecode_2() const { + return Bytecodes::cast((indices_ord() >> bytecode_2_shift) & bytecode_2_mask); +} + +// Has this bytecode been resolved? Only valid for invokes and get/put field/static. +inline bool ConstantPoolCacheEntry::is_resolved(Bytecodes::Code code) const { + switch (bytecode_number(code)) { + case 1: return (bytecode_1() == code); + case 2: return (bytecode_2() == code); + } + return false; // default: not resolved +} + +inline Method* ConstantPoolCacheEntry::f2_as_interface_method() const { + assert(bytecode_1() == Bytecodes::_invokeinterface, ""); + return (Method*)_f2; +} + +inline Metadata* ConstantPoolCacheEntry::f1_ord() const { return (Metadata *)OrderAccess::load_acquire(&_f1); } + +inline Method* ConstantPoolCacheEntry::f1_as_method() const { + Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_method(), ""); + return (Method*)f1; +} + +inline Klass* ConstantPoolCacheEntry::f1_as_klass() const { + Metadata* f1 = f1_ord(); assert(f1 == NULL || f1->is_klass(), ""); + return (Klass*)f1; +} + +inline bool ConstantPoolCacheEntry::is_f1_null() const { Metadata* f1 = f1_ord(); return f1 == NULL; } + +inline bool ConstantPoolCacheEntry::has_appendix() const { + return (!is_f1_null()) && (_flags & (1 << has_appendix_shift)) != 0; +} + +inline bool ConstantPoolCacheEntry::has_method_type() const { + return (!is_f1_null()) && (_flags & (1 << has_method_type_shift)) != 0; +} + +inline intx ConstantPoolCacheEntry::flags_ord() const { return (intx)OrderAccess::load_acquire(&_flags); } + +inline bool ConstantPoolCacheEntry::indy_resolution_failed() const { + intx flags = flags_ord(); + return (flags & (1 << indy_resolution_failed_shift)) != 0; +} + +// Constructor +inline ConstantPoolCache::ConstantPoolCache(int length, + const intStack& inverse_index_map, + const intStack& invokedynamic_inverse_index_map, + const intStack& invokedynamic_references_map) : + _length(length), + _constant_pool(NULL) { + CDS_JAVA_HEAP_ONLY(_archived_references = 0;) + initialize(inverse_index_map, invokedynamic_inverse_index_map, + invokedynamic_references_map); + for (int i = 0; i < length; i++) { + assert(entry_at(i)->is_f1_null(), "Failed to clear?"); + } +} + +#endif // SHARE_VM_OOPS_CPCACHEOOP_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/oops/method.inline.hpp 2018-03-02 08:13:09.185237008 -0500 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018, 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_OOPS_METHOD_INLINE_HPP +#define SHARE_VM_OOPS_METHOD_INLINE_HPP + +#include "oops/method.hpp" +#include "runtime/orderAccess.hpp" + +inline address Method::from_compiled_entry() const { + return OrderAccess::load_acquire(&_from_compiled_entry); +} + +inline address Method::from_interpreted_entry() const { + return OrderAccess::load_acquire(&_from_interpreted_entry); +} + +inline void Method::set_method_data(MethodData* data) { + // The store into method must be released. On platforms without + // total store order (TSO) the reference may become visible before + // the initialization of data otherwise. + OrderAccess::release_store(&_method_data, data); +} + +inline CompiledMethod* volatile Method::code() const { + assert( check_code(), "" ); + return OrderAccess::load_acquire(&_code); +} + +inline bool Method::has_compiled_code() const { return code() != NULL; } + +#endif // SHARE_VM_OOPS_METHOD_INLINE_HPP --- /dev/null 2018-02-03 04:43:52.625000053 -0500 +++ new/src/hotspot/share/oops/methodData.inline.hpp 2018-03-02 08:13:10.705670096 -0500 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2018, 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_OOPS_METHODDATA_INLINE_HPP +#define SHARE_VM_OOPS_METHODDATA_INLINE_HPP + +#include "oops/methodData.hpp" +#include "runtime/orderAccess.inline.hpp" + +inline void DataLayout::release_set_cell_at(int index, intptr_t value) { + OrderAccess::release_store(&_cells[index], value); +} + +inline void ProfileData::release_set_intptr_at(int index, intptr_t value) { + assert(0 <= index && index < cell_count(), "oob"); + data()->release_set_cell_at(index, value); +} + +inline void ProfileData::release_set_uint_at(int index, uint value) { + release_set_intptr_at(index, (intptr_t) value); +} + +inline void ProfileData::release_set_int_at(int index, int value) { + release_set_intptr_at(index, (intptr_t) value); +} + +inline void RetData::release_set_bci(uint row, int bci) { + assert((uint)row < row_limit(), "oob"); + // 'release' when setting the bci acts as a valid flag for other + // threads wrt bci_count and bci_displacement. + release_set_int_at(bci0_offset + row * ret_row_cell_count, bci); +} + +#endif // SHARE_VM_OOPS_METHODDATA_INLINE_HPP