As far as I know an object's hash code is normally stored in the header word of the object, which, for example, may have the following layout in HotSpot:
| hash code | age | 0 | 01 |
According to the HotSpotInternals - Synchronization with biased locking enabled the header word layout looks in the following way:
| 0 |epoch| age | 0 | 01 |
Where does the hash code is then actually stored if needed when biased locking is enabled?
My understanding is that asking for the (identity) hashcode prevents biased locking - as we cannot store both the hashcode and thread id in the mark word. If you ask for the hashcode of the mutex you transfer to unbiased locking mode.
This is supported by the following taken from this blog: