RFR: 8266723: JFR periodic events are causing extra allocations

Thomas Stüfe thomas.stuefe at gmail.com
Mon May 17 11:33:54 UTC 2021


Hi,

I'm curious, how is this problem solved in later backport releases (eg
JDK11)?

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?

Cheers, Thomas


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

> Hi Jaroslav,
>
> The patch looks good to me so consider it reviewed.
>
> I agree that testing on other architectures would be a good idea even
> though the code changes are clearly independent of architecture.
>
> 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
>
> On 17/05/2021 09:27, Jaroslav Bachorík wrote:
> > Gentle ping?
> >
> > -JB-
> >
> > On Fri, May 7, 2021 at 5:54 PM Jaroslav Bachorík
> > <jaroslav.bachorik at datadoghq.com> wrote:
> >>
> >> Please, review the following fix.
> >>
> >> JIRA:  https://bugs.openjdk.java.net/browse/JDK-8266723
> >> Webrev:
> >>   - hotspot:
> http://cr.openjdk.java.net/~jbachorik/8266723/hotspot/00/webrev/
> >>   - jdk: http://cr.openjdk.java.net/~jbachorik/8266723/jdk/00/webrev/
> >>
> >> In short, the JFR backport for JDK 8 could not bring in the whole JVM
> >> logging framework and took a several shortcuts. Unfortunately, one of
> >> the shortcuts is causing the log messages always generated but not
> >> persisted resulting in possible disturbance in GC due to excessive
> >> allocations.
> >>
> >> The gist of the patch is binding the java side JFR logger log level
> >> check with the global 'LogJFR' flag which is already used in the
> >> native JFR logger implementation.
> >>
> >> The path builds fine and passes tier1 and jfr tests on linux. Since
> >> the changes are not platform specific I am expecting the tests passing
> >> on other platforms as well.
> >> If there is a volunteer able to run tests for this patch on more
> >> platforms it would be welcome.
> >>
> >> Cheers,
> >>
> >> -JB-
> >
>
>


More information about the jdk8u-dev mailing list