Browse files

Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
  • Loading branch information...
1 parent c6284c2 commit e8e1ddccd616e8226b7cc1e4e9fdb327429249e8 Steve Block committed Jan 5, 2012
Showing with 331 additions and 331 deletions.
  1. +4 −4 dexopt/OptMain.cpp
  2. +1 −1 libdex/DexFile.cpp
  3. +5 −5 libdex/DexSwapVerify.cpp
  4. +3 −3 libdex/InstrUtils.cpp
  5. +7 −7 libdex/SysUtil.cpp
  6. +24 −24 libdex/ZipArchive.cpp
  7. +1 −1 libnativehelper/JNIHelp.cpp
  8. +1 −1 vm/AllocTracker.cpp
  9. +55 −55 vm/CheckJni.cpp
  10. +5 −5 vm/Ddm.cpp
  11. +9 −9 vm/Debugger.cpp
  12. +11 −11 vm/Exception.cpp
  13. +1 −1 vm/Hash.cpp
  14. +2 −2 vm/IndirectRefTable.cpp
  15. +6 −6 vm/Init.cpp
  16. +14 −14 vm/Jni.cpp
  17. +6 −6 vm/LinearAlloc.cpp
  18. +2 −2 vm/Misc.cpp
  19. +4 −4 vm/Native.cpp
  20. +2 −2 vm/Profile.cpp
  21. +11 −11 vm/ReferenceTable.cpp
  22. +7 −7 vm/StdioConverter.cpp
  23. +21 −21 vm/Thread.cpp
  24. +2 −2 vm/alloc/Alloc.cpp
  25. +1 −1 vm/alloc/Copying.cpp
  26. +3 −3 vm/alloc/DdmHeap.cpp
  27. +1 −1 vm/alloc/Heap.cpp
  28. +17 −17 vm/analysis/DexPrepare.cpp
  29. +4 −4 vm/analysis/Optimize.cpp
  30. +1 −1 vm/analysis/RegisterMap.cpp
  31. +1 −1 vm/compiler/Compiler.cpp
  32. +7 −7 vm/interp/Interp.cpp
  33. +6 −6 vm/interp/Stack.cpp
  34. +2 −2 vm/jdwp/JdwpAdb.cpp
  35. +1 −1 vm/jdwp/JdwpEvent.cpp
  36. +6 −6 vm/jdwp/JdwpHandler.cpp
  37. +2 −2 vm/jdwp/JdwpMain.cpp
  38. +3 −3 vm/jdwp/JdwpSocket.cpp
  39. +1 −1 vm/mterp/c/gotoTargets.cpp
  40. +1 −1 vm/mterp/out/InterpC-allstubs.cpp
  41. +1 −1 vm/mterp/out/InterpC-portable.cpp
  42. +1 −1 vm/mterp/out/InterpC-x86-atom.cpp
  43. +1 −1 vm/mterp/out/InterpC-x86.cpp
  44. +1 −1 vm/native/InternalNative.cpp
  45. +2 −2 vm/native/dalvik_system_DexFile.cpp
  46. +1 −1 vm/native/dalvik_system_VMDebug.cpp
  47. +2 −2 vm/native/dalvik_system_VMStack.cpp
  48. +2 −2 vm/native/dalvik_system_Zygote.cpp
  49. +1 −1 vm/native/java_lang_Class.cpp
  50. +1 −1 vm/native/java_lang_Runtime.cpp
  51. +1 −1 vm/native/java_lang_Throwable.cpp
  52. +1 −1 vm/native/java_lang_reflect_Array.cpp
  53. +1 −1 vm/native/java_lang_reflect_Constructor.cpp
  54. +2 −2 vm/oo/Array.cpp
  55. +26 −26 vm/oo/Class.cpp
  56. +2 −2 vm/oo/Object.cpp
  57. +2 −2 vm/oo/Resolve.cpp
  58. +3 −3 vm/os/android.cpp
  59. +16 −16 vm/reflect/Annotation.cpp
  60. +3 −3 vm/reflect/Reflect.cpp
