RFR (S): 8165292: The gc+task logging is repeated a lot, decreasing the usefulness of -Xlog:gc*=info
jon.masamitsu at oracle.com
Tue Sep 6 15:54:20 UTC 2016
Thanks for fixing this.
On 9/5/2016 11:50 AM, Thomas Schatzl wrote:
> Hi all,
> can I have reviews for this small change that fixes log spamming of
> the form
> [26.584s][info][gc,task ] GC(15) GC Workers: using 18 out of 18
> [26.585s][info][gc,task ] GC(15) GC Workers: using 18 out of 18
> that is repeated like 10 times per gc. This kind of clogs the
> PrintGCDetails output.
> This log message originates from WorkGang::update_active_workers(),
> every time the number of active workers is updated. Since with jdk9
> this occurs quite often, you get a lot of these messages.
> Looking at the code, there are actually two concerns here: first,
> notifying the user that the (default) number of a worker for the
> workgang has changed due to policy, second some apparent dev message
> notifying of any change of the number of workers.
> We want the first kind of message at relatively high log level, but not
> necessarily the second.
> So the solution is to add a info level message at the places where the
> code consciously updates the number of default threads (once per
> gc/marking), and move the developer messages about any change to the
> number of workers to trace level.
> I added a few (imo) out-of-scope CRs to improve the developer messages
> (JDK-8165449) and make sure that every time we run a gang task a useful
> message is printed (i.e. unify the message, because at the moment this
> is at the discretion of the developer when adding a new gang
> task), JDK-8165450.
> jprt, test case
Changes look good.
More information about the hotspot-gc-dev