Mercurial > hg > truffle
diff src/share/vm/classfile/classLoaderData.hpp @ 20260:556a06aec3fa
8035412: Cleanup ClassLoaderData::is_alive
Reviewed-by: coleenp, mgerdin
author | stefank |
---|---|
date | Fri, 21 Feb 2014 10:19:09 +0100 |
parents | e4a6e7f1b90b |
children | 2c6ef90f030a |
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoaderData.hpp Fri Feb 21 10:01:20 2014 +0100 +++ b/src/share/vm/classfile/classLoaderData.hpp Fri Feb 21 10:19:09 2014 +0100 @@ -149,7 +149,7 @@ // 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 _keep_alive; // if this CLD can be unloaded for anonymous loaders + bool _keep_alive; // if this CLD is kept alive without a keep_alive_object(). bool _is_anonymous; // if this CLD is for an anonymous class volatile int _claimed; // true if claimed, for example during GC traces. // To avoid applying oop closure more than once. @@ -240,13 +240,16 @@ oop class_loader() const { return _class_loader; } + // The object the GC is using to keep this ClassLoaderData alive. + oop keep_alive_object() const; + // Returns true if this class loader data is for a loader going away. bool is_unloading() const { assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded"); return _unloading; } - // Anonymous class loader data doesn't have anything to keep them from - // being unloaded during parsing the anonymous class. + + // Used to make sure that this CLD is not unloaded. void set_keep_alive(bool value) { _keep_alive = value; } unsigned int identity_hash() {