Question about MarkOop
Andrew Haley
aph at redhat.com
Fri Jan 2 09:39:14 UTC 2015
On 26/12/14 17:36, Viacheslav Kovalevskyi wrote:
>
> In first case (before synchronization), real life:
> OFFSET SIZE TYPE DESCRIPTION VALUE
> 0 4 (object header) 0d 00 00 00 (0000 1101 0000 0000 0000 0000 0000 0000)
> 4 4 (object header) 00 00 00 00 (0000 0000 0000 0000 0000 0000 0000 0000)
> …
> according to dict this is:
> // unused:25 hash:31 -->| unused:1 age:4 biased_lock:1 lock:2 (normal object)
>
> question: why we have this strange first byte (0000 1101)? According to layout doc it should be unused
No it shouldn't: it says "age:4 biased_lock:1 lock:2" for the least-
significant bits.
> Second case is even funnier, real life:
> OFFSET SIZE TYPE DESCRIPTION VALUE
> 0 4 (object header) 0d 70 00 1a (0000 1101 0111 0000 0000 0000 0001 1010)
> 4 4 (object header) 9b 7f 00 00 (1001 1011 0111 1111 0000 0000 0000 0000)
> …
> according to dict this is:
> // JavaThread*:54 epoch:2 unused:1 age:4 biased_lock:1 lock:2 (biased object)
>
> question: why first byte remains the same, looks like Thread pointer was written to the different offset then it should (according to the doc).
> Also the first byte remains the same.
The status bits are the same.
Andrew.
More information about the hotspot-runtime-dev
mailing list