RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v23]
Paul Hohensee
phh at openjdk.org
Tue May 30 15:57:19 UTC 2023
On Tue, 30 May 2023 14:20:12 GMT, Volker Simonis <simonis at openjdk.org> wrote:
>> Fixed using a high water mark.
>
> A simple fix for guaranteeing monotonicity, would be to add another field (e.g. `max_allocated_bytes`) which keeps the last result returned by `getTotalThreadAllocatedBytes()` and the latter would then return the maximum of the current computation and `max_allocated_bytes`.
That's what I did. :) Thanks for your review!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1210491161
More information about the hotspot-runtime-dev
mailing list