Object to ObjectMonitor mapping using a HashTable to avoid displaced headers
Axel Boldt-Christmas
axel.boldt-christmas at oracle.com
Wed Jan 31 15:41:57 UTC 2024
Hello,
We at Oracle have been working on an effort to make the Klass* stable (and avoid displaced headers) with Lilliput’s 64-bit headers.
Some background to the issue.
With the introduction of Lilliput and 64-bit headers it creates a scenario where both the narrowKlass* and the ObjectMonitor* cannot fit inside the markWord at the same time. The current solution is to place the Klass* in a displaced header. LM_LIGHTWEIGHT was introduced to the JDK project partially because the same issue existed with LM_LEGACY and the BasicLock*.
Having the Klass* not be displaced is something we see it as a pre-requisite for integrating Lilliput in the JDK.
As mentioned we have been working on a solution which uses an external hash table to map objects to their respective ObjectMonitor. With per thread caches to speed up retrieval in compiled code. The work has been done under the name OMWorld (ObjectMonitor World). The solution was initially based on LM_LIGHTWEIGHT but has been separated into a fourth locking mode.
It is time to open up the work to the broader community, and make it part of the Lilliput project. Creating a central base to work from inside the Lilliput project and repository.
Here are the latest rebased branches both on the OpenJDK/JDK master and the OpenJDK/Lilliput master.
Latest OMWorld on Mainline: https://github.com/xmas92/jdk/tree/omworld-as-new-lm
Latest OMWorld on Lilliput: https://github.com/xmas92/lilliput/tree/omworld-as-new-lm-on-lilliput
Hopefully Roman can coordinate the creation of branches in the Lilliput repo which we all can work against.
Sincerely
// Axel Boldt-Christmas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/lilliput-dev/attachments/20240131/0e48a585/attachment-0001.htm>
More information about the lilliput-dev
mailing list