mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8079408: Reimplement TraceClassLoading, TraceClassUnloading, and TraceClassLoaderData with Unified Logging
TraceClassLoading, TraceClassUnloading, and TraceClassLoaderData have been reimplemented using Unified logging. Co-authored-by: Ioi Lam <ioi.lam@oracle.com> Reviewed-by: iklam, coleenp, dholmes, jiangli, hseigel, rprotacio
This commit is contained in:
parent
828a52c262
commit
9cab990401
22 changed files with 358 additions and 122 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -48,6 +48,7 @@
|
|||
#include "utilities/dtrace.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "utilities/xmlstream.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#ifdef TARGET_ARCH_x86
|
||||
# include "nativeInst_x86.hpp"
|
||||
#endif
|
||||
|
@ -1310,13 +1311,14 @@ void nmethod::make_unloaded(BoolObjectClosure* is_alive, oop cause) {
|
|||
flush_dependencies(is_alive);
|
||||
|
||||
// Break cycle between nmethod & method
|
||||
if (TraceClassUnloading && WizardMode) {
|
||||
tty->print_cr("[Class unloading: Making nmethod " INTPTR_FORMAT
|
||||
" unloadable], Method*(" INTPTR_FORMAT
|
||||
if (log_is_enabled(Trace, classunload)) {
|
||||
outputStream* log = LogHandle(classunload)::trace_stream();
|
||||
log->print_cr("making nmethod " INTPTR_FORMAT
|
||||
" unloadable, Method*(" INTPTR_FORMAT
|
||||
"), cause(" INTPTR_FORMAT ")",
|
||||
p2i(this), p2i(_method), p2i(cause));
|
||||
if (!Universe::heap()->is_gc_active())
|
||||
cause->klass()->print();
|
||||
cause->klass()->print_on(log);
|
||||
}
|
||||
// Unlink the osr method, so we do not look this up again
|
||||
if (is_osr_method()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue