RFR: 8330053: JFR: Use LocalDateTime instead ZonedDateTime [v3]

Erik Gahlin egahlin at openjdk.org
Wed Apr 17 19:52:03 UTC 2024


On Wed, 17 Apr 2024 19:44:44 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

>> Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fallback for invalid timezone
>
> src/jdk.jfr/share/classes/jdk/jfr/internal/Repository.java line 112:
> 
>> 110:         } catch (DateTimeException d) {
>> 111:             Logger.log(LogTag.JFR, LogLevel.INFO, "Could not create LocalDateTime with the default time zone. Using UTC time zone for chunk filename.");
>> 112:             return LocalDateTime.ofEpochSecond(System.currentTimeMillis(), 0, ZoneOffset.UTC);
> 
> @egahlin 
> `System.currentTimeMillis()` - returns count of **milliseconds**, but `LocalDateTime.ofEpochSecond` expects epoch **seconds** instead of millis.

Good catch. I will file a bug to fix this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18729#discussion_r1569427403


More information about the hotspot-jfr-dev mailing list