comparison src/share/vm/oops/method.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 d05ff4bf41b3 8d9fc28831cc
comparison
equal deleted inserted replaced
7950:6cf2530f7fd3 7956:16fb9f942703
32 #include "interpreter/bytecodes.hpp" 32 #include "interpreter/bytecodes.hpp"
33 #include "interpreter/interpreter.hpp" 33 #include "interpreter/interpreter.hpp"
34 #include "interpreter/oopMapCache.hpp" 34 #include "interpreter/oopMapCache.hpp"
35 #include "memory/gcLocker.hpp" 35 #include "memory/gcLocker.hpp"
36 #include "memory/generation.hpp" 36 #include "memory/generation.hpp"
37 #include "memory/heapInspection.hpp"
37 #include "memory/metadataFactory.hpp" 38 #include "memory/metadataFactory.hpp"
38 #include "memory/oopFactory.hpp" 39 #include "memory/oopFactory.hpp"
39 #include "oops/constMethod.hpp" 40 #include "oops/constMethod.hpp"
40 #include "oops/methodData.hpp" 41 #include "oops/methodData.hpp"
41 #include "oops/method.hpp" 42 #include "oops/method.hpp"
1952 method_holder()->print_value_on(st); 1953 method_holder()->print_value_on(st);
1953 if (WizardMode) st->print("[%d,%d]", size_of_parameters(), max_locals()); 1954 if (WizardMode) st->print("[%d,%d]", size_of_parameters(), max_locals());
1954 if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code()); 1955 if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code());
1955 } 1956 }
1956 1957
1958 #if INCLUDE_SERVICES
1959 // Size Statistics
1960 void Method::collect_statistics(KlassSizeStats *sz) const {
1961 int mysize = sz->count(this);
1962 sz->_method_bytes += mysize;
1963 sz->_method_all_bytes += mysize;
1964 sz->_rw_bytes += mysize;
1965
1966 if (constMethod()) {
1967 constMethod()->collect_statistics(sz);
1968 }
1969 if (method_data()) {
1970 method_data()->collect_statistics(sz);
1971 }
1972 }
1973 #endif // INCLUDE_SERVICES
1957 1974
1958 // Verification 1975 // Verification
1959 1976
1960 void Method::verify_on(outputStream* st) { 1977 void Method::verify_on(outputStream* st) {
1961 guarantee(is_method(), "object must be method"); 1978 guarantee(is_method(), "object must be method");