comparison src/share/vm/oops/constantPool.cpp @ 7956:16fb9f942703

6479360: PrintClassHistogram improvements Summary: jcmd <pid> GC.class_stats (UnlockDiagnosticVMOptions) Reviewed-by: coleenp, hseigel, sla, acorn Contributed-by: ioi.lam@oracle.com
author acorn
date Fri, 25 Jan 2013 15:06:18 -0500
parents 5daaddd917a1
children 0d26ce8e9251
comparison
equal deleted inserted replaced
7950:6cf2530f7fd3 7956:16fb9f942703
28 #include "classfile/metadataOnStackMark.hpp" 28 #include "classfile/metadataOnStackMark.hpp"
29 #include "classfile/symbolTable.hpp" 29 #include "classfile/symbolTable.hpp"
30 #include "classfile/systemDictionary.hpp" 30 #include "classfile/systemDictionary.hpp"
31 #include "classfile/vmSymbols.hpp" 31 #include "classfile/vmSymbols.hpp"
32 #include "interpreter/linkResolver.hpp" 32 #include "interpreter/linkResolver.hpp"
33 #include "memory/heapInspection.hpp"
33 #include "memory/metadataFactory.hpp" 34 #include "memory/metadataFactory.hpp"
34 #include "memory/oopFactory.hpp" 35 #include "memory/oopFactory.hpp"
35 #include "oops/constantPool.hpp" 36 #include "oops/constantPool.hpp"
36 #include "oops/instanceKlass.hpp" 37 #include "oops/instanceKlass.hpp"
37 #include "oops/objArrayKlass.hpp" 38 #include "oops/objArrayKlass.hpp"
1944 if (cache() != NULL) { 1945 if (cache() != NULL) {
1945 st->print(" cache=" PTR_FORMAT, cache()); 1946 st->print(" cache=" PTR_FORMAT, cache());
1946 } 1947 }
1947 } 1948 }
1948 1949
1950 #if INCLUDE_SERVICES
1951 // Size Statistics
1952 void ConstantPool::collect_statistics(KlassSizeStats *sz) const {
1953 sz->_cp_all_bytes += (sz->_cp_bytes = sz->count(this));
1954 sz->_cp_all_bytes += (sz->_cp_tags_bytes = sz->count_array(tags()));
1955 sz->_cp_all_bytes += (sz->_cp_cache_bytes = sz->count(cache()));
1956 sz->_cp_all_bytes += (sz->_cp_operands_bytes = sz->count_array(operands()));
1957 sz->_cp_all_bytes += (sz->_cp_refmap_bytes = sz->count_array(reference_map()));
1958
1959 sz->_ro_bytes += sz->_cp_operands_bytes + sz->_cp_tags_bytes +
1960 sz->_cp_refmap_bytes;
1961 sz->_rw_bytes += sz->_cp_bytes + sz->_cp_cache_bytes;
1962 }
1963 #endif // INCLUDE_SERVICES
1949 1964
1950 // Verification 1965 // Verification
1951 1966
1952 void ConstantPool::verify_on(outputStream* st) { 1967 void ConstantPool::verify_on(outputStream* st) {
1953 guarantee(is_constantPool(), "object must be constant pool"); 1968 guarantee(is_constantPool(), "object must be constant pool");