mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8232759: Remove GC.class_stats
Make the GC.class_stats option obsolete Reviewed-by: dholmes, iklam
This commit is contained in:
parent
943b87ddde
commit
016b0f0caa
28 changed files with 90 additions and 823 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, 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
|
||||
|
@ -46,7 +46,6 @@
|
|||
#include "logging/logMessage.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/iterator.inline.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
|
@ -3541,61 +3540,6 @@ void InstanceKlass::print_class_load_logging(ClassLoaderData* loader_data,
|
|||
}
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
// Size Statistics
|
||||
void InstanceKlass::collect_statistics(KlassSizeStats *sz) const {
|
||||
Klass::collect_statistics(sz);
|
||||
|
||||
sz->_inst_size = wordSize * size_helper();
|
||||
sz->_vtab_bytes = wordSize * vtable_length();
|
||||
sz->_itab_bytes = wordSize * itable_length();
|
||||
sz->_nonstatic_oopmap_bytes = wordSize * nonstatic_oop_map_size();
|
||||
|
||||
int n = 0;
|
||||
n += (sz->_methods_array_bytes = sz->count_array(methods()));
|
||||
n += (sz->_method_ordering_bytes = sz->count_array(method_ordering()));
|
||||
n += (sz->_local_interfaces_bytes = sz->count_array(local_interfaces()));
|
||||
n += (sz->_transitive_interfaces_bytes = sz->count_array(transitive_interfaces()));
|
||||
n += (sz->_fields_bytes = sz->count_array(fields()));
|
||||
n += (sz->_inner_classes_bytes = sz->count_array(inner_classes()));
|
||||
n += (sz->_nest_members_bytes = sz->count_array(nest_members()));
|
||||
n += (sz->_record_components_bytes = sz->count_array(record_components()));
|
||||
sz->_ro_bytes += n;
|
||||
|
||||
const ConstantPool* cp = constants();
|
||||
if (cp) {
|
||||
cp->collect_statistics(sz);
|
||||
}
|
||||
|
||||
const Annotations* anno = annotations();
|
||||
if (anno) {
|
||||
anno->collect_statistics(sz);
|
||||
}
|
||||
|
||||
const Array<Method*>* methods_array = methods();
|
||||
if (methods()) {
|
||||
for (int i = 0; i < methods_array->length(); i++) {
|
||||
Method* method = methods_array->at(i);
|
||||
if (method) {
|
||||
sz->_method_count ++;
|
||||
method->collect_statistics(sz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const Array<RecordComponent*>* components = record_components();
|
||||
if (components != NULL) {
|
||||
for (int i = 0; i < components->length(); i++) {
|
||||
RecordComponent* component = components->at(i);
|
||||
if (component != NULL) {
|
||||
component->collect_statistics(sz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif // INCLUDE_SERVICES
|
||||
|
||||
// Verification
|
||||
|
||||
class VerifyFieldClosure: public BasicOopIterateClosure {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue