mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8209301: JVM rename is_anonymous, host_klass to unsafe specific terminology ahead of Unsafe.defineAnonymousClass deprecation
Clean up VM anonymous class terminology. Reviewed-by: coleenp, dholmes, mchung
This commit is contained in:
parent
6ccb60937c
commit
75ed173e15
64 changed files with 359 additions and 354 deletions
|
@ -92,8 +92,8 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||
static volatile size_t _num_instance_classes;
|
||||
static volatile size_t _num_array_classes;
|
||||
|
||||
static ClassLoaderData* add_to_graph(Handle class_loader, bool anonymous);
|
||||
static ClassLoaderData* add(Handle class_loader, bool anonymous);
|
||||
static ClassLoaderData* add_to_graph(Handle class_loader, bool is_unsafe_anonymous);
|
||||
static ClassLoaderData* add(Handle class_loader, bool is_unsafe_anonymous);
|
||||
|
||||
public:
|
||||
static ClassLoaderData* find_or_create(Handle class_loader);
|
||||
|
@ -114,7 +114,7 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||
// Walking classes through the ClassLoaderDataGraph include array classes. It also includes
|
||||
// classes that are allocated but not loaded, classes that have errors, and scratch classes
|
||||
// for redefinition. These classes are removed during the next class unloading.
|
||||
// Walking the ClassLoaderDataGraph also includes anonymous classes.
|
||||
// Walking the ClassLoaderDataGraph also includes unsafe anonymous classes.
|
||||
static void classes_do(KlassClosure* klass_closure);
|
||||
static void classes_do(void f(Klass* const));
|
||||
static void methods_do(void f(Method*));
|
||||
|
@ -238,16 +238,17 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
// classes in the class loader are allocated.
|
||||
Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup.
|
||||
bool _unloading; // true if this class loader goes away
|
||||
bool _is_anonymous; // if this CLD is for an anonymous class
|
||||
bool _is_unsafe_anonymous; // CLD is dedicated to one class and that class determines the CLDs lifecycle.
|
||||
// For example, an unsafe anonymous class.
|
||||
|
||||
// Remembered sets support for the oops in the class loader data.
|
||||
bool _modified_oops; // Card Table Equivalent (YC/CMS support)
|
||||
bool _accumulated_modified_oops; // Mod Union Equivalent (CMS support)
|
||||
|
||||
s2 _keep_alive; // if this CLD is kept alive.
|
||||
// Used for anonymous classes and the boot class
|
||||
// Used for unsafe anonymous classes and the boot class
|
||||
// loader. _keep_alive does not need to be volatile or
|
||||
// atomic since there is one unique CLD per anonymous class.
|
||||
// atomic since there is one unique CLD per unsafe anonymous class.
|
||||
|
||||
volatile int _claimed; // true if claimed, for example during GC traces.
|
||||
// To avoid applying oop closure more than once.
|
||||
|
@ -283,7 +284,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
void set_next(ClassLoaderData* next) { _next = next; }
|
||||
ClassLoaderData* next() const { return _next; }
|
||||
|
||||
ClassLoaderData(Handle h_class_loader, bool is_anonymous);
|
||||
ClassLoaderData(Handle h_class_loader, bool is_unsafe_anonymous);
|
||||
~ClassLoaderData();
|
||||
|
||||
// The CLD are not placed in the Heap, so the Card Table or
|
||||
|
@ -337,7 +338,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
|
||||
Mutex* metaspace_lock() const { return _metaspace_lock; }
|
||||
|
||||
bool is_anonymous() const { return _is_anonymous; }
|
||||
bool is_unsafe_anonymous() const { return _is_unsafe_anonymous; }
|
||||
|
||||
static void init_null_class_loader_data();
|
||||
|
||||
|
@ -346,15 +347,15 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
}
|
||||
|
||||
// Returns true if this class loader data is for the system class loader.
|
||||
// (Note that the class loader data may be anonymous.)
|
||||
// (Note that the class loader data may be unsafe anonymous.)
|
||||
bool is_system_class_loader_data() const;
|
||||
|
||||
// Returns true if this class loader data is for the platform class loader.
|
||||
// (Note that the class loader data may be anonymous.)
|
||||
// (Note that the class loader data may be unsafe anonymous.)
|
||||
bool is_platform_class_loader_data() const;
|
||||
|
||||
// Returns true if this class loader data is for the boot class loader.
|
||||
// (Note that the class loader data may be anonymous.)
|
||||
// (Note that the class loader data may be unsafe anonymous.)
|
||||
inline bool is_boot_class_loader_data() const;
|
||||
|
||||
bool is_builtin_class_loader_data() const;
|
||||
|
@ -372,7 +373,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
return _unloading;
|
||||
}
|
||||
|
||||
// Used to refcount an anonymous class's CLD in order to
|
||||
// Used to refcount an unsafe anonymous class's CLD in order to
|
||||
// indicate their aliveness.
|
||||
void inc_keep_alive();
|
||||
void dec_keep_alive();
|
||||
|
@ -412,7 +413,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
|
||||
static ClassLoaderData* class_loader_data(oop loader);
|
||||
static ClassLoaderData* class_loader_data_or_null(oop loader);
|
||||
static ClassLoaderData* anonymous_class_loader_data(Handle loader);
|
||||
static ClassLoaderData* unsafe_anonymous_class_loader_data(Handle loader);
|
||||
|
||||
// Returns Klass* of associated class loader, or NULL if associated loader is 'bootstrap'.
|
||||
// Also works if unloading.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue