mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8143157: Convert TraceVMOperation to Unified Logging
The former -XX:+TraceVMOperation flag is updated to the unified logging framework and is now replaced with -Xlog:vmoperation in product mode. Reviewed-by: coleenp, dholmes, mockner
This commit is contained in:
parent
961fbacd76
commit
c67974cf0f
5 changed files with 103 additions and 9 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "code/codeCacheExtensions.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "gc/shared/isGCActiveMark.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
|
@ -55,13 +56,19 @@ void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
|
|||
|
||||
void VM_Operation::evaluate() {
|
||||
ResourceMark rm;
|
||||
if (TraceVMOperation) {
|
||||
tty->print("[");
|
||||
NOT_PRODUCT(print();)
|
||||
outputStream* debugstream;
|
||||
bool enabled = log_is_enabled(Debug, vmoperation);
|
||||
if (enabled) {
|
||||
debugstream = LogHandle(vmoperation)::debug_stream();
|
||||
debugstream->print("begin ");
|
||||
print_on_error(debugstream);
|
||||
debugstream->cr();
|
||||
}
|
||||
doit();
|
||||
if (TraceVMOperation) {
|
||||
tty->print_cr("]");
|
||||
if (enabled) {
|
||||
debugstream->print("end ");
|
||||
print_on_error(debugstream);
|
||||
debugstream->cr();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue