7050392: G1: Introduce flag to generate a log of the G1 ergonomic decisions

It introduces ergonomic decision logging in G1 for the following heuristics: heap sizing, collection set construction, concurrent cycle initiation, and partially-young GC start/end. The code has a bit of refactoring in a few places to make the decision logging possible. It also replaces alternative ad-hoc logging that we have under different parameters and switches (G1_DEBUG, G1PolicyVerbose).

Reviewed-by: johnc, ysr
This commit is contained in:
Antonios Printezis 2011-09-07 12:21:23 -04:00
parent a9cd50a1c8
commit 24eb07061e
9 changed files with 563 additions and 207 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2011, 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
@ -97,10 +97,6 @@ void G1MMUTrackerQueue::add_pause(double start, double end, bool gc_thread) {
// or performance (we are GC'ing most of the time anyway!),
// simply overwrite the oldest entry in the tracker.
if (G1PolicyVerbose > 1) {
warning("MMU Tracker Queue overflow. Replacing earliest entry.");
}
_head_index = trim_index(_head_index + 1);
assert(_head_index == _tail_index, "Because we have a full circular buffer");
_tail_index = trim_index(_tail_index + 1);