OSDN Git Service

am beeeb788: am 05fa5fd5: Merge "Simplify merges of the annotation code."
[android-x86/dalvik.git] / vm / Sync.cpp
index eea5116..f42004c 100644 (file)
@@ -98,11 +98,7 @@ Monitor* dvmCreateMonitor(Object* obj)
 
     mon = (Monitor*) calloc(1, sizeof(Monitor));
     if (mon == NULL) {
-        LOGE("Unable to allocate monitor");
-        dvmAbort();
-    }
-    if (((u4)mon & 7) != 0) {
-        LOGE("Misaligned monitor: %p", mon);
+        ALOGE("Unable to allocate monitor");
         dvmAbort();
     }
     mon->obj = obj;
@@ -566,7 +562,7 @@ static void absoluteTime(s8 msec, s4 nsec, struct timespec *ts)
 #endif
     endSec = ts->tv_sec + msec / 1000;
     if (endSec >= 0x7fffffff) {
-        LOGV("NOTE: end time exceeds epoch");
+        ALOGV("NOTE: end time exceeds epoch");
         endSec = 0x7ffffffe;
     }
     ts->tv_sec = endSec;
@@ -908,7 +904,7 @@ retry:
                 goto retry;
             }
         } else {
-            LOGV("(%d) spin on lock %p: %#x (%#x) %#x",
+            ALOGV("(%d) spin on lock %p: %#x (%#x) %#x",
                  threadId, &obj->lock, 0, *thinp, thin);
             /*
              * The lock is owned by another thread.  Notify the VM
@@ -970,13 +966,13 @@ retry:
                      * Let the VM know we are no longer waiting and
                      * try again.
                      */
-                    LOGV("(%d) lock %p surprise-fattened",
+                    ALOGV("(%d) lock %p surprise-fattened",
                              threadId, &obj->lock);
                     dvmChangeStatus(self, oldStatus);
                     goto retry;
                 }
             }
-            LOGV("(%d) spin on lock done %p: %#x (%#x) %#x",
+            ALOGV("(%d) spin on lock done %p: %#x (%#x) %#x",
                  threadId, &obj->lock, 0, *thinp, thin);
             /*
              * We have acquired the thin lock.  Let the VM know that
@@ -987,7 +983,7 @@ retry:
              * Fatten the lock.
              */
             inflateMonitor(self, obj);
-            LOGV("(%d) lock %p fattened", threadId, &obj->lock);
+            ALOGV("(%d) lock %p fattened", threadId, &obj->lock);
         }
     } else {
         /*
@@ -1090,7 +1086,7 @@ void dvmObjectWait(Thread* self, Object *obj, s8 msec, s4 nsec,
          * any other thread gets a chance.
          */
         inflateMonitor(self, obj);
-        LOGV("(%d) lock %p fattened by wait()", self->threadId, &obj->lock);
+        ALOGV("(%d) lock %p fattened by wait()", self->threadId, &obj->lock);
     }
     mon = LW_MONITOR(obj->lock);
     waitMonitor(self, mon, msec, nsec, interruptShouldThrow);
@@ -1370,7 +1366,7 @@ retry:
         dvmUnlockThreadList();
         goto retry;
     }
-    LOGE("object %p has an unknown hash state %#x", obj, hashState);
+    ALOGE("object %p has an unknown hash state %#x", obj, hashState);
     dvmDumpThread(dvmThreadSelf(), false);
     dvmAbort();
     return 0;  /* Quiet the compiler. */