RFR: 8355627: Don't use ThreadCritical for EventLog list

Coleen Phillimore coleenp at openjdk.org
Wed Apr 30 11:55:49 UTC 2025


On Tue, 29 Apr 2025 19:16:48 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Use LockFreeStack to link events on the eventLog queue.  They are never popped so this requires no further synchronization.
> Tested by tier1-4.

So I was playing around with LockFreeStack because I thought it might be a good way to avoid writing yet another CAS loop in the code.  But you're right, I don't really use LockFreeStack which isn't so lock free since it requires synchronization to pop.  I couldn't decide whether I wanted to use it partially or write the CAS loop.  I take it this is a vote for the CAS loop.

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

PR Comment: https://git.openjdk.org/jdk/pull/24954#issuecomment-2841733834


More information about the hotspot-dev mailing list