RFR: 8273239: Standardize Ticks APIs return type
David Holmes
dholmes at openjdk.java.net
Thu Sep 2 02:58:29 UTC 2021
On Wed, 1 Sep 2021 14:38:52 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change on return types of Ticks API.
>
> The call of `milliseconds()` in `spinYield.cpp` seems a bug to me, because the unit in the message is `usecs`. Therefore, I changed it to `microseconds()`.
>
> Test: tier1
src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.cpp line 135:
> 133: }
> 134: log_trace(jfr)("Measured CPU usage for %d threads in %.3f milliseconds", number_of_threads,
> 135: (double)(JfrTicks::now() - event_time).milliseconds());
I think this one is a simple bug - the wrong format specifier is being used. I don't think this expects to see e.g. 3.6 milliseconds. But confirm with JFR folk.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5332
More information about the hotspot-dev
mailing list