1.1 --- a/src/share/vm/oops/constMethod.cpp Thu Jan 24 23:30:45 2013 -0800 1.2 +++ b/src/share/vm/oops/constMethod.cpp Fri Jan 25 15:06:18 2013 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -25,6 +25,7 @@ 1.11 #include "precompiled.hpp" 1.12 #include "interpreter/interpreter.hpp" 1.13 #include "memory/gcLocker.hpp" 1.14 +#include "memory/heapInspection.hpp" 1.15 #include "memory/metadataFactory.hpp" 1.16 #include "oops/constMethod.hpp" 1.17 #include "oops/method.hpp" 1.18 @@ -330,6 +331,18 @@ 1.19 method()->print_value_on(st); 1.20 } 1.21 1.22 +#if INCLUDE_SERVICES 1.23 +// Size Statistics 1.24 +void ConstMethod::collect_statistics(KlassSizeStats *sz) const { 1.25 + int n1, n2, n3; 1.26 + sz->_const_method_bytes += (n1 = sz->count(this)); 1.27 + sz->_bytecode_bytes += (n2 = code_size()); 1.28 + sz->_stackmap_bytes += (n3 = sz->count_array(stackmap_data())); 1.29 + 1.30 + sz->_method_all_bytes += n1 + n3; // note: n2 is part of n3 1.31 + sz->_ro_bytes += n1 + n3; 1.32 +} 1.33 +#endif // INCLUDE_SERVICES 1.34 1.35 // Verification 1.36