mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7160728: Introduce an extra logging level for G1 logging
Added log levels "fine", "finer" and "finest". Let PrintGC map to "fine" and PrintGCDetails map to "finer". Separated out the per worker information in the G1 logging to the "finest" level. Reviewed-by: stefank, jwilhelm, tonyp, johnc
This commit is contained in:
parent
023ad06e46
commit
bb59715dae
9 changed files with 177 additions and 46 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
|
||||
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
|
||||
#include "gc_implementation/g1/g1CollectorPolicy.hpp"
|
||||
#include "gc_implementation/g1/g1Log.hpp"
|
||||
#include "gc_implementation/g1/g1MMUTracker.hpp"
|
||||
#include "gc_implementation/g1/vm_operations_g1.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
@ -104,7 +105,7 @@ void ConcurrentMarkThread::run() {
|
|||
|
||||
double scan_start = os::elapsedTime();
|
||||
if (!cm()->has_aborted()) {
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-root-region-scan-start]");
|
||||
|
@ -113,7 +114,7 @@ void ConcurrentMarkThread::run() {
|
|||
_cm->scanRootRegions();
|
||||
|
||||
double scan_end = os::elapsedTime();
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-root-region-scan-end, %1.7lf]",
|
||||
|
@ -122,7 +123,7 @@ void ConcurrentMarkThread::run() {
|
|||
}
|
||||
|
||||
double mark_start_sec = os::elapsedTime();
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-mark-start]");
|
||||
|
@ -146,7 +147,7 @@ void ConcurrentMarkThread::run() {
|
|||
os::sleep(current_thread, sleep_time_ms, false);
|
||||
}
|
||||
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-mark-end, %1.7lf sec]",
|
||||
|
@ -165,7 +166,7 @@ void ConcurrentMarkThread::run() {
|
|||
}
|
||||
|
||||
if (cm()->restart_for_overflow()) {
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-mark-restart-for-overflow]");
|
||||
|
@ -211,7 +212,7 @@ void ConcurrentMarkThread::run() {
|
|||
// reclaimed by cleanup.
|
||||
|
||||
double cleanup_start_sec = os::elapsedTime();
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-cleanup-start]");
|
||||
|
@ -232,7 +233,7 @@ void ConcurrentMarkThread::run() {
|
|||
g1h->reset_free_regions_coming();
|
||||
|
||||
double cleanup_end_sec = os::elapsedTime();
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-cleanup-end, %1.7lf]",
|
||||
|
@ -273,7 +274,7 @@ void ConcurrentMarkThread::run() {
|
|||
_sts.leave();
|
||||
|
||||
if (cm()->has_aborted()) {
|
||||
if (PrintGC) {
|
||||
if (G1Log::fine()) {
|
||||
gclog_or_tty->date_stamp(PrintGCDateStamps);
|
||||
gclog_or_tty->stamp(PrintGCTimeStamps);
|
||||
gclog_or_tty->print_cr("[GC concurrent-mark-abort]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue