Small question about JDK-8253064 and ObjectMonitor allocation
Thomas Stüfe
thomas.stuefe at gmail.com
Mon Jan 31 04:32:05 UTC 2022
Hi,
I have a small question about a detail of JDK-8253064.
IIUC, before this patch, the VM kept thread-local freelists of
pre-allocated ObjectMonitors to reduce allocation contention. Now we just
malloc monitors right away.
I looked through the issue and the associated PR, but could find no
information on why this was done. Dan describes what he did very well:
https://github.com/openjdk/jdk/pull/642#issuecomment-720753946, but not
why.
I assume that the complexity and memory overhead of the free lists was not
worth it? That you found that malloc() is on our platforms "uncontented"
enough?
Thank you,
Thomas
More information about the hotspot-runtime-dev
mailing list