RFR: 8355627: Don't use ThreadCritical for EventLog list [v2]

Zhengyu Gu zgu at openjdk.org
Sat May 3 02:00:57 UTC 2025


On Fri, 2 May 2025 11:38:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> I guess we rely on memory ordering by address dependency on the reader's side.
>
> Yes we only used ThreadCritical to add to the list after the VM becomes multithreaded.  The list traversals (reads) are for hs_err_pid file printing, which presumably is single threaded at that point and presumably nothing is adding to the list.  I added Atomic::load() but I think it's not necessary to be a load_acquire.
> There are only about 10 items max on this list so far, so I think performance isn't a concern either way.

There is also a jcmd to print out events. In theory, that could be a problem if  CAS is unordered.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24954#discussion_r2072281836


More information about the hotspot-dev mailing list