RFR: 8148630: Convert TraceStartupTime to Unified Logging
Coleen Phillimore
coleen.phillimore at oracle.com
Wed Feb 17 20:31:03 UTC 2016
On 2/16/16 11:40 PM, Kim Barrett wrote:
>> On Feb 16, 2016, at 8:44 PM, David Holmes <david.holmes at oracle.com> wrote:
>>> TraceTime timer("Initialize java.lang classes",
>>> log_is_enabled(Info, startuptime),
>>> LogWriter(Info, startuptime));
>>>
>> I've added the above to JDK-8150015. However I would much prefer that we can write simply:
>>
>> TraceTime timer (<msg>, <log-tag>, <log-level>);
>>
>> and internalize the log_is_enabled and LogWriter functionality.
> I think that’s hard, but relatively easy would be something like
>
> TraceTime timer(<msg>, LogTime(<level>, <tag>…);
I agree with David. Anything more verbose than:
TraceTime timer(msg, log-tag, log-level);
is not really desirable. I think the purpose of logging is to not add
distraction to mainline code, whose purpose is to do something other
than logging what it's doing.
Anything more verbose is also worse than the current solution of
subclassing to use the tag as a constant and always logging at level
Info. In this case the mainline code is not visually distracting. But
I've already expressed that opinion.
TraceStartupTime timer("msg");
Coleen
>
More information about the hotspot-runtime-dev
mailing list