--- old/src/share/vm/oops/constantPool.hpp 2013-01-23 12:11:58.000000000 -0800 +++ new/src/share/vm/oops/constantPool.hpp 2013-01-23 12:11:57.000000000 -0800 @@ -80,6 +80,7 @@ } }; +class KlassSizeStats; class ConstantPool : public Metadata { friend class VMStructs; friend class BytecodeInterpreter; // Directly extracts an oop in the pool for fast instanceof/checkcast @@ -686,9 +687,13 @@ return 0 <= index && index < length(); } + // Sizing (in words) static int header_size() { return sizeof(ConstantPool)/HeapWordSize; } static int size(int length) { return align_object_size(header_size() + length); } int size() const { return size(length()); } +#if INCLUDE_SERVICES + void collect_statistics(KlassSizeStats *sz) const; +#endif friend class ClassFileParser; friend class SystemDictionary;