Shenandoah Events
zgu at redhat.com
zgu at redhat.com
Mon Jan 14 22:03:31 UTC 2019
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_layo
> > ut/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.jf
> > r/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
> >
> > > > > > > >
> >
More information about the shenandoah-dev
mailing list