< prev index next >

src/share/vm/oops/markOop.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -34,26 +34,26 @@
 //
 // Bit-format of an object header (most significant first, big endian layout below):
 //
 //  32 bits:
 //  --------
-//             hash:25 ------------>| age:4    biased_lock:1 lock:2 (normal object)
-//             JavaThread*:23 epoch:2 age:4    biased_lock:1 lock:2 (biased object)
+//             hash:24 ------------>| age:5    biased_lock:1 lock:2 (normal object)
+//             JavaThread*:22 epoch:2 age:5    biased_lock:1 lock:2 (biased object)
 //             size:32 ------------------------------------------>| (CMS free block)
 //             PromotedObject*:29 ---------->| promo_bits:3 ----->| (CMS promoted object)
 //
 //  64 bits:
 //  --------
-//  unused:25 hash:31 -->| unused:1   age:4    biased_lock:1 lock:2 (normal object)
-//  JavaThread*:54 epoch:2 unused:1   age:4    biased_lock:1 lock:2 (biased object)
+//  unused:24 hash:31 -->| unused:1   age:5    biased_lock:1 lock:2 (normal object)
+//  JavaThread*:53 epoch:2 unused:1   age:5    biased_lock:1 lock:2 (biased object)
 //  PromotedObject*:61 --------------------->| promo_bits:3 ----->| (CMS promoted object)
 //  size:64 ----------------------------------------------------->| (CMS free block)
 //
-//  unused:25 hash:31 -->| cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && normal object)
-//  JavaThread*:54 epoch:2 cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && biased object)
-//  narrowOop:32 unused:24 cms_free:1 unused:4 promo_bits:3 ----->| (COOPs && CMS promoted object)
-//  unused:21 size:35 -->| cms_free:1 unused:7 ------------------>| (COOPs && CMS free block)
+//  unused:24 hash:31 -->| cms_free:1 age:5    biased_lock:1 lock:2 (COOPs && normal object)
+//  JavaThread*:53 epoch:2 cms_free:1 age:5    biased_lock:1 lock:2 (COOPs && biased object)
+//  narrowOop:32 unused:23 cms_free:1 unused:5 promo_bits:3 ----->| (COOPs && CMS promoted object)
+//  unused:20 size:35 -->| cms_free:1 unused:8 ------------------>| (COOPs && CMS free block)
 //
 //  - hash contains the identity hash value: largest value is
 //    31 bits, see os::random().  Also, 64-bit vm's require
 //    a hash value no bigger than 32 bits because they will not
 //    properly generate a mask larger than that: see library_call.cpp

@@ -78,11 +78,11 @@
 //    times were seen when these bits were absent and an arbitrary age
 //    assigned to all biased objects, because they tended to consume a
 //    significant fraction of the eden semispaces and were not
 //    promoted promptly, causing an increase in the amount of copying
 //    performed. The runtime system aligns all JavaThread* pointers to
-//    a very large value (currently 128 bytes (32bVM) or 256 bytes (64bVM))
+//    a very large value (currently 1024 bytes (32bVM) or 2048 bytes (64bVM))
 //    to make room for the age bits & the epoch bits (used in support of
 //    biased locking), and for the CMS "freeness" bit in the 64bVM (+COOPs).
 //
 //    [JavaThread* | epoch | age | 1 | 01]       lock is biased toward given thread
 //    [0           | epoch | age | 1 | 01]       lock is anonymously biased

@@ -106,11 +106,11 @@
   // Conversion
   uintptr_t value() const { return (uintptr_t) this; }
 
  public:
   // Constants
-  enum { age_bits                 = 4,
+  enum { age_bits                 = 5,
          lock_bits                = 2,
          biased_lock_bits         = 1,
          max_hash_bits            = BitsPerWord - age_bits - lock_bits - biased_lock_bits,
          hash_bits                = max_hash_bits > 31 ? 31 : max_hash_bits,
          cms_bits                 = LP64_ONLY(1) NOT_LP64(0),

@@ -143,11 +143,11 @@
          hash_mask_in_place       = (address_word)hash_mask << hash_shift
 #endif
   };
 
   // Alignment of JavaThread pointers encoded in object header required by biased locking
-  enum { biased_lock_alignment    = 2 << (epoch_shift + epoch_bits)
+  enum { biased_lock_alignment    = 1 << (epoch_shift + epoch_bits)
   };
 
 #ifdef _WIN64
     // These values are too big for Win64
     const static uintptr_t hash_mask = right_n_bits(hash_bits);
< prev index next >