RFR: 8267579: Thread::cooked_allocated_bytes() hits assert(left >= right) failed: avoid underflow [v2]

Markus Grönlund mgronlun at openjdk.java.net
Wed Jun 9 08:50:19 UTC 2021


On Mon, 7 Jun 2021 07:01:12 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   read once
>
> This is a race-condition and will potentially fail just the same way the bug in #4224 did. There needs to be at least Atomic::loads of the the variables, or the compiler could convert the loads into multiple loads.

@stefank @dholmes-ora Are you ok with the suggested fix? The decision to have the impl in the .cpp is to avoid having to include runtime/atomic.hpp in the .inline.hpp file unnecessarily (not deemed performance sensitive). Let me know if you prefer the impl in the .inline.hpp instead.

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

PR: https://git.openjdk.java.net/jdk/pull/4363


More information about the hotspot-jfr-dev mailing list