Shenandoah Events

Ken Dobson kdobson at redhat.com
Wed Jan 16 20:25:26 UTC 2019


Hi Zhengyu,

Here's a new patch with all of the serialization moved to the
shenandoahJfrSupport files. Please give it a review when you get the chance.

Thanks,

Ken Dobson

On Tue, Jan 15, 2019 at 1:24 PM <zgu at redhat.com> wrote:

> Hi Ken,
>
> On Tue, 2019-01-15 at 12:50 -0500, Ken Dobson wrote:
>
> Hi Zhengyu,
>
> I've attached a new version of the patch with a working serializer added
> to it below. If you could review it that would be great. Specifically
> reviewing the ShenandoahHeapRegion.hpp file where I've added an end
> sentinel as well as made the RegionStates and region_state_to_string
> function public in order access them for the serializer. I had a look and
> didn't see any issues with doing so but there may be something I missed.
>
> Not sure if this list strips attachments but I'm still waiting on my
> authorship so I can use webrevs. If it gets stripped I'll send it to you
> offlist.
>
>
> Nice job!
>
> A couple of comments:
>
> - All changes made to jfr/recorder/checkpoint/types/jfrType.[cpp|hpp] and
> jfrTypeManager.cpp should move to shenandoahJfrSupport.[hpp|cpp]
> Basically, should follow what ZGC does in zTracer.
> The reason for this, is that, Shenandoah can be excluded at build time.
>
> - An extra character 'r' at L43 shenandoahHeapRegion.hpp
>
> Otherwise, looks good to me.
>
> Thanks,
>
> -Zhengyu
>
>
>
>
> Thanks,
>
> Ken Dobson
>
> On Mon, Jan 14, 2019 at 5:03 PM <zgu at redhat.com> wrote:
>
> On Mon, 2019-01-14 at 16:18 -0500, Ken Dobson wrote:
>
> Hi,
>
> They are being emitted correctly, we realized to get them to show in JMC
> you must enable experimental events in the Preferences. There is one issue
> with the events is the values of type *RegionState* display N/A because
> they require serialization I believe. I am currently looking into adding a
> serializer to the patch.
>
> Ah, make sense.
> Here are a few samples: src/hotspot/share/gc/z/zTracer.cpp
>
> Thanks,
>
> -Zhengyu
>
>
>
> Ken
>
> On Mon, Jan 14, 2019 at 3:27 PM <zgu at redhat.com> wrote:
>
> On Fri, 2019-01-11 at 15:20 -0500, Ken Dobson wrote:
> > Hi,
> >
> > Actually it shouldn't be in the default jfc file, you are able to
> > configure the events yourself by enabling them before you begin a
> > recording. You wouldn't want these events enabled by default, they
> > should be enabled explicitly by those who would like to use them.
> >
> > That being said I have been unable to get the events to show up in
> > the event browser. Using the jfr command from the CLI it appears the
> > events are being emitted correctly so it seems it's an issue on the
> > JMC side that I am currently attempting to solve.
> >
> Yes, you can enable the events at the point of recording from JMC, and
> seems that events are emitted.
>
> jfr summary ...
>
>  Event Type                              Count  Size (bytes)
> =============================================================
>  jdk.ShenandoahHeapRegionStateChange   3843823      94125936
>  jdk.ShenandoahHeapRegionInformation     63072       1332094
>
> I need to look into state change events, seems excessive ...
>
> Thanks,
>
> -Zhengyu
>
>
> > Ken
> >
> > On Fri, Jan 11, 2019 at 1:16 PM Jie Kang <jkang at redhat.com> wrote:
> > > On Fri, Jan 11, 2019 at 1:02 PM Jie Kang <jkang at redhat.com> wrote:
> > > >
> > > > On Fri, Jan 11, 2019 at 8:40 AM <zgu at redhat.com> wrote:
> > > > >
> > > > > Hi Guys,
> > > > >
> > > > > Here is my initial implementation of Shenandoah heap layout JFR
> > > events:
> > > > >
> > > > > http://cr.openjdk.java.net/~zgu/shenandoah/jfr_sh_heap_layout/w
> > > ebrev.00
> > > > > /
> > > > >
> > > > > The patch is good for jdk/jdk and shenandoah/jdk repos. I have
> > > no idea
> > > > > how to test it without JMC counterpart. If you have any
> > > suggestions,
> > > > > please let me know.
> > >
> > > Hi,
> > >
> > > Also, the default jfc file (java flight recording configuration)
> > > does
> > > not have the Shenandoah events enabled so they won't be fired
> > > unless
> > > you supply a custom jfc, or maybe patch the repo to produce a
> > > default.jfc that does have them enabled. It looks like ZGC related
> > > events are there so it should be fine to add Shenandoah ones as
> > > well.
> > >
> > > The jfc files in jdk/jdk are default.jfc and profile.jfc @
> > > http://hg.openjdk.java.net/jdk/jdk/file/fbc921683f02/src/jdk.jfr/sh
> > > are/conf/jfr
> > >
> > > Assuming the events work, they will be seen then.
> > >
> > >
> > > Regards,
> > >
> > > >
> > > > Hi,
> > > >
> > > > For testing without JMC, you can add options to the JVM to create
> > > a
> > > > flight recording and then use the CLI tool 'jfr' that is part of
> > > > OpenJDK to examine the jfr file for the existence of Shenandoah
> > > > events.
> > > >
> > > > Some hopefully helpful terminal output from a build of jdk/jdk:
> > > >
> > > > [jkang at unused-10-15-17-52 linux-x86_64-server-release]$
> > > jdk/bin/jfr
> > > > Tool for working with Flight Recorder files (.jfr)
> > > >
> > > > Before using this tool, you must have a recording file.
> > > > A file can be created by starting a recording from command line:
> > > >
> > > >  java
> > > -XX:StartFlightRecording:filename=recording.jfr,duration=30s ...
> > > >
> > > > A recording can also be started on already running Java Virtual
> > > Machine:
> > > >
> > > >  jcmd (to list available pids)
> > > >  jcmd <pid> JFR.start
> > > >
> > > > Recording data can be dumped to file using the JFR.dump command:
> > > >
> > > >  jcmd <pid> JFR.dump filename=recording.jfr
> > > >
> > > > The contents of the recording can then be printed, for example:
> > > >
> > > >  jfr print recording.jfr
> > > >
> > > >  jfr print --events CPULoad,GarbageCollection recording.jfr
> > > >
> > > >  jfr print --json --events CPULoad recording.jfr
> > > >
> > > >  jfr print --categories "GC,JVM,Java*" recording.jfr
> > > >
> > > >  jfr print --events "jdk.*" --stack-depth 64 recording.jfr
> > > >
> > > >  jfr summary recording.jfr
> > > >
> > > >  jfr metadata recording.jfr
> > > >
> > > > For more information about available commands, use 'jfr help'
> > > >
> > > >
> > > > Regards,
> > > >
> > > > >
> > > > > Hopefully, it is enough for you to get things started.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > -Zhengyu
> > > > >
> > > > > > On Wed, 2019-01-09 at 18:14 +0100, Mario Torre wrote:
> > > > > > > Hello all!
> > > > > > >
> > > > > > > I would like to have a quick meeting to discuss the JFR
> > > events in
> > > > > > > shenandoah, when would be a good time?
> > > > > > >
> > > > > > > I have a slot tomorrow at 3 PM (9AM your time I believe),
> > > would
> > > > > > > that
> > > > > > > work for you?
> > > > > > >
> > > > > > > Cheers,
> > > > > > > Mario
> > > > > > >
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newserializer.patch
Type: text/x-patch
Size: 24251 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/shenandoah-dev/attachments/20190116/54b7e448/newserializer-0001.patch>


More information about the shenandoah-dev mailing list