< prev index next >

src/hotspot/share/oops/markWord.cpp

Print this page
*** 22,14 ***
--- 22,23 ---
   *
   */
  
  #include "precompiled.hpp"
  #include "oops/markWord.hpp"
+ #include "runtime/basicLock.inline.hpp"
  #include "runtime/javaThread.hpp"
  #include "runtime/objectMonitor.inline.hpp"
  #include "utilities/ostream.hpp"
  
+ #ifdef _LP64
+ STATIC_ASSERT((markWord::klass_shadow_mask_inplace & markWord::klass_mask_in_place) == 0);
+ STATIC_ASSERT((markWord::klass_load_shift + markWord::klass_shadow_bits) == markWord::klass_shift);
+ STATIC_ASSERT(markWord::klass_shift + markWord::klass_bits == 64);
+ // The hash (preceding nKlass) shall be a direct neighbor but not interleave
+ STATIC_ASSERT(markWord::klass_shift == markWord::hash_bits_compact + markWord::hash_shift_compact);
+ #endif
+ 
  markWord markWord::displaced_mark_helper() const {
    assert(has_displaced_mark_helper(), "check");
    if (has_monitor()) {
      // Has an inflated monitor. Must be checked before has_locker().
      ObjectMonitor* monitor = this->monitor();

*** 65,11 ***
    if (is_marked()) {  // last bits = 11
      st->print(" marked(" INTPTR_FORMAT ")", value());
    } else if (has_monitor()) {  // last bits = 10
      // have to check has_monitor() before is_locked()
      st->print(" monitor(" INTPTR_FORMAT ")=", value());
!     if (print_monitor_info) {
        ObjectMonitor* mon = monitor();
        if (mon == nullptr) {
          st->print("null (this should never be seen!)");
        } else {
          mon->print_on(st);
--- 74,11 ---
    if (is_marked()) {  // last bits = 11
      st->print(" marked(" INTPTR_FORMAT ")", value());
    } else if (has_monitor()) {  // last bits = 10
      // have to check has_monitor() before is_locked()
      st->print(" monitor(" INTPTR_FORMAT ")=", value());
!     if (print_monitor_info && !UseObjectMonitorTable) {
        ObjectMonitor* mon = monitor();
        if (mon == nullptr) {
          st->print("null (this should never be seen!)");
        } else {
          mon->print_on(st);
< prev index next >