mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8072061: Automatically determine optimal sizes for the CDS regions
See new C++ class MetaspaceClosure. Reviewed-by: coleenp, jiangli, mseledtsov
This commit is contained in:
parent
4b983a51fd
commit
f7f193ae71
82 changed files with 2010 additions and 1622 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "interpreter/bytecodeStream.hpp"
|
||||
#include "interpreter/linkResolver.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/methodData.hpp"
|
||||
#include "prims/jvmtiRedefineClasses.hpp"
|
||||
|
@ -715,7 +716,7 @@ void SpeculativeTrapData::print_data_on(outputStream* st, const char* extra) con
|
|||
MethodData* MethodData::allocate(ClassLoaderData* loader_data, const methodHandle& method, TRAPS) {
|
||||
int size = MethodData::compute_allocation_size_in_words(method);
|
||||
|
||||
return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD)
|
||||
return new (loader_data, size, MetaspaceObj::MethodDataType, THREAD)
|
||||
MethodData(method(), size, THREAD);
|
||||
}
|
||||
|
||||
|
@ -1634,6 +1635,11 @@ bool MethodData::profile_parameters_for_method(const methodHandle& m) {
|
|||
return m->is_compiled_lambda_form();
|
||||
}
|
||||
|
||||
void MethodData::metaspace_pointers_do(MetaspaceClosure* it) {
|
||||
log_trace(cds)("Iter(MethodData): %p", this);
|
||||
it->push(&_method);
|
||||
}
|
||||
|
||||
void MethodData::clean_extra_data_helper(DataLayout* dp, int shift, bool reset) {
|
||||
if (shift == 0) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue