mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8210012: Implement Unified Logging Option for -XX:+TraceMethodHandles and -XX:+TraceInvokeDynamic
Transition the tracing method handles command line options to unified logging, -Xlog:methodhandles. Reviewed-by: dholmes, iklam, jrose
This commit is contained in:
parent
ed18906c08
commit
d37985cd70
23 changed files with 364 additions and 121 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logTag.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/metadataFactory.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
|
@ -1417,9 +1418,8 @@ methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
|
|||
InstanceKlass* holder = SystemDictionary::MethodHandle_klass();
|
||||
Symbol* name = MethodHandles::signature_polymorphic_intrinsic_name(iid);
|
||||
assert(iid == MethodHandles::signature_polymorphic_name_id(name), "");
|
||||
if (TraceMethodHandles) {
|
||||
tty->print_cr("make_method_handle_intrinsic MH.%s%s", name->as_C_string(), signature->as_C_string());
|
||||
}
|
||||
|
||||
log_info(methodhandles)("make_method_handle_intrinsic MH.%s%s", name->as_C_string(), signature->as_C_string());
|
||||
|
||||
// invariant: cp->symbol_at_put is preceded by a refcount increment (more usually a lookup)
|
||||
name->increment_refcount();
|
||||
|
@ -1470,9 +1470,10 @@ methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
|
|||
m->set_vtable_index(Method::nonvirtual_vtable_index);
|
||||
m->link_method(m, CHECK_(empty));
|
||||
|
||||
if (TraceMethodHandles && (Verbose || WizardMode)) {
|
||||
ttyLocker ttyl;
|
||||
m->print_on(tty);
|
||||
if (log_is_enabled(Info, methodhandles) && (Verbose || WizardMode)) {
|
||||
LogTarget(Info, methodhandles) lt;
|
||||
LogStream ls(lt);
|
||||
m->print_on(&ls);
|
||||
}
|
||||
|
||||
return m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue