RFR: 8267952: async logging supports to dynamically change tags and decorators [v2]

David Holmes dholmes at openjdk.java.net
Thu Jun 10 13:02:21 UTC 2021


On Thu, 10 Jun 2021 12:56:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> C++ makes no guarantees about atomicity unless using C++ atomic operations. Yes they probably are atomic but we don't rely on "probably". If a variable is being accessed lock-free and can take part in data-race then please just use Atomic::load and store for simple accesses (assuming they are correct in the context of how the variable can be used concurrently).
>
> Sorry I just realized what you are saying here. This is a LogDecorator type not a primitive type so the notion of atomic load/store doesn't make sense. The comments about it being a bitfield threw me.

It is the load/store of `uint _decorators;` that needs to be atomic.

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

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


More information about the hotspot-runtime-dev mailing list