mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
6990754: Use native memory and reference counting to implement SymbolTable
Move symbols from permgen into C heap and reference count them Reviewed-by: never, acorn, jmasa, stefank
This commit is contained in:
parent
950858350d
commit
7b4f8073f0
223 changed files with 3783 additions and 3641 deletions
|
@ -396,7 +396,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
|
|||
HandleMark hm;
|
||||
methodHandle method(thread, array->element(0)->method());
|
||||
Bytecode_invoke invoke = Bytecode_invoke_check(method, array->element(0)->bci());
|
||||
return_type = invoke.is_valid() ? invoke.result_type(thread) : T_ILLEGAL;
|
||||
return_type = invoke.is_valid() ? invoke.result_type() : T_ILLEGAL;
|
||||
}
|
||||
|
||||
// Compute information for handling adapters and adjusting the frame size of the caller.
|
||||
|
@ -601,7 +601,7 @@ JRT_LEAF(BasicType, Deoptimization::unpack_frames(JavaThread* thread, int exec_m
|
|||
cur_code == Bytecodes::_invokestatic ||
|
||||
cur_code == Bytecodes::_invokeinterface) {
|
||||
Bytecode_invoke invoke(mh, iframe->interpreter_frame_bci());
|
||||
symbolHandle signature(thread, invoke.signature());
|
||||
Symbol* signature = invoke.signature();
|
||||
ArgumentSizeComputer asc(signature);
|
||||
cur_invoke_parameter_size = asc.size();
|
||||
if (cur_code != Bytecodes::_invokestatic) {
|
||||
|
@ -1156,7 +1156,7 @@ void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int i
|
|||
if (!constant_pool->tag_at(index).is_symbol()) return;
|
||||
|
||||
Handle class_loader (THREAD, instanceKlass::cast(constant_pool->pool_holder())->class_loader());
|
||||
symbolHandle symbol (THREAD, constant_pool->symbol_at(index));
|
||||
Symbol* symbol = constant_pool->symbol_at(index);
|
||||
|
||||
// class name?
|
||||
if (symbol->byte_at(0) != '(') {
|
||||
|
@ -1166,10 +1166,10 @@ void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int i
|
|||
}
|
||||
|
||||
// then it must be a signature!
|
||||
ResourceMark rm(THREAD);
|
||||
for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) {
|
||||
if (ss.is_object()) {
|
||||
symbolOop s = ss.as_symbol(CHECK);
|
||||
symbolHandle class_name (THREAD, s);
|
||||
Symbol* class_name = ss.as_symbol(CHECK);
|
||||
Handle protection_domain (THREAD, Klass::cast(constant_pool->pool_holder())->protection_domain());
|
||||
SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK);
|
||||
}
|
||||
|
@ -1246,19 +1246,17 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra
|
|||
format_trap_request(buf, sizeof(buf), trap_request));
|
||||
nm->log_identity(xtty);
|
||||
}
|
||||
symbolHandle class_name;
|
||||
Symbol* class_name = NULL;
|
||||
bool unresolved = false;
|
||||
if (unloaded_class_index >= 0) {
|
||||
constantPoolHandle constants (THREAD, trap_method->constants());
|
||||
if (constants->tag_at(unloaded_class_index).is_unresolved_klass()) {
|
||||
class_name = symbolHandle(THREAD,
|
||||
constants->klass_name_at(unloaded_class_index));
|
||||
class_name = constants->klass_name_at(unloaded_class_index);
|
||||
unresolved = true;
|
||||
if (xtty != NULL)
|
||||
xtty->print(" unresolved='1'");
|
||||
} else if (constants->tag_at(unloaded_class_index).is_symbol()) {
|
||||
class_name = symbolHandle(THREAD,
|
||||
constants->symbol_at(unloaded_class_index));
|
||||
class_name = constants->symbol_at(unloaded_class_index);
|
||||
}
|
||||
if (xtty != NULL)
|
||||
xtty->name(class_name);
|
||||
|
@ -1294,7 +1292,7 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra
|
|||
trap_reason_name(reason),
|
||||
trap_action_name(action),
|
||||
unloaded_class_index);
|
||||
if (class_name.not_null()) {
|
||||
if (class_name != NULL) {
|
||||
tty->print(unresolved ? " unresolved class: " : " symbol: ");
|
||||
class_name->print_symbol_on(tty);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue