Mercurial > hg > truffle
comparison src/share/vm/oops/markOop.hpp @ 1546:a00b51b2dda4
6948539: CMS+UseCompressedOops: placement of cms_free bit interferes with promoted object link
Summary: When using compressed oops, use compressed promoted pointers in b63:b31 of the mark word, so as not to interfere with the CMS "freeness bit" at b7. Updated mark-word layout documentation.
Reviewed-by: minqi, poonam, jmasa, coleenp
author | ysr |
---|---|
date | Mon, 17 May 2010 00:47:28 -0700 |
parents | 1ee8caae33af |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1545:cc387008223e | 1546:a00b51b2dda4 |
---|---|
25 // The markOop describes the header of an object. | 25 // The markOop describes the header of an object. |
26 // | 26 // |
27 // Note that the mark is not a real oop but just a word. | 27 // Note that the mark is not a real oop but just a word. |
28 // It is placed in the oop hierarchy for historical reasons. | 28 // It is placed in the oop hierarchy for historical reasons. |
29 // | 29 // |
30 // Bit-format of an object header (most significant first): | 30 // Bit-format of an object header (most significant first, big endian layout below): |
31 // | 31 // |
32 // 32 bits: unused:0 hash:25 age:4 biased_lock:1 lock:2 | 32 // 32 bits: |
33 // 64 bits: unused:24 hash:31 cms:2 age:4 biased_lock:1 lock:2 | 33 // -------- |
34 // unused:20 size:35 cms:2 age:4 biased_lock:1 lock:2 (if cms | 34 // hash:25 ------------>| age:4 biased_lock:1 lock:2 (normal object) |
35 // free chunk) | 35 // JavaThread*:23 epoch:2 age:4 biased_lock:1 lock:2 (biased object) |
36 // size:32 ------------------------------------------>| (CMS free block) | |
37 // PromotedObject*:29 ---------->| promo_bits:3 ----->| (CMS promoted object) | |
38 // | |
39 // 64 bits: | |
40 // -------- | |
41 // unused:25 hash:31 -->| unused:1 age:4 biased_lock:1 lock:2 (normal object) | |
42 // JavaThread*:54 epoch:2 unused:1 age:4 biased_lock:1 lock:2 (biased object) | |
43 // PromotedObject*:61 --------------------->| promo_bits:3 ----->| (CMS promoted object) | |
44 // size:64 ----------------------------------------------------->| (CMS free block) | |
45 // | |
46 // unused:25 hash:31 -->| cms_free:1 age:4 biased_lock:1 lock:2 (COOPs && normal object) | |
47 // JavaThread*:54 epoch:2 cms_free:1 age:4 biased_lock:1 lock:2 (COOPs && biased object) | |
48 // narrowOop:32 unused:24 cms_free:1 unused:4 promo_bits:3 ----->| (COOPs && CMS promoted object) | |
49 // unused:21 size:35 -->| cms_free:1 unused:7 ------------------>| (COOPs && CMS free block) | |
36 // | 50 // |
37 // - hash contains the identity hash value: largest value is | 51 // - hash contains the identity hash value: largest value is |
38 // 31 bits, see os::random(). Also, 64-bit vm's require | 52 // 31 bits, see os::random(). Also, 64-bit vm's require |
39 // a hash value no bigger than 32 bits because they will not | 53 // a hash value no bigger than 32 bits because they will not |
40 // properly generate a mask larger than that: see library_call.cpp | 54 // properly generate a mask larger than that: see library_call.cpp |
59 // times were seen when these bits were absent and an arbitrary age | 73 // times were seen when these bits were absent and an arbitrary age |
60 // assigned to all biased objects, because they tended to consume a | 74 // assigned to all biased objects, because they tended to consume a |
61 // significant fraction of the eden semispaces and were not | 75 // significant fraction of the eden semispaces and were not |
62 // promoted promptly, causing an increase in the amount of copying | 76 // promoted promptly, causing an increase in the amount of copying |
63 // performed. The runtime system aligns all JavaThread* pointers to | 77 // performed. The runtime system aligns all JavaThread* pointers to |
64 // a very large value (currently 128 bytes) to make room for the | 78 // a very large value (currently 128 bytes (32bVM) or 256 bytes (64bVM)) |
65 // age bits when biased locking is enabled. | 79 // to make room for the age bits & the epoch bits (used in support of |
80 // biased locking), and for the CMS "freeness" bit in the 64bVM (+COOPs). | |
66 // | 81 // |
67 // [JavaThread* | epoch | age | 1 | 01] lock is biased toward given thread | 82 // [JavaThread* | epoch | age | 1 | 01] lock is biased toward given thread |
68 // [0 | epoch | age | 1 | 01] lock is anonymously biased | 83 // [0 | epoch | age | 1 | 01] lock is anonymously biased |
69 // | 84 // |
70 // - the two lock bits are used to describe three states: locked/unlocked and monitor. | 85 // - the two lock bits are used to describe three states: locked/unlocked and monitor. |