--- a/hotspot/src/share/vm/oops/instanceKlass.hpp Fri Dec 07 10:55:16 2012 -0800
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Tue Jan 08 14:04:25 2013 -0500
@@ -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;