diff src/share/vm/oops/instanceKlass.hpp @ 7482:989155e2d07a

Merge with hs25-b15.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 16 Jan 2013 01:34:24 +0100
parents 2cb439954abf 37a3e8b7a1e9
children 3ac7d10a6572
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Tue Jan 15 18:54:02 2013 +0100
+++ b/src/share/vm/oops/instanceKlass.hpp	Wed Jan 16 01:34:24 2013 +0100
@@ -31,6 +31,7 @@
 #include "oops/fieldInfo.hpp"
 #include "oops/instanceOop.hpp"
 #include "oops/klassVtable.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/os.hpp"
 #include "utilities/accessFlags.hpp"
@@ -170,6 +171,11 @@
     initialization_error                // error happened during initialization
   };
 
+  static int number_of_instance_classes() { return _total_instanceKlass_count; }
+
+ private:
+  static volatile int _total_instanceKlass_count;
+
  protected:
   // Protection domain.
   oop             _protection_domain;
@@ -454,7 +460,7 @@
   bool link_class_or_fail(TRAPS); // returns false on failure
   void unlink_class();
   void rewrite_class(TRAPS);
-  void relocate_and_link_methods(TRAPS);
+  void link_methods(TRAPS);
   Method* class_initializer();
 
   // set the class to initialized if no static initializer is present
@@ -538,6 +544,12 @@
     }
   }
 
+  // Oop that keeps the metadata for this class from being unloaded
+  // in places where the metadata is stored in other places, like nmethods
+  oop klass_holder() const {
+    return is_anonymous() ? java_mirror() : class_loader();
+  }
+
   // signers
   objArrayOop signers() const              { return _signers; }
   void set_signers(objArrayOop s)          { klass_oop_store((oop*)&_signers, s); }
@@ -651,6 +663,10 @@
     if (annotations() == NULL) return NULL;
     return annotations()->fields_annotations();
   }
+  Annotations* type_annotations() const {
+    if (annotations() == NULL) return NULL;
+    return annotations()->type_annotations();
+  }
 
   // allocation
   instanceOop allocate_instance(TRAPS);