mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -29,6 +29,7 @@
|
|||
#include "classfile/vmSymbols.hpp"
|
||||
#include "gc_implementation/shared/markSweep.inline.hpp"
|
||||
#include "gc_interface/collectedHeap.inline.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
@ -624,6 +625,17 @@ void Klass::oop_print_value_on(oop obj, outputStream* st) {
|
|||
obj->print_address_on(st);
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
// Size Statistics
|
||||
void Klass::collect_statistics(KlassSizeStats *sz) const {
|
||||
sz->_klass_bytes = sz->count(this);
|
||||
sz->_mirror_bytes = sz->count(java_mirror());
|
||||
sz->_secondary_supers_bytes = sz->count_array(secondary_supers());
|
||||
|
||||
sz->_ro_bytes += sz->_secondary_supers_bytes;
|
||||
sz->_rw_bytes += sz->_klass_bytes + sz->_mirror_bytes;
|
||||
}
|
||||
#endif // INCLUDE_SERVICES
|
||||
|
||||
// Verification
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue