src/share/vm/runtime/timer.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/timer.cpp Wed Feb 10 16:34:40 2016
--- new/src/share/vm/runtime/timer.cpp Wed Feb 10 16:34:40 2016
*** 1,7 ****
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 112,158 ****
--- 112,166 ----
assert(is_updated(), "must not be clear");
return os::elapsed_counter() - _counter;
}
TraceTime::TraceTime(const char* title,
! bool doit) {
! bool doit,
+ LogTagType tag) {
_active = doit;
_verbose = true;
+ _tag = tag;
+ _title = title;
if (_active) {
_accum = NULL;
tty->print("[%s", title);
tty->flush();
_t.start();
}
}
TraceTime::TraceTime(const char* title,
elapsedTimer* accumulator,
bool doit,
! bool verbose) {
! bool verbose,
+ LogTagType tag) {
_active = doit;
_verbose = verbose;
+ _tag = tag;
+ _title = title;
+
if (_active) {
if (_verbose) {
tty->print("[%s", title);
tty->flush();
}
_accum = accumulator;
_t.start();
}
}
TraceTime::~TraceTime() {
if (_active) {
_t.stop();
if (_accum!=NULL) _accum->add(_t);
if (_verbose) {
tty->print_cr(", %3.7f secs]", _t.seconds());
+ switch (_tag) {
+ case LogTag::_startuptime :
+ log_info(startuptime)("%s, %3.7f secs", _title, _t.seconds());
+ break;
+ case LogTag::__NO_TAG :
+ default :
+ tty->print_cr("[%s, %3.7f secs]", _title, _t.seconds());
tty->flush();
}
}
+ }
}
TraceCPUTime::TraceCPUTime(bool doit,
bool print_cr,
outputStream *logfile) :
src/share/vm/runtime/timer.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File