Shenandoah Events

Jie Kang jkang at redhat.com
Fri Jan 11 18:02:39 UTC 2019


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/webrev.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,

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