提交 a36119da 编写于 作者: K kmo

8011952: Missing ResourceMarks in TraceMethodHandles

Summary: add missing ResourceMark under TraceMethodHandles in LinkResolver
Reviewed-by: dholmes
上级 adecd32a
...@@ -217,6 +217,7 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result, ...@@ -217,6 +217,7 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result,
TRAPS) { TRAPS) {
vmIntrinsics::ID iid = MethodHandles::signature_polymorphic_name_id(name); vmIntrinsics::ID iid = MethodHandles::signature_polymorphic_name_id(name);
if (TraceMethodHandles) { if (TraceMethodHandles) {
ResourceMark rm(THREAD);
tty->print_cr("lookup_polymorphic_method iid=%s %s.%s%s", tty->print_cr("lookup_polymorphic_method iid=%s %s.%s%s",
vmIntrinsics::name_at(iid), klass->external_name(), vmIntrinsics::name_at(iid), klass->external_name(),
name->as_C_string(), full_signature->as_C_string()); name->as_C_string(), full_signature->as_C_string());
...@@ -231,6 +232,7 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result, ...@@ -231,6 +232,7 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result,
TempNewSymbol basic_signature = TempNewSymbol basic_signature =
MethodHandles::lookup_basic_type_signature(full_signature, keep_last_arg, CHECK); MethodHandles::lookup_basic_type_signature(full_signature, keep_last_arg, CHECK);
if (TraceMethodHandles) { if (TraceMethodHandles) {
ResourceMark rm(THREAD);
tty->print_cr("lookup_polymorphic_method %s %s => basic %s", tty->print_cr("lookup_polymorphic_method %s %s => basic %s",
name->as_C_string(), name->as_C_string(),
full_signature->as_C_string(), full_signature->as_C_string(),
...@@ -283,6 +285,8 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result, ...@@ -283,6 +285,8 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result,
} }
if (result.not_null()) { if (result.not_null()) {
#ifdef ASSERT #ifdef ASSERT
ResourceMark rm(THREAD);
TempNewSymbol basic_signature = TempNewSymbol basic_signature =
MethodHandles::lookup_basic_type_signature(full_signature, CHECK); MethodHandles::lookup_basic_type_signature(full_signature, CHECK);
int actual_size_of_params = result->size_of_parameters(); int actual_size_of_params = result->size_of_parameters();
...@@ -1222,8 +1226,10 @@ void LinkResolver::resolve_invokehandle(CallInfo& result, constantPoolHandle poo ...@@ -1222,8 +1226,10 @@ void LinkResolver::resolve_invokehandle(CallInfo& result, constantPoolHandle poo
Symbol* method_signature = NULL; Symbol* method_signature = NULL;
KlassHandle current_klass; KlassHandle current_klass;
resolve_pool(resolved_klass, method_name, method_signature, current_klass, pool, index, CHECK); resolve_pool(resolved_klass, method_name, method_signature, current_klass, pool, index, CHECK);
if (TraceMethodHandles) if (TraceMethodHandles) {
ResourceMark rm(THREAD);
tty->print_cr("resolve_invokehandle %s %s", method_name->as_C_string(), method_signature->as_C_string()); tty->print_cr("resolve_invokehandle %s %s", method_name->as_C_string(), method_signature->as_C_string());
}
resolve_handle_call(result, resolved_klass, method_name, method_signature, current_klass, CHECK); resolve_handle_call(result, resolved_klass, method_name, method_signature, current_klass, CHECK);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册