8251560: Remove excessive header file inclusion from systemDictionary.hpp and others

Reviewed-by: coleenp
This commit is contained in:
Ioi Lam 2020-08-31 08:05:08 -07:00
parent a616bc979b
commit dd89c92c50
35 changed files with 187 additions and 141 deletions

View file

@ -44,6 +44,7 @@
#include "runtime/deoptimization.hpp" #include "runtime/deoptimization.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
#include "runtime/java.hpp"
#include "runtime/safepointVerifiers.hpp" #include "runtime/safepointVerifiers.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#include "runtime/vmOperations.hpp" #include "runtime/vmOperations.hpp"

View file

@ -32,6 +32,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/reflectionUtils.hpp"
// ciField // ciField
// //

View file

@ -39,6 +39,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "utilities/copy.hpp" #include "utilities/copy.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/utf8.hpp" #include "utilities/utf8.hpp"

View file

@ -28,6 +28,7 @@
#include "classfile/classFileStream.hpp" #include "classfile/classFileStream.hpp"
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/defaultMethods.hpp" #include "classfile/defaultMethods.hpp"
#include "classfile/dictionary.hpp" #include "classfile/dictionary.hpp"
#include "classfile/fieldLayoutBuilder.hpp" #include "classfile/fieldLayoutBuilder.hpp"

View file

@ -36,6 +36,7 @@
#include "memory/metaspaceShared.hpp" #include "memory/metaspaceShared.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "utilities/defaultStream.hpp" #include "utilities/defaultStream.hpp"
#include "utilities/hashtable.inline.hpp" #include "utilities/hashtable.inline.hpp"

View file

