RFR: 8298379: JFR: Some UNTIMED events only sets endTime

Erik Helin ehelin at openjdk.org
Thu Dec 8 13:32:05 UTC 2022


On Thu, 8 Dec 2022 13:22:35 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> Greetings,
> 
> It was pointed out that some UNTIMED events only call set_endtime(), and not the corresponding set_starttime(), for example some events in jfrPeriodic.cpp. UNTIMED events need to have both timestamps set, because the UNTIMED parameter denotes that the user takes on the responsibility for controlling time stamping.
> 
> This change rectifies a few places by adding the corresponding set_starttime() call.
> 
> Test: jdk_jfr
> 
> Thanks
> Markus

src/hotspot/share/gc/shared/objectCountEventSender.cpp line 57:

> 55:   T event(UNTIMED);
> 56:   if (event.should_commit()) {
> 57:     event.set_endtime(timestamp);

Suggestion:

    event.set_starttime(timestamp);

-------------

PR: https://git.openjdk.org/jdk/pull/11592


More information about the hotspot-dev mailing list