Пример #1
0
    public void notify(Object... args) {
      lockOperations = 0;
      unlockOperations = 0;
      deflations = 0;

      ThinLock.notifyAppRunStart("", 0);
    }
Пример #2
0
    public void notify(Object... args) {
      int totalLocks = lockOperations + ThinLock.fastLocks + ThinLock.slowLocks;

      RVMThread.dumpStats();
      VM.sysWrite(" notifyAll operations\n");
      VM.sysWrite("FatLocks: ");
      VM.sysWrite(lockOperations);
      VM.sysWrite(" locks");
      Services.percentage(lockOperations, totalLocks, "all lock operations");
      VM.sysWrite("FatLocks: ");
      VM.sysWrite(unlockOperations);
      VM.sysWrite(" unlock operations\n");
      VM.sysWrite("FatLocks: ");
      VM.sysWrite(deflations);
      VM.sysWrite(" deflations\n");

      ThinLock.notifyExit(totalLocks);
      VM.sysWriteln();

      VM.sysWrite("lock availability stats: ");
      VM.sysWriteInt(globalLocksAllocated);
      VM.sysWrite(" locks allocated, ");
      VM.sysWriteInt(globalLocksFreed);
      VM.sysWrite(" locks freed, ");
      VM.sysWriteInt(globalFreeLocks);
      VM.sysWrite(" free locks\n");
    }
Пример #3
0
 /**
  * Disassociates this heavy-weight lock from the indicated object. This lock is not held, nor are
  * any threads on its queues. Note: the mutex for this lock is held when deflate is called.
  *
  * @param o the object from which this lock is to be disassociated
  */
 private void deflate(Object o, Offset lockOffset) {
   if (VM.VerifyAssertions) {
     VM._assert(lockedObject == o);
     VM._assert(recursionCount == 0);
     VM._assert(entering.isEmpty());
     VM._assert(waiting.isEmpty());
   }
   if (STATS) deflations++;
   ThinLock.markDeflated(o, lockOffset, index);
   lockedObject = null;
   free(this);
 }