VM.sysWrite("  Locking thread: "); thread.dump(1);
VM.sysWrite("GC Warning:  Locking thread: "); t.dump(1);
  public void acquire() {    int retryCountdown = TIMEOUT_CHECK_FREQ;    double localStart = 0.0; // Avoid getting time unnecessarily    double lastSlowReport = 0.0;    while (!VM_Synchronization.tryCompareAndSwap(this, lockFieldOffset, UNLOCKED, LOCKED)) {      if (localStart == 0.0) 	lastSlowReport = localStart = VM_Time.now();      retryCountdown--;      if (retryCountdown == 0) {	retryCountdown = TIMEOUT_CHECK_FREQ;	double now = VM_Time.now();	double lastReportDuration = now - lastSlowReport;	double waitTime = now - localStart;	if (lastReportDuration > SLOW_THRESHOLD) {	    lastSlowReport = now;	    VM.sysWrite("\nWarning: possible slow or deadlock - failed to acquire lock ", id);	    VM.sysWrite(" (", name);	    VM.sysWrite(")  after ", 1000.0 * waitTime);	    VM.sysWriteln(" ms");	    if (thread == null) 		VM.sysWriteln("  Locking thread unknown");	    else {		VM.sysWrite("  Locking thread: "); thread.dump(1); 		VM.sysWriteln(" at position ", where);	    }	}	if (waitTime > TIME_OUT) {	    VM.sysWrite("Locked out thread: "); 	    VM_Thread.getCurrentThread().dump(1); 	    VM.sysWriteln("\nWill now spin for one second and die");	    VM_Scheduler.dumpStack();	    VM_Interface.busyWait(1.0);	    VM.sysFail("Deadlock or someone holding on to lock for too long");	}      }    }    if (REPORT_SLOW_LOCK) {      setStart(VM_Time.now());      setThread(VM_Thread.getCurrentThread());    }    if (verbose > 1) {      VM.sysWrite("Thread ");      thread.dump();      VM.sysWrite(" acquired lock ", id);      VM.sysWriteln(" ", name);    }    VM_Magic.isync();  }