View
8 dexopt/OptMain.cpp
@@ -94,13 +94,13 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
* Open the zip archive, find the DEX entry.
*/
if (dexZipPrepArchive(zipFd, debugFileName, &zippy) != 0) {
- LOGW("DexOptZ: unable to open zip archive '%s'", debugFileName);
+ ALOGW("DexOptZ: unable to open zip archive '%s'", debugFileName);
goto bail;
}
zipEntry = dexZipFindEntry(&zippy, kClassesDex);
if (zipEntry == NULL) {
- LOGW("DexOptZ: zip archive '%s' does not include %s",
+ ALOGW("DexOptZ: zip archive '%s' does not include %s",
debugFileName, kClassesDex);
goto bail;
}
@@ -111,7 +111,7 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
if (dexZipGetEntryInfo(&zippy, zipEntry, NULL, &uncompLen, NULL, NULL,
&modWhen, &crc32) != 0)
{
- LOGW("DexOptZ: zip archive GetEntryInfo failed on %s", debugFileName);
+ ALOGW("DexOptZ: zip archive GetEntryInfo failed on %s", debugFileName);
goto bail;
}
@@ -123,7 +123,7 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
* Extract the DEX data into the cache file at the current offset.
*/
if (dexZipExtractEntryToFile(&zippy, zipEntry, cacheFd) != 0) {
- LOGW("DexOptZ: extraction of %s from %s failed",
+ ALOGW("DexOptZ: extraction of %s from %s failed",
kClassesDex, debugFileName);
goto bail;
}
View
2 libdex/DexFile.cpp
@@ -195,7 +195,7 @@ static void classLookupAdd(DexFile* pDexFile, DexClassLookup* pLookup,
probes++;
}
//if (probes > 1)
- // LOGW("classLookupAdd: probes=%d", probes);
+ // ALOGW("classLookupAdd: probes=%d", probes);
pLookup->table[idx].classDescriptorHash = hash;
pLookup->table[idx].classDescriptorOffset = stringOff;
View
10 libdex/DexSwapVerify.cpp
@@ -114,7 +114,7 @@ static inline bool checkPtrRange(const CheckState* state,
const void* fileEnd = state->fileEnd;
if ((start < fileStart) || (start > fileEnd)
|| (end < start) || (end > fileEnd)) {
- LOGW("Bad offset range for %s: %#x..%#x", label,
+ ALOGW("Bad offset range for %s: %#x..%#x", label,
fileOffset(state, start), fileOffset(state, end));
return false;
}
@@ -187,7 +187,7 @@ static inline bool checkPtrRange(const CheckState* state,
*/
#define CHECK_INDEX(_field, _limit) { \
if ((_field) >= (_limit)) { \
- LOGW("Bad index: %s(%u) > %s(%u)", \
+ ALOGW("Bad index: %s(%u) > %s(%u)", \
#_field, (u4)(_field), #_limit, (u4)(_limit)); \
return 0; \
} \
@@ -206,7 +206,7 @@ static inline bool checkPtrRange(const CheckState* state,
*/
#define CHECK_INDEX_OR_NOINDEX(_field, _limit) { \
if ((_field) != kDexNoIndex && (_field) >= (_limit)) { \
- LOGW("Bad index: %s(%u) > %s(%u)", \
+ ALOGW("Bad index: %s(%u) > %s(%u)", \
#_field, (u4)(_field), #_limit, (u4)(_limit)); \
return 0; \
} \
@@ -2839,7 +2839,7 @@ int dexSwapAndVerify(u1* addr, int len)
LOGE("ERROR: Bad length: expected %d, got %d", expectedLen, len);
okay = false;
} else if (len != expectedLen) {
- LOGW("WARNING: Odd length: expected %d, got %d", expectedLen,
+ ALOGW("WARNING: Odd length: expected %d, got %d", expectedLen,
len);
// keep going
}
@@ -2893,7 +2893,7 @@ int dexSwapAndVerify(u1* addr, int len)
pHeader->headerSize, (int) sizeof(DexHeader));
okay = false;
} else if (pHeader->headerSize > sizeof(DexHeader)) {
- LOGW("WARNING: Large header size %d, struct %d",
+ ALOGW("WARNING: Large header size %d, struct %d",
pHeader->headerSize, (int) sizeof(DexHeader));
// keep going?
}
View
6 libdex/InstrUtils.cpp
@@ -610,7 +610,7 @@ void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec)
case 5: {
if (format == kFmt35mi) {
/* A fifth arg is verboten for inline invokes. */
- LOGW("Invalid arg count in 35mi (5)");
+ ALOGW("Invalid arg count in 35mi (5)");
goto bail;
}
/*
@@ -626,7 +626,7 @@ void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec)
case 1: pDec->vC = pDec->arg[0] = regList & 0x0f; break;
case 0: break; // Valid, but no need to do anything.
default:
- LOGW("Invalid arg count in 35c/35ms/35mi (%d)", count);
+ ALOGW("Invalid arg count in 35c/35ms/35mi (%d)", count);
goto bail;
}
}
@@ -643,7 +643,7 @@ void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec)
pDec->vB_wide = FETCH_u4(1) | ((u8) FETCH_u4(3) << 32);
break;
default:
- LOGW("Can't decode unexpected format %d (op=%d)", format, opcode);
+ ALOGW("Can't decode unexpected format %d (op=%d)", format, opcode);
assert(false);
break;
}
View
14 libdex/SysUtil.cpp
@@ -46,7 +46,7 @@ static void* sysCreateAnonShmem(size_t length)
ptr = mmap(NULL, length, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANON, -1, 0);
if (ptr == MAP_FAILED) {
- LOGW("mmap(%d, RW, SHARED|ANON) failed: %s", (int) length,
+ ALOGW("mmap(%d, RW, SHARED|ANON) failed: %s", (int) length,
strerror(errno));
return NULL;
}
@@ -164,7 +164,7 @@ int sysFakeMapFile(int fd, MemMapping* pMap)
memPtr = malloc(length);
if (read(fd, memPtr, length) < 0) {
- LOGW("read(fd=%d, start=%d, length=%d) failed: %s", (int) length,
+ ALOGW("read(fd=%d, start=%d, length=%d) failed: %s", (int) length,
fd, (int) start, strerror(errno));
return -1;
}
@@ -197,7 +197,7 @@ int sysMapFileInShmemReadOnly(int fd, MemMapping* pMap)
memPtr = mmap(NULL, length, PROT_READ, MAP_FILE | MAP_SHARED, fd, start);
if (memPtr == MAP_FAILED) {
- LOGW("mmap(%d, RO, FILE|SHARED, %d, %d) failed: %s", (int) length,
+ ALOGW("mmap(%d, RO, FILE|SHARED, %d, %d) failed: %s", (int) length,
fd, (int) start, strerror(errno));
return -1;
}
@@ -237,7 +237,7 @@ int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap)
memPtr = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE,
fd, start);
if (memPtr == MAP_FAILED) {
- LOGW("mmap(%d, R/W, FILE|PRIVATE, %d, %d) failed: %s", (int) length,
+ ALOGW("mmap(%d, R/W, FILE|PRIVATE, %d, %d) failed: %s", (int) length,
fd, (int) start, strerror(errno));
return -1;
}
@@ -284,7 +284,7 @@ int sysMapFileSegmentInShmem(int fd, off_t start, size_t length,
memPtr = mmap(NULL, actualLength, PROT_READ, MAP_FILE | MAP_SHARED,
fd, actualStart);
if (memPtr == MAP_FAILED) {
- LOGW("mmap(%d, R, FILE|SHARED, %d, %d) failed: %s",
+ ALOGW("mmap(%d, R, FILE|SHARED, %d, %d) failed: %s",
(int) actualLength, fd, (int) actualStart, strerror(errno));
return -1;
}
@@ -358,7 +358,7 @@ void sysReleaseShmem(MemMapping* pMap)
return;
if (munmap(pMap->baseAddr, pMap->baseLength) < 0) {
- LOGW("munmap(%p, %d) failed: %s",
+ ALOGW("munmap(%p, %d) failed: %s",
pMap->baseAddr, (int)pMap->baseLength, strerror(errno));
} else {
ALOGV("munmap(%p, %d) succeeded", pMap->baseAddr, pMap->baseLength);
@@ -418,7 +418,7 @@ int sysCopyFileToFile(int outFd, int inFd, size_t count)
ssize_t actual = TEMP_FAILURE_RETRY(read(inFd, buf, getSize));
if (actual != (ssize_t) getSize) {
- LOGW("sysCopyFileToFile: copy read failed (%d vs %zd)",
+ ALOGW("sysCopyFileToFile: copy read failed (%d vs %zd)",
(int) actual, getSize);
return -1;
}
View
48 libdex/ZipArchive.cpp
@@ -80,7 +80,7 @@ static int entryToIndex(const ZipArchive* pArchive, const ZipEntry entry)
if (ent < 0 || ent >= pArchive->mHashTableSize ||
pArchive->mHashTable[ent].name == NULL)
{
- LOGW("Zip: invalid ZipEntry %p (%ld)", entry, ent);
+ ALOGW("Zip: invalid ZipEntry %p (%ld)", entry, ent);
return -1;
}
return ent;
@@ -147,12 +147,12 @@ static int mapCentralDirectory0(int fd, const char* debugFileName,
off_t searchStart = fileLength - readAmount;
if (lseek(fd, searchStart, SEEK_SET) != searchStart) {
- LOGW("Zip: seek %ld failed: %s", (long) searchStart, strerror(errno));
+ ALOGW("Zip: seek %ld failed: %s", (long) searchStart, strerror(errno));
return -1;
}
ssize_t actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, readAmount));
if (actual != (ssize_t) readAmount) {
- LOGW("Zip: read %zd failed: %s", readAmount, strerror(errno));
+ ALOGW("Zip: read %zd failed: %s", readAmount, strerror(errno));
return -1;
}
@@ -188,12 +188,12 @@ static int mapCentralDirectory0(int fd, const char* debugFileName,
u4 dirOffset = get4LE(eocdPtr + kEOCDFileOffset);
if ((long long) dirOffset + (long long) dirSize > (long long) eocdOffset) {
- LOGW("Zip: bad offsets (dir %ld, size %u, eocd %ld)",
+ ALOGW("Zip: bad offsets (dir %ld, size %u, eocd %ld)",
(long) dirOffset, dirSize, (long) eocdOffset);
return -1;
}
if (numEntries == 0) {
- LOGW("Zip: empty archive?");
+ ALOGW("Zip: empty archive?");
return -1;
}
@@ -207,7 +207,7 @@ static int mapCentralDirectory0(int fd, const char* debugFileName,
if (sysMapFileSegmentInShmem(fd, dirOffset, dirSize,
&pArchive->mDirectoryMap) != 0)
{
- LOGW("Zip: cd map failed");
+ ALOGW("Zip: cd map failed");
return -1;
}
@@ -295,17 +295,17 @@ static int parseZipArchive(ZipArchive* pArchive)
int i;
for (i = 0; i < numEntries; i++) {
if (get4LE(ptr) != kCDESignature) {
- LOGW("Zip: missed a central dir sig (at %d)", i);
+ ALOGW("Zip: missed a central dir sig (at %d)", i);
goto bail;
}
if (ptr + kCDELen > cdPtr + cdLength) {
- LOGW("Zip: ran off the end (at %d)", i);
+ ALOGW("Zip: ran off the end (at %d)", i);
goto bail;
}
long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset);
if (localHdrOffset >= pArchive->mDirectoryOffset) {
- LOGW("Zip: bad LFH offset %ld at entry %d", localHdrOffset, i);
+ ALOGW("Zip: bad LFH offset %ld at entry %d", localHdrOffset, i);
goto bail;
}
@@ -320,7 +320,7 @@ static int parseZipArchive(ZipArchive* pArchive)
ptr += kCDELen + fileNameLen + extraLen + commentLen;
if ((size_t)(ptr - cdPtr) > cdLength) {
- LOGW("Zip: bad CD advance (%d vs %zd) at entry %d",
+ ALOGW("Zip: bad CD advance (%d vs %zd) at entry %d",
(int) (ptr - cdPtr), cdLength, i);
goto bail;
}
@@ -454,7 +454,7 @@ ZipEntry dexZipFindEntry(const ZipArchive* pArchive, const char* entryName)
ZipEntry findEntryByIndex(ZipArchive* pArchive, int idx)
{
if (idx < 0 || idx >= pArchive->mNumEntries) {
- LOGW("Invalid index %d", idx);
+ ALOGW("Invalid index %d", idx);
return NULL;
}
@@ -531,46 +531,46 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry,
if (pOffset != NULL) {
long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset);
if (localHdrOffset + kLFHLen >= cdOffset) {
- LOGW("Zip: bad local hdr offset in zip");
+ ALOGW("Zip: bad local hdr offset in zip");
return -1;
}
u1 lfhBuf[kLFHLen];
if (lseek(pArchive->mFd, localHdrOffset, SEEK_SET) != localHdrOffset) {
- LOGW("Zip: failed seeking to lfh at offset %ld", localHdrOffset);
+ ALOGW("Zip: failed seeking to lfh at offset %ld", localHdrOffset);
return -1;
}
ssize_t actual =
TEMP_FAILURE_RETRY(read(pArchive->mFd, lfhBuf, sizeof(lfhBuf)));
if (actual != sizeof(lfhBuf)) {
- LOGW("Zip: failed reading lfh from offset %ld", localHdrOffset);
+ ALOGW("Zip: failed reading lfh from offset %ld", localHdrOffset);
return -1;
}
if (get4LE(lfhBuf) != kLFHSignature) {
- LOGW("Zip: didn't find signature at start of lfh, offset=%ld",
+ ALOGW("Zip: didn't find signature at start of lfh, offset=%ld",
localHdrOffset);
return -1;
}
off_t dataOffset = localHdrOffset + kLFHLen
+ get2LE(lfhBuf + kLFHNameLen) + get2LE(lfhBuf + kLFHExtraLen);
if (dataOffset >= cdOffset) {
- LOGW("Zip: bad data offset %ld in zip", (long) dataOffset);
+ ALOGW("Zip: bad data offset %ld in zip", (long) dataOffset);
return -1;
}
/* check lengths */
if ((off_t)(dataOffset + compLen) > cdOffset) {
- LOGW("Zip: bad compressed length in zip (%ld + %zd > %ld)",
+ ALOGW("Zip: bad compressed length in zip (%ld + %zd > %ld)",
(long) dataOffset, compLen, (long) cdOffset);
return -1;
}
if (method == kCompressStored &&
(off_t)(dataOffset + uncompLen) > cdOffset)
{
- LOGW("Zip: bad uncompressed length in zip (%ld + %zd > %ld)",
+ ALOGW("Zip: bad uncompressed length in zip (%ld + %zd > %ld)",
(long) dataOffset, uncompLen, (long) cdOffset);
return -1;
}
@@ -619,7 +619,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen)
LOGE("Installed zlib is not compatible with linked version (%s)",
ZLIB_VERSION);
} else {
- LOGW("Call to inflateInit2 failed (zerr=%d)", zerr);
+ ALOGW("Call to inflateInit2 failed (zerr=%d)", zerr);
}
goto bail;
}
@@ -634,7 +634,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen)
ssize_t actual = TEMP_FAILURE_RETRY(read(inFd, readBuf, getSize));
if (actual != (ssize_t) getSize) {
- LOGW("Zip: inflate read failed (%d vs %zd)",
+ ALOGW("Zip: inflate read failed (%d vs %zd)",
(int)actual, getSize);
goto z_bail;
}
@@ -648,7 +648,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen)
/* uncompress the data */
zerr = inflate(&zstream, Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
- LOGW("Zip: inflate zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)",
+ ALOGW("Zip: inflate zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)",
zerr, zstream.next_in, zstream.avail_in,
zstream.next_out, zstream.avail_out);
goto z_bail;
@@ -671,7 +671,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen)
/* paranoia */
if (zstream.total_out != uncompLen) {
- LOGW("Zip: size mismatch on inflated file (%ld vs %zd)",
+ ALOGW("Zip: size mismatch on inflated file (%ld vs %zd)",
zstream.total_out, uncompLen);
goto z_bail;
}
@@ -699,7 +699,7 @@ int dexZipExtractEntryToFile(const ZipArchive* pArchive,
int result = -1;
int ent = entryToIndex(pArchive, entry);
if (ent < 0) {
- LOGW("Zip: extract can't find entry %p", entry);
+ ALOGW("Zip: extract can't find entry %p", entry);
goto bail;
}
@@ -713,7 +713,7 @@ int dexZipExtractEntryToFile(const ZipArchive* pArchive,
goto bail;
}
if (lseek(pArchive->mFd, dataOffset, SEEK_SET) != dataOffset) {
- LOGW("Zip: lseek to data at %ld failed", (long) dataOffset);
+ ALOGW("Zip: lseek to data at %ld failed", (long) dataOffset);
goto bail;
}
View
2 libnativehelper/JNIHelp.cpp
@@ -213,7 +213,7 @@ extern "C" int jniThrowException(C_JNIEnv* env, const char* className, const cha
if (exception.get() != NULL) {
char* text = getExceptionSummary(env, exception.get());
- LOGW("Discarding pending exception (%s) to throw %s", text, className);
+ ALOGW("Discarding pending exception (%s) to throw %s", text, className);
free(text);
}
}
View
2 vm/AllocTracker.cpp
@@ -188,7 +188,7 @@ void dvmDoTrackAllocation(ClassObject* clazz, size_t size)
{
Thread* self = dvmThreadSelf();
if (self == NULL) {
- LOGW("alloc tracker: no thread");
+ ALOGW("alloc tracker: no thread");
return;
}
View
110 vm/CheckJni.cpp
@@ -68,10 +68,10 @@ static void checkCallResultCommon(const u4* args, const JValue* pResult,
const Object* resultObj = (const Object*) pResult->l;
if (resultObj == kInvalidIndirectRefObject) {
- LOGW("JNI WARNING: invalid reference returned from native code");
+ ALOGW("JNI WARNING: invalid reference returned from native code");
const Method* method = dvmGetCurrentJNIMethod();
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGW(" in %s.%s:%s", method->clazz->descriptor, method->name, desc);
+ ALOGW(" in %s.%s:%s", method->clazz->descriptor, method->name, desc);
free(desc);
abortMaybe();
return;
@@ -103,17 +103,17 @@ static void checkCallResultCommon(const u4* args, const JValue* pResult,
*/
ClassObject* declClazz = dvmFindClassNoInit(declType, method->clazz->classLoader);
if (declClazz == NULL) {
- LOGW("JNI WARNING: method declared to return '%s' returned '%s'",
+ ALOGW("JNI WARNING: method declared to return '%s' returned '%s'",
declType, objType);
- LOGW(" failed in %s.%s ('%s' not found)",
+ ALOGW(" failed in %s.%s ('%s' not found)",
method->clazz->descriptor, method->name, declType);
abortMaybe();
return;
}
if (!dvmInstanceof(objClazz, declClazz)) {
- LOGW("JNI WARNING: method declared to return '%s' returned '%s'",
+ ALOGW("JNI WARNING: method declared to return '%s' returned '%s'",
declType, objType);
- LOGW(" failed in %s.%s",
+ ALOGW(" failed in %s.%s",
method->clazz->descriptor, method->name);
abortMaybe();
return;
@@ -230,16 +230,16 @@ class ScopedCheck {
*/
void checkClassName(const char* className) {
if (!dexIsValidClassName(className, false)) {
- LOGW("JNI WARNING: illegal class name '%s' (%s)", className, mFunctionName);
- LOGW(" (should be formed like 'dalvik/system/DexFile')");
- LOGW(" or '[Ldalvik/system/DexFile;' or '[[B')");
+ ALOGW("JNI WARNING: illegal class name '%s' (%s)", className, mFunctionName);
+ ALOGW(" (should be formed like 'dalvik/system/DexFile')");
+ ALOGW(" or '[Ldalvik/system/DexFile;' or '[[B')");
abortMaybe();
}
}
void checkFieldTypeForGet(jfieldID fid, const char* expectedSignature, bool isStatic) {
if (fid == NULL) {
- LOGW("JNI WARNING: null jfieldID");
+ ALOGW("JNI WARNING: null jfieldID");
showLocation();
abortMaybe();
}
@@ -259,15 +259,15 @@ class ScopedCheck {
if (!printWarn && isStatic && !dvmIsStaticField(field)) {
if (isStatic) {
- LOGW("JNI WARNING: accessing non-static field %s as static", field->name);
+ ALOGW("JNI WARNING: accessing non-static field %s as static", field->name);
} else {
- LOGW("JNI WARNING: accessing static field %s as non-static", field->name);
+ ALOGW("JNI WARNING: accessing static field %s as non-static", field->name);
}
printWarn = true;
}
if (printWarn) {
- LOGW("JNI WARNING: %s for field '%s' of expected type %s, got %s",
+ ALOGW("JNI WARNING: %s for field '%s' of expected type %s, got %s",
mFunctionName, field->name, expectedSignature, actualSignature);
showLocation();
abortMaybe();
@@ -282,7 +282,7 @@ class ScopedCheck {
*/
void checkFieldTypeForSet(jobject jobj, jfieldID fieldID, PrimitiveType prim, bool isStatic) {
if (fieldID == NULL) {
- LOGW("JNI WARNING: null jfieldID");
+ ALOGW("JNI WARNING: null jfieldID");
showLocation();
abortMaybe();
}
@@ -298,7 +298,7 @@ class ScopedCheck {
* and valid.
*/
if (obj != NULL && !dvmIsHeapAddress(obj)) {
- LOGW("JNI WARNING: field operation on invalid %s reference (%p)",
+ ALOGW("JNI WARNING: field operation on invalid %s reference (%p)",
indirectRefKindName(jobj), jobj);
printWarn = true;
} else {
@@ -309,20 +309,20 @@ class ScopedCheck {
assert(objClass != NULL);
if (!dvmInstanceof(objClass, fieldClass)) {
- LOGW("JNI WARNING: set field '%s' expected type %s, got %s",
+ ALOGW("JNI WARNING: set field '%s' expected type %s, got %s",
field->name, field->signature, objClass->descriptor);
printWarn = true;
}
}
} else if (dexGetPrimitiveTypeFromDescriptorChar(field->signature[0]) != prim) {
- LOGW("JNI WARNING: %s for field '%s' expected type %s, got %s",
+ ALOGW("JNI WARNING: %s for field '%s' expected type %s, got %s",
mFunctionName, field->name, field->signature, primitiveTypeToName(prim));
printWarn = true;
} else if (isStatic && !dvmIsStaticField(field)) {
if (isStatic) {
- LOGW("JNI WARNING: accessing non-static field %s as static", field->name);
+ ALOGW("JNI WARNING: accessing non-static field %s as static", field->name);
} else {
- LOGW("JNI WARNING: accessing static field %s as non-static", field->name);
+ ALOGW("JNI WARNING: accessing static field %s as non-static", field->name);
}
printWarn = true;
}
@@ -343,7 +343,7 @@ class ScopedCheck {
Object* obj = dvmDecodeIndirectRef(self(), jobj);
if (!dvmIsHeapAddress(obj)) {
- LOGW("JNI ERROR: field operation on invalid reference (%p)", jobj);
+ ALOGW("JNI ERROR: field operation on invalid reference (%p)", jobj);
dvmAbort();
}
@@ -361,7 +361,7 @@ class ScopedCheck {
clazz = clazz->super;
}
- LOGW("JNI WARNING: instance fieldID %p not valid for class %s",
+ ALOGW("JNI WARNING: instance fieldID %p not valid for class %s",
fieldID, obj->clazz->descriptor);
showLocation();
abortMaybe();
@@ -372,7 +372,7 @@ class ScopedCheck {
*/
void checkNonNull(const void* ptr) {
if (ptr == NULL) {
- LOGW("JNI WARNING: invalid null pointer (%s)", mFunctionName);
+ ALOGW("JNI WARNING: invalid null pointer (%s)", mFunctionName);
abortMaybe();
}
}
@@ -386,20 +386,20 @@ class ScopedCheck {
bool printWarn = false;
if (*expectedType != method->shorty[0]) {
- LOGW("JNI WARNING: expected return type '%s'", expectedType);
+ ALOGW("JNI WARNING: expected return type '%s'", expectedType);
printWarn = true;
} else if (isStatic && !dvmIsStaticMethod(method)) {
if (isStatic) {
- LOGW("JNI WARNING: calling non-static method with static call");
+ ALOGW("JNI WARNING: calling non-static method with static call");
} else {
- LOGW("JNI WARNING: calling static method with non-static call");
+ ALOGW("JNI WARNING: calling static method with non-static call");
}
printWarn = true;
}
if (printWarn) {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGW(" calling %s.%s %s", method->clazz->descriptor, method->name, desc);
+ ALOGW(" calling %s.%s %s", method->clazz->descriptor, method->name, desc);
free(desc);
showLocation();
abortMaybe();
@@ -417,9 +417,9 @@ class ScopedCheck {
StaticField* base = &clazz->sfields[0];
int fieldCount = clazz->sfieldCount;
if ((StaticField*) fieldID < base || (StaticField*) fieldID >= base + fieldCount) {
- LOGW("JNI WARNING: static fieldID %p not valid for class %s",
+ ALOGW("JNI WARNING: static fieldID %p not valid for class %s",
fieldID, clazz->descriptor);
- LOGW(" base=%p count=%d", base, fieldCount);
+ ALOGW(" base=%p count=%d", base, fieldCount);
showLocation();
abortMaybe();
}
@@ -441,7 +441,7 @@ class ScopedCheck {
const Method* method = (const Method*) methodID;
if (!dvmInstanceof(clazz, method->clazz)) {
- LOGW("JNI WARNING: can't call static %s.%s on class %s",
+ ALOGW("JNI WARNING: can't call static %s.%s on class %s",
method->clazz->descriptor, method->name, clazz->descriptor);
showLocation();
// no abort?
@@ -462,7 +462,7 @@ class ScopedCheck {
const Method* method = (const Method*) methodID;
if (!dvmInstanceof(obj->clazz, method->clazz)) {
- LOGW("JNI WARNING: can't call %s.%s on instance of %s",
+ ALOGW("JNI WARNING: can't call %s.%s on instance of %s",
method->clazz->descriptor, method->name, obj->clazz->descriptor);
showLocation();
abortMaybe();
@@ -734,7 +734,7 @@ class ScopedCheck {
*/
void checkArray(jarray jarr) {
if (jarr == NULL) {
- LOGW("JNI WARNING: received null array");
+ ALOGW("JNI WARNING: received null array");
showLocation();
abortMaybe();
return;
@@ -745,11 +745,11 @@ class ScopedCheck {
Object* obj = dvmDecodeIndirectRef(self(), jarr);
if (!dvmIsHeapAddress(obj)) {
- LOGW("JNI WARNING: jarray is an invalid %s reference (%p)",
+ ALOGW("JNI WARNING: jarray is an invalid %s reference (%p)",
indirectRefKindName(jarr), jarr);
printWarn = true;
} else if (obj->clazz->descriptor[0] != '[') {
- LOGW("JNI WARNING: jarray arg has wrong type (expected array, got %s)",
+ ALOGW("JNI WARNING: jarray arg has wrong type (expected array, got %s)",
obj->clazz->descriptor);
printWarn = true;
}
@@ -766,7 +766,7 @@ class ScopedCheck {
void checkLengthPositive(jsize length) {
if (length < 0) {
- LOGW("JNI WARNING: negative jsize (%s)", mFunctionName);
+ ALOGW("JNI WARNING: negative jsize (%s)", mFunctionName);
abortMaybe();
}
}
@@ -786,16 +786,16 @@ class ScopedCheck {
bool printWarn = false;
if (dvmGetJNIRefType(self(), jobj) == JNIInvalidRefType) {
- LOGW("JNI WARNING: %p is not a valid JNI reference", jobj);
+ ALOGW("JNI WARNING: %p is not a valid JNI reference", jobj);
printWarn = true;
} else {
Object* obj = dvmDecodeIndirectRef(self(), jobj);
if (obj == kInvalidIndirectRefObject) {
- LOGW("JNI WARNING: native code passing in invalid reference %p", jobj);
+ ALOGW("JNI WARNING: native code passing in invalid reference %p", jobj);
printWarn = true;
} else if (obj != NULL && !dvmIsHeapAddress(obj)) {
// TODO: when we remove workAroundAppJniBugs, this should be impossible.
- LOGW("JNI WARNING: native code passing in reference to invalid object %p %p",
+ ALOGW("JNI WARNING: native code passing in reference to invalid object %p %p",
jobj, obj);
printWarn = true;
}
@@ -813,7 +813,7 @@ class ScopedCheck {
*/
void checkReleaseMode(jint mode) {
if (mode != 0 && mode != JNI_COMMIT && mode != JNI_ABORT) {
- LOGW("JNI WARNING: bad value for mode (%d) (%s)", mode, mFunctionName);
+ ALOGW("JNI WARNING: bad value for mode (%d) (%s)", mode, mFunctionName);
abortMaybe();
}
}
@@ -841,7 +841,7 @@ class ScopedCheck {
dvmAbort();
}
- LOGW("JNI WARNING: threadid=%d using env from threadid=%d",
+ ALOGW("JNI WARNING: threadid=%d using env from threadid=%d",
threadEnv->envThreadId, ((JNIEnvExt*) mEnv)->envThreadId);
printWarn = true;
@@ -868,7 +868,7 @@ class ScopedCheck {
break;
case kFlag_CritBad: // not okay to call
if (threadEnv->critical) {
- LOGW("JNI WARNING: threadid=%d using JNI after critical get",
+ ALOGW("JNI WARNING: threadid=%d using JNI after critical get",
threadEnv->envThreadId);
printWarn = true;
}
@@ -880,7 +880,7 @@ class ScopedCheck {
case kFlag_CritRelease: // this is a "release" call
threadEnv->critical--;
if (threadEnv->critical < 0) {
- LOGW("JNI WARNING: threadid=%d called too many crit releases",
+ ALOGW("JNI WARNING: threadid=%d called too many crit releases",
threadEnv->envThreadId);
printWarn = true;
}
@@ -895,7 +895,7 @@ class ScopedCheck {
*/
bool printException = false;
if ((flags & kFlag_ExcepOkay) == 0 && dvmCheckException(dvmThreadSelf())) {
- LOGW("JNI WARNING: JNI method called with exception pending");
+ ALOGW("JNI WARNING: JNI method called with exception pending");
printWarn = true;
printException = true;
}
@@ -904,7 +904,7 @@ class ScopedCheck {
showLocation();
}
if (printException) {
- LOGW("Pending exception is:");
+ ALOGW("Pending exception is:");
dvmLogExceptionStackTrace();
}
if (printWarn) {
@@ -918,7 +918,7 @@ class ScopedCheck {
void checkUtfString(const char* bytes, bool nullable) {
if (bytes == NULL) {
if (!nullable) {
- LOGW("JNI WARNING: non-nullable const char* was NULL");
+ ALOGW("JNI WARNING: non-nullable const char* was NULL");
showLocation();
abortMaybe();
}
@@ -928,8 +928,8 @@ class ScopedCheck {
const char* errorKind = NULL;
u1 utf8 = checkUtfBytes(bytes, &errorKind);
if (errorKind != NULL) {
- LOGW("JNI WARNING: input is not valid Modified UTF-8: illegal %s byte %#x", errorKind, utf8);
- LOGW(" string: '%s'", bytes);
+ ALOGW("JNI WARNING: input is not valid Modified UTF-8: illegal %s byte %#x", errorKind, utf8);
+ ALOGW(" string: '%s'", bytes);
showLocation();
abortMaybe();
}
@@ -944,7 +944,7 @@ class ScopedCheck {
*/
void checkInstance(jobject jobj, ClassObject* expectedClass, const char* argName) {
if (jobj == NULL) {
- LOGW("JNI WARNING: received null %s", argName);
+ ALOGW("JNI WARNING: received null %s", argName);
showLocation();
abortMaybe();
return;
@@ -955,11 +955,11 @@ class ScopedCheck {
Object* obj = dvmDecodeIndirectRef(self(), jobj);
if (!dvmIsHeapAddress(obj)) {
- LOGW("JNI WARNING: %s is an invalid %s reference (%p)",
+ ALOGW("JNI WARNING: %s is an invalid %s reference (%p)",
argName, indirectRefKindName(jobj), jobj);
printWarn = true;
} else if (obj->clazz != expectedClass) {
- LOGW("JNI WARNING: %s arg has wrong type (expected %s, got %s)",
+ ALOGW("JNI WARNING: %s arg has wrong type (expected %s, got %s)",
argName, expectedClass->descriptor, obj->clazz->descriptor);
printWarn = true;
}
@@ -1041,7 +1041,7 @@ class ScopedCheck {
void showLocation() {
const Method* method = dvmGetCurrentJNIMethod();
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGW(" in %s.%s:%s (%s)", method->clazz->descriptor, method->name, desc, mFunctionName);
+ ALOGW(" in %s.%s:%s (%s)", method->clazz->descriptor, method->name, desc, mFunctionName);
free(desc);
}
@@ -1210,10 +1210,10 @@ struct GuardedCopy {
// TODO: we could mprotect instead, and keep the allocation around for a while.
// This would be even more expensive, but it might catch more errors.
// if (mprotect(fullBuf, totalByteCount, PROT_NONE) != 0) {
- // LOGW("mprotect(PROT_NONE) failed: %s", strerror(errno));
+ // ALOGW("mprotect(PROT_NONE) failed: %s", strerror(errno));
// }
if (munmap(fullBuf, totalByteCount) != 0) {
- LOGW("munmap failed: %s", strerror(errno));
+ ALOGW("munmap failed: %s", strerror(errno));
dvmAbort();
}
}
@@ -1426,7 +1426,7 @@ static jobject Check_NewGlobalRef(JNIEnv* env, jobject obj) {
static void Check_DeleteGlobalRef(JNIEnv* env, jobject globalRef) {
CHECK_JNI_ENTRY(kFlag_Default | kFlag_ExcepOkay, "EL", env, globalRef);
if (globalRef != NULL && dvmGetJNIRefType(sc.self(), globalRef) != JNIGlobalRefType) {
- LOGW("JNI WARNING: DeleteGlobalRef on non-global %p (type=%d)",
+ ALOGW("JNI WARNING: DeleteGlobalRef on non-global %p (type=%d)",
globalRef, dvmGetJNIRefType(sc.self(), globalRef));
abortMaybe();
} else {
@@ -1443,7 +1443,7 @@ static jobject Check_NewLocalRef(JNIEnv* env, jobject ref) {
static void Check_DeleteLocalRef(JNIEnv* env, jobject localRef) {
CHECK_JNI_ENTRY(kFlag_Default | kFlag_ExcepOkay, "EL", env, localRef);
if (localRef != NULL && dvmGetJNIRefType(sc.self(), localRef) != JNILocalRefType) {
- LOGW("JNI WARNING: DeleteLocalRef on non-local %p (type=%d)",
+ ALOGW("JNI WARNING: DeleteLocalRef on non-local %p (type=%d)",
localRef, dvmGetJNIRefType(sc.self(), localRef));
abortMaybe();
} else {
@@ -1986,7 +1986,7 @@ static jobjectRefType Check_GetObjectRefType(JNIEnv* env, jobject obj) {
static jobject Check_NewDirectByteBuffer(JNIEnv* env, void* address, jlong capacity) {
CHECK_JNI_ENTRY(kFlag_Default, "EpJ", env, address, capacity);
if (address == NULL || capacity < 0) {
- LOGW("JNI WARNING: invalid values for address (%p) or capacity (%ld)",
+ ALOGW("JNI WARNING: invalid values for address (%p) or capacity (%ld)",
address, (long) capacity);
abortMaybe();
return NULL;
View
10 vm/Ddm.cpp
@@ -61,7 +61,7 @@ bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
*/
dataArray = dvmAllocPrimitiveArray('B', dataLen, ALLOC_DEFAULT);
if (dataArray == NULL) {
- LOGW("array alloc failed (%d)", dataLen);
+ ALOGW("array alloc failed (%d)", dataLen);
dvmClearException(self);
goto bail;
}
@@ -75,7 +75,7 @@ bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
length = get4BE((u1*)dataArray->contents + 4);
offset = kChunkHdrLen;
if (offset+length > (unsigned int) dataLen) {
- LOGW("WARNING: bad chunk found (len=%u pktLen=%d)", length, dataLen);
+ ALOGW("WARNING: bad chunk found (len=%u pktLen=%d)", length, dataLen);
goto bail;
}
@@ -124,15 +124,15 @@ bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
if (length == 0 || replyData == NULL)
goto bail;
if (offset + length > replyData->length) {
- LOGW("WARNING: chunk off=%d len=%d exceeds reply array len %d",
+ ALOGW("WARNING: chunk off=%d len=%d exceeds reply array len %d",
offset, length, replyData->length);
goto bail;
}
u1* reply;
reply = (u1*) malloc(length + kChunkHdrLen);
if (reply == NULL) {
- LOGW("malloc %d failed", length+kChunkHdrLen);
+ ALOGW("malloc %d failed", length+kChunkHdrLen);
goto bail;
}
set4BE(reply + 0, type);
@@ -230,7 +230,7 @@ void dvmDdmSetThreadNotification(bool enable)
if (enable) {
Thread* thread;
for (thread = gDvm.threadList; thread != NULL; thread = thread->next) {
- //LOGW("notify %d", thread->threadId);
+ //ALOGW("notify %d", thread->threadId);
dvmDdmSendThreadNotification(thread, true);
}
}
View
18 vm/Debugger.cpp
@@ -587,7 +587,7 @@ void dvmDbgGetClassList(u4* pNumClasses, RefTypeId** pClassRefBuf)
(RefTypeId*)malloc(sizeof(RefTypeId) * *pNumClasses);
if (dvmHashForeach(gDvm.loadedClasses, copyRefType, &pRefType) != 0) {
- LOGW("Warning: problem getting class list");
+ ALOGW("Warning: problem getting class list");
/* not really expecting this to happen */
} else {
assert(pRefType - *pClassRefBuf == (int) *pNumClasses);
@@ -996,7 +996,7 @@ bool dvmDbgOutputArray(ObjectId arrayId, int firstIndex, int count,
assert(dvmIsArray(arrayObj));
if (firstIndex + count > (int)arrayObj->length) {
- LOGW("Request for index=%d + count=%d excceds length=%d",
+ ALOGW("Request for index=%d + count=%d excceds length=%d",
firstIndex, count, arrayObj->length);
return false;
}
@@ -1047,7 +1047,7 @@ bool dvmDbgSetArrayElements(ObjectId arrayId, int firstIndex, int count,
assert(dvmIsArray(arrayObj));
if (firstIndex + count > (int)arrayObj->length) {
- LOGW("Attempt to set index=%d + count=%d excceds length=%d",
+ ALOGW("Attempt to set index=%d + count=%d excceds length=%d",
firstIndex, count, arrayObj->length);
return false;
}
@@ -2159,7 +2159,7 @@ void dvmDbgSuspendThread(ObjectId threadId)
thread = threadObjToThread(threadObj);
if (thread == NULL) {
/* can happen if our ThreadDeath notify crosses in the mail */
- LOGW("WARNING: threadid=%llx obj=%p no match", threadId, threadObj);
+ ALOGW("WARNING: threadid=%llx obj=%p no match", threadId, threadObj);
} else {
dvmSuspendThread(thread);
}
@@ -2179,7 +2179,7 @@ void dvmDbgResumeThread(ObjectId threadId)
thread = threadObjToThread(threadObj);
if (thread == NULL) {
- LOGW("WARNING: threadid=%llx obj=%p no match", threadId, threadObj);
+ ALOGW("WARNING: threadid=%llx obj=%p no match", threadId, threadObj);
} else {
dvmResumeThread(thread);
}
@@ -2226,7 +2226,7 @@ static Object* getThisObject(const u4* framePtr)
thisObj = (Object*) framePtr[argOffset];
if (thisObj != NULL && !dvmIsHeapAddress(thisObj)) {
- LOGW("Debugger: invalid 'this' pointer %p in %s.%s; returning NULL",
+ ALOGW("Debugger: invalid 'this' pointer %p in %s.%s; returning NULL",
framePtr, method->clazz->descriptor, method->name);
thisObj = NULL;
}
@@ -2299,7 +2299,7 @@ void dvmDbgGetLocalValue(ObjectId threadId, FrameId frameId, int slot,
/* convert to "ObjectId" */
objVal = (Object*)framePtr[slot];
if (objVal != NULL && !dvmIsHeapAddress(objVal)) {
- LOGW("JDWP: slot %d expected to hold array, %p invalid",
+ ALOGW("JDWP: slot %d expected to hold array, %p invalid",
slot, objVal);
dvmAbort(); // DEBUG: make it obvious
objVal = NULL;
@@ -2315,7 +2315,7 @@ void dvmDbgGetLocalValue(ObjectId threadId, FrameId frameId, int slot,
objVal = (Object*)framePtr[slot];
if (objVal != NULL && !dvmIsHeapAddress(objVal)) {
- LOGW("JDWP: slot %d expected to hold object, %p invalid",
+ ALOGW("JDWP: slot %d expected to hold object, %p invalid",
slot, objVal);
dvmAbort(); // DEBUG: make it obvious
objVal = NULL;
@@ -2651,7 +2651,7 @@ JdwpError dvmDbgInvokeMethod(ObjectId threadId, ObjectId objectId,
* be stuck waiting on a suspended thread.
*/
if (targetThread->suspendCount > 1) {
- LOGW("threadid=%d: suspend count on threadid=%d is %d, too deep "
+ ALOGW("threadid=%d: suspend count on threadid=%d is %d, too deep "
"for method exec",
dvmThreadSelf()->threadId, targetThread->threadId,
targetThread->suspendCount);
View
22 vm/Exception.cpp
@@ -269,7 +269,7 @@ static bool initException(Object* exception, const char* msg, Object* cause,
else {
msgStr = dvmCreateStringFromCstr(msg);
if (msgStr == NULL) {
- LOGW("Could not allocate message string \"%s\" while "
+ ALOGW("Could not allocate message string \"%s\" while "
"throwing internal exception (%s)",
msg, excepClass->descriptor);
goto bail;
@@ -366,7 +366,7 @@ static bool initException(Object* exception, const char* msg, Object* cause,
* constructor, e.g. it doesn't provide one that takes a string
* when a message has been provided.
*/
- LOGW("WARNING: exception class '%s' missing constructor "
+ ALOGW("WARNING: exception class '%s' missing constructor "
"(msg='%s' kind=%d)",
excepClass->descriptor, msg, initKind);
assert(strcmp(excepClass->descriptor,
@@ -409,7 +409,7 @@ static bool initException(Object* exception, const char* msg, Object* cause,
* return an error and let our caller deal with it.
*/
if (self->exception != NULL) {
- LOGW("Exception thrown (%s) while throwing internal exception (%s)",
+ ALOGW("Exception thrown (%s) while throwing internal exception (%s)",
self->exception->clazz->descriptor, exception->clazz->descriptor);
goto bail;
}
@@ -429,14 +429,14 @@ static bool initException(Object* exception, const char* msg, Object* cause,
/* initCause() threw an exception; return an error and
* let the caller deal with it.
*/
- LOGW("Exception thrown (%s) during initCause() "
+ ALOGW("Exception thrown (%s) during initCause() "
"of internal exception (%s)",
self->exception->clazz->descriptor,
exception->clazz->descriptor);
goto bail;
}
} else {
- LOGW("WARNING: couldn't find initCause in '%s'",
+ ALOGW("WARNING: couldn't find initCause in '%s'",
excepClass->descriptor);
}
}
@@ -579,12 +579,12 @@ void dvmPrintExceptionStackTrace()
JValue unused;
dvmCallMethod(self, printMethod, exception, &unused);
} else {
- LOGW("WARNING: could not find printStackTrace in %s",
+ ALOGW("WARNING: could not find printStackTrace in %s",
exception->clazz->descriptor);
}
if (self->exception != NULL) {
- LOGW("NOTE: exception thrown while printing stack trace: %s",
+ ALOGW("NOTE: exception thrown while printing stack trace: %s",
self->exception->clazz->descriptor);
}
@@ -671,7 +671,7 @@ static int findCatchInMethod(Thread* self, const Method* method, int relPc,
* up a warning, then move on to the next entry.
* Keep the exception status clear.
*/
- LOGW("Could not resolve class ref'ed in exception "
+ ALOGW("Could not resolve class ref'ed in exception "
"catch list (class index %d, exception %s)",
handler->typeIdx,
(self->exception != NULL) ?
@@ -1100,12 +1100,12 @@ static StringObject* getExceptionMessage(Object* exception)
dvmChangeStatus(self, oldStatus);
} else {
- LOGW("WARNING: could not find getMessage in %s",
+ ALOGW("WARNING: could not find getMessage in %s",
exception->clazz->descriptor);
}
if (dvmGetException(self) != NULL) {
- LOGW("NOTE: exception thrown while retrieving exception message: %s",
+ ALOGW("NOTE: exception thrown while retrieving exception message: %s",
dvmGetException(self)->clazz->descriptor);
/* will be overwritten below */
}
@@ -1165,7 +1165,7 @@ void dvmLogExceptionStackTrace()
Object* cause;
if (exception == NULL) {
- LOGW("tried to log a null exception?");
+ ALOGW("tried to log a null exception?");
return;
}
View
2 vm/Hash.cpp
@@ -225,7 +225,7 @@ void* dvmHashTableLookup(HashTable* pHashTable, u4 itemHash, void* item,
}
/* note "pEntry" is now invalid */
} else {
- //LOGW("okay %d/%d/%d",
+ //ALOGW("okay %d/%d/%d",
// pHashTable->numEntries, pHashTable->tableSize,
// (pHashTable->tableSize * LOAD_NUMER) / LOAD_DENOM);
}
View
4 vm/IndirectRefTable.cpp
@@ -141,7 +141,7 @@ Object* IndirectRefTable::get(IndirectRef iref) const {
IndirectRefKind kind = indirectRefKind(iref);
if (kind != kind_) {
if (iref == NULL) {
- LOGW("Attempt to look up NULL %s reference", indirectRefKindToString(kind_));
+ ALOGW("Attempt to look up NULL %s reference", indirectRefKindToString(kind_));
return kInvalidIndirectRefObject;
}
if (kind == kIndirectKindInvalid) {
@@ -252,7 +252,7 @@ bool IndirectRefTable::remove(u4 cookie, IndirectRef iref)
// reference looks like a pointer, scan the table to find the index
int i = findObject(reinterpret_cast<Object*>(iref), bottomIndex, topIndex, table_);
if (i < 0) {
- LOGW("trying to work around app JNI bugs, but didn't find %p in table!", iref);
+ ALOGW("trying to work around app JNI bugs, but didn't find %p in table!", iref);
return false;
}
index = i;
View
12 vm/Init.cpp
@@ -480,7 +480,7 @@ static bool enableAssertions(const char* pkgOrClass, bool enable)
pCtrl->pkgOrClass = dvmDotToSlash(pkgOrClass+1); // skip ':'
if (pCtrl->pkgOrClass == NULL) {
/* can happen if class name includes an illegal '/' */
- LOGW("Unable to process assertion arg '%s'", pkgOrClass);
+ ALOGW("Unable to process assertion arg '%s'", pkgOrClass);
return false;
}
@@ -571,7 +571,7 @@ static void processXjitop(const char *opt)
}
for (; startValue <= endValue; startValue++) {
- LOGW("Dalvik opcode %x is selected for debugging",
+ ALOGW("Dalvik opcode %x is selected for debugging",
(unsigned int) startValue);
/* Mark the corresponding bit to 1 */
gDvmJit.opList[startValue >> 3] |= 1 << (startValue & 0x7);
@@ -1344,7 +1344,7 @@ std::string dvmStartup(int argc, const char* const argv[],
*/
if (dvmReferenceTableEntries(&dvmThreadSelf()->internalLocalRefTable) != 0)
{
- LOGW("Warning: tracked references remain post-initialization");
+ ALOGW("Warning: tracked references remain post-initialization");
dvmDumpReferenceTable(&dvmThreadSelf()->internalLocalRefTable, "MAIN");
}
@@ -1541,7 +1541,7 @@ static bool initJdwp()
gDvm.jdwpState = dvmJdwpStartup(&params);
if (gDvm.jdwpState == NULL) {
- LOGW("WARNING: debugger thread failed to initialize");
+ ALOGW("WARNING: debugger thread failed to initialize");
/* TODO: ignore? fail? need to mimic "expected" behavior */
}
}
@@ -1553,7 +1553,7 @@ static bool initJdwp()
if (dvmJdwpIsActive(gDvm.jdwpState)) {
//dvmChangeStatus(NULL, THREAD_RUNNING);
if (!dvmJdwpPostVMStart(gDvm.jdwpState, gDvm.jdwpSuspend)) {
- LOGW("WARNING: failed to post 'start' message to debugger");
+ ALOGW("WARNING: failed to post 'start' message to debugger");
/* keep going */
}
//dvmChangeStatus(NULL, THREAD_NATIVE);
@@ -1775,7 +1775,7 @@ void dvmPrintNativeBackTrace()
size_t i;
for (i = 0; i < frameCount; ++i) {
- LOGW("#%-2d %s", i, strings[i]);
+ ALOGW("#%-2d %s", i, strings[i]);
}
free(strings);
}
View
28 vm/Jni.cpp
@@ -176,7 +176,7 @@ static void checkStackSum(Thread* self) {
(strcmp(meth->clazz->descriptor, "Ljava/lang/Runtime;") == 0)) {
ALOGD("JNI: bad stack CRC (0x%08x) -- okay during JNI_OnLoad", stackCrc);
} else {
- LOGW("JNI: bad stack CRC (%08x vs %08x)", crc, stackCrc);
+ ALOGW("JNI: bad stack CRC (%08x vs %08x)", crc, stackCrc);
dvmAbort();
}
}
@@ -354,7 +354,7 @@ Object* dvmDecodeIndirectRef(Thread* self, jobject jobj) {
// Assume an invalid local reference is actually a direct pointer.
return reinterpret_cast<Object*>(jobj);
}
- LOGW("Invalid indirect reference %p in decodeIndirectRef", jobj);
+ ALOGW("Invalid indirect reference %p in decodeIndirectRef", jobj);
dvmAbort();
return kInvalidIndirectRefObject;
}
@@ -424,7 +424,7 @@ static void deleteLocalReference(Thread* self, jobject jobj) {
* complain about it so the user will notice that things aren't
* going quite the way they expect.
*/
- LOGW("JNI WARNING: DeleteLocalRef(%p) failed to find entry", jobj);
+ ALOGW("JNI WARNING: DeleteLocalRef(%p) failed to find entry", jobj);
}
}
@@ -505,7 +505,7 @@ static jobject addGlobalReference(Object* obj) {
/* watch for "excessive" use; not generally appropriate */
if (count >= gDvm.jniGrefLimit) {
if (gDvmJni.warnOnly) {
- LOGW("Excessive JNI global references (%d)", count);
+ ALOGW("Excessive JNI global references (%d)", count);
} else {
gDvm.jniGlobalRefTable.dump("JNI global");
LOGE("Excessive JNI global references (%d)", count);
@@ -541,7 +541,7 @@ static void deleteWeakGlobalReference(jobject jobj) {
ScopedPthreadMutexLock lock(&gDvm.jniWeakGlobalRefLock);
IndirectRefTable *table = &gDvm.jniWeakGlobalRefTable;
if (!table->remove(IRT_FIRST_SEGMENT, jobj)) {
- LOGW("JNI: DeleteWeakGlobalRef(%p) failed to find entry", jobj);
+ ALOGW("JNI: DeleteWeakGlobalRef(%p) failed to find entry", jobj);
}
}
@@ -559,7 +559,7 @@ static void deleteGlobalReference(jobject jobj) {
ScopedPthreadMutexLock lock(&gDvm.jniGlobalRefLock);
if (!gDvm.jniGlobalRefTable.remove(IRT_FIRST_SEGMENT, jobj)) {
- LOGW("JNI: DeleteGlobalRef(%p) failed to find entry", jobj);
+ ALOGW("JNI: DeleteGlobalRef(%p) failed to find entry", jobj);
return;
}
@@ -612,7 +612,7 @@ static void pinPrimitiveArray(ArrayObject* arrayObj) {
}
if (count > kPinComplainThreshold) {
- LOGW("JNI: pin count on array %p (%s) is now %d",
+ ALOGW("JNI: pin count on array %p (%s) is now %d",
arrayObj, arrayObj->clazz->descriptor, count);
/* keep going */
}
@@ -632,7 +632,7 @@ static void unpinPrimitiveArray(ArrayObject* arrayObj) {
if (!dvmRemoveFromReferenceTable(&gDvm.jniPinRefTable,
gDvm.jniPinRefTable.table, (Object*) arrayObj))
{
- LOGW("JNI: unpinPrimitiveArray(%p) failed to find entry (valid=%d)",
+ ALOGW("JNI: unpinPrimitiveArray(%p) failed to find entry (valid=%d)",
arrayObj, dvmIsHeapAddress((Object*) arrayObj));
return;
}
@@ -730,7 +730,7 @@ static bool dvmRegisterJNIMethod(ClassObject* clazz, const char* methodName,
}
if (!dvmIsNativeMethod(method)) {
- LOGW("Unable to register: not native: %s.%s:%s", clazz->descriptor, methodName, signature);
+ ALOGW("Unable to register: not native: %s.%s:%s", clazz->descriptor, methodName, signature);
return false;
}
@@ -998,7 +998,7 @@ void dvmReleaseJniMonitors(Thread* self) {
Object** ptr = pRefTable->nextEntry;
while (--ptr >= top) {
if (!dvmUnlockObject(self, *ptr)) {
- LOGW("Unable to unlock monitor %p at thread detach", *ptr);
+ ALOGW("Unable to unlock monitor %p at thread detach", *ptr);
} else {
LOGVV("--- detach-releasing monitor %p", *ptr);
}
@@ -1200,7 +1200,7 @@ static jclass DefineClass(JNIEnv* env, const char *name, jobject loader,
UNUSED_PARAMETER(bufLen);
ScopedJniThreadState ts(env);
- LOGW("JNI DefineClass is not supported");
+ ALOGW("JNI DefineClass is not supported");
return NULL;
}
@@ -1368,7 +1368,7 @@ static jthrowable ExceptionOccurred(JNIEnv* env) {
* there was no exception, even though it's pretty much raining
* exceptions in here.
*/
- LOGW("JNI WARNING: addLocal/exception combo");
+ ALOGW("JNI WARNING: addLocal/exception combo");
}
return localException;
}
@@ -1432,7 +1432,7 @@ static jobject PopLocalFrame(JNIEnv* env, jobject jresult) {
ScopedJniThreadState ts(env);
Object* result = dvmDecodeIndirectRef(ts.self(), jresult);
if (!dvmPopLocalFrame(ts.self())) {
- LOGW("JNI WARNING: too many PopLocalFrame calls");
+ ALOGW("JNI WARNING: too many PopLocalFrame calls");
dvmClearException(ts.self());
dvmThrowRuntimeException("too many PopLocalFrame calls");
}
@@ -3497,7 +3497,7 @@ jint JNI_CreateJavaVM(JavaVM** p_vm, JNIEnv** p_env, void* vm_args) {
if (!status.empty()) {
free(pEnv);
free(pVM);
- LOGW("CreateJavaVM failed: %s", status.c_str());
+ ALOGW("CreateJavaVM failed: %s", status.c_str());
return JNI_ERR;
}
View
12 vm/LinearAlloc.cpp
@@ -187,14 +187,14 @@ LinearAllocHdr* dvmLinearAllocCreate(Object* classLoader)
* the extra page now that we have ashmem?]
*/
if (mprotect(pHdr->mapAddr, pHdr->mapLength, PROT_NONE) != 0) {
- LOGW("LinearAlloc init mprotect failed: %s", strerror(errno));
+ ALOGW("LinearAlloc init mprotect failed: %s", strerror(errno));
free(pHdr);
return NULL;
}
if (mprotect(pHdr->mapAddr + SYSTEM_PAGE_SIZE, SYSTEM_PAGE_SIZE,
ENFORCE_READ_ONLY ? PROT_READ : PROT_READ|PROT_WRITE) != 0)
{
- LOGW("LinearAlloc init mprotect #2 failed: %s", strerror(errno));
+ ALOGW("LinearAlloc init mprotect #2 failed: %s", strerror(errno));
free(pHdr);
return NULL;
}
@@ -244,7 +244,7 @@ void dvmLinearAllocDestroy(Object* classLoader)
}
if (munmap(pHdr->mapAddr, pHdr->mapLength) != 0) {
- LOGW("LinearAlloc munmap(%p, %d) failed: %s",
+ ALOGW("LinearAlloc munmap(%p, %d) failed: %s",
pHdr->mapAddr, pHdr->mapLength, strerror(errno));
}
free(pHdr);
@@ -480,7 +480,7 @@ static void updatePages(Object* classLoader, void* mem, int direction)
*/
if (i == firstPage) {
if ((*pLen & LENGTHFLAG_RW) == 0) {
- LOGW("Double RO on %p", mem);
+ ALOGW("Double RO on %p", mem);
dvmAbort();
} else
*pLen &= ~LENGTHFLAG_RW;
@@ -515,7 +515,7 @@ static void updatePages(Object* classLoader, void* mem, int direction)
if (i == firstPage) {
if ((*pLen & LENGTHFLAG_RW) != 0) {
- LOGW("Double RW on %p", mem);
+ ALOGW("Double RW on %p", mem);
dvmAbort();
} else
*pLen |= LENGTHFLAG_RW;
@@ -675,7 +675,7 @@ static void checkAllFree(Object* classLoader)
& ~(BLOCK_ALIGN-1));
if ((rawLen & LENGTHFLAG_FREE) == 0) {
- LOGW("LinearAlloc %p not freed: %p len=%d", classLoader,
+ ALOGW("LinearAlloc %p not freed: %p len=%d", classLoader,
pHdr->mapAddr + off + HEADER_EXTRA, rawLen & LENGTHFLAG_MASK);
}
View
4 vm/Misc.cpp
@@ -570,11 +570,11 @@ bool dvmSetCloseOnExec(int fd)
*/
flags = fcntl(fd, F_GETFD);
if (flags < 0) {
- LOGW("Unable to get fd flags for fd %d", fd);
+ ALOGW("Unable to get fd flags for fd %d", fd);
return false;
}
if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
- LOGW("Unable to set close-on-exec for fd %d", fd);
+ ALOGW("Unable to set close-on-exec for fd %d", fd);
return false;
}
return true;
View
8 vm/Native.cpp
@@ -116,9 +116,9 @@ void dvmResolveNativeMethod(const u4* args, JValue* pResult,
return;
}
- IF_LOGW() {
+ IF_ALOGW() {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGW("No implementation found for native %s.%s %s",
+ ALOGW("No implementation found for native %s.%s %s",
clazz->descriptor, method->name, desc);
free(desc);
}
@@ -338,7 +338,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
pEntry = findSharedLibEntry(pathName);
if (pEntry != NULL) {
if (pEntry->classLoader != classLoader) {
- LOGW("Shared lib '%s' already opened by CL %p; can't open in %p",
+ ALOGW("Shared lib '%s' already opened by CL %p; can't open in %p",
pathName, pEntry->classLoader, classLoader);
return false;
}
@@ -440,7 +440,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
if (version != JNI_VERSION_1_2 && version != JNI_VERSION_1_4 &&
version != JNI_VERSION_1_6)
{
- LOGW("JNI_OnLoad returned bad version (%d) in %s %p",
+ ALOGW("JNI_OnLoad returned bad version (%d) in %s %p",
version, pathName, classLoader);
/*
* It's unwise to call dlclose() here, but we can mark it
View
4 vm/Profile.cpp
@@ -619,7 +619,7 @@ void dvmMethodTraceStop()
| (scanPtr[5] << 24);
if (METHOD_ID(methodVal) == fillVal) {
u1* scanBase = state->buf + TRACE_HEADER_LEN;
- LOGW("Found unfilled record at %d (of %d)",
+ ALOGW("Found unfilled record at %d (of %d)",
(scanPtr - scanBase) / recordSize,
(finalCurOffset - TRACE_HEADER_LEN) / recordSize);
finalCurOffset = scanPtr - state->buf;
@@ -634,7 +634,7 @@ void dvmMethodTraceStop()
state->overflow ? " (NOTE: overflowed buffer)" : "",
(finalCurOffset - TRACE_HEADER_LEN) / recordSize);
if (gDvm.debuggerActive) {
- LOGW("WARNING: a debugger is active; method-tracing results "
+ ALOGW("WARNING: a debugger is active; method-tracing results "
"will be skewed");
}
View
22 vm/ReferenceTable.cpp
@@ -64,7 +64,7 @@ bool dvmAddToReferenceTable(ReferenceTable* pRef, Object* obj)
if (pRef->nextEntry == pRef->table + pRef->allocEntries) {
/* reached end of allocated space; did we hit buffer max? */
if (pRef->nextEntry == pRef->table + pRef->maxEntries) {
- LOGW("ReferenceTable overflow (max=%d)", pRef->maxEntries);
+ ALOGW("ReferenceTable overflow (max=%d)", pRef->maxEntries);
return false;
}
@@ -216,11 +216,11 @@ static int compareObject(const void* vobj1, const void* vobj2)
static void logSummaryLine(const Object* obj, size_t elems, int identical, int equiv)
{
if (obj == NULL) {
- LOGW(" NULL reference (count=%d)", equiv);
+ ALOGW(" NULL reference (count=%d)", equiv);
return;
}
if (obj == kClearedJniWeakGlobal) {
- LOGW(" cleared jweak (count=%d)", equiv);
+ ALOGW(" cleared jweak (count=%d)", equiv);
return;
}
@@ -239,7 +239,7 @@ static void logSummaryLine(const Object* obj, size_t elems, int identical, int e
if (identical + equiv != 0) {
StringAppendF(&msg, " (%d unique instances)", equiv + 1);
}
- LOGW(" %s", msg.c_str());
+ ALOGW(" %s", msg.c_str());
}
/*
@@ -251,10 +251,10 @@ static void logSummaryLine(const Object* obj, size_t elems, int identical, int e
void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
const char* descr)
{
- LOGW("%s reference table (%p) dump:", descr, refs);
+ ALOGW("%s reference table (%p) dump:", descr, refs);
if (count == 0) {
- LOGW(" (empty)");
+ ALOGW(" (empty)");
return;
}
@@ -264,20 +264,20 @@ void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
if (first < 0) {
first = 0;
}
- LOGW(" Last %d entries (of %d):", (count - first), count);
+ ALOGW(" Last %d entries (of %d):", (count - first), count);
for (int idx = count - 1; idx >= first; --idx) {
const Object* ref = refs[idx];
if (ref == NULL) {
continue;
}
if (ref == kClearedJniWeakGlobal) {
- LOGW(" %5d: cleared jweak", idx);
+ ALOGW(" %5d: cleared jweak", idx);
continue;
}
if (ref->clazz == NULL) {
// should only be possible right after a plain dvmMalloc().
size_t size = dvmObjectSizeInHeap(ref);
- LOGW(" %5d: %p (raw) (%zd bytes)", idx, ref, size);
+ ALOGW(" %5d: %p (raw) (%zd bytes)", idx, ref, size);
continue;
}
@@ -304,7 +304,7 @@ void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
}
free(s);
}
- LOGW(" %5d: %p %s%s", idx, ref, className.c_str(), extras.c_str());
+ ALOGW(" %5d: %p %s%s", idx, ref, className.c_str(), extras.c_str());
}
// Make a copy of the table, and sort it.
@@ -329,7 +329,7 @@ void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
}
// Dump a summary of the whole table.
- LOGW(" Summary:");
+ ALOGW(" Summary:");
size_t equiv, identical;
equiv = identical = 0;
size_t idx;
View
14 vm/StdioConverter.cpp
@@ -55,16 +55,16 @@ bool dvmStdioConverterStartup()
pthread_cond_init(&gDvm.stdioConverterCond, NULL);
if (pipe(gDvm.stdoutPipe) != 0) {
- LOGW("pipe failed: %s", strerror(errno));
+ ALOGW("pipe failed: %s", strerror(errno));
return false;
}
if (pipe(gDvm.stderrPipe) != 0) {
- LOGW("pipe failed: %s", strerror(errno));
+ ALOGW("pipe failed: %s", strerror(errno));
return false;
}
if (dup2(gDvm.stdoutPipe[1], kFilenoStdout) != kFilenoStdout) {
- LOGW("dup2(1) failed: %s", strerror(errno));
+ ALOGW("dup2(1) failed: %s", strerror(errno));
return false;
}
close(gDvm.stdoutPipe[1]);
@@ -73,7 +73,7 @@ bool dvmStdioConverterStartup()
/* don't redirect stderr on sim -- logs get written there! */
/* (don't need this on the sim anyway) */
if (dup2(gDvm.stderrPipe[1], kFilenoStderr) != kFilenoStderr) {
- LOGW("dup2(2) failed: %d %s", errno, strerror(errno));
+ ALOGW("dup2(2) failed: %d %s", errno, strerror(errno));
return false;
}
close(gDvm.stderrPipe[1]);
@@ -182,7 +182,7 @@ static void* stdioConverterThreadStart(void* arg)
/* probably EOF; give up */
if (err) {
- LOGW("stdio converter got read error; shutting it down");
+ ALOGW("stdio converter got read error; shutting it down");
break;
}
}
@@ -213,7 +213,7 @@ static bool readAndLog(int fd, BufferedData* data, const char* tag)
want = kMaxLine - data->count;
actual = read(fd, data->buf + data->count, want);
if (actual <= 0) {
- LOGW("read %s: (%d,%d) failed (%d): %s",
+ ALOGW("read %s: (%d,%d) failed (%d): %s",
tag, fd, want, (int)actual, strerror(errno));
return false;
} else {
@@ -231,7 +231,7 @@ static bool readAndLog(int fd, BufferedData* data, const char* tag)
for (i = data->count; i > 0; i--, cp++) {
if (*cp == '\n' || (*cp == '\r' && i != 0 && *(cp+1) != '\n')) {
*cp = '\0';
- //LOGW("GOT %d at %d '%s'", cp - start, start - data->buf, start);
+ //ALOGW("GOT %d at %d '%s'", cp - start, start - data->buf, start);
ALOG(LOG_INFO, tag, "%s", start);
start = cp+1;
}
View
42 vm/Thread.cpp
@@ -261,7 +261,7 @@ bool dvmThreadStartup()
/* test our pthread lib */
if (pthread_getspecific(gDvm.pthreadKeySelf) != NULL)
- LOGW("WARNING: newly-created pthread TLS slot is not NULL");
+ ALOGW("WARNING: newly-created pthread TLS slot is not NULL");
/* prep thread-related locks and conditions */
dvmInitMutex(&gDvm.threadListLock);
@@ -552,7 +552,7 @@ void dvmSlayDaemons()
gDvm.offJavaLangThread_daemon))
{
/* should never happen; suspend it with the rest */
- LOGW("threadid=%d: non-daemon id=%d still running at shutdown?!",
+ ALOGW("threadid=%d: non-daemon id=%d still running at shutdown?!",
threadId, target->threadId);
}
@@ -782,7 +782,7 @@ bool dvmPrepMainThread()
*/
Object* systemLoader = dvmGetSystemClassLoader();
if (systemLoader == NULL) {
- LOGW("WARNING: system class loader is NULL (setting main ctxt)");
+ ALOGW("WARNING: system class loader is NULL (setting main ctxt)");
/* keep going? */
} else {
dvmSetFieldObject(threadObj, gDvm.offJavaLangThread_contextClassLoader,
@@ -985,7 +985,7 @@ static void freeThread(Thread* thread)
free(interpStackBottom);
#else
if (munmap(interpStackBottom, thread->interpStackSize) != 0)
- LOGW("munmap(thread stack) failed");
+ ALOGW("munmap(thread stack) failed");
#endif
}
@@ -1061,7 +1061,7 @@ static void threadExitCheck(void* arg)
self->threadId, arg, self->threadExitCheckCount);
if (self->status == THREAD_ZOMBIE) {
- LOGW("threadid=%d: Weird -- shouldn't be in threadExitCheck",
+ ALOGW("threadid=%d: Weird -- shouldn't be in threadExitCheck",
self->threadId);
return;
}
@@ -1201,7 +1201,7 @@ static void setThreadName(const char *threadName)
buf[sizeof(buf)-1] = '\0';
int err = pthread_setname_np(pthread_self(), buf);
if (err != 0) {
- LOGW("Unable to set the name of current thread to '%s': %s",
+ ALOGW("Unable to set the name of current thread to '%s': %s",
buf, strerror(err));
}
#elif defined(HAVE_PRCTL)
@@ -1566,7 +1566,7 @@ static void threadExitUncaughtException(Thread* self, Object* group)
Object* handlerObj;
Method* uncaughtHandler;
- LOGW("threadid=%d: thread exiting with uncaught exception (group=%p)",
+ ALOGW("threadid=%d: thread exiting with uncaught exception (group=%p)",
self->threadId, group);
assert(group != NULL);
@@ -1605,7 +1605,7 @@ static void threadExitUncaughtException(Thread* self, Object* group)
self->threadObj, exception);
} else {
/* should be impossible, but handle it anyway */
- LOGW("WARNING: no 'uncaughtException' method in class %s",
+ ALOGW("WARNING: no 'uncaughtException' method in class %s",
handlerObj->clazz->descriptor);
dvmSetException(self, exception);
dvmLogExceptionStackTrace();
@@ -1687,7 +1687,7 @@ bool dvmCreateInternalThread(pthread_t* pHandle, const char* name,
pthread_cond_wait(&gDvm.threadStartCond, &gDvm.threadListLock);
if (newThread == NULL) {
- LOGW("internal thread create failed (createStatus=%d)", createStatus);
+ ALOGW("internal thread create failed (createStatus=%d)", createStatus);
assert(createStatus < 0);
/* don't free pArgs -- if pthread_create succeeded, child owns it */
dvmUnlockThreadList();
@@ -1913,7 +1913,7 @@ bool dvmAttachCurrentThread(const JavaVMAttachArgs* pArgs, bool isDaemon)
* way that ensures another thread can't call start() on it.
*/
if (dvmGetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread) != NULL) {
- LOGW("WOW: thread start hijack");
+ ALOGW("WOW: thread start hijack");
dvmThrowIllegalThreadStateException(
"thread has already been started");
/* We don't want to free anything associated with the thread
@@ -2322,12 +2322,12 @@ int dvmRaiseThreadPriorityIfNeeded(Thread* thread, int* pSavedThreadPrio,
errno = 0;
*pSavedThreadPrio = getpriority(PRIO_PROCESS, thread->systemTid);
if (errno != 0) {
- LOGW("Unable to get priority for threadid=%d sysTid=%d",
+ ALOGW("Unable to get priority for threadid=%d sysTid=%d",
thread->threadId, thread->systemTid);
return 0;
}
if (get_sched_policy(thread->systemTid, pSavedThreadPolicy) != 0) {
- LOGW("Unable to get policy for threadid=%d sysTid=%d",
+ ALOGW("Unable to get policy for threadid=%d sysTid=%d",
thread->threadId, thread->systemTid);
return 0;
}
@@ -2339,7 +2339,7 @@ int dvmRaiseThreadPriorityIfNeeded(Thread* thread, int* pSavedThreadPrio,
*/
if (*pSavedThreadPolicy == SP_BACKGROUND) {
if (set_sched_policy(thread->systemTid, SP_FOREGROUND) != 0) {
- LOGW("Couldn't set fg policy on tid %d", thread->systemTid);
+ ALOGW("Couldn't set fg policy on tid %d", thread->systemTid);
} else {
changeFlags |= kChangedPolicy;
ALOGD("Temporarily moving tid %d to fg (was %d)",
@@ -2354,7 +2354,7 @@ int dvmRaiseThreadPriorityIfNeeded(Thread* thread, int* pSavedThreadPrio,
if (*pSavedThreadPrio > 0) {
const int kHigher = 0;
if (setpriority(PRIO_PROCESS, thread->systemTid, kHigher) != 0) {
- LOGW("Couldn't raise priority on tid %d to %d",
+ ALOGW("Couldn't raise priority on tid %d to %d",
thread->systemTid, kHigher);
} else {
changeFlags |= kChangedPriority;
@@ -2374,7 +2374,7 @@ void dvmResetThreadPriority(Thread* thread, int changeFlags,
{
if ((changeFlags & kChangedPolicy) != 0) {
if (set_sched_policy(thread->systemTid, savedThreadPolicy) != 0) {
- LOGW("NOTE: couldn't reset tid %d to (%d)",
+ ALOGW("NOTE: couldn't reset tid %d to (%d)",
thread->systemTid, savedThreadPolicy);
} else {
ALOGD("Restored policy of %d to %d",
@@ -2385,7 +2385,7 @@ void dvmResetThreadPriority(Thread* thread, int changeFlags,
if ((changeFlags & kChangedPriority) != 0) {
if (setpriority(PRIO_PROCESS, thread->systemTid, savedThreadPrio) != 0)
{
- LOGW("NOTE: couldn't reset priority on thread %d to %d",
+ ALOGW("NOTE: couldn't reset priority on thread %d to %d",
thread->systemTid, savedThreadPrio);
} else {
ALOGD("Restored priority on %d to %d",