< prev index next >

src/hotspot/share/runtime/synchronizer.cpp

Print this page
rev 51786 : imported patch syncknobs-06-Knob_Verbose
rev 51787 : imported patch syncknobs-07-Knob_VerifyInUse
rev 51788 : imported patch syncknobs-08-Knob_VerifyMatch

@@ -1048,26 +1048,15 @@
   // More precisely, trigger an asynchronous STW safepoint as the number
   // of active monitors passes the specified threshold.
   // TODO: assert thread state is reasonable
 
   if (ForceMonitorScavenge == 0 && Atomic::xchg (1, &ForceMonitorScavenge) == 0) {
-    if (ObjectMonitor::Knob_Verbose) {
-      tty->print_cr("INFO: Monitor scavenge - Induced STW @%s (%d)",
-                    Whence, ForceMonitorScavenge) ;
-      tty->flush();
-    }
     // Induce a 'null' safepoint to scavenge monitors
     // Must VM_Operation instance be heap allocated as the op will be enqueue and posted
     // to the VMthread and have a lifespan longer than that of this activation record.
     // The VMThread will delete the op when completed.
     VMThread::execute(new VM_ScavengeMonitors());
-
-    if (ObjectMonitor::Knob_Verbose) {
-      tty->print_cr("INFO: Monitor scavenge - STW posted @%s (%d)",
-                    Whence, ForceMonitorScavenge) ;
-      tty->flush();
-    }
   }
 }
 
 void ObjectSynchronizer::verifyInUse(Thread *Self) {
   ObjectMonitor* mid;

@@ -1108,13 +1097,10 @@
       guarantee(m->object() == NULL, "invariant");
       if (MonitorInUseLists) {
         m->FreeNext = Self->omInUseList;
         Self->omInUseList = m;
         Self->omInUseCount++;
-        if (ObjectMonitor::Knob_VerifyInUse) {
-          verifyInUse(Self);
-        }
       } else {
         m->FreeNext = NULL;
       }
       return m;
     }

@@ -1248,13 +1234,10 @@
         } else if (cur_mid_in_use != NULL) {
           cur_mid_in_use->FreeNext = mid->FreeNext; // maintain the current thread in-use list
         }
         extracted = true;
         Self->omInUseCount--;
-        if (ObjectMonitor::Knob_VerifyInUse) {
-          verifyInUse(Self);
-        }
         break;
       }
     }
     assert(extracted, "Should have extracted from in-use list");
   }

@@ -1761,18 +1744,10 @@
 void ObjectSynchronizer::finish_deflate_idle_monitors(DeflateMonitorCounters* counters) {
   gMonitorFreeCount += counters->nScavenged;
 
   // Consider: audit gFreeList to ensure that gMonitorFreeCount and list agree.
 
-  if (ObjectMonitor::Knob_Verbose) {
-    tty->print_cr("INFO: Deflate: InCirc=%d InUse=%d Scavenged=%d "
-                  "ForceMonitorScavenge=%d : pop=%d free=%d",
-                  counters->nInCirculation, counters->nInuse, counters->nScavenged, ForceMonitorScavenge,
-                  gMonitorPopulation, gMonitorFreeCount);
-    tty->flush();
-  }
-
   ForceMonitorScavenge = 0;    // Reset
 
   OM_PERFDATA_OP(Deflations, inc(counters->nScavenged));
   OM_PERFDATA_OP(MonExtant, set_value(counters->nInCirculation));
 

@@ -1794,13 +1769,10 @@
   Thread::muxAcquire(&gListLock, "scavenge - return");
 
   // Adjust counters
   counters->nInCirculation += thread->omInUseCount;
   thread->omInUseCount -= deflated_count;
-  if (ObjectMonitor::Knob_VerifyInUse) {
-    verifyInUse(thread);
-  }
   counters->nScavenged += deflated_count;
   counters->nInuse += thread->omInUseCount;
 
   // Move the scavenged monitors back to the global free list.
   if (freeHeadp != NULL) {

@@ -1825,19 +1797,10 @@
 
  public:
   ReleaseJavaMonitorsClosure(Thread* thread) : THREAD(thread) {}
   void do_monitor(ObjectMonitor* mid) {
     if (mid->owner() == THREAD) {
-      if (ObjectMonitor::Knob_VerifyMatch != 0) {
-        ResourceMark rm;
-        Handle obj(THREAD, (oop) mid->object());
-        tty->print("INFO: unexpected locked object:");
-        javaVFrame::print_locked_object_class_name(tty, obj, "locked");
-        fatal("exiting JavaThread=" INTPTR_FORMAT
-              " unexpectedly owns ObjectMonitor=" INTPTR_FORMAT,
-              p2i(THREAD), p2i(mid));
-      }
       (void)mid->complete_exit(CHECK);
     }
   }
 };
 
< prev index next >