hotspot/src/share/vm/classfile/classLoaderData.hpp
changeset 14816 f2935b95cb54
parent 14588 8ec26d2d9339
child 14848 fabcdf88c360
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp	Fri Dec 07 10:55:16 2012 -0800
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp	Wed Dec 12 11:39:29 2012 -0500
@@ -109,6 +109,7 @@
   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 _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.
                            // Has to be an int because we cas it.
@@ -139,7 +140,7 @@
   void set_next(ClassLoaderData* next) { _next = next; }
   ClassLoaderData* next() const        { return _next; }
 
-  ClassLoaderData(Handle h_class_loader);
+  ClassLoaderData(Handle h_class_loader, bool is_anonymous);
   ~ClassLoaderData();
 
   void set_metaspace(Metaspace* m) { _metaspace = m; }
@@ -174,12 +175,12 @@
     return _the_null_class_loader_data;
   }
 
-  bool is_anonymous() const;
+  bool is_anonymous() const { return _is_anonymous; }
 
   static void init_null_class_loader_data() {
     assert(_the_null_class_loader_data == NULL, "cannot initialize twice");
     assert(ClassLoaderDataGraph::_head == NULL, "cannot initialize twice");
-    _the_null_class_loader_data = new ClassLoaderData((oop)NULL);
+    _the_null_class_loader_data = new ClassLoaderData((oop)NULL, false);
     ClassLoaderDataGraph::_head = _the_null_class_loader_data;
     assert(_the_null_class_loader_data->is_the_null_class_loader_data(), "Must be");
     if (DumpSharedSpaces) {