mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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
|
@ -26,6 +26,7 @@
|
|||
#include "classfile/vmSymbols.hpp"
|
||||
#include "compiler/compilerDirectives.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "prims/jvm.h"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
|
@ -183,6 +184,15 @@ void vmSymbols::symbols_do(SymbolClosure* f) {
|
|||
}
|
||||
}
|
||||
|
||||
void vmSymbols::metaspace_pointers_do(MetaspaceClosure *it) {
|
||||
for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) {
|
||||
it->push(&_symbols[index]);
|
||||
}
|
||||
for (int i = 0; i < T_VOID+1; i++) {
|
||||
it->push(&_type_signatures[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void vmSymbols::serialize(SerializeClosure* soc) {
|
||||
soc->do_region((u_char*)&_symbols[FIRST_SID],
|
||||
(SID_LIMIT - FIRST_SID) * sizeof(_symbols[0]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue