RFR: JDK-8266536: Provide a variant of os::iso8601_time which works with arbitrary timestamps [v5]
Thomas Stuefe
stuefe at openjdk.java.net
Fri May 7 07:11:28 UTC 2021
> We have os::iso8601_time(), which gives an ISO8601 timestamp of the current time. It would be very useful to have a second variant which can be fed an arbitrary numerical timestamp.
>
> This is useful in the context of making asynchronous UL logging cheaper (see JDK-8229517)
>
> This patch provides an additional API:
> `char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t buffer_length, bool utc);`
> alongside the existing
> `char* os::iso8601_time(char* buffer, size_t buffer_length, bool utc);`
> and implements the latter using the former. Not much code added.
>
> In addition, it adds a regression gtest for these APIs.
>
> Please ignore the harfbuzz change, its a build fix needed for older gcc, will be removed before final push.
>
> Testing: GHA, manual gtests, SAP nightlies on all our platforms.
>
> Thanks, Thomas
Thomas Stuefe has updated the pull request incrementally with two additional commits since the last revision:
- remove stray edit
- Yasumasa-feedback-2
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3869/files
- new: https://git.openjdk.java.net/jdk/pull/3869/files/e6461c58..2b6e20f1
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3869&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3869&range=03-04
Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/3869.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3869/head:pull/3869
PR: https://git.openjdk.java.net/jdk/pull/3869
More information about the hotspot-runtime-dev
mailing list