comparison src/share/vm/oops/constMethod.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 ade95d680b42
children 927a311d00f9
comparison
equal deleted inserted replaced
7950:6cf2530f7fd3 7956:16fb9f942703
1 /* 1 /*
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "interpreter/interpreter.hpp" 26 #include "interpreter/interpreter.hpp"
27 #include "memory/gcLocker.hpp" 27 #include "memory/gcLocker.hpp"
28 #include "memory/heapInspection.hpp"
28 #include "memory/metadataFactory.hpp" 29 #include "memory/metadataFactory.hpp"
29 #include "oops/constMethod.hpp" 30 #include "oops/constMethod.hpp"
30 #include "oops/method.hpp" 31 #include "oops/method.hpp"
31 32
32 // Static initialization 33 // Static initialization
328 assert(is_constMethod(), "must be constMethod"); 329 assert(is_constMethod(), "must be constMethod");
329 st->print(" const part of method " ); 330 st->print(" const part of method " );
330 method()->print_value_on(st); 331 method()->print_value_on(st);
331 } 332 }
332 333
334 #if INCLUDE_SERVICES
335 // Size Statistics
336 void ConstMethod::collect_statistics(KlassSizeStats *sz) const {
337 int n1, n2, n3;
338 sz->_const_method_bytes += (n1 = sz->count(this));
339 sz->_bytecode_bytes += (n2 = code_size());
340 sz->_stackmap_bytes += (n3 = sz->count_array(stackmap_data()));
341
342 sz->_method_all_bytes += n1 + n3; // note: n2 is part of n3
343 sz->_ro_bytes += n1 + n3;
344 }
345 #endif // INCLUDE_SERVICES
333 346
334 // Verification 347 // Verification
335 348
336 void ConstMethod::verify_on(outputStream* st) { 349 void ConstMethod::verify_on(outputStream* st) {
337 guarantee(is_constMethod(), "object must be constMethod"); 350 guarantee(is_constMethod(), "object must be constMethod");