RFR: 8266723: JFR periodic events are causing extra allocations

Thomas Stüfe thomas.stuefe at gmail.com
Mon May 17 12:13:39 UTC 2021


On Mon, May 17, 2021 at 2:11 PM Andrew Dinn <adinn at redhat.com> wrote:

>
> On 17/05/2021 12:44, Jaroslav Bachorík wrote:
> > JDK 11 has the full implementation of JVM logging and the
> > 'should_log()' implementation is based on it.
>
> >> One small point, is it not excessive to always dive into native
> >> coding for querying the log state? How hot is this coding? Ideally
> >> logging should not cause overhead if logging is disabled. Would it not
> >> be sufficient to cache the value in java?
> >
> > Good point. I will add caching.
> That first statement makes me wonder about the need for this? Is the log
> setting also cached in jdk11? If not then I wonder whether this is
> really needed.
>
>
I agree, we should have the same solution in both releases.

Wrt caching, logging can be switched off and on via jcmd, so caching is a
trade off function wise. That's why I asked how hot the code is.

Cheers, Thomas


> regards,
>
>
> Andrew Dinn
> -----------
> Red Hat Distinguished Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill
>
>


More information about the jdk8u-dev mailing list