@ -0,0 +1,99 @@
/*
* Copyright (c) 2020, 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_CLASSFILE_CLASSLOADINFO_HPP
#define SHARE_CLASSFILE_CLASSLOADINFO_HPP
#include "runtime/handles.hpp"
class InstanceKlass;
template <typename T> class GrowableArray;
class ClassInstanceInfo : public StackObj {
private:
InstanceKlass* _dynamic_nest_host;
Handle _class_data;
public:
ClassInstanceInfo() {
_dynamic_nest_host = NULL;
_class_data = Handle();
}
ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
_dynamic_nest_host = dynamic_nest_host;
_class_data = class_data;
}
InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
Handle class_data() const { return _class_data; }
friend class ClassLoadInfo;
};
class ClassLoadInfo : public StackObj {
private:
Handle _protection_domain;
const InstanceKlass* _unsafe_anonymous_host;
GrowableArray<Handle>* _cp_patches;
ClassInstanceInfo _class_hidden_info;
bool _is_hidden;
bool _is_strong_hidden;
bool _can_access_vm_annotations;
public:
ClassLoadInfo(Handle protection_domain) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = NULL;
_cp_patches = NULL;
_class_hidden_info._dynamic_nest_host = NULL;
_class_hidden_info._class_data = Handle();
_is_hidden = false;
_is_strong_hidden = false;
_can_access_vm_annotations = false;
}
ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
Handle class_data, bool is_hidden, bool is_strong_hidden,
bool can_access_vm_annotations) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = unsafe_anonymous_host;
_cp_patches = cp_patches;
_class_hidden_info._dynamic_nest_host = dynamic_nest_host;
_class_hidden_info._class_data = class_data;
_is_hidden = is_hidden;
_is_strong_hidden = is_strong_hidden;
_can_access_vm_annotations = can_access_vm_annotations;
}
Handle protection_domain() const { return _protection_domain; }
const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
GrowableArray<Handle>* cp_patches() const { return _cp_patches; }
const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
bool is_hidden() const { return _is_hidden; }
bool is_strong_hidden() const { return _is_strong_hidden; }
bool can_access_vm_annotations() const { return _can_access_vm_annotations; }
};
#endif // SHARE_CLASSFILE_CLASSLOADINFO_HPP

View file

@ -29,6 +29,7 @@
#include "classfile/classLoader.inline.hpp" #include "classfile/classLoader.inline.hpp"
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoaderExt.hpp" #include "classfile/classLoaderExt.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "classfile/moduleEntry.hpp" #include "classfile/moduleEntry.hpp"
#include "classfile/modules.hpp" #include "classfile/modules.hpp"

View file

@ -28,6 +28,7 @@
#include "classfile/classLoader.inline.hpp" #include "classfile/classLoader.inline.hpp"
#include "classfile/classLoaderExt.hpp" #include "classfile/classLoaderExt.hpp"
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/klassFactory.hpp" #include "classfile/klassFactory.hpp"
#include "classfile/modules.hpp" #include "classfile/modules.hpp"
#include "classfile/systemDictionaryShared.hpp" #include "classfile/systemDictionaryShared.hpp"

View file

@ -33,6 +33,7 @@
#include "memory/metaspaceClosure.hpp" #include "memory/metaspaceClosure.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "memory/universe.hpp" #include "memory/universe.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "oops/oopHandle.inline.hpp" #include "oops/oopHandle.inline.hpp"
#include "runtime/arguments.hpp" #include "runtime/arguments.hpp"
@ -418,6 +419,23 @@ void SymbolPropertyEntry::free_entry() {
_method_type.release(Universe::vm_global()); _method_type.release(Universe::vm_global());
} }
void SymbolPropertyEntry::print_entry(outputStream* st) const {
symbol()->print_value_on(st);
st->print("/mode=" INTX_FORMAT, symbol_mode());
st->print(" -> ");
bool printed = false;
if (method() != NULL) {
method()->print_value_on(st);
printed = true;
}
if (method_type() != NULL) {
if (printed) st->print(" and ");
st->print(INTPTR_FORMAT, p2i((void *)method_type()));
printed = true;
}
st->print_cr(printed ? "" : "(empty)");
}
SymbolPropertyTable::SymbolPropertyTable(int table_size) SymbolPropertyTable::SymbolPropertyTable(int table_size)
: Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry)) : Hashtable<Symbol*, mtSymbol>(table_size, sizeof(SymbolPropertyEntry))
{ {

View file

@ -25,8 +25,6 @@
#ifndef SHARE_CLASSFILE_DICTIONARY_HPP #ifndef SHARE_CLASSFILE_DICTIONARY_HPP
#define SHARE_CLASSFILE_DICTIONARY_HPP #define SHARE_CLASSFILE_DICTIONARY_HPP
#include "classfile/protectionDomainCache.hpp"
#include "classfile/systemDictionary.hpp"
#include "oops/instanceKlass.hpp" #include "oops/instanceKlass.hpp"
#include "oops/oop.hpp" #include "oops/oop.hpp"
#include "oops/oopHandle.hpp" #include "oops/oopHandle.hpp"
@ -34,7 +32,7 @@
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"
class DictionaryEntry; class DictionaryEntry;
class BoolObjectClosure; class ProtectionDomainEntry;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// The data structure for the class loader data dictionaries. // The data structure for the class loader data dictionaries.
@ -208,22 +206,7 @@ class SymbolPropertyEntry : public HashtableEntry<Symbol*, mtSymbol> {
return (SymbolPropertyEntry**)HashtableEntry<Symbol*, mtSymbol>::next_addr(); return (SymbolPropertyEntry**)HashtableEntry<Symbol*, mtSymbol>::next_addr();
} }
void print_entry(outputStream* st) const { void print_entry(outputStream* st) const;
symbol()->print_value_on(st);
st->print("/mode=" INTX_FORMAT, symbol_mode());
st->print(" -> ");
bool printed = false;
if (method() != NULL) {
method()->print_value_on(st);
printed = true;
}
if (method_type() != NULL) {
if (printed) st->print(" and ");
st->print(INTPTR_FORMAT, p2i((void *)method_type()));
printed = true;
}
st->print_cr(printed ? "" : "(empty)");
}
}; };
// A system-internal mapping of symbols to pointers, both managed // A system-internal mapping of symbols to pointers, both managed

View file

@ -62,6 +62,7 @@
#include "runtime/java.hpp" #include "runtime/java.hpp"
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.inline.hpp" #include "runtime/jniHandles.inline.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/safepoint.hpp" #include "runtime/safepoint.hpp"
#include "runtime/safepointVerifiers.hpp" #include "runtime/safepointVerifiers.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"

View file

@ -28,6 +28,7 @@
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "jvmtifiles/jvmti.h" #include "jvmtifiles/jvmti.h"
#include "oops/oop.hpp" #include "oops/oop.hpp"
#include "oops/instanceKlass.hpp"
#include "runtime/os.hpp" #include "runtime/os.hpp"
class RecordComponent; class RecordComponent;

View file

@ -28,6 +28,7 @@
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.hpp" #include "classfile/classLoaderData.hpp"
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/klassFactory.hpp" #include "classfile/klassFactory.hpp"
#include "memory/filemap.hpp" #include "memory/filemap.hpp"
#include "memory/metaspaceShared.hpp" #include "memory/metaspaceShared.hpp"

View file

@ -31,6 +31,7 @@
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoaderDataGraph.inline.hpp" #include "classfile/classLoaderDataGraph.inline.hpp"
#include "classfile/classLoaderExt.hpp" #include "classfile/classLoaderExt.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/dictionary.hpp" #include "classfile/dictionary.hpp"
#include "classfile/javaClasses.inline.hpp" #include "classfile/javaClasses.inline.hpp"
#include "classfile/klassFactory.hpp" #include "classfile/klassFactory.hpp"
@ -111,46 +112,6 @@ OopHandle SystemDictionary::_java_platform_loader;
const int defaultProtectionDomainCacheSize = 1009; const int defaultProtectionDomainCacheSize = 1009;
ClassLoadInfo::ClassLoadInfo() {
_protection_domain = Handle();
_unsafe_anonymous_host = NULL;
_cp_patches = NULL;
_class_hidden_info._dynamic_nest_host = NULL;
_class_hidden_info._class_data = Handle();
_is_hidden = false;
_is_strong_hidden = false;
_can_access_vm_annotations = false;
}
ClassLoadInfo::ClassLoadInfo(Handle protection_domain) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = NULL;
_cp_patches = NULL;
_class_hidden_info._dynamic_nest_host = NULL;
_class_hidden_info._class_data = Handle();
_is_hidden = false;
_is_strong_hidden = false;
_can_access_vm_annotations = false;
}
ClassLoadInfo::ClassLoadInfo(Handle protection_domain,
const InstanceKlass* unsafe_anonymous_host,
GrowableArray<Handle>* cp_patches,
InstanceKlass* dynamic_nest_host,
Handle class_data,
bool is_hidden,
bool is_strong_hidden,
bool can_access_vm_annotations) {
_protection_domain = protection_domain;
_unsafe_anonymous_host = unsafe_anonymous_host;
_cp_patches = cp_patches;
_class_hidden_info._dynamic_nest_host = dynamic_nest_host;
_class_hidden_info._class_data = class_data;
_is_hidden = is_hidden;
_is_strong_hidden = is_strong_hidden;
_can_access_vm_annotations = can_access_vm_annotations;
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Java-level SystemLoader and PlatformLoader // Java-level SystemLoader and PlatformLoader
@ -2047,6 +2008,10 @@ bool SystemDictionary::is_well_known_klass(Symbol* class_name) {
} }
return false; return false;
} }
bool SystemDictionary::is_well_known_klass(Klass* k) {
return is_well_known_klass(k->name());
}
#endif #endif
bool SystemDictionary::resolve_wk_klass(WKID id, TRAPS) { bool SystemDictionary::resolve_wk_klass(WKID id, TRAPS) {
@ -2951,6 +2916,19 @@ ProtectionDomainCacheEntry* SystemDictionary::cache_get(Handle protection_domain
return _pd_cache_table->get(protection_domain); return _pd_cache_table->get(protection_domain);
} }
ClassLoaderData* SystemDictionary::class_loader_data(Handle class_loader) {
return ClassLoaderData::class_loader_data(class_loader());
}
bool SystemDictionary::is_wk_klass_loaded(InstanceKlass* klass) {
return !(klass == NULL || !klass->is_loaded());
}
bool SystemDictionary::is_nonpublic_Object_method(Method* m) {
assert(m != NULL, "Unexpected NULL Method*");
return !m->is_public() && m->method_holder() == SystemDictionary::Object_klass();
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void SystemDictionary::print_on(outputStream *st) { void SystemDictionary::print_on(outputStream *st) {

View file

@ -25,62 +25,10 @@
#ifndef SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP #ifndef SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
#define SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP #define SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
#include "classfile/classLoaderData.hpp" #include "classfile/vmSymbols.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oopHandle.hpp" #include "oops/oopHandle.hpp"
#include "oops/symbol.hpp" #include "runtime/handles.hpp"
#include "runtime/java.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/signature.hpp" #include "runtime/signature.hpp"
#include "utilities/hashtable.hpp"
class ClassInstanceInfo : public StackObj {
private:
InstanceKlass* _dynamic_nest_host;
Handle _class_data;
public:
ClassInstanceInfo() {
_dynamic_nest_host = NULL;
_class_data = Handle();
}
ClassInstanceInfo(InstanceKlass* dynamic_nest_host, Handle class_data) {
_dynamic_nest_host = dynamic_nest_host;
_class_data = class_data;
}
InstanceKlass* dynamic_nest_host() const { return _dynamic_nest_host; }
Handle class_data() const { return _class_data; }
friend class ClassLoadInfo;
};
class ClassLoadInfo : public StackObj {
private:
Handle _protection_domain;
const InstanceKlass* _unsafe_anonymous_host;
GrowableArray<Handle>* _cp_patches;
ClassInstanceInfo _class_hidden_info;
bool _is_hidden;
bool _is_strong_hidden;
bool _can_access_vm_annotations;
public:
ClassLoadInfo();
ClassLoadInfo(Handle protection_domain);
ClassLoadInfo(Handle protection_domain, const InstanceKlass* unsafe_anonymous_host,
GrowableArray<Handle>* cp_patches, InstanceKlass* dynamic_nest_host,
Handle class_data, bool is_hidden, bool is_strong_hidden,
bool can_access_vm_annotations);
Handle protection_domain() const { return _protection_domain; }
const InstanceKlass* unsafe_anonymous_host() const { return _unsafe_anonymous_host; }
GrowableArray<Handle>* cp_patches() const { return _cp_patches; }
const ClassInstanceInfo* class_hidden_info_ptr() const { return &_class_hidden_info; }
bool is_hidden() const { return _is_hidden; }
bool is_strong_hidden() const { return _is_strong_hidden; }
bool can_access_vm_annotations() const { return _can_access_vm_annotations; }
};
// The dictionary in each ClassLoaderData stores all loaded classes, either // The dictionary in each ClassLoaderData stores all loaded classes, either
// initiatied by its class loader or defined by its class loader: // initiatied by its class loader or defined by its class loader:
@ -123,16 +71,20 @@ class ClassLoadInfo : public StackObj {
class BootstrapInfo; class BootstrapInfo;
class ClassFileStream; class ClassFileStream;
class ClassLoadInfo;
class Dictionary; class Dictionary;
class PlaceholderTable; class PlaceholderTable;
class LoaderConstraintTable; class LoaderConstraintTable;
template <MEMFLAGS F> class HashtableBucket; template <MEMFLAGS F> class HashtableBucket;
class ResolutionErrorTable; class ResolutionErrorTable;
class SymbolPropertyTable; class SymbolPropertyTable;
class PackageEntry;
class ProtectionDomainCacheTable; class ProtectionDomainCacheTable;
class ProtectionDomainCacheEntry; class ProtectionDomainCacheEntry;
class GCTimer; class GCTimer;
class EventClassLoad; class EventClassLoad;
class Symbol;
class TableStatistics;
#define WK_KLASS_ENUM_NAME(kname) kname##_knum #define WK_KLASS_ENUM_NAME(kname) kname##_knum
@ -445,22 +397,15 @@ public:
} }
static BasicType box_klass_type(Klass* k); // inverse of box_klass static BasicType box_klass_type(Klass* k); // inverse of box_klass
#ifdef ASSERT #ifdef ASSERT
static bool is_well_known_klass(Klass* k) { static bool is_well_known_klass(Klass* k);
return is_well_known_klass(k->name());
}
static bool is_well_known_klass(Symbol* class_name); static bool is_well_known_klass(Symbol* class_name);
#endif #endif
protected: protected:
// Returns the class loader data to be used when looking up/updating the // Returns the class loader data to be used when looking up/updating the
// system dictionary. // system dictionary.
static ClassLoaderData *class_loader_data(Handle class_loader) { static ClassLoaderData *class_loader_data(Handle class_loader);
return ClassLoaderData::class_loader_data(class_loader()); static bool is_wk_klass_loaded(InstanceKlass* klass);
}
static bool is_wk_klass_loaded(InstanceKlass* klass) {
return !(klass == NULL || !klass->is_loaded());
}
public: public:
static bool Object_klass_loaded() { return is_wk_klass_loaded(WK_KLASS(Object_klass)); } static bool Object_klass_loaded() { return is_wk_klass_loaded(WK_KLASS(Object_klass)); }
@ -670,10 +615,7 @@ public:
is_system_class_loader(class_loader); is_system_class_loader(class_loader);
} }
// Returns TRUE if the method is a non-public member of class java.lang.Object. // Returns TRUE if the method is a non-public member of class java.lang.Object.
static bool is_nonpublic_Object_method(Method* m) { static bool is_nonpublic_Object_method(Method* m);
assert(m != NULL, "Unexpected NULL Method*");
return !m->is_public() && m->method_holder() == SystemDictionary::Object_klass();
}
// Return Symbol or throw exception if name given is can not be a valid Symbol. // Return Symbol or throw exception if name given is can not be a valid Symbol.
static Symbol* class_name_symbol(const char* name, Symbol* exception, TRAPS); static Symbol* class_name_symbol(const char* name, Symbol* exception, TRAPS);

View file

@ -26,7 +26,6 @@
#define SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP #define SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
#include "oops/klass.hpp" #include "oops/klass.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/packageEntry.hpp" #include "classfile/packageEntry.hpp"
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "memory/filemap.hpp" #include "memory/filemap.hpp"
@ -103,6 +102,7 @@
#define UNREGISTERED_INDEX -9999 #define UNREGISTERED_INDEX -9999
class ClassFileStream; class ClassFileStream;
class Dictionary;
class DumpTimeSharedClassInfo; class DumpTimeSharedClassInfo;
class DumpTimeSharedClassTable; class DumpTimeSharedClassTable;
class LambdaProxyClassDictionary; class LambdaProxyClassDictionary;

View file

@ -34,6 +34,7 @@
#include "gc/shared/workerPolicy.hpp" #include "gc/shared/workerPolicy.hpp"
#include "runtime/globals.hpp" #include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp" #include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
static const double MaxRamFractionForYoung = 0.8; static const double MaxRamFractionForYoung = 0.8;
size_t G1Arguments::MaxMemoryForYoung; size_t G1Arguments::MaxMemoryForYoung;
@ -274,4 +275,4 @@ size_t G1Arguments::heap_reserved_size_bytes() {
size_t G1Arguments::heap_max_size_bytes() { size_t G1Arguments::heap_max_size_bytes() {
return MaxHeapSize; return MaxHeapSize;
} }

View file

@ -98,6 +98,7 @@
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/init.hpp" #include "runtime/init.hpp"
#include "runtime/java.hpp"
#include "runtime/orderAccess.hpp" #include "runtime/orderAccess.hpp"
#include "runtime/threadSMR.hpp" #include "runtime/threadSMR.hpp"
#include "runtime/vmThread.hpp" #include "runtime/vmThread.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,6 +29,7 @@
#include "memory/allocation.inline.hpp" #include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
#include "runtime/java.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
#include "runtime/threadSMR.hpp" #include "runtime/threadSMR.hpp"
#include "utilities/align.hpp" #include "utilities/align.hpp"

View file

@ -73,6 +73,7 @@
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/safepoint.hpp" #include "runtime/safepoint.hpp"
#include "runtime/vmThread.hpp" #include "runtime/vmThread.hpp"
#include "services/memTracker.hpp" #include "services/memTracker.hpp"

View file

@ -36,6 +36,7 @@
#include "memory/universe.hpp" #include "memory/universe.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/init.hpp" #include "runtime/init.hpp"
#include "runtime/java.hpp"
#include "utilities/dtrace.hpp" #include "utilities/dtrace.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/preserveException.hpp" #include "utilities/preserveException.hpp"

View file

@ -26,6 +26,7 @@
#include "jvm.h" #include "jvm.h"
#include "classfile/classFileParser.hpp" #include "classfile/classFileParser.hpp"
#include "classfile/classFileStream.hpp" #include "classfile/classFileStream.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaClasses.inline.hpp" #include "classfile/javaClasses.inline.hpp"
#include "classfile/moduleEntry.hpp" #include "classfile/moduleEntry.hpp"
#include "classfile/modules.hpp" #include "classfile/modules.hpp"

View file

@ -50,6 +50,7 @@
#include "runtime/frame.inline.hpp" #include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.inline.hpp" #include "runtime/interfaceSupport.inline.hpp"
#include "runtime/jniHandles.inline.hpp" #include "runtime/jniHandles.inline.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/timerTrace.hpp" #include "runtime/timerTrace.hpp"
#include "runtime/vframe_hp.hpp" #include "runtime/vframe_hp.hpp"

View file

@ -28,8 +28,9 @@
#include "jvmci/jvmciJavaClasses.hpp" #include "jvmci/jvmciJavaClasses.hpp"
#include "jvmci/jvmciRuntime.hpp" #include "jvmci/jvmciRuntime.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/java.hpp"
// ------------------------------------------------------------------ // ------------------------------------------------------------------

View file

@ -43,7 +43,9 @@
#include "runtime/deoptimization.hpp" #include "runtime/deoptimization.hpp"
#include "runtime/fieldDescriptor.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/frame.inline.hpp" #include "runtime/frame.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/jniHandles.inline.hpp" #include "runtime/jniHandles.inline.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/sharedRuntime.hpp" #include "runtime/sharedRuntime.hpp"
#if INCLUDE_G1GC #if INCLUDE_G1GC
#include "gc/g1/g1ThreadLocalData.hpp" #include "gc/g1/g1ThreadLocalData.hpp"

View file

@ -29,6 +29,7 @@
#include "oops/compressedOops.hpp" #include "oops/compressedOops.hpp"
#include "oops/markWord.hpp" #include "oops/markWord.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/os.inline.hpp" #include "runtime/os.inline.hpp"
#include "services/memTracker.hpp" #include "services/memTracker.hpp"
#include "utilities/align.hpp" #include "utilities/align.hpp"

View file

@ -77,6 +77,7 @@
#include "runtime/javaCalls.hpp" #include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "runtime/orderAccess.hpp" #include "runtime/orderAccess.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/thread.inline.hpp" #include "runtime/thread.inline.hpp"
#include "services/classLoadingService.hpp" #include "services/classLoadingService.hpp"
#include "services/threadService.hpp" #include "services/threadService.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,10 +26,8 @@
#define SHARE_OOPS_KLASS_INLINE_HPP #define SHARE_OOPS_KLASS_INLINE_HPP
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "oops/compressedOops.hpp"
#include "oops/klass.hpp" #include "oops/klass.hpp"
#include "oops/markWord.hpp" #include "oops/markWord.hpp"
#include "oops/oopHandle.inline.hpp"
inline void Klass::set_prototype_header(markWord header) { inline void Klass::set_prototype_header(markWord header) {
assert(!header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances"); assert(!header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances");

View file

@ -28,6 +28,7 @@
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.hpp" #include "classfile/classLoaderData.hpp"
#include "classfile/classLoaderData.inline.hpp" #include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaAssertions.hpp" #include "classfile/javaAssertions.hpp"
#include "classfile/javaClasses.inline.hpp" #include "classfile/javaClasses.inline.hpp"
#include "classfile/moduleEntry.hpp" #include "classfile/moduleEntry.hpp"

View file

@ -24,8 +24,9 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "aot/aotLoader.hpp" #include "aot/aotLoader.hpp"
#include "classfile/classLoaderDataGraph.hpp"
#include "classfile/classFileStream.hpp" #include "classfile/classFileStream.hpp"
#include "classfile/classLoaderDataGraph.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaClasses.inline.hpp" #include "classfile/javaClasses.inline.hpp"
#include "classfile/metadataOnStackMark.hpp" #include "classfile/metadataOnStackMark.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"

View file

@ -51,6 +51,7 @@
#include "runtime/jniHandles.inline.hpp" #include "runtime/jniHandles.inline.hpp"
#include "runtime/timerTrace.hpp" #include "runtime/timerTrace.hpp"
#include "runtime/reflection.hpp" #include "runtime/reflection.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/safepointVerifiers.hpp" #include "runtime/safepointVerifiers.hpp"
#include "runtime/signature.hpp" #include "runtime/signature.hpp"
#include "runtime/stubRoutines.hpp" #include "runtime/stubRoutines.hpp"

View file

@ -27,6 +27,7 @@
#include "jvm.h" #include "jvm.h"
#include "classfile/classFileStream.hpp" #include "classfile/classFileStream.hpp"
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "classfile/classLoadInfo.hpp"
#include "classfile/javaClasses.inline.hpp" #include "classfile/javaClasses.inline.hpp"
#include "classfile/vmSymbols.hpp" #include "classfile/vmSymbols.hpp"
#include "jfr/jfrEvents.hpp" #include "jfr/jfrEvents.hpp"

View file

@ -25,6 +25,7 @@
#ifndef SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP #ifndef SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP
#define SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP #define SHARE_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP
#include "runtime/fieldDescriptor.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
// All fieldDescriptor inline functions that (directly or indirectly) use "_cp()" or "_cp->" // All fieldDescriptor inline functions that (directly or indirectly) use "_cp()" or "_cp->"

View file

@ -308,6 +308,12 @@ BasicType Signature::basic_type(int ch) {
return btcode; return btcode;
} }
Symbol* Signature::strip_envelope(const Symbol* signature) {
assert(has_envelope(signature), "precondition");
return SymbolTable::new_symbol((char*) signature->bytes() + 1,
signature->utf8_length() - 2);
}
static const int jl_len = 10, object_len = 6, jl_object_len = jl_len + object_len; static const int jl_len = 10, object_len = 6, jl_object_len = jl_len + object_len;
static const char jl_str[] = "java/lang/"; static const char jl_str[] = "java/lang/";

View file

@ -25,7 +25,6 @@
#ifndef SHARE_RUNTIME_SIGNATURE_HPP #ifndef SHARE_RUNTIME_SIGNATURE_HPP
#define SHARE_RUNTIME_SIGNATURE_HPP #define SHARE_RUNTIME_SIGNATURE_HPP
#include "classfile/symbolTable.hpp"
#include "memory/allocation.hpp" #include "memory/allocation.hpp"
#include "oops/method.hpp" #include "oops/method.hpp"
@ -131,11 +130,7 @@ class Signature : AllStatic {
// inside the envelope, by stripping 'L' and ';'. // inside the envelope, by stripping 'L' and ';'.
// Caller is responsible for decrementing the newly created // Caller is responsible for decrementing the newly created
// Symbol's refcount, use TempNewSymbol. // Symbol's refcount, use TempNewSymbol.
static Symbol* strip_envelope(const Symbol* signature) { static Symbol* strip_envelope(const Symbol* signature);
assert(has_envelope(signature), "precondition");
return SymbolTable::new_symbol((char*) signature->bytes() + 1,
signature->utf8_length() - 2);
}
// Assuming it's either a field or method descriptor, determine // Assuming it's either a field or method descriptor, determine
// whether it is in fact a method descriptor: // whether it is in fact a method descriptor: