OSDN Git Service

Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
authorSteve Block <steveblock@google.com>
Wed, 4 Jan 2012 20:04:51 +0000 (20:04 +0000)
committerSteve Block <steveblock@google.com>
Thu, 5 Jan 2012 20:28:22 +0000 (20:28 +0000)
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ic558031c75b3702d90eb78bd730501ae5d3c077b

53 files changed:
dexopt/OptMain.cpp
libdex/DexOptData.cpp
libdex/SysUtil.cpp
vm/AllocTracker.cpp
vm/CheckJni.cpp
vm/Ddm.cpp
vm/Debugger.cpp
vm/Exception.cpp
vm/Hash.cpp
vm/IndirectRefTable.cpp
vm/Init.cpp
vm/InlineNative.cpp
vm/JarFile.cpp
vm/Jni.cpp
vm/LinearAlloc.cpp
vm/Misc.cpp
vm/Native.cpp
vm/PointerSet.cpp
vm/Profile.cpp
vm/RawDexFile.cpp
vm/SignalCatcher.cpp
vm/StdioConverter.cpp
vm/Thread.cpp
vm/alloc/Copying.cpp
vm/alloc/DdmHeap.cpp
vm/analysis/CodeVerify.cpp
vm/analysis/DexPrepare.cpp
vm/analysis/Liveness.cpp
vm/analysis/Optimize.cpp
vm/analysis/RegisterMap.cpp
vm/analysis/VfyBasicBlock.cpp
vm/compiler/Utility.cpp
vm/hprof/Hprof.cpp
vm/interp/Interp.cpp
vm/interp/Jit.cpp
vm/interp/Stack.cpp
vm/jdwp/JdwpAdb.cpp
vm/jdwp/JdwpEvent.cpp
vm/jdwp/JdwpHandler.cpp
vm/jdwp/JdwpMain.cpp
vm/jdwp/JdwpSocket.cpp
vm/mterp/Mterp.cpp
vm/native/dalvik_system_VMDebug.cpp
vm/native/dalvik_system_VMRuntime.cpp
vm/native/dalvik_system_VMStack.cpp
vm/native/dalvik_system_Zygote.cpp
vm/native/java_lang_VMThread.cpp
vm/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cpp
vm/oo/AccessCheck.cpp
vm/oo/Class.cpp
vm/os/android.cpp
vm/reflect/Proxy.cpp
vm/test/TestIndirectRefTable.cpp

index a3345b4..59b4d35 100644 (file)
@@ -541,7 +541,7 @@ bail:
      */
 #if 0
     if (vmStarted) {
-        LOGI("DexOpt shutting down, result=%d", result);
+        ALOGI("DexOpt shutting down, result=%d", result);
         dvmShutdown();
     }
 #endif
index 2af8ad6..a0d996d 100644 (file)
@@ -113,7 +113,7 @@ bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile)
             pDexFile->pRegisterMapPool = pOptData;
             break;
         default:
-            LOGI("Unknown chunk 0x%08x (%c%c%c%c), size=%d in opt data area",
+            ALOGI("Unknown chunk 0x%08x (%c%c%c%c), size=%d in opt data area",
                 *pOpt,
                 (char) ((*pOpt) >> 24), (char) ((*pOpt) >> 16),
                 (char) ((*pOpt) >> 8),  (char)  (*pOpt),
index d5c9528..09e1ce1 100644 (file)
@@ -334,7 +334,7 @@ int sysChangeMapAccess(void* addr, size_t length, int wantReadWrite,
     u1* alignAddr = (u1*) ((int) addr & ~(SYSTEM_PAGE_SIZE-1));
     size_t alignLength = length + ((u1*) addr - alignAddr);
 
-    //LOGI("%p/%zd --> %p/%zd", addr, length, alignAddr, alignLength);
+    //ALOGI("%p/%zd --> %p/%zd", addr, length, alignAddr, alignLength);
     int prot = wantReadWrite ? (PROT_READ|PROT_WRITE) : (PROT_READ);
     if (mprotect(alignAddr, alignLength, prot) != 0) {
         int err = errno;
index a9c7644..8ea3c05 100644 (file)
@@ -111,7 +111,7 @@ bool dvmEnableAllocTracker()
     dvmLockMutex(&gDvm.allocTrackerLock);
 
     if (gDvm.allocRecords == NULL) {
-        LOGI("Enabling alloc tracker (%d entries, %d frames --> %d bytes)",
+        ALOGI("Enabling alloc tracker (%d entries, %d frames --> %d bytes)",
             kNumAllocRecords, kMaxAllocRecordStackDepth,
             sizeof(AllocRecord) * kNumAllocRecords);
         gDvm.allocRecordHead = gDvm.allocRecordCount = 0;
@@ -351,7 +351,7 @@ static bool populateStringTables(PointerSet* classNames,
         idx = (idx + 1) & (kNumAllocRecords-1);
     }
 
-    LOGI("class %d/%d, method %d/%d, file %d/%d",
+    ALOGI("class %d/%d, method %d/%d, file %d/%d",
         dvmPointerSetGetCount(classNames), classCount,
         dvmPointerSetGetCount(methodNames), methodCount,
         dvmPointerSetGetCount(fileNames), fileCount);
@@ -555,7 +555,7 @@ bool dvmGenerateTrackedAllocationReport(u1** pData, size_t* pDataLen)
     totalSize += computeStringTableSize(classNames);
     totalSize += computeStringTableSize(methodNames);
     totalSize += computeStringTableSize(fileNames);
-    LOGI("Generated AT, size is %zd/%zd", baseSize, totalSize);
+    ALOGI("Generated AT, size is %zd/%zd", baseSize, totalSize);
 
     /*
      * Part 3: allocate a buffer and generate the output.
@@ -613,11 +613,11 @@ void dvmDumpTrackedAllocations(bool enable)
     int idx = headIndex();
     int count = gDvm.allocRecordCount;
 
-    LOGI("Tracked allocations, (head=%d count=%d)",
+    ALOGI("Tracked allocations, (head=%d count=%d)",
         gDvm.allocRecordHead, count);
     while (count--) {
         AllocRecord* pRec = &gDvm.allocRecords[idx];
-        LOGI(" T=%-2d %6d %s",
+        ALOGI(" T=%-2d %6d %s",
             pRec->threadId, pRec->size, pRec->clazz->descriptor);
 
         if (true) {
@@ -627,10 +627,10 @@ void dvmDumpTrackedAllocations(bool enable)
 
                 const Method* method = pRec->stackElem[i].method;
                 if (dvmIsNativeMethod(method)) {
-                    LOGI("    %s.%s (Native)",
+                    ALOGI("    %s.%s (Native)",
                         method->clazz->descriptor, method->name);
                 } else {
-                    LOGI("    %s.%s +%d",
+                    ALOGI("    %s.%s +%d",
                         method->clazz->descriptor, method->name,
                         pRec->stackElem[i].pc);
                 }
index 1025148..1d62136 100644 (file)
@@ -651,14 +651,14 @@ public:
             if (entry) {
                 if (mHasMethod) {
                     std::string methodName(dvmHumanReadableMethod(method, false));
-                    LOGI("JNI: %s -> %s(%s)", methodName.c_str(), mFunctionName, msg.c_str());
+                    ALOGI("JNI: %s -> %s(%s)", methodName.c_str(), mFunctionName, msg.c_str());
                     mIndent = methodName.size() + 1;
                 } else {
-                    LOGI("JNI: -> %s(%s)", mFunctionName, msg.c_str());
+                    ALOGI("JNI: -> %s(%s)", mFunctionName, msg.c_str());
                     mIndent = 0;
                 }
             } else {
-                LOGI("JNI: %*s<- %s returned %s", mIndent, "", mFunctionName, msg.c_str());
+                ALOGI("JNI: %*s<- %s returned %s", mIndent, "", mFunctionName, msg.c_str());
             }
         }
 
index 580fdfa..f7db955 100644 (file)
@@ -86,7 +86,7 @@ bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
     dvmCallMethod(self, gDvm.methDalvikDdmcServer_dispatch, NULL, &callRes,
         type, dataArray, offset, length);
     if (dvmCheckException(self)) {
-        LOGI("Exception thrown by dispatcher for 0x%08x", type);
+        ALOGI("Exception thrown by dispatcher for 0x%08x", type);
         dvmLogExceptionStackTrace();
         dvmClearException(self);
         goto bail;
@@ -180,7 +180,7 @@ static void broadcast(int event)
     dvmCallMethod(self, gDvm.methDalvikDdmcServer_broadcast, NULL, &unused,
         event);
     if (dvmCheckException(self)) {
-        LOGI("Exception thrown by broadcast(%d)", event);
+        ALOGI("Exception thrown by broadcast(%d)", event);
         dvmLogExceptionStackTrace();
         dvmClearException(self);
         return;
@@ -436,7 +436,7 @@ ArrayObject* dvmDdmGetStackTraceById(u4 threadId)
             break;
     }
     if (thread == NULL) {
-        LOGI("dvmDdmGetStackTraceById: threadid=%d not found", threadId);
+        ALOGI("dvmDdmGetStackTraceById: threadid=%d not found", threadId);
         dvmUnlockThreadList();
         return NULL;
     }
index d67df1e..b083821 100644 (file)
@@ -223,7 +223,7 @@ static ObjectId registerObject(const Object* obj, RegistryType type, bool reg)
     dvmHashTableLock(gDvm.dbgRegistry);
     if (!gDvm.debuggerConnected) {
         /* debugger has detached while we were doing stuff? */
-        LOGI("ignoring registerObject request in thread=%d",
+        ALOGI("ignoring registerObject request in thread=%d",
             dvmThreadSelf()->threadId);
         //dvmAbort();
         goto bail;
@@ -395,7 +395,7 @@ void dvmDbgActive()
     if (gDvm.debuggerActive)
         return;
 
-    LOGI("Debugger is active");
+    ALOGI("Debugger is active");
     dvmInitBreakpoints();
     gDvm.debuggerActive = true;
     dvmEnableAllSubMode(kSubModeDebuggerActive);
@@ -489,7 +489,7 @@ void dvmDbgExit(int status)
 {
     // TODO? invoke System.exit() to perform exit processing; ends up
     // in System.exitInternal(), which can call JNI exit hook
-    LOGI("GC lifetime allocation: %d bytes", gDvm.allocProf.allocCount);
+    ALOGI("GC lifetime allocation: %d bytes", gDvm.allocProf.allocCount);
     if (CALC_CACHE_STATS) {
         dvmDumpAtomicCacheStats(gDvm.instanceofCache);
         dvmDumpBootClassPath();
index 1a4fad5..f317aea 100644 (file)
@@ -1051,9 +1051,9 @@ void dvmLogRawStackTrace(const int* intVals, int stackDepth) {
 
         std::string dotName(dvmHumanReadableDescriptor(meth->clazz->descriptor));
         if (dvmIsNativeMethod(meth)) {
-            LOGI("\tat %s.%s(Native Method)", dotName.c_str(), meth->name);
+            ALOGI("\tat %s.%s(Native Method)", dotName.c_str(), meth->name);
         } else {
-            LOGI("\tat %s.%s(%s:%d)",
+            ALOGI("\tat %s.%s(%s:%d)",
                 dotName.c_str(), meth->name, dvmGetMethodSourceFile(meth),
                 dvmLineNumFromPC(meth, pc));
         }
@@ -1128,10 +1128,10 @@ static void logStackTraceOf(Object* exception) {
         dvmReleaseTrackedAlloc((Object*) messageStr, dvmThreadSelf());
         messageStr = NULL;
 
-        LOGI("%s: %s", className.c_str(), cp);
+        ALOGI("%s: %s", className.c_str(), cp);
         free(cp);
     } else {
-        LOGI("%s:", className.c_str());
+        ALOGI("%s:", className.c_str());
     }
 
     /*
@@ -1143,7 +1143,7 @@ static void logStackTraceOf(Object* exception) {
     const ArrayObject* stackData = (const ArrayObject*) dvmGetFieldObject(exception,
                     gDvm.offJavaLangThrowable_stackState);
     if (stackData == NULL) {
-        LOGI("  (raw stack trace not found)");
+        ALOGI("  (raw stack trace not found)");
         return;
     }
 
@@ -1175,7 +1175,7 @@ void dvmLogExceptionStackTrace()
         if (cause == NULL) {
             break;
         }
-        LOGI("Caused by:");
+        ALOGI("Caused by:");
         exception = cause;
     }
 }
index a4591f1..826f545 100644 (file)
@@ -136,7 +136,7 @@ static bool resizeHash(HashTable* pHashTable, int newSize)
     int i;
 
     assert(countTombStones(pHashTable) == pHashTable->numDeadEntries);
-    //LOGI("before: dead=%d", pHashTable->numDeadEntries);
+    //ALOGI("before: dead=%d", pHashTable->numDeadEntries);
 
     pNewEntries = (HashEntry*) calloc(newSize, sizeof(HashEntry));
     if (pNewEntries == NULL)
@@ -203,7 +203,7 @@ void* dvmHashTableLookup(HashTable* pHashTable, u4 itemHash, void* item,
             pEntry = pHashTable->pEntries;
         }
 
-        //LOGI("+++ look probing %d...", pEntry - pHashTable->pEntries);
+        //ALOGI("+++ look probing %d...", pEntry - pHashTable->pEntries);
     }
 
     if (pEntry->data == NULL) {
@@ -260,7 +260,7 @@ bool dvmHashTableRemove(HashTable* pHashTable, u4 itemHash, void* item)
     pEnd = &pHashTable->pEntries[pHashTable->tableSize];
     while (pEntry->data != NULL) {
         if (pEntry->data == item) {
-            //LOGI("+++ stepping on entry %d", pEntry - pHashTable->pEntries);
+            //ALOGI("+++ stepping on entry %d", pEntry - pHashTable->pEntries);
             pEntry->data = HASH_TOMBSTONE;
             pHashTable->numEntries--;
             pHashTable->numDeadEntries++;
@@ -274,7 +274,7 @@ bool dvmHashTableRemove(HashTable* pHashTable, u4 itemHash, void* item)
             pEntry = pHashTable->pEntries;
         }
 
-        //LOGI("+++ del probing %d...", pEntry - pHashTable->pEntries);
+        //ALOGI("+++ del probing %d...", pEntry - pHashTable->pEntries);
     }
 
     return false;
@@ -412,7 +412,7 @@ void dvmHashTableProbeCount(HashTable* pHashTable, HashCalcFunc calcFunc,
         totalProbe += count;
     }
 
-    LOGI("Probe: min=%d max=%d, total=%d in %d (%d), avg=%.3f",
+    ALOGI("Probe: min=%d max=%d, total=%d in %d (%d), avg=%.3f",
         minProbe, maxProbe, totalProbe, numEntries, pHashTable->tableSize,
         (float) totalProbe / (float) numEntries);
 }
index 7712012..1842237 100644 (file)
@@ -166,7 +166,7 @@ Object* IndirectRefTable::get(IndirectRef iref) const {
 
     Object* obj = table_[index].obj;
     if (obj == NULL) {
-        LOGI("JNI ERROR (app bug): accessed deleted %s reference %p",
+        ALOGI("JNI ERROR (app bug): accessed deleted %s reference %p",
                 indirectRefKindToString(kind_), iref);
         abortMaybe();
         return kInvalidIndirectRefObject;
index 7279a4f..9a6d02a 100644 (file)
@@ -373,9 +373,9 @@ static bool handleJdwpOption(const char* name, const char* value)
                strcmp(name, "timeout") == 0)
     {
         /* valid but unsupported */
-        LOGI("Ignoring JDWP option '%s'='%s'", name, value);
+        ALOGI("Ignoring JDWP option '%s'='%s'", name, value);
     } else {
-        LOGI("Ignoring unrecognized JDWP option '%s'='%s'", name, value);
+        ALOGI("Ignoring unrecognized JDWP option '%s'='%s'", name, value);
     }
 
     return true;
@@ -1201,7 +1201,7 @@ std::string dvmStartup(int argc, const char* const argv[],
 #if WITH_EXTRA_GC_CHECKS > 1
     /* only "portable" interp has the extra goodies */
     if (gDvm.executionMode != kExecutionModeInterpPortable) {
-        LOGI("Switching to 'portable' interpreter for GC checks");
+        ALOGI("Switching to 'portable' interpreter for GC checks");
         gDvm.executionMode = kExecutionModeInterpPortable;
     }
 #endif
index cf6c67d..6e3f373 100644 (file)
@@ -136,7 +136,7 @@ bool javaLangString_charAt(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
         return false;
     }
 
-    //LOGI("String.charAt this=0x%08x index=%d", arg0, arg1);
+    //ALOGI("String.charAt this=0x%08x index=%d", arg0, arg1);
     count = dvmGetFieldInt((Object*) arg0, STRING_FIELDOFF_COUNT);
     if ((s4) arg1 < 0 || (s4) arg1 >= count) {
         dvmThrowStringIndexOutOfBoundsExceptionWithIndex(count, arg1);
@@ -403,7 +403,7 @@ bool javaLangString_equals(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
 bool javaLangString_length(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
     JValue* pResult)
 {
-    //LOGI("String.length this=0x%08x pResult=%p", arg0, pResult);
+    //ALOGI("String.length this=0x%08x pResult=%p", arg0, pResult);
 
     /* null reference check on "this" */
     if ((Object*) arg0 == NULL) {
@@ -421,7 +421,7 @@ bool javaLangString_length(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
 bool javaLangString_isEmpty(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
     JValue* pResult)
 {
-    //LOGI("String.isEmpty this=0x%08x pResult=%p", arg0, pResult);
+    //ALOGI("String.isEmpty this=0x%08x pResult=%p", arg0, pResult);
 
     /* null reference check on "this" */
     if ((Object*) arg0 == NULL) {
@@ -455,7 +455,7 @@ static inline int indexOfCommon(Object* strObj, int ch, int start)
     const u2* chars = (const u2*)(void*)charArray->contents;
     int offset = dvmGetFieldInt(strObj, STRING_FIELDOFF_OFFSET);
     int count = dvmGetFieldInt(strObj, STRING_FIELDOFF_COUNT);
-    //LOGI("String.indexOf(0x%08x, 0x%04x, %d) off=%d count=%d",
+    //ALOGI("String.indexOf(0x%08x, 0x%04x, %d) off=%d count=%d",
     //    (u4) strObj, ch, start, offset, count);
 
     /* factor out the offset */
index a4affb8..a398996 100644 (file)
@@ -150,7 +150,7 @@ DexCacheStatus dvmDexCacheStatus(const char *fileName)
          */
         fd = openAlternateSuffix(fileName, "odex", O_RDONLY, &cachedName);
         if (fd < 0) {
-            LOGI("Zip is good, but no %s inside, and no .odex "
+            ALOGI("Zip is good, but no %s inside, and no .odex "
                     "file in the same directory", kDexInJarName);
             result = DEX_CACHE_BAD_ARCHIVE;
             goto bail;
@@ -269,7 +269,7 @@ tryArchive:
                     dexGetZipEntryCrc32(&archive, entry),
                     isBootstrap, &newFile, /*createIfMissing=*/true);
             if (fd < 0) {
-                LOGI("Unable to open or create cache for %s (%s)",
+                ALOGI("Unable to open or create cache for %s (%s)",
                     fileName, cachedName);
                 goto bail;
             }
@@ -316,7 +316,7 @@ tryArchive:
                     (int) (endWhen - extractWhen) / 1000);
             }
         } else {
-            LOGI("Zip is good, but no %s inside, and no valid .odex "
+            ALOGI("Zip is good, but no %s inside, and no valid .odex "
                     "file in the same directory", kDexInJarName);
             goto bail;
         }
@@ -327,7 +327,7 @@ tryArchive:
      * doesn't have to be seeked anywhere in particular.
      */
     if (dvmDexFileOpenFromFd(fd, &pDvmDex) != 0) {
-        LOGI("Unable to map %s in %s", kDexInJarName, fileName);
+        ALOGI("Unable to map %s in %s", kDexInJarName, fileName);
         goto bail;
     }
 
index 94c3199..4f897a3 100644 (file)
@@ -439,21 +439,21 @@ static jobject addGlobalReference(Object* obj) {
         return NULL;
     }
 
-    //LOGI("adding obj=%p", obj);
+    //ALOGI("adding obj=%p", obj);
     //dvmDumpThread(dvmThreadSelf(), false);
 
     if (false && dvmIsClassObject((Object*)obj)) {
         ClassObject* clazz = (ClassObject*) obj;
-        LOGI("-------");
-        LOGI("Adding global ref on class %s", clazz->descriptor);
+        ALOGI("-------");
+        ALOGI("Adding global ref on class %s", clazz->descriptor);
         dvmDumpThread(dvmThreadSelf(), false);
     }
     if (false && ((Object*)obj)->clazz == gDvm.classJavaLangString) {
         StringObject* strObj = (StringObject*) obj;
         char* str = dvmCreateCstrFromString(strObj);
         if (strcmp(str, "sync-response") == 0) {
-            LOGI("-------");
-            LOGI("Adding global ref on string '%s'", str);
+            ALOGI("-------");
+            ALOGI("Adding global ref on string '%s'", str);
             dvmDumpThread(dvmThreadSelf(), false);
             //dvmAbort();
         }
@@ -464,7 +464,7 @@ static jobject addGlobalReference(Object* obj) {
         if (arrayObj->length == 8192 /*&&
             dvmReferenceTableEntries(&gDvm.jniGlobalRefTable) > 400*/)
         {
-            LOGI("Adding global ref on byte array %p (len=%d)",
+            ALOGI("Adding global ref on byte array %p (len=%d)",
                 arrayObj, arrayObj->length);
             dvmDumpThread(dvmThreadSelf(), false);
         }
@@ -901,7 +901,7 @@ static void logNativeMethodEntry(const Method* method, const u4* args)
 
     std::string className(dvmHumanReadableDescriptor(method->clazz->descriptor));
     char* signature = dexProtoCopyMethodDescriptor(&method->prototype);
-    LOGI("-> %s %s%s %s(%s)", className.c_str(), method->name, signature, thisString, argsString);
+    ALOGI("-> %s %s%s %s(%s)", className.c_str(), method->name, signature, thisString, argsString);
     free(signature);
 }
 
@@ -912,13 +912,13 @@ static void logNativeMethodExit(const Method* method, Thread* self, const JValue
     if (dvmCheckException(self)) {
         Object* exception = dvmGetException(self);
         std::string exceptionClassName(dvmHumanReadableDescriptor(exception->clazz->descriptor));
-        LOGI("<- %s %s%s threw %s", className.c_str(),
+        ALOGI("<- %s %s%s threw %s", className.c_str(),
                 method->name, signature, exceptionClassName.c_str());
     } else {
         char returnValueString[128] = { 0 };
         char returnType = method->shorty[0];
         appendValue(returnType, returnValue, returnValueString, sizeof(returnValueString), false);
-        LOGI("<- %s %s%s returned %s", className.c_str(),
+        ALOGI("<- %s %s%s returned %s", className.c_str(),
                 method->name, signature, returnValueString);
     }
     free(signature);
@@ -1094,7 +1094,7 @@ void dvmCallJNIMethod(const u4* args, JValue* pResult, const Method* method, Thr
     u4 accessFlags = method->accessFlags;
     bool isSynchronized = (accessFlags & ACC_SYNCHRONIZED) != 0;
 
-    //LOGI("JNI calling %p (%s.%s:%s):", method->insns,
+    //ALOGI("JNI calling %p (%s.%s:%s):", method->insns,
     //    method->clazz->descriptor, method->name, method->shorty);
 
     /*
@@ -1118,7 +1118,7 @@ void dvmCallJNIMethod(const u4* args, JValue* pResult, const Method* method, Thr
         while (*shorty != '\0') {
             switch (*shorty++) {
             case 'L':
-                //LOGI("  local %d: 0x%08x", idx, modArgs[idx]);
+                //ALOGI("  local %d: 0x%08x", idx, modArgs[idx]);
                 if (modArgs[idx] != 0) {
                     modArgs[idx] = (u4) addLocalReference(self, (Object*) modArgs[idx]);
                 }
@@ -1382,7 +1382,7 @@ static void ExceptionDescribe(JNIEnv* env) {
     if (exception != NULL) {
         dvmPrintExceptionStackTrace();
     } else {
-        LOGI("Odd: ExceptionDescribe called, but no exception pending");
+        ALOGI("Odd: ExceptionDescribe called, but no exception pending");
     }
 }
 
@@ -2451,7 +2451,7 @@ static jint RegisterNatives(JNIEnv* env, jclass jclazz,
     ClassObject* clazz = (ClassObject*) dvmDecodeIndirectRef(ts.self(), jclazz);
 
     if (gDvm.verboseJni) {
-        LOGI("[Registering JNI native methods for class %s]",
+        ALOGI("[Registering JNI native methods for class %s]",
             clazz->descriptor);
     }
 
@@ -2496,7 +2496,7 @@ static jint UnregisterNatives(JNIEnv* env, jclass jclazz) {
 
     ClassObject* clazz = (ClassObject*) dvmDecodeIndirectRef(ts.self(), jclazz);
     if (gDvm.verboseJni) {
-        LOGI("[Unregistering JNI native methods for class %s]",
+        ALOGI("[Unregistering JNI native methods for class %s]",
             clazz->descriptor);
     }
     dvmUnregisterJNINativeMethods(clazz);
@@ -3272,7 +3272,7 @@ JNIEnv* dvmCreateJNIEnv(Thread* self) {
     JavaVMExt* vm = (JavaVMExt*) gDvmJni.jniVm;
 
     //if (self != NULL)
-    //    LOGI("Ent CreateJNIEnv: threadid=%d %p", self->threadId, self);
+    //    ALOGI("Ent CreateJNIEnv: threadid=%d %p", self->threadId, self);
 
     assert(vm != NULL);
 
@@ -3304,7 +3304,7 @@ JNIEnv* dvmCreateJNIEnv(Thread* self) {
     vm->envList = newEnv;
 
     //if (self != NULL)
-    //    LOGI("Xit CreateJNIEnv: threadid=%d %p", self->threadId, self);
+    //    ALOGI("Xit CreateJNIEnv: threadid=%d %p", self->threadId, self);
     return (JNIEnv*) newEnv;
 }
 
@@ -3316,7 +3316,7 @@ void dvmDestroyJNIEnv(JNIEnv* env) {
         return;
     }
 
-    //LOGI("Ent DestroyJNIEnv: threadid=%d %p", self->threadId, self);
+    //ALOGI("Ent DestroyJNIEnv: threadid=%d %p", self->threadId, self);
 
     JNIEnvExt* extEnv = (JNIEnvExt*) env;
     JavaVMExt* vm = (JavaVMExt*) gDvmJni.jniVm;
@@ -3335,7 +3335,7 @@ void dvmDestroyJNIEnv(JNIEnv* env) {
     }
 
     free(env);
-    //LOGI("Xit DestroyJNIEnv: threadid=%d %p", self->threadId, self);
+    //ALOGI("Xit DestroyJNIEnv: threadid=%d %p", self->threadId, self);
 }
 
 /*
index 6e53ac6..fa57819 100644 (file)
@@ -599,10 +599,10 @@ void dvmLinearAllocDump(Object* classLoader)
 
     dvmLockMutex(&pHdr->lock);
 
-    LOGI("LinearAlloc classLoader=%p", classLoader);
-    LOGI("  mapAddr=%p mapLength=%d firstOffset=%d",
+    ALOGI("LinearAlloc classLoader=%p", classLoader);
+    ALOGI("  mapAddr=%p mapLength=%d firstOffset=%d",
         pHdr->mapAddr, pHdr->mapLength, pHdr->firstOffset);
-    LOGI("  curOffset=%d", pHdr->curOffset);
+    ALOGI("  curOffset=%d", pHdr->curOffset);
 
     int off = pHdr->firstOffset;
     u4 rawLen, fullLen;
@@ -612,7 +612,7 @@ void dvmLinearAllocDump(Object* classLoader)
         fullLen = ((HEADER_EXTRA*2 + (rawLen & LENGTHFLAG_MASK))
                     & ~(BLOCK_ALIGN-1));
 
-        LOGI("  %p (%3d): %clen=%d%s", pHdr->mapAddr + off + HEADER_EXTRA,
+        ALOGI("  %p (%3d): %clen=%d%s", pHdr->mapAddr + off + HEADER_EXTRA,
             (int) ((off + HEADER_EXTRA) / SYSTEM_PAGE_SIZE),
             (rawLen & LENGTHFLAG_FREE) != 0 ? '*' : ' ',
             rawLen & LENGTHFLAG_MASK,
@@ -622,7 +622,7 @@ void dvmLinearAllocDump(Object* classLoader)
     }
 
     if (ENFORCE_READ_ONLY) {
-        LOGI("writeRefCount map:");
+        ALOGI("writeRefCount map:");
 
         int numPages = (pHdr->mapLength+SYSTEM_PAGE_SIZE-1) / SYSTEM_PAGE_SIZE;
         int zstart = 0;
index d13a9e5..c463d60 100644 (file)
@@ -678,7 +678,7 @@ bool dvmGetThreadStats(ProcStatData* pData, pid_t tid)
     int cc = read(fd, lineBuf, sizeof(lineBuf)-1);
     if (cc <= 0) {
         const char* msg = (cc == 0) ? "unexpected EOF" : strerror(errno);
-        LOGI("Unable to read '%s': %s", nameBuf, msg);
+        ALOGI("Unable to read '%s': %s", nameBuf, msg);
         close(fd);
         return false;
     }
@@ -707,7 +707,7 @@ bool dvmGetThreadStats(ProcStatData* pData, pid_t tid)
     char* endp;
     pData->utime = strtoul(cp+1, &endp, 10);
     if (endp == cp+1)
-        LOGI("Warning: strtoul failed on utime ('%.30s...')", cp);
+        ALOGI("Warning: strtoul failed on utime ('%.30s...')", cp);
 
     cp = strchr(cp+1, ' ');
     if (cp == NULL)
@@ -715,7 +715,7 @@ bool dvmGetThreadStats(ProcStatData* pData, pid_t tid)
 
     pData->stime = strtoul(cp+1, &endp, 10);
     if (endp == cp+1)
-        LOGI("Warning: strtoul failed on stime ('%.30s...')", cp);
+        ALOGI("Warning: strtoul failed on stime ('%.30s...')", cp);
 
     /*
      * Skip more stuff we don't care about.
@@ -731,12 +731,12 @@ bool dvmGetThreadStats(ProcStatData* pData, pid_t tid)
      */
     pData->processor = strtol(cp+1, &endp, 10);
     if (endp == cp+1)
-        LOGI("Warning: strtoul failed on processor ('%.30s...')", cp);
+        ALOGI("Warning: strtoul failed on processor ('%.30s...')", cp);
 
     return true;
 
 parse_fail:
-    LOGI("stat parse failed (%s)", lineBuf);
+    ALOGI("stat parse failed (%s)", lineBuf);
     return false;
 }
 
index a616d1f..be446ec 100644 (file)
@@ -269,7 +269,7 @@ static bool checkOnLoadResult(SharedLib* pEntry)
          * Check this so we don't end up waiting for ourselves.  We need
          * to return "true" so the caller can continue.
          */
-        LOGI("threadid=%d: recursive native library load attempt (%s)",
+        ALOGI("threadid=%d: recursive native library load attempt (%s)",
             self->threadId, pEntry->pathName);
         return true;
     }
@@ -402,7 +402,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
     SharedLib* pActualEntry = addSharedLibEntry(pNewEntry);
 
     if (pNewEntry != pActualEntry) {
-        LOGI("WOW: we lost a race to add a shared lib (%s CL=%p)",
+        ALOGI("WOW: we lost a race to add a shared lib (%s CL=%p)",
             pathName, classLoader);
         freeSharedLibEntry(pNewEntry);
         return checkOnLoadResult(pActualEntry);
@@ -431,7 +431,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
             self->classLoaderOverride = classLoader;
             oldStatus = dvmChangeStatus(self, THREAD_NATIVE);
             if (gDvm.verboseJni) {
-                LOGI("[Calling JNI_OnLoad for \"%s\"]", pathName);
+                ALOGI("[Calling JNI_OnLoad for \"%s\"]", pathName);
             }
             version = (*func)(gDvmJni.jniVm, NULL);
             dvmChangeStatus(self, oldStatus);
@@ -454,7 +454,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
                 result = false;
             } else {
                 if (gDvm.verboseJni) {
-                    LOGI("[Returned from JNI_OnLoad for \"%s\"]", pathName);
+                    ALOGI("[Returned from JNI_OnLoad for \"%s\"]", pathName);
                 }
             }
         }
@@ -583,7 +583,7 @@ static char* createJniNameString(const char* classDescriptor,
  */
 static char* mangleString(const char* str, int len)
 {
-    //LOGI("mangling '%s' %d", str, len);
+    //ALOGI("mangling '%s' %d", str, len);
 
     assert(str[len] == '\0');
 
index d0e2095..d34fcff 100644 (file)
@@ -267,8 +267,8 @@ void dvmPointerSetIntersect(PointerSet* pSet, const void** ptrArray, int count)
  */
 void dvmPointerSetDump(const PointerSet* pSet)
 {
-    LOGI("PointerSet %p", pSet);
+    ALOGI("PointerSet %p", pSet);
     int i;
     for (i = 0; i < pSet->count; i++)
-        LOGI(" %2d: %p", i, pSet->list[i]);
+        ALOGI(" %2d: %p", i, pSet->list[i]);
 }
index 07de098..def1cc8 100644 (file)
@@ -368,12 +368,12 @@ void dvmMethodTraceStart(const char* traceFileName, int traceFd, int bufferSize,
 
     dvmLockMutex(&state->startStopLock);
     while (state->traceEnabled != 0) {
-        LOGI("TRACE start requested, but already in progress; stopping");
+        ALOGI("TRACE start requested, but already in progress; stopping");
         dvmUnlockMutex(&state->startStopLock);
         dvmMethodTraceStop();
         dvmLockMutex(&state->startStopLock);
     }
-    LOGI("TRACE STARTED: '%s' %dKB", traceFileName, bufferSize / 1024);
+    ALOGI("TRACE STARTED: '%s' %dKB", traceFileName, bufferSize / 1024);
 
     /*
      * Allocate storage and open files.
@@ -630,7 +630,7 @@ void dvmMethodTraceStop()
         }
     }
 
-    LOGI("TRACE STOPPED%s: writing %d records",
+    ALOGI("TRACE STOPPED%s: writing %d records",
         state->overflow ? " (NOTE: overflowed buffer)" : "",
         (finalCurOffset - TRACE_HEADER_LEN) / recordSize);
     if (gDvm.debuggerActive) {
@@ -750,7 +750,7 @@ void dvmMethodTraceAdd(Thread* self, const Method* method, int action)
     if (!self->cpuClockBaseSet) {
         self->cpuClockBase = getThreadCpuTimeInUsec();
         self->cpuClockBaseSet = true;
-        //LOGI("thread base id=%d 0x%llx",
+        //ALOGI("thread base id=%d 0x%llx",
         //    self->threadId, self->cpuClockBase);
     }
 #endif
index 1dc12c9..d8df655 100644 (file)
@@ -162,7 +162,7 @@ int dvmRawDexFileOpen(const char* fileName, const char* odexOutputName,
         adler32, isBootstrap, &newFile, /*createIfMissing=*/true);
 
     if (optFd < 0) {
-        LOGI("Unable to open or create cache for %s (%s)",
+        ALOGI("Unable to open or create cache for %s (%s)",
                 fileName, cachedName);
         goto bail;
     }
@@ -210,7 +210,7 @@ int dvmRawDexFileOpen(const char* fileName, const char* odexOutputName,
      * doesn't have to be seeked anywhere in particular.
      */
     if (dvmDexFileOpenFromFd(optFd, &pDvmDex) != 0) {
-        LOGI("Unable to map cached %s", fileName);
+        ALOGI("Unable to map cached %s", fileName);
         goto bail;
     }
 
index 3768357..2d686c9 100644 (file)
@@ -195,7 +195,7 @@ static void handleSigQuit()
                     gDvm.stackTraceFile, (int) actual, traceLen,
                     strerror(errno));
             } else {
-                LOGI("Wrote stack traces to '%s'", gDvm.stackTraceFile);
+                ALOGI("Wrote stack traces to '%s'", gDvm.stackTraceFile);
             }
             close(fd);
         }
@@ -210,7 +210,7 @@ static void handleSigQuit()
  */
 static void handleSigUsr1()
 {
-    LOGI("SIGUSR1 forcing GC (no HPROF)");
+    ALOGI("SIGUSR1 forcing GC (no HPROF)");
     dvmCollectGarbage();
 }
 
@@ -292,7 +292,7 @@ loop:
         }
 
         if (!gDvm.haltSignalCatcher) {
-            LOGI("threadid=%d: reacting to signal %d",
+            ALOGI("threadid=%d: reacting to signal %d",
                 dvmThreadSelf()->threadId, rcvd);
         }
 
index 003a6ef..d2acdae 100644 (file)
@@ -217,7 +217,7 @@ static bool readAndLog(int fd, BufferedData* data, const char* tag)
             tag, fd, want, (int)actual, strerror(errno));
         return false;
     } else {
-        //LOGI("read %s: %d at %d", tag, actual, data->count);
+        //ALOGI("read %s: %d at %d", tag, actual, data->count);
     }
     data->count += actual;
 
index 6ae23c7..7363e6e 100644 (file)
@@ -476,7 +476,7 @@ static void lockThreadSuspend(const char* who, SuspendCause why)
                  * Could be two app threads both want to patch predicted
                  * chaining cells around the same time.
                  */
-                LOGI("threadid=%d ODD: want thread-suspend lock (%s:%s),"
+                ALOGI("threadid=%d ODD: want thread-suspend lock (%s:%s),"
                      " it's held, no suspend pending",
                     self->threadId, who, getSuspendCauseStr(why));
             } else {
@@ -903,7 +903,7 @@ static bool prepareThread(Thread* thread)
     thread->handle = pthread_self();
     thread->systemTid = dvmGetSysThreadId();
 
-    //LOGI("SYSTEM TID IS %d (pid is %d)", (int) thread->systemTid,
+    //ALOGI("SYSTEM TID IS %d (pid is %d)", (int) thread->systemTid,
     //    (int) getpid());
     /*
      * If we were called by dvmAttachCurrentThread, the self value is
@@ -1598,7 +1598,7 @@ static void threadExitUncaughtException(Thread* self, Object* group)
             "uncaughtException", "(Ljava/lang/Thread;Ljava/lang/Throwable;)V");
 
     if (uncaughtHandler != NULL) {
-        //LOGI("+++ calling %s.uncaughtException",
+        //ALOGI("+++ calling %s.uncaughtException",
         //     handlerObj->clazz->descriptor);
         JValue unused;
         dvmCallMethod(self, uncaughtHandler, handlerObj, &unused,
@@ -2114,7 +2114,7 @@ void dvmDetachCurrentThread()
 
     dvmLockMutex(&traceState->startStopLock);
     if (traceState->traceEnabled) {
-        LOGI("threadid=%d: waiting for method trace to finish",
+        ALOGI("threadid=%d: waiting for method trace to finish",
             self->threadId);
         while (traceState->traceEnabled) {
             dvmWaitCond(&traceState->threadExitCond,
@@ -2265,7 +2265,7 @@ void dvmSuspendSelf(bool jdwpActivity)
      * If we got here via waitForDebugger(), don't do this part.
      */
     if (jdwpActivity) {
-        //LOGI("threadid=%d: clearing wait-for-event (my handle=%08x)",
+        //ALOGI("threadid=%d: clearing wait-for-event (my handle=%08x)",
         //    self->threadId, (int) self->handle);
         dvmJdwpClearWaitForEventThread(gDvm.jdwpState);
     }
@@ -3297,7 +3297,7 @@ void dvmDumpThreadEx(const DebugOutputTarget* target, Thread* thread,
      */
     threadObj = thread->threadObj;
     if (threadObj == NULL) {
-        LOGI("Can't dump thread %d: threadObj not set", thread->threadId);
+        ALOGI("Can't dump thread %d: threadObj not set", thread->threadId);
         return;
     }
     dvmAddTrackedAlloc(threadObj, NULL);
index 566b371..9160158 100644 (file)
 #define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
 
 #if 0
-#define LOG_ALLOC LOGI
-#define LOG_PIN LOGI
-#define LOG_PROM LOGI
-#define LOG_REF LOGI
-#define LOG_SCAV LOGI
-#define LOG_TRAN LOGI
-#define LOG_VER LOGI
+#define LOG_ALLOC ALOGI
+#define LOG_PIN ALOGI
+#define LOG_PROM ALOGI
+#define LOG_REF ALOGI
+#define LOG_SCAV ALOGI
+#define LOG_TRAN ALOGI
+#define LOG_VER ALOGI
 #else
 #define LOG_ALLOC(...) ((void)0)
 #define LOG_PIN(...) ((void)0)
@@ -1813,7 +1813,7 @@ static void pinThreadStack(const Thread *thread)
             const RegisterMap* pMap = dvmGetExpandedRegisterMap(method);
             const u1* regVector = NULL;
 
-            LOGI("conservative : %s.%s", method->clazz->descriptor, method->name);
+            ALOGI("conservative : %s.%s", method->clazz->descriptor, method->name);
 
             if (pMap != NULL) {
                 int addr = saveArea->xtra.currentPc - method->insns;
index 62b8037..9673f81 100644 (file)
@@ -135,12 +135,12 @@ bool dvmDdmHandleHpifChunk(int when)
             gDvm.gcHeap->ddmHpifWhen = when;
             dvmUnlockHeap();
         } else {
-            LOGI("%s(): can't lock heap to set when", __func__);
+            ALOGI("%s(): can't lock heap to set when", __func__);
             return false;
         }
         break;
     default:
-        LOGI("%s(): bad when value 0x%08x", __func__, when);
+        ALOGI("%s(): bad when value 0x%08x", __func__, when);
         return false;
     }
 
@@ -451,14 +451,14 @@ void dvmDdmSendHeapSegments(bool shouldLock, bool native)
 
 bool dvmDdmHandleHpsgNhsgChunk(int when, int what, bool native)
 {
-    LOGI("dvmDdmHandleHpsgChunk(when %d, what %d, heap %d)", when, what,
+    ALOGI("dvmDdmHandleHpsgChunk(when %d, what %d, heap %d)", when, what,
          native);
     switch (when) {
     case HPSG_WHEN_NEVER:
     case HPSG_WHEN_EVERY_GC:
         break;
     default:
-        LOGI("%s(): bad when value 0x%08x", __func__, when);
+        ALOGI("%s(): bad when value 0x%08x", __func__, when);
         return false;
     }
 
@@ -467,7 +467,7 @@ bool dvmDdmHandleHpsgNhsgChunk(int when, int what, bool native)
     case HPSG_WHAT_DISTINCT_OBJECTS:
         break;
     default:
-        LOGI("%s(): bad what value 0x%08x", __func__, what);
+        ALOGI("%s(): bad what value 0x%08x", __func__, what);
         return false;
     }
 
@@ -482,7 +482,7 @@ bool dvmDdmHandleHpsgNhsgChunk(int when, int what, bool native)
 //TODO: if what says we should dump immediately, signal (or do) it from here
         dvmUnlockHeap();
     } else {
-        LOGI("%s(): can't lock heap to set when/what", __func__);
+        ALOGI("%s(): can't lock heap to set when/what", __func__);
         return false;
     }
 
index 18ab190..3d8d2fa 100644 (file)
@@ -629,7 +629,7 @@ static ClassObject* lookupClassByDescriptor(const Method* meth,
      * allows the verifier to process the class successfully.
      */
 
-    //LOGI("Looking up '%s'", typeStr);
+    //ALOGI("Looking up '%s'", typeStr);
     ClassObject* clazz;
     clazz = dvmFindClassNoInit(pDescriptor, meth->clazz->classLoader);
     if (clazz == NULL) {
@@ -1136,7 +1136,7 @@ static Method* verifyInvocationArgs(const Method* meth,
             std::string dotMethClass =
                 dvmHumanReadableDescriptor(meth->clazz->descriptor);
 
-            LOGI("Could not find method %s.%s, referenced from method %s.%s",
+            ALOGI("Could not find method %s.%s, referenced from method %s.%s",
                     dotMissingClass.c_str(), methodName,
                     dotMethClass.c_str(), meth->name);
         }
@@ -2645,7 +2645,7 @@ static bool updateRegisters(const Method* meth, InsnFlags* insnFlags,
         }
 
         if (gDebugVerbose) {
-            //LOGI(" RESULT (changed=%d)", changed);
+            //ALOGI(" RESULT (changed=%d)", changed);
             //dumpRegTypes(vdata, targetRegs, 0, "rslt", NULL, 0);
         }
 #ifdef VERIFIER_STATS
@@ -3194,7 +3194,7 @@ static void verifyFilledNewArrayRegs(const Method* meth,
     } else {
         expectedType = primitiveTypeToRegType(elemType);
     }
-    //LOGI("filled-new-array: %s -> %d", resClass->descriptor, expectedType);
+    //ALOGI("filled-new-array: %s -> %d", resClass->descriptor, expectedType);
 
     /*
      * Verify each register.  If "argCount" is bad, verifyRegisterType()
@@ -3619,12 +3619,12 @@ static bool doCodeVerification(VerifierData* vdata, RegisterTable* regTable)
     dvmInsnSetChanged(insnFlags, 0, true);
 
     if (dvmWantVerboseVerification(meth)) {
-        IF_LOGI() {
+        IF_ALOGI() {
             char* desc = dexProtoCopyMethodDescriptor(&meth->prototype);
-            LOGI("Now verifying: %s.%s %s (ins=%d regs=%d)",
+            ALOGI("Now verifying: %s.%s %s (ins=%d regs=%d)",
                 meth->clazz->descriptor, meth->name, desc,
                 meth->insSize, meth->registersSize);
-            LOGI(" ------ [0    4    8    12   16   20   24   28   32   36");
+            ALOGI(" ------ [0    4    8    12   16   20   24   28   32   36");
             free(desc);
         }
         debugVerbose = true;
@@ -3700,7 +3700,7 @@ static bool doCodeVerification(VerifierData* vdata, RegisterTable* regTable)
                 NULL, uninitMap, SHOW_REG_DETAILS);
         }
 
-        //LOGI("process %s.%s %s %d",
+        //ALOGI("process %s.%s %s %d",
         //    meth->clazz->descriptor, meth->name, meth->descriptor, insnIdx);
         if (!verifyInstruction(meth, insnFlags, regTable, insnIdx,
                 uninitMap, &startGuess))
@@ -6064,7 +6064,7 @@ static void logLocalsCb(void *cnxt, u2 reg, u4 startAddress, u4 endAddress,
 
     if (addr >= (int) startAddress && addr < (int) endAddress)
     {
-        LOGI("        %2d: '%s' %s", reg, name, descriptor);
+        ALOGI("        %2d: '%s' %s", reg, name, descriptor);
     }
 }
 
@@ -6143,10 +6143,10 @@ static void dumpRegTypes(const VerifierData* vdata,
     }
 
     if (addr == 0 && addrName != NULL) {
-        LOGI("%c%s %s mst=%d", branchTarget ? '>' : ' ',
+        ALOGI("%c%s %s mst=%d", branchTarget ? '>' : ' ',
             addrName, regChars, registerLine->monitorStackTop);
     } else {
-        LOGI("%c0x%04x %s mst=%d", branchTarget ? '>' : ' ',
+        ALOGI("%c0x%04x %s mst=%d", branchTarget ? '>' : ' ',
             addr, regChars, registerLine->monitorStackTop);
     }
     if (displayFlags & DRT_SHOW_LIVENESS) {
@@ -6164,9 +6164,9 @@ static void dumpRegTypes(const VerifierData* vdata,
                 bool isLive = dvmIsBitSet(liveRegs, i);
                 liveChars[i + 1 + (i / 4)] = isLive ? '+' : '-';
             }
-            LOGI("        %s", liveChars);
+            ALOGI("        %s", liveChars);
         } else {
-            LOGI("        %c", '#');
+            ALOGI("        %c", '#');
         }
     }
 
@@ -6177,12 +6177,12 @@ static void dumpRegTypes(const VerifierData* vdata,
                 ClassObject* clazz = regTypeReferenceToClass(addrRegs[i], uninitMap);
                 assert(dvmIsHeapAddress((Object*)clazz));
                 if (i < regCount) {
-                    LOGI("        %2d: 0x%08x %s%s",
+                    ALOGI("        %2d: 0x%08x %s%s",
                         i, addrRegs[i],
                         regTypeIsUninitReference(addrRegs[i]) ? "[U]" : "",
                         clazz->descriptor);
                 } else {
-                    LOGI("        RS: 0x%08x %s%s",
+                    ALOGI("        RS: 0x%08x %s%s",
                         addrRegs[i],
                         regTypeIsUninitReference(addrRegs[i]) ? "[U]" : "",
                         clazz->descriptor);
index 53922b6..0f80624 100644 (file)
@@ -1023,16 +1023,16 @@ static void verifyAndOptimizeClasses(DexFile* pDexFile, bool doVerify,
     }
 
 #ifdef VERIFIER_STATS
-    LOGI("Verifier stats:");
-    LOGI(" methods examined        : %u", gDvm.verifierStats.methodsExamined);
-    LOGI(" monitor-enter methods   : %u", gDvm.verifierStats.monEnterMethods);
-    LOGI(" instructions examined   : %u", gDvm.verifierStats.instrsExamined);
-    LOGI(" instructions re-examined: %u", gDvm.verifierStats.instrsReexamined);
-    LOGI(" copying of register sets: %u", gDvm.verifierStats.copyRegCount);
-    LOGI(" merging of register sets: %u", gDvm.verifierStats.mergeRegCount);
-    LOGI(" ...that caused changes  : %u", gDvm.verifierStats.mergeRegChanged);
-    LOGI(" uninit searches         : %u", gDvm.verifierStats.uninitSearches);
-    LOGI(" max memory required     : %u", gDvm.verifierStats.biggestAlloc);
+    ALOGI("Verifier stats:");
+    ALOGI(" methods examined        : %u", gDvm.verifierStats.methodsExamined);
+    ALOGI(" monitor-enter methods   : %u", gDvm.verifierStats.monEnterMethods);
+    ALOGI(" instructions examined   : %u", gDvm.verifierStats.instrsExamined);
+    ALOGI(" instructions re-examined: %u", gDvm.verifierStats.instrsReexamined);
+    ALOGI(" copying of register sets: %u", gDvm.verifierStats.copyRegCount);
+    ALOGI(" merging of register sets: %u", gDvm.verifierStats.mergeRegCount);
+    ALOGI(" ...that caused changes  : %u", gDvm.verifierStats.mergeRegChanged);
+    ALOGI(" uninit searches         : %u", gDvm.verifierStats.uninitSearches);
+    ALOGI(" max memory required     : %u", gDvm.verifierStats.biggestAlloc);
 #endif
 }
 
@@ -1232,7 +1232,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
         expectedFlags |= DEX_OPT_FLAG_BIG;
 #endif
         if ((expectedFlags & matchMask) != (optHdr.flags & matchMask)) {
-            LOGI("DexOpt: header flag mismatch (0x%02x vs 0x%02x, mask=0x%02x)",
+            ALOGI("DexOpt: header flag mismatch (0x%02x vs 0x%02x, mask=0x%02x)",
                 expectedFlags, optHdr.flags, matchMask);
             goto bail;
         }
@@ -1272,13 +1272,13 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
     ptr = depData;
     val = read4LE(&ptr);
     if (sourceAvail && val != modWhen) {
-        LOGI("DexOpt: source file mod time mismatch (%08x vs %08x)",
+        ALOGI("DexOpt: source file mod time mismatch (%08x vs %08x)",
             val, modWhen);
         goto bail;
     }
     val = read4LE(&ptr);
     if (sourceAvail && val != crc) {
-        LOGI("DexOpt: source file CRC mismatch (%08x vs %08x)", val, crc);
+        ALOGI("DexOpt: source file CRC mismatch (%08x vs %08x)", val, crc);
         goto bail;
     }
     val = read4LE(&ptr);
@@ -1308,7 +1308,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
 
         if (numDeps == 0) {
             /* more entries in bootclasspath than in deps list */
-            LOGI("DexOpt: not all deps represented");
+            ALOGI("DexOpt: not all deps represented");
             goto bail;
         }
 
@@ -1316,7 +1316,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
         if (len != storedStrLen ||
             strcmp(cacheFileName, (const char*) ptr) != 0)
         {
-            LOGI("DexOpt: mismatch dep name: '%s' vs. '%s'",
+            ALOGI("DexOpt: mismatch dep name: '%s' vs. '%s'",
                 cacheFileName, ptr);
             goto bail;
         }
@@ -1324,7 +1324,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
         ptr += storedStrLen;
 
         if (memcmp(signature, ptr, kSHA1DigestLen) != 0) {
-            LOGI("DexOpt: mismatch dep signature for '%s'", cacheFileName);
+            ALOGI("DexOpt: mismatch dep signature for '%s'", cacheFileName);
             goto bail;
         }
         ptr += kSHA1DigestLen;
@@ -1336,7 +1336,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
 
     if (numDeps != 0) {
         /* more entries in deps list than in classpath */
-        LOGI("DexOpt: Some deps went away");
+        ALOGI("DexOpt: Some deps went away");
         goto bail;
     }
 
index 16d0522..18d5a15 100644 (file)
@@ -68,7 +68,7 @@ bool dvmComputeLiveness(VerifierData* vdata)
     bool verbose = false; //= dvmWantVerboseVerification(vdata->method);
     if (verbose) {
         const Method* meth = vdata->method;
-        LOGI("Computing liveness for %s.%s:%s",
+        ALOGI("Computing liveness for %s.%s:%s",
             meth->clazz->descriptor, meth->name, meth->shorty);
     }
 
@@ -147,7 +147,7 @@ bool dvmComputeLiveness(VerifierData* vdata)
         assert(workBlock->liveRegs != NULL);
         dvmCopyBitVector(workBits, workBlock->liveRegs);
         if (verbose) {
-            LOGI("Loaded work bits from last=0x%04x", workBlock->lastAddr);
+            ALOGI("Loaded work bits from last=0x%04x", workBlock->lastAddr);
             dumpLiveState(vdata, 0xfffd, workBlock->liveRegs);
             dumpLiveState(vdata, 0xffff, workBits);
         }
@@ -215,7 +215,7 @@ bool dvmComputeLiveness(VerifierData* vdata)
 
             pred->changed = dvmCheckMergeBitVectors(pred->liveRegs, workBits);
             if (verbose) {
-                LOGI("merging cur=%04x into pred last=%04x (ch=%d)",
+                ALOGI("merging cur=%04x into pred last=%04x (ch=%d)",
                     curIdx, pred->lastAddr, pred->changed);
                 dumpLiveState(vdata, 0xfffa, pred->liveRegs);
                 dumpLiveState(vdata, 0xfffb, workBits);
@@ -741,7 +741,7 @@ static void markLocalsCb(void* ctxt, u2 reg, u4 startAddress, u4 endAddress,
     bool verbose = dvmWantVerboseVerification(vdata->method);
 
     if (verbose) {
-        LOGI("%04x-%04x %2d (%s %s)",
+        ALOGI("%04x-%04x %2d (%s %s)",
             startAddress, endAddress, reg, name, descriptor);
     }
 
@@ -819,5 +819,5 @@ static void dumpLiveState(const VerifierData* vdata, u4 curIdx,
         regChars[1 + idx + (idx/4)] = ch;
     }
 
-    LOGI("0x%04x %s", curIdx, regChars);
+    ALOGI("0x%04x %s", curIdx, regChars);
 }
index 2b09c1c..301d53a 100644 (file)
@@ -486,7 +486,7 @@ ClassObject* dvmOptResolveClass(ClassObject* referrer, u4 classIdx,
 
     /* multiple definitions? */
     if (IS_CLASS_FLAG_SET(resClass, CLASS_MULTIPLE_DEFS)) {
-        LOGI("DexOpt: not resolving ambiguous class '%s'",
+        ALOGI("DexOpt: not resolving ambiguous class '%s'",
             resClass->descriptor);
         if (pFailure != NULL)
             *pFailure = VERIFY_ERROR_NO_CLASS;
@@ -568,7 +568,7 @@ InstField* dvmOptResolveInstField(ClassObject* referrer, u4 ifieldIdx,
     bool allowed = dvmCheckFieldAccess(referrer, (Field*)resField);
     untweakLoader(referrer, resField->clazz);
     if (!allowed) {
-        LOGI("DexOpt: access denied from %s to field %s.%s",
+        ALOGI("DexOpt: access denied from %s to field %s.%s",
             referrer->descriptor, resField->clazz->descriptor,
             resField->name);
         if (pFailure != NULL)
@@ -646,7 +646,7 @@ StaticField* dvmOptResolveStaticField(ClassObject* referrer, u4 sfieldIdx,
     bool allowed = dvmCheckFieldAccess(referrer, (Field*)resField);
     untweakLoader(referrer, resField->clazz);
     if (!allowed) {
-        LOGI("DexOpt: access denied from %s to field %s.%s",
+        ALOGI("DexOpt: access denied from %s to field %s.%s",
             referrer->descriptor, resField->clazz->descriptor,
             resField->name);
         if (pFailure != NULL)
@@ -683,7 +683,7 @@ static void rewriteInstField(Method* method, u2* insns, Opcode quickOpc,
 
     instField = dvmOptResolveInstField(clazz, fieldIdx, NULL);
     if (instField == NULL) {
-        LOGI("DexOpt: unable to optimize instance field ref "
+        ALOGI("DexOpt: unable to optimize instance field ref "
              "0x%04x at 0x%02x in %s.%s",
             fieldIdx, (int) (insns - method->insns), clazz->descriptor,
             method->name);
@@ -724,7 +724,7 @@ static void rewriteStaticField0(Method* method, u2* insns, Opcode volatileOpc,
 
     staticField = dvmOptResolveStaticField(clazz, fieldIdx, NULL);
     if (staticField == NULL) {
-        LOGI("DexOpt: unable to optimize static field ref "
+        ALOGI("DexOpt: unable to optimize static field ref "
              "0x%04x at 0x%02x in %s.%s",
             fieldIdx, (int) (insns - method->insns), clazz->descriptor,
             method->name);
@@ -862,9 +862,9 @@ Method* dvmOptResolveMethod(ClassObject* referrer, u4 methodIdx,
     bool allowed = dvmCheckMethodAccess(referrer, resMethod);
     untweakLoader(referrer, resMethod->clazz);
     if (!allowed) {
-        IF_LOGI() {
+        IF_ALOGI() {
             char* desc = dexProtoCopyMethodDescriptor(&resMethod->prototype);
-            LOGI("DexOpt: illegal method access (call %s.%s %s from %s)",
+            ALOGI("DexOpt: illegal method access (call %s.%s %s from %s)",
                 resMethod->clazz->descriptor, resMethod->name, desc,
                 referrer->descriptor);
             free(desc);
@@ -912,7 +912,7 @@ static void rewriteVirtualInvoke(Method* method, u2* insns, Opcode newOpc)
     updateOpcode(method, insns, newOpc);
     dvmUpdateCodeUnit(method, insns+1, baseMethod->methodIndex);
 
-    //LOGI("DexOpt: rewrote call to %s.%s --> %s.%s",
+    //ALOGI("DexOpt: rewrote call to %s.%s --> %s.%s",
     //    method->clazz->descriptor, method->name,
     //    baseMethod->clazz->descriptor, baseMethod->name);
 
@@ -1002,7 +1002,7 @@ Method* dvmOptResolveInterfaceMethod(ClassObject* referrer, u4 methodIdx)
         }
         if (!dvmIsInterfaceClass(resClass)) {
             /* whoops */
-            LOGI("Interface method not part of interface class");
+            ALOGI("Interface method not part of interface class");
             return NULL;
         }
 
@@ -1066,7 +1066,7 @@ static bool rewriteExecuteInline(Method* method, u2* insns,
     while (inlineSubs->method != NULL) {
         /*
         if (extra) {
-            LOGI("comparing %p vs %p %s.%s %s",
+            ALOGI("comparing %p vs %p %s.%s %s",
                 inlineSubs->method, calledMethod,
                 inlineSubs->method->clazz->descriptor,
                 inlineSubs->method->name,
@@ -1080,7 +1080,7 @@ static bool rewriteExecuteInline(Method* method, u2* insns,
             updateOpcode(method, insns, OP_EXECUTE_INLINE);
             dvmUpdateCodeUnit(method, insns+1, (u2) inlineSubs->inlineIdx);
 
-            //LOGI("DexOpt: execute-inline %s.%s --> %s.%s",
+            //ALOGI("DexOpt: execute-inline %s.%s --> %s.%s",
             //    method->clazz->descriptor, method->name,
             //    calledMethod->clazz->descriptor, calledMethod->name);
             return true;
@@ -1120,7 +1120,7 @@ static bool rewriteExecuteInlineRange(Method* method, u2* insns,
             updateOpcode(method, insns, OP_EXECUTE_INLINE_RANGE);
             dvmUpdateCodeUnit(method, insns+1, (u2) inlineSubs->inlineIdx);
 
-            //LOGI("DexOpt: execute-inline/range %s.%s --> %s.%s",
+            //ALOGI("DexOpt: execute-inline/range %s.%s --> %s.%s",
             //    method->clazz->descriptor, method->name,
             //    calledMethod->clazz->descriptor, calledMethod->name);
             return true;
index 21b60ef..db1314a 100644 (file)
@@ -142,11 +142,11 @@ void dvmRegisterMapDumpStats()
             break;
     }
 
-    LOGI("Register Map gcPointGap stats (diff count=%d, total=%d):",
+    ALOGI("Register Map gcPointGap stats (diff count=%d, total=%d):",
         pStats->gcGapCount, pStats->totalGcPointCount);
     assert(pStats->gcPointGap[0] == 0);
     for (i = 1; i <= end; i++) {
-        LOGI(" %2d %d", i, pStats->gcPointGap[i]);
+        ALOGI(" %2d %d", i, pStats->gcPointGap[i]);
     }
 
 
@@ -155,16 +155,16 @@ void dvmRegisterMapDumpStats()
             break;
     }
 
-    LOGI("Register Map bit difference stats:");
+    ALOGI("Register Map bit difference stats:");
     for (i = 0; i <= end; i++) {
-        LOGI(" %2d %d", i, pStats->numDiffBits[i]);
+        ALOGI(" %2d %d", i, pStats->numDiffBits[i]);
     }
 
 
-    LOGI("Register Map update position stats (lt16=%d ge16=%d):",
+    ALOGI("Register Map update position stats (lt16=%d ge16=%d):",
         pStats->updateLT16, pStats->updateGE16);
     for (i = 0; i < kNumUpdatePosns; i++) {
-        LOGI(" %2d %d", i, pStats->updatePosn[i]);
+        ALOGI(" %2d %d", i, pStats->updatePosn[i]);
     }
 #endif
 }
@@ -479,7 +479,7 @@ static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap)
         {
             char* desc;
             desc = dexProtoCopyMethodDescriptor(&vdata->method->prototype);
-            LOGI("Map for %s.%s %s", vdata->method->clazz->descriptor,
+            ALOGI("Map for %s.%s %s", vdata->method->clazz->descriptor,
                 vdata->method->name, desc);
             free(desc);
 
@@ -977,12 +977,12 @@ static int compareMaps(const RegisterMap* pMap1, const RegisterMap* pMap2)
     size1 = computeRegisterMapSize(pMap1);
     size2 = computeRegisterMapSize(pMap2);
     if (size1 != size2) {
-        LOGI("compareMaps: size mismatch (%zd vs %zd)", size1, size2);
+        ALOGI("compareMaps: size mismatch (%zd vs %zd)", size1, size2);
         return -1;
     }
 
     if (memcmp(pMap1, pMap2, size1) != 0) {
-        LOGI("compareMaps: content mismatch");
+        ALOGI("compareMaps: content mismatch");
         return -1;
     }
 
@@ -1286,7 +1286,7 @@ static void computeMapStats(RegisterMap* pMap, const Method* method)
                     prevAddr, addr, method->clazz->descriptor, method->name);
             } else if (addrDiff > kMaxGcPointGap) {
                 if (REGISTER_MAP_VERBOSE) {
-                    LOGI("HEY: addrDiff is %d, max %d (0x%04x->0x%04x %s.%s)",
+                    ALOGI("HEY: addrDiff is %d, max %d (0x%04x->0x%04x %s.%s)",
                         addrDiff, kMaxGcPointGap, prevAddr, addr,
                         method->clazz->descriptor, method->name);
                 }
@@ -1349,7 +1349,7 @@ static void computeMapStats(RegisterMap* pMap, const Method* method)
 
             if (numDiff > kMaxDiffBits) {
                 if (REGISTER_MAP_VERBOSE) {
-                    LOGI("WOW: numDiff is %d, max %d", numDiff, kMaxDiffBits);
+                    ALOGI("WOW: numDiff is %d, max %d", numDiff, kMaxDiffBits);
                 }
             } else {
                 pStats->numDiffBits[numDiff]++;
@@ -1472,7 +1472,7 @@ static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
     numEntries = dvmRegisterMapGetNumEntries(pMap);
 
     if (debug) {
-        LOGI("COMPRESS: %s.%s aw=%d rw=%d ne=%d",
+        ALOGI("COMPRESS: %s.%s aw=%d rw=%d ne=%d",
             meth->clazz->descriptor, meth->name,
             addrWidth, regWidth, numEntries);
         dumpRegisterMap(pMap, -1);
@@ -1549,7 +1549,7 @@ static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
             addr |= (*mapData++) << 8;
 
         if (debug)
-            LOGI(" addr=0x%04x ent=%d (aw=%d)", addr, entry, addrWidth);
+            ALOGI(" addr=0x%04x ent=%d (aw=%d)", addr, entry, addrWidth);
 
         addrDiff = addr - prevAddr;
         assert(addrDiff > 0);
@@ -1557,12 +1557,12 @@ static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
             /* small difference, encode in 3 bits */
             key = addrDiff -1;          /* set 00000AAA */
             if (debug)
-                LOGI(" : small %d, key=0x%02x", addrDiff, key);
+                ALOGI(" : small %d, key=0x%02x", addrDiff, key);
         } else {
             /* large difference, output escape code */
             key = 0x07;                 /* escape code for AAA */
             if (debug)
-                LOGI(" : large %d, key=0x%02x", addrDiff, key);
+                ALOGI(" : large %d, key=0x%02x", addrDiff, key);
         }
 
         int numBitsChanged, firstBitChanged, lebSize;
@@ -1571,26 +1571,26 @@ static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
             &firstBitChanged, &numBitsChanged, NULL);
 
         if (debug) {
-            LOGI(" : diff fbc=%d nbc=%d ls=%d (rw=%d)",
+            ALOGI(" : diff fbc=%d nbc=%d ls=%d (rw=%d)",
                 firstBitChanged, numBitsChanged, lebSize, regWidth);
         }
 
         if (numBitsChanged == 0) {
             /* set B to 1 and CCCC to zero to indicate no bits were changed */
             key |= 0x08;
-            if (debug) LOGI(" : no bits changed");
+            if (debug) ALOGI(" : no bits changed");
         } else if (numBitsChanged == 1 && firstBitChanged < 16) {
             /* set B to 0 and CCCC to the index of the changed bit */
             key |= firstBitChanged << 4;
-            if (debug) LOGI(" : 1 low bit changed");
+            if (debug) ALOGI(" : 1 low bit changed");
         } else if (numBitsChanged < 15 && lebSize < regWidth) {
             /* set B to 1 and CCCC to the number of bits */
             key |= 0x08 | (numBitsChanged << 4);
-            if (debug) LOGI(" : some bits changed");
+            if (debug) ALOGI(" : some bits changed");
         } else {
             /* set B to 1 and CCCC to 0x0f so we store the entire vector */
             key |= 0x08 | 0xf0;
-            if (debug) LOGI(" : encode original");
+            if (debug) ALOGI(" : encode original");
         }
 
         /*
@@ -1725,7 +1725,7 @@ static RegisterMap* uncompressMapDifferential(const RegisterMap* pMap)
 
     /* now we know enough to allocate the new map */
     if (REGISTER_MAP_VERBOSE) {
-        LOGI("Expanding to map aw=%d rw=%d ne=%d",
+        ALOGI("Expanding to map aw=%d rw=%d ne=%d",
             newAddrWidth, regWidth, numEntries);
     }
     newMapSize = kHeaderSize + (newAddrWidth + regWidth) * numEntries;
index 46316fe..d6c4b79 100644 (file)
@@ -228,7 +228,7 @@ static bool setPredecessors(VerifierData* vdata, VfyBasicBlock* curBlock,
 
     if (false) {
         if (dvmPointerSetGetCount(curBlock->predecessors) > 256) {
-            LOGI("Lots of preds at 0x%04x in %s.%s:%s", curIdx,
+            ALOGI("Lots of preds at 0x%04x in %s.%s:%s", curIdx,
                 meth->clazz->descriptor, meth->name, meth->shorty);
         }
     }
@@ -245,7 +245,7 @@ static void dumpBasicBlocks(const VerifierData* vdata)
     unsigned int idx;
     int count;
 
-    LOGI("Basic blocks for %s.%s:%s", vdata->method->clazz->descriptor,
+    ALOGI("Basic blocks for %s.%s:%s", vdata->method->clazz->descriptor,
         vdata->method->name, vdata->method->shorty);
     for (idx = 0; idx < vdata->insnsSize; idx++) {
         VfyBasicBlock* block = vdata->basicBlocks[idx];
@@ -280,7 +280,7 @@ static void dumpBasicBlocks(const VerifierData* vdata)
         printBuf[sizeof(printBuf)-2] = '!';
         printBuf[sizeof(printBuf)-1] = '\0';
 
-        LOGI("%s", printBuf);
+        ALOGI("%s", printBuf);
     }
 
     usleep(100 * 1000);      /* ugh...let logcat catch up */
@@ -309,7 +309,7 @@ bool dvmComputeVfyBasicBlocks(VerifierData* vdata)
 
     bool verbose = false; //dvmWantVerboseVerification(meth);
     if (verbose) {
-        LOGI("Basic blocks for %s.%s:%s",
+        ALOGI("Basic blocks for %s.%s:%s",
             meth->clazz->descriptor, meth->name, meth->shorty);
     }
 
@@ -473,11 +473,11 @@ bool dvmComputeVfyBasicBlocks(VerifierData* vdata)
             else
                 startEnd = "-";
 
-            LOGI("%04x: %c%c%s #%d", idx, tryc, btc, startEnd, debugBBIndex);
+            ALOGI("%04x: %c%c%s #%d", idx, tryc, btc, startEnd, debugBBIndex);
 
             if (pTries != NULL && idx == tryStart) {
                 assert(numHandlers > 0);
-                LOGI("  EXC block: [%04x, %04x) %d:(%04x...)",
+                ALOGI("  EXC block: [%04x, %04x) %d:(%04x...)",
                     tryStart, tryEnd, numHandlers, handlerList[0]);
             }
         }
index b2bff81..b455301 100644 (file)
@@ -79,7 +79,7 @@ retry:
         currentArena = newArena;
         numArenaBlocks++;
         if (numArenaBlocks > 10)
-            LOGI("Total arena pages for JIT: %d", numArenaBlocks);
+            ALOGI("Total arena pages for JIT: %d", numArenaBlocks);
         goto retry;
     }
     /* Should not reach here */
index 4a6b1a6..c0a6c7f 100644 (file)
@@ -76,7 +76,7 @@ bool hprofShutdown(hprof_context_t *tailCtx)
     hprofContextInit(headCtx, strdup(tailCtx->fileName), tailCtx->fd, true,
         tailCtx->directToDdms);
 
-    LOGI("hprof: dumping heap strings to \"%s\".", tailCtx->fileName);
+    ALOGI("hprof: dumping heap strings to \"%s\".", tailCtx->fileName);
     hprofDumpStrings(headCtx);
     hprofDumpClasses(headCtx);
 
@@ -145,7 +145,7 @@ bool hprofShutdown(hprof_context_t *tailCtx)
     }
 
     /* throw out a log message for the benefit of "runhat" */
-    LOGI("hprof: heap dump completed (%dKB)",
+    ALOGI("hprof: heap dump completed (%dKB)",
         (headCtx->fileDataSize + tailCtx->fileDataSize + 1023) / 1024);
 
     hprofFreeContext(headCtx);
index b0c0553..00a0e60 100644 (file)
@@ -937,7 +937,7 @@ void dvmInterpCheckTrackedRefs(Thread* self, const Method* method,
 
         dvmAbort();
     }
-    //LOGI("TRACK OK");
+    //ALOGI("TRACK OK");
 }
 #endif
 
index 2a6bb65..8cae67e 100644 (file)
@@ -1309,7 +1309,7 @@ bool dvmJitResizeJitTable( unsigned int size )
     assert(gDvmJit.pJitEntryTable != NULL);
     assert(size && !(size & (size - 1)));   /* Is power of 2? */
 
-    LOGI("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size);
+    ALOGI("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size);
 
     if (size <= gDvmJit.jitTableSize) {
         return true;
index 6c8a517..b1034d3 100644 (file)
@@ -1014,15 +1014,15 @@ void dvmHandleStackOverflow(Thread* self, const Method* method)
     }
 
     /* open it up to the full range */
-    LOGI("threadid=%d: stack overflow on call to %s.%s:%s",
+    ALOGI("threadid=%d: stack overflow on call to %s.%s:%s",
         self->threadId,
         method->clazz->descriptor, method->name, method->shorty);
     StackSaveArea* saveArea = SAVEAREA_FROM_FP(self->interpSave.curFrame);
-    LOGI("  method requires %d+%d+%d=%d bytes, fp is %p (%d left)",
+    ALOGI("  method requires %d+%d+%d=%d bytes, fp is %p (%d left)",
         method->registersSize * 4, sizeof(StackSaveArea), method->outsSize * 4,
         (method->registersSize + method->outsSize) * 4 + sizeof(StackSaveArea),
         saveArea, (u1*) saveArea - self->interpStackEnd);
-    LOGI("  expanding stack end (%p to %p)", self->interpStackEnd,
+    ALOGI("  expanding stack end (%p to %p)", self->interpStackEnd,
         self->interpStackStart - self->interpStackSize);
     //dvmDumpThread(self, false);
     self->interpStackEnd = self->interpStackStart - self->interpStackSize;
@@ -1069,7 +1069,7 @@ void dvmCleanupStackOverflow(Thread* self, const Object* exception)
     self->interpStackEnd = newStackEnd;
     self->stackOverflowed = false;
 
-    LOGI("Shrank stack (to %p, curFrame is %p)", self->interpStackEnd,
+    ALOGI("Shrank stack (to %p, curFrame is %p)", self->interpStackEnd,
         self->interpSave.curFrame);
 }
 
@@ -1345,7 +1345,7 @@ void dvmDumpRunningThreadStack(const DebugOutputTarget* target, Thread* thread)
     /*
      * Run through the stack and rewrite the "prev" pointers.
      */
-    //LOGI("DR: fpOff=%d (from %p %p)",fpOffset, origStack,
+    //ALOGI("DR: fpOff=%d (from %p %p)",fpOffset, origStack,
     //     thread->interpSave.curFrame);
     fp = stackCopy + fpOffset;
     while (true) {
index 8c470c1..54b5ee9 100644 (file)
@@ -534,7 +534,7 @@ static bool processIncoming(JdwpState* state)
                 if (maxfd < fd)
                     maxfd = fd;
             } else {
-                LOGI("NOTE: entering select w/o wakepipe");
+                ALOGI("NOTE: entering select w/o wakepipe");
             }
 
             if (maxfd < 0) {
@@ -573,7 +573,7 @@ static bool processIncoming(JdwpState* state)
             {
                 int  sock = receiveClientFd(netState);
                 if (sock >= 0) {
-                    LOGI("Ignoring second debugger -- accepting and dropping");
+                    ALOGI("Ignoring second debugger -- accepting and dropping");
                     close(sock);
                 } else {
                     assert(netState->controlSock < 0);
index 56e94b3..0062875 100644 (file)
@@ -161,9 +161,9 @@ static void unlockEventMutex(JdwpState* state)
  */
 static void dumpEvent(const JdwpEvent* pEvent)
 {
-    LOGI("Event id=0x%4x %p (prev=%p next=%p):",
+    ALOGI("Event id=0x%4x %p (prev=%p next=%p):",
         pEvent->requestId, pEvent, pEvent->prev, pEvent->next);
-    LOGI("  kind=%s susp=%s modCount=%d",
+    ALOGI("  kind=%s susp=%s modCount=%d",
         dvmJdwpEventKindStr(pEvent->eventKind),
         dvmJdwpSuspendPolicyStr(pEvent->suspendPolicy),
         pEvent->modCount);
@@ -171,7 +171,7 @@ static void dumpEvent(const JdwpEvent* pEvent)
     for (int i = 0; i < pEvent->modCount; i++) {
         const JdwpEventMod* pMod = &pEvent->mods[i];
         JdwpModKind kind = static_cast<JdwpModKind>(pMod->modKind);
-        LOGI("  %s", dvmJdwpModKindStr(kind));
+        ALOGI("  %s", dvmJdwpModKindStr(kind));
         /* TODO - show details */
     }
 }
@@ -591,7 +591,7 @@ static void suspendByPolicy(JdwpState* state, JdwpSuspendPolicy suspendPolicy)
 
     /* this is rare but possible -- see CLASS_PREPARE handling */
     if (dvmDbgGetThreadSelfId() == state->debugThreadId) {
-        LOGI("NOTE: suspendByPolicy not suspending JDWP thread");
+        ALOGI("NOTE: suspendByPolicy not suspending JDWP thread");
         return;
     }
 
index c3cefaf..f109e25 100644 (file)
@@ -1023,7 +1023,7 @@ static JdwpError handleTR_Suspend(JdwpState* state,
     ObjectId threadId = dvmReadObjectId(&buf);
 
     if (threadId == dvmDbgGetThreadSelfId()) {
-        LOGI("  Warning: ignoring request to suspend self");
+        ALOGI("  Warning: ignoring request to suspend self");
         return ERR_THREAD_NOT_SUSPENDED;
     }
     ALOGV("  Req to suspend thread 0x%llx", threadId);
@@ -1042,7 +1042,7 @@ static JdwpError handleTR_Resume(JdwpState* state,
     ObjectId threadId = dvmReadObjectId(&buf);
 
     if (threadId == dvmDbgGetThreadSelfId()) {
-        LOGI("  Warning: ignoring request to resume self");
+        ALOGI("  Warning: ignoring request to resume self");
         return ERR_NONE;
     }
     ALOGV("  Req to resume thread 0x%llx", threadId);
index 9ba841e..7f2fecf 100644 (file)
@@ -162,7 +162,7 @@ JdwpState* dvmJdwpStartup(const JdwpStartupParams* pParams)
             goto fail;
         }
 
-        LOGI("JDWP connected");
+        ALOGI("JDWP connected");
 
         /*
          * Ordinarily we would pause briefly to allow the debugger to set
index a5470f9..f020574 100644 (file)
@@ -109,7 +109,7 @@ static bool prepareSocket(JdwpState* state, const JdwpStartupParams* pParams)
     }
 
     if (pParams->suspend)
-        LOGI("JDWP will wait for debugger on port %d", port);
+        ALOGI("JDWP will wait for debugger on port %d", port);
     else
         ALOGD("JDWP will %s on port %d",
             pParams->server ? "listen" : "connect", port);
@@ -435,7 +435,7 @@ static bool establishConnection(JdwpState* state)
 
     addr.addrInet.sin_port = htons(state->params.port);
 
-    LOGI("Connecting out to '%s' %d",
+    ALOGI("Connecting out to '%s' %d",
         inet_ntoa(addr.addrInet.sin_addr), ntohs(addr.addrInet.sin_port));
 
     /*
@@ -461,7 +461,7 @@ static bool establishConnection(JdwpState* state)
         return false;
     }
 
-    LOGI("Connection established to %s (%s:%d)",
+    ALOGI("Connection established to %s (%s:%d)",
         state->params.host, inet_ntoa(addr.addrInet.sin_addr),
         ntohs(addr.addrInet.sin_port));
     netState->awaitingHandshake = true;
@@ -695,7 +695,7 @@ static bool processIncoming(JdwpState* state)
             if (fd >= 0) {
                 FD_SET(fd, &readfds);
             } else {
-                LOGI("NOTE: entering select w/o wakepipe");
+                ALOGI("NOTE: entering select w/o wakepipe");
             }
 
             /*
@@ -730,7 +730,7 @@ static bool processIncoming(JdwpState* state)
             if (netState->listenSock >= 0 &&
                 FD_ISSET(netState->listenSock, &readfds))
             {
-                LOGI("Ignoring second debugger -- accepting and dropping");
+                ALOGI("Ignoring second debugger -- accepting and dropping");
                 union {
                     struct sockaddr_in   addrInet;
                     struct sockaddr      addrPlain;
@@ -740,7 +740,7 @@ static bool processIncoming(JdwpState* state)
                 tmpSock = accept(netState->listenSock, &addr.addrPlain,
                                 &addrlen);
                 if (tmpSock < 0)
-                    LOGI("Weird -- accept failed");
+                    ALOGI("Weird -- accept failed");
                 else
                     close(tmpSock);
             }
index 7839018..9f9556f 100644 (file)
@@ -86,9 +86,9 @@ void dvmMterpStd(Thread* self)
             desc);
         free(desc);
     }
-    //LOGI("self is %p, pc=%p, fp=%p", self, self->interpSave.pc,
+    //ALOGI("self is %p, pc=%p, fp=%p", self, self->interpSave.pc,
     //      self->interpSave.curFrame);
-    //LOGI("first instruction is 0x%04x", self->interpSave.pc[0]);
+    //ALOGI("first instruction is 0x%04x", self->interpSave.pc[0]);
 
     /*
      * Handle any ongoing profiling and prep for debugging
index 1a97462..256d4c6 100644 (file)
@@ -683,11 +683,11 @@ static void Dalvik_dalvik_system_VMDebug_dumpReferenceTables(const u4* args,
     UNUSED_PARAMETER(args);
     UNUSED_PARAMETER(pResult);
 
-    LOGI("--- reference table dump ---");
+    ALOGI("--- reference table dump ---");
     dvmDumpJniReferenceTables();
     // could dump thread's internalLocalRefTable, probably not useful
     // ditto for thread's jniMonitorRefTable
-    LOGI("---");
+    ALOGI("---");
     RETURN_VOID();
 }
 
index 6bd5333..72bad29 100644 (file)
@@ -194,7 +194,7 @@ static void Dalvik_dalvik_system_VMRuntime_setTargetSdkVersion(const u4* args,
     int targetSdkVersion = args[1];
     if (targetSdkVersion > 0 && targetSdkVersion <= 13 /* honeycomb-mr2 */) {
         // TODO: running with CheckJNI should override this and force you to obey the strictest rules.
-        LOGI("Turning on JNI app bug workarounds for target SDK version %i...", targetSdkVersion);
+        ALOGI("Turning on JNI app bug workarounds for target SDK version %i...", targetSdkVersion);
         gDvmJni.workAroundAppJniBugs = true;
     }
     RETURN_VOID();
index 85ea21a..a1d723e 100644 (file)
@@ -150,7 +150,7 @@ static int* getTraceBuf(Object* targetThreadObj, size_t* pStackDepth)
             break;
     }
     if (thread == NULL) {
-        LOGI("VMStack.getTraceBuf: threadObj %p not active",
+        ALOGI("VMStack.getTraceBuf: threadObj %p not active",
             targetThreadObj);
         dvmUnlockThreadList();
         return NULL;
index e51e7bf..ddc37b0 100644 (file)
@@ -502,7 +502,7 @@ static void Dalvik_dalvik_system_Zygote_forkSystemServer(
     if (pid > 0) {
         int status;
 
-        LOGI("System server process %d has been created", pid);
+        ALOGI("System server process %d has been created", pid);
         gDvm.systemServerPid = pid;
         /* There is a slight window that the system server process has crashed
          * but it went unnoticed because we haven't published its pid yet. So
@@ -526,7 +526,7 @@ static void Dalvik_dalvik_system_Zygote_execShell(
     const char *argp[] = {_PATH_BSHELL, "-c", NULL, NULL};
     argp[2] = dvmCreateCstrFromString(command);
 
-    LOGI("Exec: %s %s %s", argp[0], argp[1], argp[2]);
+    ALOGI("Exec: %s %s %s", argp[0], argp[1], argp[2]);
 
     execv(_PATH_BSHELL, (char**)argp);
     exit(127);
index 5a8b4cf..635b726 100644 (file)
@@ -179,7 +179,7 @@ static void Dalvik_java_lang_VMThread_nameChanged(const u4* args,
 
     dvmDdmSendThreadNameChange(threadId, nameStr);
     //char* str = dvmCreateCstrFromString(nameStr);
-    //LOGI("UPDATE: threadid=%d now '%s'", threadId, str);
+    //ALOGI("UPDATE: threadid=%d now '%s'", threadId, str);
     //free(str);
 
     RETURN_VOID();
index eed8ce1..558b2ff 100644 (file)
@@ -31,7 +31,7 @@ static void Dalvik_org_apache_harmony_dalvik_ddmc_DdmVmInternal_threadNotify(
 {
     bool enable = (args[0] != 0);
 
-    //LOGI("ddmThreadNotification: %d", enable);
+    //ALOGI("ddmThreadNotification: %d", enable);
     dvmDdmSetThreadNotification(enable);
     RETURN_VOID();
 }
index c50bc45..cef4dab 100644 (file)
@@ -143,7 +143,7 @@ bool dvmCheckMethodAccess(const ClassObject* accessFrom, const Method* method)
  */
 bool dvmCheckFieldAccess(const ClassObject* accessFrom, const Field* field)
 {
-    //LOGI("CHECK ACCESS from '%s' to field '%s' (in %s) flags=%#x",
+    //ALOGI("CHECK ACCESS from '%s' to field '%s' (in %s) flags=%#x",
     //    accessFrom->descriptor, field->name,
     //    field->clazz->descriptor, field->accessFlags);
     return checkAccess(accessFrom, field->clazz, field->accessFlags);
index 5c4563f..fe4c3a2 100644 (file)
@@ -274,13 +274,13 @@ static void linearAllocTests()
     dvmLinearReadOnly(NULL, (char*)fiddle);
 
     char* str = (char*)dvmLinearStrdup(NULL, "This is a test!");
-    LOGI("GOT: '%s'", str);
+    ALOGI("GOT: '%s'", str);
 
     /* try to check the bounds; allocator may round allocation size up */
     fiddle = (char*)dvmLinearAlloc(NULL, 12);
-    LOGI("Should be 1: %d", dvmLinearAllocContains(fiddle, 12));
-    LOGI("Should be 0: %d", dvmLinearAllocContains(fiddle, 13));
-    LOGI("Should be 0: %d", dvmLinearAllocContains(fiddle - 128*1024, 1));
+    ALOGI("Should be 1: %d", dvmLinearAllocContains(fiddle, 12));
+    ALOGI("Should be 0: %d", dvmLinearAllocContains(fiddle, 13));
+    ALOGI("Should be 0: %d", dvmLinearAllocContains(fiddle - 128*1024, 1));
 
     dvmLinearAllocDump(NULL);
     dvmLinearFree(NULL, (char*)str);
@@ -514,7 +514,7 @@ static void dumpClassPath(const ClassPathEntry* cpe)
         default:            kindStr = "???";    break;
         }
 
-        LOGI("  %2d: type=%s %s %p", idx, kindStr, cpe->fileName, cpe->ptr);
+        ALOGI("  %2d: type=%s %s %p", idx, kindStr, cpe->fileName, cpe->ptr);
         if (CALC_CACHE_STATS && cpe->kind == kCpeJar) {
             JarFile* pJarFile = (JarFile*) cpe->ptr;
             DvmDex* pDvmDex = dvmGetJarFileDex(pJarFile);
@@ -981,7 +981,7 @@ bool dvmLoaderInInitiatingList(const ClassObject* clazz, const Object* loader)
     int i;
     for (i = loaderList->initiatingLoaderCount-1; i >= 0; --i) {
         if (loaderList->initiatingLoaders[i] == loader) {
-            //LOGI("+++ found initiating match %p in %s",
+            //ALOGI("+++ found initiating match %p in %s",
             //    loader, clazz->descriptor);
             return true;
         }
@@ -1039,7 +1039,7 @@ void dvmAddInitiatingLoader(ClassObject* clazz, Object* loader)
             }
             loaderList->initiatingLoaders = newList;
 
-            //LOGI("Expanded init list to %d (%s)",
+            //ALOGI("Expanded init list to %d (%s)",
             //    loaderList->initiatingLoaderCount+kInitLoaderInc,
             //    clazz->descriptor);
         }
@@ -1076,7 +1076,7 @@ static int hashcmpClassByCrit(const void* vclazz, const void* vcrit)
               (pCrit->loader != NULL &&
                dvmLoaderInInitiatingList(clazz, pCrit->loader)) ));
     //if (match)
-    //    LOGI("+++ %s %p matches existing %s %p",
+    //    ALOGI("+++ %s %p matches existing %s %p",
     //        pCrit->descriptor, pCrit->loader,
     //        clazz->descriptor, clazz->classLoader);
     return !match;
@@ -1316,7 +1316,7 @@ ClassObject* dvmFindClassNoInit(const char* descriptor,
 static ClassObject* findClassFromLoaderNoInit(const char* descriptor,
     Object* loader)
 {
-    //LOGI("##### findClassFromLoaderNoInit (%s,%p)",
+    //ALOGI("##### findClassFromLoaderNoInit (%s,%p)",
     //        descriptor, loader);
 
     Thread* self = dvmThreadSelf();
@@ -1682,7 +1682,7 @@ got_class:
                 clazz = NULL;
                 goto bail;
             }
-            //LOGI("WAITING  for '%s' (owner=%d)",
+            //ALOGI("WAITING  for '%s' (owner=%d)",
             //    clazz->descriptor, clazz->initThreadId);
             while (!dvmIsClassLinked(clazz) && clazz->status != CLASS_ERROR) {
                 dvmObjectWait(self, (Object*) clazz, 0, 0, false);
@@ -1707,7 +1707,7 @@ got_class:
     assert(dvmIsClassObject(clazz));
     assert(clazz == gDvm.classJavaLangObject || clazz->super != NULL);
     if (!dvmIsInterfaceClass(clazz)) {
-        //LOGI("class=%s vtableCount=%d, virtualMeth=%d",
+        //ALOGI("class=%s vtableCount=%d, virtualMeth=%d",
         //    clazz->descriptor, clazz->vtableCount,
         //    clazz->virtualMethodCount);
         assert(clazz->vtableCount >= clazz->virtualMethodCount);
@@ -1976,7 +1976,7 @@ static ClassObject* loadClassFromDex(DvmDex* pDvmDex,
             classLoader);
 
     if (gDvm.verboseClass && (result != NULL)) {
-        LOGI("[Loaded %s from DEX %p (cl=%p)]",
+        ALOGI("[Loaded %s from DEX %p (cl=%p)]",
             result->descriptor, pDvmDex, classLoader);
     }
 
@@ -2609,7 +2609,7 @@ bool dvmLinkClass(ClassObject* clazz)
                              clazz->descriptor, interfaceIdxArray[i],
                              classDescriptor);
                     } else {
-                        LOGI("Failed resolving %s interface %d '%s'",
+                        ALOGI("Failed resolving %s interface %d '%s'",
                              clazz->descriptor, interfaceIdxArray[i],
                              classDescriptor);
                     }
@@ -2868,7 +2868,7 @@ static bool createVtable(ClassObject* clazz)
     int i;
 
     if (clazz->super != NULL) {
-        //LOGI("SUPER METHODS %d %s->%s", clazz->super->vtableCount,
+        //ALOGI("SUPER METHODS %d %s->%s", clazz->super->vtableCount,
         //    clazz->descriptor, clazz->super->descriptor);
     }
 
@@ -3553,10 +3553,10 @@ static bool computeFieldOffsets(ClassObject* clazz)
 
     LOGVV("--- computeFieldOffsets '%s'", clazz->descriptor);
 
-    //LOGI("OFFSETS fieldCount=%d", clazz->ifieldCount);
-    //LOGI("dataobj, instance: %d", offsetof(DataObject, instanceData));
-    //LOGI("classobj, access: %d", offsetof(ClassObject, accessFlags));
-    //LOGI("super=%p, fieldOffset=%d", clazz->super, fieldOffset);
+    //ALOGI("OFFSETS fieldCount=%d", clazz->ifieldCount);
+    //ALOGI("dataobj, instance: %d", offsetof(DataObject, instanceData));
+    //ALOGI("classobj, access: %d", offsetof(ClassObject, accessFlags));
+    //ALOGI("super=%p, fieldOffset=%d", clazz->super, fieldOffset);
 
     /*
      * Start by moving all reference fields to the front.
@@ -3757,7 +3757,7 @@ static bool computeFieldOffsets(ClassObject* clazz)
  */
 static void throwEarlierClassFailure(ClassObject* clazz)
 {
-    LOGI("Rejecting re-init on previously-failed class %s v=%p",
+    ALOGI("Rejecting re-init on previously-failed class %s v=%p",
         clazz->descriptor, clazz->verifyErrorClass);
 
     if (clazz->verifyErrorClass == NULL) {
@@ -4348,7 +4348,7 @@ noverify:
          * was set), bail out.
          */
         if (dvmCheckException(self)) {
-            LOGI("Class init of '%s' failing with wait() exception",
+            ALOGI("Class init of '%s' failing with wait() exception",
                 clazz->descriptor);
             /*
              * TODO: this is bogus, because it means the two threads have a
@@ -4368,7 +4368,7 @@ noverify:
             goto bail_unlock;
         }
         if (clazz->status == CLASS_INITIALIZING) {
-            LOGI("Waiting again for class init");
+            ALOGI("Waiting again for class init");
             continue;
         }
         assert(clazz->status == CLASS_INITIALIZED ||
@@ -4669,7 +4669,7 @@ static int dumpClass(void* vclazz, void* varg)
     int i;
 
     if (clazz == NULL) {
-        LOGI("dumpClass: ignoring request to dump null class");
+        ALOGI("dumpClass: ignoring request to dump null class");
         return 0;
     }
 
@@ -4681,13 +4681,13 @@ static int dumpClass(void* vclazz, void* varg)
         initStr = dvmIsClassInitialized(clazz) ? "true" : "false";
 
         if (showInit && showLoader)
-            LOGI("%s %p %s", clazz->descriptor, clazz->classLoader, initStr);
+            ALOGI("%s %p %s", clazz->descriptor, clazz->classLoader, initStr);
         else if (showInit)
-            LOGI("%s %s", clazz->descriptor, initStr);
+            ALOGI("%s %s", clazz->descriptor, initStr);
         else if (showLoader)
-            LOGI("%s %p", clazz->descriptor, clazz->classLoader);
+            ALOGI("%s %p", clazz->descriptor, clazz->classLoader);
         else
-            LOGI("%s", clazz->descriptor);
+            ALOGI("%s", clazz->descriptor);
 
         return 0;
     }
@@ -4698,32 +4698,32 @@ static int dumpClass(void* vclazz, void* varg)
     else
         super = NULL;
 
-    LOGI("----- %s '%s' cl=%p ser=0x%08x -----",
+    ALOGI("----- %s '%s' cl=%p ser=0x%08x -----",
         dvmIsInterfaceClass(clazz) ? "interface" : "class",
         clazz->descriptor, clazz->classLoader, clazz->serialNumber);
-    LOGI("  objectSize=%d (%d from super)", (int) clazz->objectSize,
+    ALOGI("  objectSize=%d (%d from super)", (int) clazz->objectSize,
         super != NULL ? (int) super->objectSize : -1);
-    LOGI("  access=0x%04x.%04x", clazz->accessFlags >> 16,
+    ALOGI("  access=0x%04x.%04x", clazz->accessFlags >> 16,
         clazz->accessFlags & JAVA_FLAGS_MASK);
     if (super != NULL)
-        LOGI("  super='%s' (cl=%p)", super->descriptor, super->classLoader);
+        ALOGI("  super='%s' (cl=%p)", super->descriptor, super->classLoader);
     if (dvmIsArrayClass(clazz)) {
-        LOGI("  dimensions=%d elementClass=%s",
+        ALOGI("  dimensions=%d elementClass=%s",
             clazz->arrayDim, clazz->elementClass->descriptor);
     }
     if (clazz->iftableCount > 0) {
-        LOGI("  interfaces (%d):", clazz->iftableCount);
+        ALOGI("  interfaces (%d):", clazz->iftableCount);
         for (i = 0; i < clazz->iftableCount; i++) {
             InterfaceEntry* ent = &clazz->iftable[i];
             int j;
 
-            LOGI("    %2d: %s (cl=%p)",
+            ALOGI("    %2d: %s (cl=%p)",
                 i, ent->clazz->descriptor, ent->clazz->classLoader);
 
             /* enable when needed */
             if (false && ent->methodIndexArray != NULL) {
                 for (j = 0; j < ent->clazz->virtualMethodCount; j++)
-                    LOGI("      %2d: %d %s %s",
+                    ALOGI("      %2d: %d %s %s",
                         j, ent->methodIndexArray[j],
                         ent->clazz->virtualMethods[j].name,
                         clazz->vtable[ent->methodIndexArray[j]]->name);
@@ -4731,30 +4731,30 @@ static int dumpClass(void* vclazz, void* varg)
         }
     }
     if (!dvmIsInterfaceClass(clazz)) {
-        LOGI("  vtable (%d entries, %d in super):", clazz->vtableCount,
+        ALOGI("  vtable (%d entries, %d in super):", clazz->vtableCount,
             super != NULL ? super->vtableCount : 0);
         for (i = 0; i < clazz->vtableCount; i++) {
             desc = dexProtoCopyMethodDescriptor(&clazz->vtable[i]->prototype);
-            LOGI("    %s%2d: %p %20s %s",
+            ALOGI("    %s%2d: %p %20s %s",
                 (i != clazz->vtable[i]->methodIndex) ? "*** " : "",
                 (u4) clazz->vtable[i]->methodIndex, clazz->vtable[i],
                 clazz->vtable[i]->name, desc);
             free(desc);
         }
-        LOGI("  direct methods (%d entries):", clazz->directMethodCount);
+        ALOGI("  direct methods (%d entries):", clazz->directMethodCount);
         for (i = 0; i < clazz->directMethodCount; i++) {
             desc = dexProtoCopyMethodDescriptor(
                     &clazz->directMethods[i].prototype);
-            LOGI("    %2d: %20s %s", i, clazz->directMethods[i].name,
+            ALOGI("    %2d: %20s %s", i, clazz->directMethods[i].name,
                 desc);
             free(desc);
         }
     } else {
-        LOGI("  interface methods (%d):", clazz->virtualMethodCount);
+        ALOGI("  interface methods (%d):", clazz->virtualMethodCount);
         for (i = 0; i < clazz->virtualMethodCount; i++) {
             desc = dexProtoCopyMethodDescriptor(
                     &clazz->virtualMethods[i].prototype);
-            LOGI("    %2d: %2d %20s %s", i,
+            ALOGI("    %2d: %2d %20s %s", i,
                 (u4) clazz->virtualMethods[i].methodIndex,
                 clazz->virtualMethods[i].name,
                 desc);
@@ -4762,16 +4762,16 @@ static int dumpClass(void* vclazz, void* varg)
         }
     }
     if (clazz->sfieldCount > 0) {
-        LOGI("  static fields (%d entries):", clazz->sfieldCount);
+        ALOGI("  static fields (%d entries):", clazz->sfieldCount);
         for (i = 0; i < clazz->sfieldCount; i++) {
-            LOGI("    %2d: %20s %s", i, clazz->sfields[i].name,
+            ALOGI("    %2d: %20s %s", i, clazz->sfields[i].name,
                 clazz->sfields[i].signature);
         }
     }
     if (clazz->ifieldCount > 0) {
-        LOGI("  instance fields (%d entries):", clazz->ifieldCount);
+        ALOGI("  instance fields (%d entries):", clazz->ifieldCount);
         for (i = 0; i < clazz->ifieldCount; i++) {
-            LOGI("    %2d: %20s %s", i, clazz->ifields[i].name,
+            ALOGI("    %2d: %20s %s", i, clazz->ifields[i].name,
                 clazz->ifields[i].signature);
         }
     }
@@ -4820,7 +4820,7 @@ void dvmDumpLoaderStats(const char* msg)
         gDvm.numDeclaredMethods, gDvm.numDeclaredInstFields,
         gDvm.numDeclaredStaticFields, gDvm.pBootLoaderAlloc->curOffset);
 #ifdef COUNT_PRECISE_METHODS
-    LOGI("GC precise methods: %d",
+    ALOGI("GC precise methods: %d",
         dvmPointerSetGetCount(gDvm.preciseMethods));
 #endif
 }
index a80a695..4e58e68 100644 (file)
@@ -63,7 +63,7 @@ void os_changeThreadPriority(Thread* thread, int newPriority)
 
     if (setpriority(PRIO_PROCESS, pid, newNice) != 0) {
         std::string threadName(dvmGetThreadName(thread));
-        LOGI("setPriority(%d) '%s' to prio=%d(n=%d) failed: %s",
+        ALOGI("setPriority(%d) '%s' to prio=%d(n=%d) failed: %s",
         pid, threadName.c_str(), newPriority, newNice, strerror(errno));
     } else {
         ALOGV("setPriority(%d) to prio=%d(n=%d)", pid, newPriority, newNice);
@@ -101,7 +101,7 @@ int os_raiseThreadPriority()
     errno = 0;
     int oldThreadPriority = getpriority(PRIO_PROCESS, 0);
     if (errno != 0) {
-        LOGI("getpriority(self) failed: %s", strerror(errno));
+        ALOGI("getpriority(self) failed: %s", strerror(errno));
     } else if (oldThreadPriority > ANDROID_PRIORITY_NORMAL) {
         /* Current value is numerically greater than "normal", which
          * in backward UNIX terms means lower priority.
@@ -110,7 +110,7 @@ int os_raiseThreadPriority()
             set_sched_policy(dvmGetSysThreadId(), SP_FOREGROUND);
         }
         if (setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_NORMAL) != 0) {
-            LOGI("Unable to elevate priority from %d to %d",
+            ALOGI("Unable to elevate priority from %d to %d",
                     oldThreadPriority, ANDROID_PRIORITY_NORMAL);
         } else {
             /*
index b022263..94a87c2 100644 (file)
@@ -329,9 +329,9 @@ static bool gatherMethods(ArrayObject* interfaces, Method*** pMethods,
     if (actualCount < 0)
         goto bail;
 
-    //LOGI("gathered methods:");
+    //ALOGI("gathered methods:");
     //for (i = 0; i < actualCount; i++) {
-    //    LOGI(" %d: %s.%s",
+    //    ALOGI(" %d: %s.%s",
     //        i, methods[i]->clazz->descriptor, methods[i]->name);
     //}
 
index 63c6356..0997d61 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef NDEBUG
 
-#define DBUG_MSG    LOGI
+#define DBUG_MSG    ALOGI
 
 class Stopwatch {
 public: