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"); |