RFR: 8244661: JFR: Remove use of thread-locals for java.base events

Jaroslav Bachorík jaroslav.bachorik at datadoghq.com
Tue May 12 10:08:13 UTC 2020


Great, thanks for taking care of that!

Approved!

Cheers,

-JB-

On Mon, May 11, 2020 at 7:46 PM Erik Gahlin <erik.gahlin at oracle.com> wrote:
>
> Hi Jaroslav,
>
> It’s kind of checked in the added methods in EventHandler.
>
> There must be an override or the base class version is invoked and an internal error is thrown. The generated subclasses only have one write method so they must match up.  If the order of two types with the same data type would switch, it would go unnoticed. I added a test that checks that fields have not been altered.
>
> Erik
>
> > On 11 May 2020, at 15:43, Jaroslav Bachorík <jaroslav.bachorik at datadoghq.com> wrote:
> >
> > Hi Erik,
> >
> > A bit naive question - would it be possible to validate the correct
> > order of `handler.write()` arguments such that they correspond to the
> > event fields during testing somehow (in addition to having the warning
> > comments in sources)?
> >
> > Thanks!
> >
> > -JB-
> >
> > On Sat, May 9, 2020 at 11:45 PM Erik Gahlin <erik.gahlin at oracle.com> wrote:
> >>
> >> Hi,
> >>
> >> Could I have a review of change that removes object caching for performance sensitive events in java.base. Instead events are written directly using the event handler. Purpose is to avoid memory bloat when using thread-locals together with virtual threads for project Loom, but it will benefit ordinary threads as well, so plan is to check it in for JDK 15.
> >>
> >> Bug:
> >> https://bugs.openjdk.java.net/browse/JDK-8244661
> >>
> >> Webrev:
> >> http://cr.openjdk.java.net/~egahlin/8244661/
> >>
> >> Testing: jdk/jdk/jfr + reproducer in the original allocation bug
> >> https://bugs.openjdk.java.net/browse/JDK-8187234
> >>
> >> Thanks
> >> Erik
> >>
>


More information about the hotspot-jfr-dev mailing list