RFR 8247471: Enhance CPU load events with the actual elapsed CPU time

Jaroslav Bachorík jaroslav.bachorik at datadoghq.com
Thu Jun 18 17:41:45 UTC 2020


Hi Erik,


On Mon, Jun 15, 2020 at 10:20 AM Erik Gahlin <erik.gahlin at oracle.com> wrote:
>
> Hi Jaroslav,
>
> I wonder if we should remove CPU from the field names and labels in metadata.xml
>
> <Field type="long" contentType="nanos" name="jvmUserCpuTime" label="Elapsed JVM UserTime”/>
>
> becomes
>
> <Field type="long" contentType="nanos" name="jvmUserTime" label="Elapsed JVM User Time”/>
>
> CPU is implicit from the event name and we don’t have it for the other fields.

Changed: http://cr.openjdk.java.net/~jbachorik/8247471/webrev.01/

>
> When does machineTotalCpuTime start?
>
> From when the machine booted or when the JVM process started?
>
> Maybe we want to make that clear in a description.

I re-checked the descriptions and all attributes are defined as
'elapsed' time which kind of evokes the delta against the previous
state. I agree that it might not be immediately 100% clear but if I am
going to enhance the description I would need guidance about how much
text is not too much - eg. would something like 'JVM System CPU Time
Elapsed Since Previous CPU Load Event' (and similar) be acceptable?

Thanks,

-JB-

>
> Erik
>
> > On 12 Jun 2020, at 12:08, Jaroslav Bachorík <jaroslav.bachorik at datadoghq.com> wrote:
> >
> > Hi all,
> >
> > Here is my attempt at adding the elapsed CPU time to
> > ThreadCPULoadEvent and CPULoadEvent JFR events.
> >
> > I have tested the implementation on Linux, MacOS and Windows and it is
> > working as expected.
> > However, I am not an expert on all of those platforms so if there is
> > an easier way to get the elapsed CPU time than what I am doing now I
> > am open to suggestions.
> >
> > JIRA: https://bugs.openjdk.java.net/browse/JDK-8247471
> > Webrev: http://cr.openjdk.java.net/~jbachorik/8247471
> >
> > Thanks!
> >
> > -JB-
>


More information about the hotspot-jfr-dev mailing list