mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6479360: PrintClassHistogram improvements
Jcmd <pid> GC.class_stats (UnlockDiagnosticVMOptions) Reviewed-by: coleenp, hseigel, sla, acorn
This commit is contained in:
parent
19303cc71d
commit
93b845e21b
23 changed files with 807 additions and 53 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "memory/gcLocker.hpp"
|
||||
#include "memory/generation.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "oops/constMethod.hpp"
|
||||
|
@ -1954,6 +1955,22 @@ void Method::print_value_on(outputStream* st) const {
|
|||
if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code());
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
// Size Statistics
|
||||
void Method::collect_statistics(KlassSizeStats *sz) const {
|
||||
int mysize = sz->count(this);
|
||||
sz->_method_bytes += mysize;
|
||||
sz->_method_all_bytes += mysize;
|
||||
sz->_rw_bytes += mysize;
|
||||
|
||||
if (constMethod()) {
|
||||
constMethod()->collect_statistics(sz);
|
||||
}
|
||||
if (method_data()) {
|
||||
method_data()->collect_statistics(sz);
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_SERVICES
|
||||
|
||||
// Verification
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue