summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-05 23:21:27 +0000
committerSteve Block <steveblock@google.com>2012-01-06 10:04:42 +0000
commite8e1ddccd616e8226b7cc1e4e9fdb327429249e8 (patch)
treebd6714388cbff4c72bb5d7dc3d6f90092afa5931
parentc6284c2f24d180091a824698c0b0869f491ceccc (diff)
downloadandroid_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.tar.gz
android_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.tar.bz2
android_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.zip
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
-rw-r--r--dexopt/OptMain.cpp8
-rw-r--r--libdex/DexFile.cpp2
-rw-r--r--libdex/DexSwapVerify.cpp10
-rw-r--r--libdex/InstrUtils.cpp6
-rw-r--r--libdex/SysUtil.cpp14
-rw-r--r--libdex/ZipArchive.cpp48
-rw-r--r--libnativehelper/JNIHelp.cpp2
-rw-r--r--vm/AllocTracker.cpp2
-rw-r--r--vm/CheckJni.cpp110
-rw-r--r--vm/Ddm.cpp10
-rw-r--r--vm/Debugger.cpp18
-rw-r--r--vm/Exception.cpp22
-rw-r--r--vm/Hash.cpp2
-rw-r--r--vm/IndirectRefTable.cpp4
-rw-r--r--vm/Init.cpp12
-rw-r--r--vm/Jni.cpp28
-rw-r--r--vm/LinearAlloc.cpp12
-rw-r--r--vm/Misc.cpp4
-rw-r--r--vm/Native.cpp8
-rw-r--r--vm/Profile.cpp4
-rw-r--r--vm/ReferenceTable.cpp22
-rw-r--r--vm/StdioConverter.cpp14
-rw-r--r--vm/Thread.cpp42
-rw-r--r--vm/alloc/Alloc.cpp4
-rw-r--r--vm/alloc/Copying.cpp2
-rw-r--r--vm/alloc/DdmHeap.cpp6
-rw-r--r--vm/alloc/Heap.cpp2
-rw-r--r--vm/analysis/DexPrepare.cpp34
-rw-r--r--vm/analysis/Optimize.cpp8
-rw-r--r--vm/analysis/RegisterMap.cpp2
-rw-r--r--vm/compiler/Compiler.cpp2
-rw-r--r--vm/interp/Interp.cpp14
-rw-r--r--vm/interp/Stack.cpp12
-rw-r--r--vm/jdwp/JdwpAdb.cpp4
-rw-r--r--vm/jdwp/JdwpEvent.cpp2
-rw-r--r--vm/jdwp/JdwpHandler.cpp12
-rw-r--r--vm/jdwp/JdwpMain.cpp4
-rw-r--r--vm/jdwp/JdwpSocket.cpp6
-rw-r--r--vm/mterp/c/gotoTargets.cpp2
-rw-r--r--vm/mterp/out/InterpC-allstubs.cpp2
-rw-r--r--vm/mterp/out/InterpC-portable.cpp2
-rw-r--r--vm/mterp/out/InterpC-x86-atom.cpp2
-rw-r--r--vm/mterp/out/InterpC-x86.cpp2
-rw-r--r--vm/native/InternalNative.cpp2
-rw-r--r--vm/native/dalvik_system_DexFile.cpp4
-rw-r--r--vm/native/dalvik_system_VMDebug.cpp2
-rw-r--r--vm/native/dalvik_system_VMStack.cpp4
-rw-r--r--vm/native/dalvik_system_Zygote.cpp4
-rw-r--r--vm/native/java_lang_Class.cpp2
-rw-r--r--vm/native/java_lang_Runtime.cpp2
-rw-r--r--vm/native/java_lang_Throwable.cpp2
-rw-r--r--vm/native/java_lang_reflect_Array.cpp2
-rw-r--r--vm/native/java_lang_reflect_Constructor.cpp2
-rw-r--r--vm/oo/Array.cpp4
-rw-r--r--vm/oo/Class.cpp52
-rw-r--r--vm/oo/Object.cpp4
-rw-r--r--vm/oo/Resolve.cpp4
-rw-r--r--vm/os/android.cpp6
-rw-r--r--vm/reflect/Annotation.cpp32
-rw-r--r--vm/reflect/Reflect.cpp6
60 files changed, 331 insertions, 331 deletions
diff --git a/dexopt/OptMain.cpp b/dexopt/OptMain.cpp
index 59b4d3556..bdbeff686 100644
--- a/dexopt/OptMain.cpp
+++ b/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;
}
diff --git a/libdex/DexFile.cpp b/libdex/DexFile.cpp
index 52bc500dd..2f6fd4036 100644
--- a/libdex/DexFile.cpp
+++ b/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;
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp
index 0a742b762..18445b25e 100644
--- a/libdex/DexSwapVerify.cpp
+++ b/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?
}
diff --git a/libdex/InstrUtils.cpp b/libdex/InstrUtils.cpp
index 9dfe64c8e..be343f0f2 100644
--- a/libdex/InstrUtils.cpp
+++ b/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;
}
diff --git a/libdex/SysUtil.cpp b/libdex/SysUtil.cpp
index 09e1ce12c..d3fac5ba5 100644
--- a/libdex/SysUtil.cpp
+++ b/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;
}
diff --git a/libdex/ZipArchive.cpp b/libdex/ZipArchive.cpp
index 75ee03123..f242f6447 100644
--- a/libdex/ZipArchive.cpp
+++ b/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,24 +531,24 @@ 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;
}
@@ -556,13 +556,13 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry,
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;
}
@@ -570,7 +570,7 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry,
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;
}
diff --git a/libnativehelper/JNIHelp.cpp b/libnativehelper/JNIHelp.cpp
index a9a1167fd..d4e4ff3ab 100644
--- a/libnativehelper/JNIHelp.cpp
+++ b/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);
}
}
diff --git a/vm/AllocTracker.cpp b/vm/AllocTracker.cpp
index 8ea3c058d..a3e39e71c 100644
--- a/vm/AllocTracker.cpp
+++ b/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;
}
diff --git a/vm/CheckJni.cpp b/vm/CheckJni.cpp
index 1d62136b7..6ca706193 100644
--- a/vm/CheckJni.cpp
+++ b/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 @@ public:
*/
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 @@ public:
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 @@ public:
*/
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 @@ public:
* 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 @@ public:
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 @@ public:
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 @@ public:
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 @@ public:
*/
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 @@ public:
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 @@ public:
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 @@ public:
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 @@ public:
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 @@ private:
*/
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 @@ private:
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 @@ private:
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 @@ private:
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 @@ private:
*/
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 @@ private:
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 @@ private:
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 @@ private:
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 @@ private:
*/
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 @@ private:
showLocation();
}
if (printException) {
- LOGW("Pending exception is:");
+ ALOGW("Pending exception is:");
dvmLogExceptionStackTrace();
}
if (printWarn) {
@@ -918,7 +918,7 @@ private:
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 @@ private:
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 @@ private:
*/
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 @@ private:
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 @@ private:
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 @@ private:
// 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;
diff --git a/vm/Ddm.cpp b/vm/Ddm.cpp
index f7db955d4..dad74841d 100644
--- a/vm/Ddm.cpp
+++ b/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,7 +124,7 @@ 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;
}
@@ -132,7 +132,7 @@ bool dvmDdmHandlePacket(const u1* buf, int dataLen, u1** pReplyBuf,
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);
}
}
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index b08382197..faf39caef 100644
--- a/vm/Debugger.cpp
+++ b/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);
diff --git a/vm/Exception.cpp b/vm/Exception.cpp
index f317aea76..081709ab1 100644
--- a/vm/Exception.cpp
+++ b/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;
}
diff --git a/vm/Hash.cpp b/vm/Hash.cpp
index 826f545cf..ebfc7df56 100644
--- a/vm/Hash.cpp
+++ b/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);
}
diff --git a/vm/IndirectRefTable.cpp b/vm/IndirectRefTable.cpp
index 184223772..01a5684f9 100644
--- a/vm/IndirectRefTable.cpp
+++ b/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;
diff --git a/vm/Init.cpp b/vm/Init.cpp
index 9a6d02ad6..64cf3b40f 100644
--- a/vm/Init.cpp
+++ b/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);
}
diff --git a/vm/Jni.cpp b/vm/Jni.cpp
index 4f897a3ca..39b335669 100644
--- a/vm/Jni.cpp
+++ b/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;
}
diff --git a/vm/LinearAlloc.cpp b/vm/LinearAlloc.cpp
index fa5781980..d5490cd27 100644
--- a/vm/LinearAlloc.cpp
+++ b/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);
}
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index c463d6074..b00325080 100644
--- a/vm/Misc.cpp
+++ b/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;
diff --git a/vm/Native.cpp b/vm/Native.cpp
index be446ec9c..0c2d6d353 100644
--- a/vm/Native.cpp
+++ b/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
diff --git a/vm/Profile.cpp b/vm/Profile.cpp
index def1cc8b4..3be0694a2 100644
--- a/vm/Profile.cpp
+++ b/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");
}
diff --git a/vm/ReferenceTable.cpp b/vm/ReferenceTable.cpp
index 8237c355a..2e96f8002 100644
--- a/vm/ReferenceTable.cpp
+++ b/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;
diff --git a/vm/StdioConverter.cpp b/vm/StdioConverter.cpp
index d2acdaeb3..0153ff2ea 100644
--- a/vm/StdioConverter.cpp
+++ b/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;
}
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index 7363e6eb8..1ee00a88a 100644
--- a/vm/Thread.cpp
+++ b/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",
@@ -2472,7 +2472,7 @@ static void waitForThreadSuspend(Thread* self, Thread* thread)
*/
if (!dvmIterativeSleep(sleepIter++, spinSleepTime, startWhen)) {
if (spinSleepTime != FIRST_SLEEP) {
- LOGW("threadid=%d: spin on suspend #%d threadid=%d (pcf=%d)",
+ ALOGW("threadid=%d: spin on suspend #%d threadid=%d (pcf=%d)",
self->threadId, retryCount,
thread->threadId, priChangeFlags);
if (retryCount > 1) {
@@ -2503,7 +2503,7 @@ static void waitForThreadSuspend(Thread* self, Thread* thread)
}
if (complained) {
- LOGW("threadid=%d: spin on suspend resolved in %lld msec",
+ ALOGW("threadid=%d: spin on suspend resolved in %lld msec",
self->threadId,
(dvmGetRelativeTimeUsec() - firstStartWhen) / 1000);
//dvmDumpThread(thread, false); /* suspended, so dump is safe */
@@ -3037,7 +3037,7 @@ Thread* dvmGetThreadFromThreadObject(Object* vmThreadObj)
}
if (thread == NULL) {
- LOGW("WARNING: vmThreadObj=%p has thread=%p, not in thread list",
+ ALOGW("WARNING: vmThreadObj=%p has thread=%p, not in thread list",
vmThreadObj, (Thread*)vmData);
vmData = 0;
}
@@ -3254,7 +3254,7 @@ struct SchedulerStats {
static void getSchedulerStats(SchedulerStats* stats, pid_t tid) {
struct sched_param sp;
if (pthread_getschedparam(pthread_self(), &stats->policy, &sp) != 0) {
- LOGW("Warning: pthread_getschedparam failed");
+ ALOGW("Warning: pthread_getschedparam failed");
stats->policy = -1;
stats->priority = -1;
} else {
@@ -3363,7 +3363,7 @@ void dvmDumpThreadEx(const DebugOutputTarget* target, Thread* thread,
std::string dvmGetThreadName(Thread* thread) {
if (thread->threadObj == NULL) {
- LOGW("threadObj is NULL, name not available");
+ ALOGW("threadObj is NULL, name not available");
return "-unknown-";
}
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index d2c3336f8..8a9eb4ed3 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -119,7 +119,7 @@ static Object* createStockException(const char* descriptor, const char* msg)
} else {
msgStr = dvmCreateStringFromCstr(msg);
if (msgStr == NULL) {
- LOGW("Could not allocate message string \"%s\"", msg);
+ ALOGW("Could not allocate message string \"%s\"", msg);
dvmReleaseTrackedAlloc(obj, self);
return NULL;
}
@@ -165,7 +165,7 @@ bool dvmCreateStockExceptions()
if (gDvm.outOfMemoryObj == NULL || gDvm.internalErrorObj == NULL ||
gDvm.noClassDefFoundErrorObj == NULL)
{
- LOGW("Unable to create stock exceptions");
+ ALOGW("Unable to create stock exceptions");
return false;
}
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index 9160158d3..0940e9d6c 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -1575,7 +1575,7 @@ static void scavengeThreadStack(Thread *thread)
* some value.
*/
if (saveArea->xtra.currentPc != thread->currentPc2) {
- LOGW("PGC: savedPC(%p) != current PC(%p), %s.%s ins=%p",
+ ALOGW("PGC: savedPC(%p) != current PC(%p), %s.%s ins=%p",
saveArea->xtra.currentPc, thread->currentPc2,
method->clazz->descriptor, method->name, method->insns);
if (saveArea->xtra.currentPc != NULL)
diff --git a/vm/alloc/DdmHeap.cpp b/vm/alloc/DdmHeap.cpp
index 9673f8113..ffe4cae17 100644
--- a/vm/alloc/DdmHeap.cpp
+++ b/vm/alloc/DdmHeap.cpp
@@ -69,7 +69,7 @@ void dvmDdmSendHeapInfo(int reason, bool shouldLock)
*/
if (reason == gDvm.gcHeap->ddmHpifWhen) {
if (shouldLock && ! dvmLockHeap()) {
- LOGW("%s(): can't lock heap to clear when", __func__);
+ ALOGW("%s(): can't lock heap to clear when", __func__);
goto skip_when;
}
if (reason == gDvm.gcHeap->ddmHpifWhen) {
@@ -228,7 +228,7 @@ static void heap_chunk_callback(const void *chunkptr, size_t chunklen,
bytesLeft = ctx->bufLen - (size_t)(ctx->p - ctx->buf);
if (bytesLeft < needed) {
- LOGW("chunk is too big to transmit (chunklen=%zd, %zd bytes)",
+ ALOGW("chunk is too big to transmit (chunklen=%zd, %zd bytes)",
chunklen, needed);
return;
}
@@ -414,7 +414,7 @@ void dvmDdmSendHeapSegments(bool shouldLock, bool native)
}
}
if (shouldLock && !dvmLockHeap()) {
- LOGW("Can't lock heap for DDM HPSx dump");
+ ALOGW("Can't lock heap for DDM HPSx dump");
return;
}
diff --git a/vm/alloc/Heap.cpp b/vm/alloc/Heap.cpp
index 8a3c67385..8d39dd147 100644
--- a/vm/alloc/Heap.cpp
+++ b/vm/alloc/Heap.cpp
@@ -184,7 +184,7 @@ static void *tryMalloc(size_t size)
* throwing an OOME, though.
*/
if (size >= gDvm.heapGrowthLimit) {
- LOGW("%zd byte allocation exceeds the %zd byte maximum heap size",
+ ALOGW("%zd byte allocation exceeds the %zd byte maximum heap size",
size, gDvm.heapGrowthLimit);
ptr = NULL;
goto collect_soft_refs;
diff --git a/vm/analysis/DexPrepare.cpp b/vm/analysis/DexPrepare.cpp
index 0f80624d0..7985481b6 100644
--- a/vm/analysis/DexPrepare.cpp
+++ b/vm/analysis/DexPrepare.cpp
@@ -213,7 +213,7 @@ retry:
*/
if (fdStat.st_size == 0) {
if (readOnly) {
- LOGW("DexOpt: file has zero length and isn't writable");
+ ALOGW("DexOpt: file has zero length and isn't writable");
goto close_fail;
}
cc = dexOptCreateEmptyHeader(fd);
@@ -255,7 +255,7 @@ retry:
* give up now.
*/
if (createIfMissing) {
- LOGW("Cached DEX '%s' (%s) is stale and not writable",
+ ALOGW("Cached DEX '%s' (%s) is stale and not writable",
fileName, cacheFileName);
}
goto close_fail;
@@ -285,12 +285,12 @@ retry:
ALOGD("ODEX file is stale or bad; removing and retrying (%s)",
cacheFileName);
if (ftruncate(fd, 0) != 0) {
- LOGW("Warning: unable to truncate cache file '%s': %s",
+ ALOGW("Warning: unable to truncate cache file '%s': %s",
cacheFileName, strerror(errno));
/* keep going */
}
if (unlink(cacheFileName) != 0) {
- LOGW("Warning: unable to remove cache file '%s': %d %s",
+ ALOGW("Warning: unable to remove cache file '%s': %d %s",
cacheFileName, errno, strerror(errno));
/* keep going; permission failure should probably be fatal */
}
@@ -366,7 +366,7 @@ bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength,
* was all optimized, got rejected.
*/
if (gDvm.optimizing) {
- LOGW("Rejecting recursive optimization attempt on '%s'", fileName);
+ ALOGW("Rejecting recursive optimization attempt on '%s'", fileName);
return false;
}
@@ -393,7 +393,7 @@ bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength,
/* full path to optimizer */
androidRoot = getenv("ANDROID_ROOT");
if (androidRoot == NULL) {
- LOGW("ANDROID_ROOT not set, defaulting to /system");
+ ALOGW("ANDROID_ROOT not set, defaulting to /system");
androidRoot = "/system";
}
execFile = (char*)alloca(strlen(androidRoot) + strlen(kDexOptBin) + 1);
@@ -504,7 +504,7 @@ bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength,
ALOGD("DexOpt: --- END '%s' (success) ---", lastPart);
return true;
} else {
- LOGW("DexOpt: --- END '%s' --- status=0x%04x, process failed",
+ ALOGW("DexOpt: --- END '%s' --- status=0x%04x, process failed",
lastPart, status);
return false;
}
@@ -632,7 +632,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
/* unmap the read-write version, forcing writes to disk */
if (msync(mapAddr, dexOffset + dexLength, MS_SYNC) != 0) {
- LOGW("msync failed: %s", strerror(errno));
+ ALOGW("msync failed: %s", strerror(errno));
// weird, but keep going
}
#if 1
@@ -674,7 +674,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
* Append the dependency list.
*/
if (writeDependencies(fd, modWhen, crc) != 0) {
- LOGW("Failed writing dependencies");
+ ALOGW("Failed writing dependencies");
goto bail;
}
@@ -694,7 +694,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
* Append any optimized pre-computed data structures.
*/
if (!writeOptData(fd, pClassLookup, pRegMapBuilder)) {
- LOGW("Failed writing opt data");
+ ALOGW("Failed writing opt data");
goto bail;
}
@@ -1211,12 +1211,12 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
goto bail;
}
if (memcmp(magic+4, DEX_OPT_MAGIC_VERS, 4) != 0) {
- LOGW("DexOpt: stale opt version (0x%02x %02x %02x %02x)",
+ ALOGW("DexOpt: stale opt version (0x%02x %02x %02x %02x)",
magic[4], magic[5], magic[6], magic[7]);
goto bail;
}
if (optHdr.depsLength < kMinDepSize || optHdr.depsLength > kMaxDepSize) {
- LOGW("DexOpt: weird deps length %d, bailing", optHdr.depsLength);
+ ALOGW("DexOpt: weird deps length %d, bailing", optHdr.depsLength);
goto bail;
}
@@ -1240,7 +1240,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
posn = lseek(fd, optHdr.depsOffset, SEEK_SET);
if (posn < 0) {
- LOGW("DexOpt: seek to deps failed: %s", strerror(errno));
+ ALOGW("DexOpt: seek to deps failed: %s", strerror(errno));
goto bail;
}
@@ -1249,16 +1249,16 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
*/
depData = (u1*) malloc(optHdr.depsLength);
if (depData == NULL) {
- LOGW("DexOpt: unable to allocate %d bytes for deps",
+ ALOGW("DexOpt: unable to allocate %d bytes for deps",
optHdr.depsLength);
goto bail;
}
actual = read(fd, depData, optHdr.depsLength);
if (actual < 0) {
- LOGW("DexOpt: failed reading deps: %s", strerror(errno));
+ ALOGW("DexOpt: failed reading deps: %s", strerror(errno));
goto bail;
} else if (actual != (ssize_t) optHdr.depsLength) {
- LOGW("DexOpt: failed reading deps: got %d of %d",
+ ALOGW("DexOpt: failed reading deps: got %d of %d",
(int) actual, optHdr.depsLength);
goto bail;
}
@@ -1342,7 +1342,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
// consumed all data and no more?
if (ptr != depData + optHdr.depsLength) {
- LOGW("DexOpt: Spurious dep data? %d vs %d",
+ ALOGW("DexOpt: Spurious dep data? %d vs %d",
(int) (ptr - depData), optHdr.depsLength);
assert(false);
}
diff --git a/vm/analysis/Optimize.cpp b/vm/analysis/Optimize.cpp
index 301d53aeb..9e299f3ef 100644
--- a/vm/analysis/Optimize.cpp
+++ b/vm/analysis/Optimize.cpp
@@ -498,7 +498,7 @@ ClassObject* dvmOptResolveClass(ClassObject* referrer, u4 classIdx,
bool allowed = dvmCheckClassAccess(referrer, resClass);
untweakLoader(referrer, resClass);
if (!allowed) {
- LOGW("DexOpt: resolve class illegal access: %s -> %s",
+ ALOGW("DexOpt: resolve class illegal access: %s -> %s",
referrer->descriptor, resClass->descriptor);
if (pFailure != NULL)
*pFailure = VERIFY_ERROR_ACCESS_CLASS;
@@ -784,7 +784,7 @@ Method* dvmOptResolveMethod(ClassObject* referrer, u4 methodIdx,
}
if (dvmIsInterfaceClass(resClass)) {
/* method is part of an interface; this is wrong method for that */
- LOGW("DexOpt: method is in an interface");
+ ALOGW("DexOpt: method is in an interface");
if (pFailure != NULL)
*pFailure = VERIFY_ERROR_GENERIC;
return NULL;
@@ -834,7 +834,7 @@ Method* dvmOptResolveMethod(ClassObject* referrer, u4 methodIdx,
/* see if this is a pure-abstract method */
if (dvmIsAbstractMethod(resMethod) && !dvmIsAbstractClass(resClass)) {
- LOGW("DexOpt: pure-abstract method '%s' in %s",
+ ALOGW("DexOpt: pure-abstract method '%s' in %s",
dexStringById(pDvmDex->pDexFile, pMethodId->nameIdx),
resClass->descriptor);
if (pFailure != NULL)
@@ -1021,7 +1021,7 @@ Method* dvmOptResolveInterfaceMethod(ClassObject* referrer, u4 methodIdx)
/* we're expecting this to be abstract */
if (!dvmIsAbstractMethod(resMethod)) {
char* desc = dexProtoCopyMethodDescriptor(&resMethod->prototype);
- LOGW("Found non-abstract interface method %s.%s %s",
+ ALOGW("Found non-abstract interface method %s.%s %s",
resMethod->clazz->descriptor, resMethod->name, desc);
free(desc);
return NULL;
diff --git a/vm/analysis/RegisterMap.cpp b/vm/analysis/RegisterMap.cpp
index db1314a41..742bb128c 100644
--- a/vm/analysis/RegisterMap.cpp
+++ b/vm/analysis/RegisterMap.cpp
@@ -609,7 +609,7 @@ static bool writeMapForMethod(const Method* meth, u1** pPtr)
{
if (meth->registerMap == NULL) {
if (!dvmIsAbstractMethod(meth) && !dvmIsNativeMethod(meth)) {
- LOGW("Warning: no map available for %s.%s",
+ ALOGW("Warning: no map available for %s.%s",
meth->clazz->descriptor, meth->name);
/* weird, but keep going */
}
diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp
index 6e3402116..4236d53b9 100644
--- a/vm/compiler/Compiler.cpp
+++ b/vm/compiler/Compiler.cpp
@@ -779,7 +779,7 @@ void dvmCompilerShutdown(void)
dvmUnlockMutex(&gDvmJit.compilerLock);
if (pthread_join(gDvmJit.compilerHandle, &threadReturn) != 0)
- LOGW("Compiler thread join failed");
+ ALOGW("Compiler thread join failed");
else if (gDvm.verboseShutdown)
ALOGD("Compiler thread has shut down");
}
diff --git a/vm/interp/Interp.cpp b/vm/interp/Interp.cpp
index 00a0e604a..83150ee45 100644
--- a/vm/interp/Interp.cpp
+++ b/vm/interp/Interp.cpp
@@ -321,7 +321,7 @@ static void dvmBreakpointSetRemove(BreakpointSet* pSet, Method* method,
method->clazz->descriptor, method->name, instrOffset);
dvmAbort();
} else {
- LOGW("Breakpoint was already restored? (%s.%s +%#x)",
+ ALOGW("Breakpoint was already restored? (%s.%s +%#x)",
method->clazz->descriptor, method->name, instrOffset);
}
} else {
@@ -396,7 +396,7 @@ void dvmInitBreakpoints()
BreakpointSet* pSet = gDvm.breakpointSet;
dvmBreakpointSetLock(pSet);
if (dvmBreakpointSetCount(pSet) != 0) {
- LOGW("WARNING: %d leftover breakpoints", dvmBreakpointSetCount(pSet));
+ ALOGW("WARNING: %d leftover breakpoints", dvmBreakpointSetCount(pSet));
/* generally not good, but we can keep going */
}
dvmBreakpointSetUnlock(pSet);
@@ -505,7 +505,7 @@ bool dvmAddSingleStep(Thread* thread, int size, int depth)
StepControl* pCtrl = &gDvm.stepControl;
if (pCtrl->active && thread != pCtrl->thread) {
- LOGW("WARNING: single-step active for %p; adding %p",
+ ALOGW("WARNING: single-step active for %p; adding %p",
pCtrl->thread, thread);
/*
@@ -552,7 +552,7 @@ bool dvmAddSingleStep(Thread* thread, int size, int depth)
prevFp = fp;
}
if (fp == NULL) {
- LOGW("Unexpected: step req in native-only threadid=%d",
+ ALOGW("Unexpected: step req in native-only threadid=%d",
thread->threadId);
return false;
}
@@ -1348,7 +1348,7 @@ static std::string fieldNameFromIndex(const Method* method, int ref,
VerifyErrorRefType refType, int flags)
{
if (refType != VERIFY_ERROR_REF_FIELD) {
- LOGW("Expected ref type %d, got %d", VERIFY_ERROR_REF_FIELD, refType);
+ ALOGW("Expected ref type %d, got %d", VERIFY_ERROR_REF_FIELD, refType);
return NULL; /* no message */
}
@@ -1373,7 +1373,7 @@ static std::string methodNameFromIndex(const Method* method, int ref,
VerifyErrorRefType refType, int flags)
{
if (refType != VERIFY_ERROR_REF_METHOD) {
- LOGW("Expected ref type %d, got %d", VERIFY_ERROR_REF_METHOD,refType);
+ ALOGW("Expected ref type %d, got %d", VERIFY_ERROR_REF_METHOD,refType);
return NULL; /* no message */
}
@@ -1715,7 +1715,7 @@ void dvmCheckBefore(const u2 *pc, u4 *fp, Thread* self)
strcmp(method->name, mn) == 0 &&
strcmp(method->shorty, sg) == 0)
{
- LOGW("Reached %s.%s, enabling verbose mode",
+ ALOGW("Reached %s.%s, enabling verbose mode",
method->clazz->descriptor, method->name);
android_setMinPriority(LOG_TAG"i", ANDROID_LOG_VERBOSE);
dumpRegs(method, fp, true);
diff --git a/vm/interp/Stack.cpp b/vm/interp/Stack.cpp
index b1034d328..aa164393b 100644
--- a/vm/interp/Stack.cpp
+++ b/vm/interp/Stack.cpp
@@ -81,7 +81,7 @@ static bool dvmPushInterpFrame(Thread* self, const Method* method)
if (stackPtr - stackReq < self->interpStackEnd) {
/* not enough space */
- LOGW("Stack overflow on call to interp "
+ ALOGW("Stack overflow on call to interp "
"(req=%d top=%p cur=%p size=%d %s.%s)",
stackReq, self->interpStackStart, self->interpSave.curFrame,
self->interpStackSize, method->clazz->descriptor, method->name);
@@ -155,7 +155,7 @@ bool dvmPushJNIFrame(Thread* self, const Method* method)
if (stackPtr - stackReq < self->interpStackEnd) {
/* not enough space */
- LOGW("Stack overflow on call to native "
+ ALOGW("Stack overflow on call to native "
"(req=%d top=%p cur=%p size=%d '%s')",
stackReq, self->interpStackStart, self->interpSave.curFrame,
self->interpStackSize, method->name);
@@ -227,7 +227,7 @@ bool dvmPushLocalFrame(Thread* self, const Method* method)
if (stackPtr - stackReq < self->interpStackEnd) {
/* not enough space; let JNI throw the exception */
- LOGW("Stack overflow on PushLocal "
+ ALOGW("Stack overflow on PushLocal "
"(req=%d top=%p cur=%p size=%d '%s')",
stackReq, self->interpStackStart, self->interpSave.curFrame,
self->interpStackSize, method->name);
@@ -359,7 +359,7 @@ static ClassObject* callPrep(Thread* self, const Method* method, Object* obj,
#ifndef NDEBUG
if (self->status != THREAD_RUNNING) {
- LOGW("threadid=%d: status=%d on call to %s.%s -",
+ ALOGW("threadid=%d: status=%d on call to %s.%s -",
self->threadId, self->status,
method->clazz->descriptor, method->name);
}
@@ -1036,7 +1036,7 @@ void dvmHandleStackOverflow(Thread* self, const Method* method)
*/
Object* excep = dvmGetException(self);
if (excep != NULL) {
- LOGW("Stack overflow while throwing exception");
+ ALOGW("Stack overflow while throwing exception");
dvmClearException(self);
}
dvmThrowChainedException(gDvm.exStackOverflowError, NULL, excep);
@@ -1276,7 +1276,7 @@ static void dumpFrames(const DebugOutputTarget* target, void* framePtr,
first = false;
if (saveArea->prevFrame != NULL && saveArea->prevFrame <= framePtr) {
- LOGW("Warning: loop in stack trace at frame %d (%p -> %p)",
+ ALOGW("Warning: loop in stack trace at frame %d (%p -> %p)",
checkCount, framePtr, saveArea->prevFrame);
break;
}
diff --git a/vm/jdwp/JdwpAdb.cpp b/vm/jdwp/JdwpAdb.cpp
index 54b5ee900..c21fb4e07 100644
--- a/vm/jdwp/JdwpAdb.cpp
+++ b/vm/jdwp/JdwpAdb.cpp
@@ -165,7 +165,7 @@ static int receiveClientFd(JdwpNetState* netState)
if (ret <= 0) {
if (ret < 0) {
- LOGW("receiving file descriptor from ADB failed (socket %d): %s",
+ ALOGW("receiving file descriptor from ADB failed (socket %d): %s",
netState->controlSock, strerror(errno));
}
close(netState->controlSock);
@@ -468,7 +468,7 @@ static bool handlePacket(JdwpState* state)
return false;
}
} else {
- LOGW("No reply created for set=%d cmd=%d", cmdSet, cmd);
+ ALOGW("No reply created for set=%d cmd=%d", cmdSet, cmd);
}
expandBufFree(pReply);
} else {
diff --git a/vm/jdwp/JdwpEvent.cpp b/vm/jdwp/JdwpEvent.cpp
index 0062875b0..ca31a7d42 100644
--- a/vm/jdwp/JdwpEvent.cpp
+++ b/vm/jdwp/JdwpEvent.cpp
@@ -927,7 +927,7 @@ bool dvmJdwpPostThreadChange(JdwpState* state, ObjectId threadId, bool start)
* I don't think this can happen.
*/
if (invokeInProgress(state)) {
- LOGW("Not posting thread change during invoke");
+ ALOGW("Not posting thread change during invoke");
return false;
}
diff --git a/vm/jdwp/JdwpHandler.cpp b/vm/jdwp/JdwpHandler.cpp
index f109e25e2..fce8a9a75 100644
--- a/vm/jdwp/JdwpHandler.cpp
+++ b/vm/jdwp/JdwpHandler.cpp
@@ -355,7 +355,7 @@ static JdwpError handleVM_Exit(JdwpState* state,
{
u4 exitCode = get4BE(buf);
- LOGW("Debugger is telling the VM to exit with code=%d", exitCode);
+ ALOGW("Debugger is telling the VM to exit with code=%d", exitCode);
dvmDbgExit(exitCode);
return ERR_NOT_IMPLEMENTED; // shouldn't get here
@@ -648,7 +648,7 @@ static JdwpError handleRT_SignatureWithGeneric(JdwpState* state,
if (signature != NULL) {
expandBufAddUtf8String(pReply, (const u1*) signature);
} else {
- LOGW("No signature for refTypeId=0x%llx", refTypeId);
+ ALOGW("No signature for refTypeId=0x%llx", refTypeId);
expandBufAddUtf8String(pReply, (const u1*) "Lunknown;");
}
expandBufAddUtf8String(pReply, genericSignature);
@@ -1215,7 +1215,7 @@ static JdwpError handleTGR_Name(JdwpState* state,
expandBufAddUtf8String(pReply, (u1*) name);
else {
expandBufAddUtf8String(pReply, (u1*) "BAD-GROUP-ID");
- LOGW("bad thread group ID");
+ ALOGW("bad thread group ID");
}
free(name);
@@ -1516,7 +1516,7 @@ static JdwpError handleER_Set(JdwpState* state,
}
break;
default:
- LOGW("GLITCH: unsupported modKind=%d", modKind);
+ ALOGW("GLITCH: unsupported modKind=%d", modKind);
break;
}
}
@@ -1526,7 +1526,7 @@ static JdwpError handleER_Set(JdwpState* state,
* has sent us bad stuff, but for now we blame ourselves.
*/
if (buf != origBuf + dataLen) {
- LOGW("GLITCH: dataLen is %d, we have consumed %d", dataLen,
+ ALOGW("GLITCH: dataLen is %d, we have consumed %d", dataLen,
(int) (buf - origBuf));
}
@@ -1545,7 +1545,7 @@ static JdwpError handleER_Set(JdwpState* state,
if (err != ERR_NONE) {
/* registration failed, probably because event is bogus */
dvmJdwpEventFree(pEvent);
- LOGW("WARNING: event request rejected");
+ ALOGW("WARNING: event request rejected");
}
return err;
}
diff --git a/vm/jdwp/JdwpMain.cpp b/vm/jdwp/JdwpMain.cpp
index 7f2fecf1c..6e9062252 100644
--- a/vm/jdwp/JdwpMain.cpp
+++ b/vm/jdwp/JdwpMain.cpp
@@ -197,7 +197,7 @@ void dvmJdwpResetState(JdwpState* state)
* mid-request, though, we could see this.
*/
if (state->eventThreadId != 0) {
- LOGW("WARNING: resetting state while event in progress");
+ ALOGW("WARNING: resetting state while event in progress");
assert(false);
}
}
@@ -226,7 +226,7 @@ void dvmJdwpShutdown(JdwpState* state)
if (state->debugThreadStarted) {
state->run = false;
if (pthread_join(state->debugThreadHandle, &threadReturn) != 0) {
- LOGW("JDWP thread join failed");
+ ALOGW("JDWP thread join failed");
}
}
diff --git a/vm/jdwp/JdwpSocket.cpp b/vm/jdwp/JdwpSocket.cpp
index f020574f9..50f0b3b2e 100644
--- a/vm/jdwp/JdwpSocket.cpp
+++ b/vm/jdwp/JdwpSocket.cpp
@@ -414,7 +414,7 @@ static bool establishConnection(JdwpState* state)
int cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf),
&pEntry, &h_errno);
if (cc != 0) {
- LOGW("gethostbyname_r('%s') failed: %s",
+ ALOGW("gethostbyname_r('%s') failed: %s",
state->params.host, strerror(errno));
return false;
}
@@ -423,7 +423,7 @@ static bool establishConnection(JdwpState* state)
h_errno = 0;
pEntry = gethostbyname(state->params.host);
if (pEntry == NULL) {
- LOGW("gethostbyname('%s') failed: %s",
+ ALOGW("gethostbyname('%s') failed: %s",
state->params.host, strerror(h_errno));
return false;
}
@@ -626,7 +626,7 @@ static bool handlePacket(JdwpState* state)
return false;
}
} else {
- LOGW("No reply created for set=%d cmd=%d", cmdSet, cmd);
+ ALOGW("No reply created for set=%d cmd=%d", cmdSet, cmd);
}
expandBufFree(pReply);
} else {
diff --git a/vm/mterp/c/gotoTargets.cpp b/vm/mterp/c/gotoTargets.cpp
index f83778ef8..6df3b9a37 100644
--- a/vm/mterp/c/gotoTargets.cpp
+++ b/vm/mterp/c/gotoTargets.cpp
@@ -185,7 +185,7 @@ GOTO_TARGET(invokeVirtual, bool methodCallRange, bool)
#if 0
if (vsrc1 != methodToCall->insSize) {
- LOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
+ ALOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
baseMethod->clazz->descriptor, baseMethod->name,
(u4) baseMethod->methodIndex,
methodToCall->clazz->descriptor, methodToCall->name);
diff --git a/vm/mterp/out/InterpC-allstubs.cpp b/vm/mterp/out/InterpC-allstubs.cpp
index d8d2f3509..b266e61f0 100644
--- a/vm/mterp/out/InterpC-allstubs.cpp
+++ b/vm/mterp/out/InterpC-allstubs.cpp
@@ -3261,7 +3261,7 @@ GOTO_TARGET(invokeVirtual, bool methodCallRange, bool)
#if 0
if (vsrc1 != methodToCall->insSize) {
- LOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
+ ALOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
baseMethod->clazz->descriptor, baseMethod->name,
(u4) baseMethod->methodIndex,
methodToCall->clazz->descriptor, methodToCall->name);
diff --git a/vm/mterp/out/InterpC-portable.cpp b/vm/mterp/out/InterpC-portable.cpp
index 558b0d4df..2abcb8d9b 100644
--- a/vm/mterp/out/InterpC-portable.cpp
+++ b/vm/mterp/out/InterpC-portable.cpp
@@ -3211,7 +3211,7 @@ GOTO_TARGET(invokeVirtual, bool methodCallRange, bool)
#if 0
if (vsrc1 != methodToCall->insSize) {
- LOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
+ ALOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
baseMethod->clazz->descriptor, baseMethod->name,
(u4) baseMethod->methodIndex,
methodToCall->clazz->descriptor, methodToCall->name);
diff --git a/vm/mterp/out/InterpC-x86-atom.cpp b/vm/mterp/out/InterpC-x86-atom.cpp
index 9ae4df476..b204ff930 100644
--- a/vm/mterp/out/InterpC-x86-atom.cpp
+++ b/vm/mterp/out/InterpC-x86-atom.cpp
@@ -1500,7 +1500,7 @@ GOTO_TARGET(invokeVirtual, bool methodCallRange, bool)
#if 0
if (vsrc1 != methodToCall->insSize) {
- LOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
+ ALOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
baseMethod->clazz->descriptor, baseMethod->name,
(u4) baseMethod->methodIndex,
methodToCall->clazz->descriptor, methodToCall->name);
diff --git a/vm/mterp/out/InterpC-x86.cpp b/vm/mterp/out/InterpC-x86.cpp
index f755e3689..616e31f0e 100644
--- a/vm/mterp/out/InterpC-x86.cpp
+++ b/vm/mterp/out/InterpC-x86.cpp
@@ -1442,7 +1442,7 @@ GOTO_TARGET(invokeVirtual, bool methodCallRange, bool)
#if 0
if (vsrc1 != methodToCall->insSize) {
- LOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
+ ALOGW("WRONG METHOD: base=%s.%s virtual[%d]=%s.%s",
baseMethod->clazz->descriptor, baseMethod->name,
(u4) baseMethod->methodIndex,
methodToCall->clazz->descriptor, methodToCall->name);
diff --git a/vm/native/InternalNative.cpp b/vm/native/InternalNative.cpp
index 832032186..0d06ea7e6 100644
--- a/vm/native/InternalNative.cpp
+++ b/vm/native/InternalNative.cpp
@@ -193,7 +193,7 @@ ClassObject* dvmFindClassByName(StringObject* nameObj, Object* loader,
* auto-generating bogus array classes.
*/
if (!dexIsValidClassName(name, true)) {
- LOGW("dvmFindClassByName rejecting '%s'", name);
+ ALOGW("dvmFindClassByName rejecting '%s'", name);
dvmThrowClassNotFoundException(name);
goto bail;
}
diff --git a/vm/native/dalvik_system_DexFile.cpp b/vm/native/dalvik_system_DexFile.cpp
index 335b3dd14..ad03e8119 100644
--- a/vm/native/dalvik_system_DexFile.cpp
+++ b/vm/native/dalvik_system_DexFile.cpp
@@ -192,7 +192,7 @@ static void Dalvik_dalvik_system_DexFile_openDexFile(const u4* args,
* if the caller specifies their own output file.
*/
if (dvmClassPathContains(gDvm.bootClassPath, sourceName)) {
- LOGW("Refusing to reopen boot DEX '%s'", sourceName);
+ ALOGW("Refusing to reopen boot DEX '%s'", sourceName);
dvmThrowIOException(
"Re-opening BOOTCLASSPATH DEX files is not allowed");
free(sourceName);
@@ -318,7 +318,7 @@ static void Dalvik_dalvik_system_DexFile_closeDexFile(const u4* args,
u4 hash = (u4) pDexOrJar;
dvmHashTableLock(gDvm.userDexFiles);
if (!dvmHashTableRemove(gDvm.userDexFiles, hash, pDexOrJar)) {
- LOGW("WARNING: could not remove '%s' from DEX hash table",
+ ALOGW("WARNING: could not remove '%s' from DEX hash table",
pDexOrJar->fileName);
}
dvmHashTableUnlock(gDvm.userDexFiles);
diff --git a/vm/native/dalvik_system_VMDebug.cpp b/vm/native/dalvik_system_VMDebug.cpp
index 256d4c61d..f6d91a24a 100644
--- a/vm/native/dalvik_system_VMDebug.cpp
+++ b/vm/native/dalvik_system_VMDebug.cpp
@@ -706,7 +706,7 @@ static void Dalvik_dalvik_system_VMDebug_crash(const u4* args,
UNUSED_PARAMETER(args);
UNUSED_PARAMETER(pResult);
- LOGW("Crashing VM on request");
+ ALOGW("Crashing VM on request");
dvmDumpThread(dvmThreadSelf(), false);
dvmAbort();
}
diff --git a/vm/native/dalvik_system_VMStack.cpp b/vm/native/dalvik_system_VMStack.cpp
index a1d723e58..db627ef25 100644
--- a/vm/native/dalvik_system_VMStack.cpp
+++ b/vm/native/dalvik_system_VMStack.cpp
@@ -97,14 +97,14 @@ static void Dalvik_dalvik_system_VMStack_getClasses(const u4* args,
ClassObject* classArrayClass = dvmFindArrayClass("[Ljava/lang/Class;",
NULL);
if (classArrayClass == NULL) {
- LOGW("Unable to find java.lang.Class array class");
+ ALOGW("Unable to find java.lang.Class array class");
return;
}
ArrayObject* classes = dvmAllocArrayByClass(classArrayClass,
size,
ALLOC_DEFAULT);
if (classes == NULL) {
- LOGW("Unable to allocate class array of %zd elements", size);
+ ALOGW("Unable to allocate class array of %zd elements", size);
return;
}
diff --git a/vm/native/dalvik_system_Zygote.cpp b/vm/native/dalvik_system_Zygote.cpp
index ddc37b003..8d6ef4f58 100644
--- a/vm/native/dalvik_system_Zygote.cpp
+++ b/vm/native/dalvik_system_Zygote.cpp
@@ -130,7 +130,7 @@ static void setSignalHandler()
err = sigaction (SIGCHLD, &sa, NULL);
if (err < 0) {
- LOGW("Error setting SIGCHLD handler: %s", strerror(errno));
+ ALOGW("Error setting SIGCHLD handler: %s", strerror(errno));
}
}
@@ -149,7 +149,7 @@ static void unsetSignalHandler()
err = sigaction (SIGCHLD, &sa, NULL);
if (err < 0) {
- LOGW("Error unsetting SIGCHLD handler: %s", strerror(errno));
+ ALOGW("Error unsetting SIGCHLD handler: %s", strerror(errno));
}
}
diff --git a/vm/native/java_lang_Class.cpp b/vm/native/java_lang_Class.cpp
index 615c31cc3..46606d8b7 100644
--- a/vm/native/java_lang_Class.cpp
+++ b/vm/native/java_lang_Class.cpp
@@ -510,7 +510,7 @@ static void Dalvik_java_lang_Class_newInstance(const u4* args, JValue* pResult)
/* initialize the class if it hasn't been already */
if (!dvmIsClassInitialized(clazz)) {
if (!dvmInitClass(clazz)) {
- LOGW("Class init failed in newInstance call (%s)",
+ ALOGW("Class init failed in newInstance call (%s)",
clazz->descriptor);
assert(dvmCheckException(self));
RETURN_VOID();
diff --git a/vm/native/java_lang_Runtime.cpp b/vm/native/java_lang_Runtime.cpp
index 764aa7f96..d23b8037d 100644
--- a/vm/native/java_lang_Runtime.cpp
+++ b/vm/native/java_lang_Runtime.cpp
@@ -51,7 +51,7 @@ static void Dalvik_java_lang_Runtime_nativeExit(const u4* args,
dvmChangeStatus(NULL, THREAD_NATIVE);
(*gDvm.exitHook)(status); // not expected to return
dvmChangeStatus(NULL, THREAD_RUNNING);
- LOGW("JNI exit hook returned");
+ ALOGW("JNI exit hook returned");
}
ALOGD("Calling exit(%d)", status);
#if defined(WITH_JIT) && defined(WITH_JIT_TUNING)
diff --git a/vm/native/java_lang_Throwable.cpp b/vm/native/java_lang_Throwable.cpp
index 1324e5ad2..6e3ab6c9b 100644
--- a/vm/native/java_lang_Throwable.cpp
+++ b/vm/native/java_lang_Throwable.cpp
@@ -48,7 +48,7 @@ static void Dalvik_java_lang_Throwable_nativeGetStackTrace(const u4* args,
ArrayObject* elements = NULL;
if (stackState == NULL) {
- LOGW("getStackTrace() called but no trace available");
+ ALOGW("getStackTrace() called but no trace available");
RETURN_PTR(NULL); /* could throw NPE; currently caller will do so */
}
diff --git a/vm/native/java_lang_reflect_Array.cpp b/vm/native/java_lang_reflect_Array.cpp
index 83eda78ca..dbe823da4 100644
--- a/vm/native/java_lang_reflect_Array.cpp
+++ b/vm/native/java_lang_reflect_Array.cpp
@@ -120,7 +120,7 @@ static void Dalvik_java_lang_reflect_Array_createMultiArray(const u4* args,
*/
arrayClass = dvmFindArrayClass(acDescriptor, elementClass->classLoader);
if (arrayClass == NULL) {
- LOGW("Unable to find or generate array class '%s'", acDescriptor);
+ ALOGW("Unable to find or generate array class '%s'", acDescriptor);
assert(dvmCheckException(dvmThreadSelf()));
free(acDescriptor);
RETURN_VOID();
diff --git a/vm/native/java_lang_reflect_Constructor.cpp b/vm/native/java_lang_reflect_Constructor.cpp
index e776bf1ee..166dbf556 100644
--- a/vm/native/java_lang_reflect_Constructor.cpp
+++ b/vm/native/java_lang_reflect_Constructor.cpp
@@ -51,7 +51,7 @@ static void Dalvik_java_lang_reflect_Constructor_constructNative(
/* initialize the class if it hasn't been already */
if (!dvmIsClassInitialized(declaringClass)) {
if (!dvmInitClass(declaringClass)) {
- LOGW("Class init failed in Constructor.constructNative (%s)",
+ ALOGW("Class init failed in Constructor.constructNative (%s)",
declaringClass->descriptor);
assert(dvmCheckException(dvmThreadSelf()));
RETURN_VOID();
diff --git a/vm/oo/Array.cpp b/vm/oo/Array.cpp
index 45f63190b..056198895 100644
--- a/vm/oo/Array.cpp
+++ b/vm/oo/Array.cpp
@@ -503,7 +503,7 @@ bool dvmCopyObjectArray(ArrayObject* dstArray, const ArrayObject* srcArray,
length = dstArray->length;
for (count = 0; count < length; count++) {
if (!dvmInstanceof(src[count]->clazz, dstElemClass)) {
- LOGW("dvmCopyObjectArray: can't store %s in %s",
+ ALOGW("dvmCopyObjectArray: can't store %s in %s",
src[count]->clazz->descriptor, dstElemClass->descriptor);
return false;
}
@@ -539,7 +539,7 @@ bool dvmUnboxObjectArray(ArrayObject* dstArray, const ArrayObject* srcArray,
* necessary for correctness.
*/
if (!dvmUnboxPrimitive(*src, dstElemClass, &result)) {
- LOGW("dvmCopyObjectArray: can't store %s in %s",
+ ALOGW("dvmCopyObjectArray: can't store %s in %s",
(*src)->clazz->descriptor, dstElemClass->descriptor);
return false;
}
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp
index fe4c3a2e5..b53ea3f8e 100644
--- a/vm/oo/Class.cpp
+++ b/vm/oo/Class.cpp
@@ -314,7 +314,7 @@ ClassObject* dvmFindPrimitiveClass(char type)
case PRIM_FLOAT: return gDvm.typeFloat;
case PRIM_DOUBLE: return gDvm.typeDouble;
default: {
- LOGW("Unknown primitive type '%c'", type);
+ ALOGW("Unknown primitive type '%c'", type);
return NULL;
}
}
@@ -1013,7 +1013,7 @@ void dvmAddInitiatingLoader(ClassObject* clazz, Object* loader)
* checking before every add, so we may not want to do this.
*/
//if (dvmLoaderInInitiatingList(clazz, loader)) {
- // LOGW("WOW: simultaneous add of initiating class loader");
+ // ALOGW("WOW: simultaneous add of initiating class loader");
// goto bail_unlock;
//}
@@ -1220,7 +1220,7 @@ static void removeClassFromHash(ClassObject* clazz)
dvmHashTableLock(gDvm.loadedClasses);
if (!dvmHashTableRemove(gDvm.loadedClasses, hash, clazz))
- LOGW("Hash table remove failed on class '%s'", clazz->descriptor);
+ ALOGW("Hash table remove failed on class '%s'", clazz->descriptor);
dvmHashTableUnlock(gDvm.loadedClasses);
}
@@ -1386,7 +1386,7 @@ static ClassObject* findClassFromLoaderNoInit(const char* descriptor,
clazz = NULL;
goto bail;
} else if (clazz == NULL) {
- LOGW("ClassLoader returned NULL w/o exception pending");
+ ALOGW("ClassLoader returned NULL w/o exception pending");
dvmThrowNullPointerException("ClassLoader returned null");
goto bail;
}
@@ -1496,7 +1496,7 @@ static ClassObject* findClassNoInit(const char* descriptor, Object* loader,
*/
if (dvmCheckException(self)) {
LOGE("Class lookup %s attempted with exception pending", descriptor);
- LOGW("Pending exception is:");
+ ALOGW("Pending exception is:");
dvmLogExceptionStackTrace();
dvmDumpAllThreads(false);
dvmAbort();
@@ -1565,7 +1565,7 @@ static ClassObject* findClassNoInit(const char* descriptor, Object* loader,
*
* (Yes, this happens.)
*/
- //LOGW("WOW: somebody loaded %s simultaneously", descriptor);
+ //ALOGW("WOW: somebody loaded %s simultaneously", descriptor);
clazz->initThreadId = 0;
dvmUnlockObject(self, (Object*) clazz);
@@ -1619,7 +1619,7 @@ static ClassObject* findClassNoInit(const char* descriptor, Object* loader,
/* happens with "external" libs */
ALOGV("Link of class '%s' failed", descriptor);
} else {
- LOGW("Link of class '%s' failed", descriptor);
+ ALOGW("Link of class '%s' failed", descriptor);
}
goto bail;
}
@@ -1676,7 +1676,7 @@ got_class:
if (!dvmIsClassLinked(clazz) &&
clazz->initThreadId == self->threadId)
{
- LOGW("Recursive link on class %s", clazz->descriptor);
+ ALOGW("Recursive link on class %s", clazz->descriptor);
dvmUnlockObject(self, (Object*) clazz);
dvmThrowClassCircularityError(clazz->descriptor);
clazz = NULL;
@@ -1741,7 +1741,7 @@ static ClassObject* loadClassFromDex0(DvmDex* pDvmDex,
* runtime state.
*/
if ((pClassDef->accessFlags & ~EXPECTED_FILE_FLAGS) != 0) {
- LOGW("Invalid file flags in class %s: %04x",
+ ALOGW("Invalid file flags in class %s: %04x",
descriptor, pClassDef->accessFlags);
return NULL;
}
@@ -2549,7 +2549,7 @@ bool dvmLinkClass(ClassObject* clazz)
size_t len = clazz->interfaceCount * sizeof(*interfaceIdxArray);
interfaceIdxArray = (u4*)malloc(len);
if (interfaceIdxArray == NULL) {
- LOGW("Unable to allocate memory to link %s", clazz->descriptor);
+ ALOGW("Unable to allocate memory to link %s", clazz->descriptor);
goto bail;
}
memcpy(interfaceIdxArray, clazz->interfaces, len);
@@ -2576,7 +2576,7 @@ bool dvmLinkClass(ClassObject* clazz)
ALOGV("Unable to resolve superclass of %s (%d)",
clazz->descriptor, superclassIdx);
} else {
- LOGW("Unable to resolve superclass of %s (%d)",
+ ALOGW("Unable to resolve superclass of %s (%d)",
clazz->descriptor, superclassIdx);
}
goto bail;
@@ -2619,7 +2619,7 @@ bool dvmLinkClass(ClassObject* clazz)
/* are we allowed to implement this interface? */
if (!dvmCheckClassAccess(clazz, clazz->interfaces[i])) {
dvmLinearReadOnly(clazz->classLoader, clazz->interfaces);
- LOGW("Interface '%s' is not accessible to '%s'",
+ ALOGW("Interface '%s' is not accessible to '%s'",
clazz->interfaces[i]->descriptor, clazz->descriptor);
dvmThrowIllegalAccessError("interface not accessible");
goto bail;
@@ -2661,17 +2661,17 @@ bool dvmLinkClass(ClassObject* clazz)
}
/* verify */
if (dvmIsFinalClass(clazz->super)) {
- LOGW("Superclass of '%s' is final '%s'",
+ ALOGW("Superclass of '%s' is final '%s'",
clazz->descriptor, clazz->super->descriptor);
dvmThrowIncompatibleClassChangeError("superclass is final");
goto bail;
} else if (dvmIsInterfaceClass(clazz->super)) {
- LOGW("Superclass of '%s' is interface '%s'",
+ ALOGW("Superclass of '%s' is interface '%s'",
clazz->descriptor, clazz->super->descriptor);
dvmThrowIncompatibleClassChangeError("superclass is an interface");
goto bail;
} else if (!dvmCheckClassAccess(clazz, clazz->super)) {
- LOGW("Superclass of '%s' (%s) is not accessible",
+ ALOGW("Superclass of '%s' (%s) is not accessible",
clazz->descriptor, clazz->super->descriptor);
dvmThrowIllegalAccessError("superclass not accessible");
goto bail;
@@ -2770,7 +2770,7 @@ bool dvmLinkClass(ClassObject* clazz)
dvmLinearReadOnly(clazz->classLoader, clazz->virtualMethods);
} else {
if (!createVtable(clazz)) {
- LOGW("failed creating vtable");
+ ALOGW("failed creating vtable");
goto bail;
}
}
@@ -2917,7 +2917,7 @@ static bool createVtable(ClassObject* clazz)
{
/* verify */
if (dvmIsFinalMethod(superMeth)) {
- LOGW("Method %s.%s overrides final %s.%s",
+ ALOGW("Method %s.%s overrides final %s.%s",
localMeth->clazz->descriptor, localMeth->name,
superMeth->clazz->descriptor, superMeth->name);
goto bail;
@@ -3059,7 +3059,7 @@ static bool createIftable(ClassObject* clazz)
/* make sure this is still an interface class */
if (!dvmIsInterfaceClass(interf)) {
- LOGW("Class '%s' implements non-interface '%s'",
+ ALOGW("Class '%s' implements non-interface '%s'",
clazz->descriptor, interf->descriptor);
dvmThrowIncompatibleClassChangeErrorWithClassMessage(
clazz->descriptor);
@@ -3228,7 +3228,7 @@ static bool createIftable(ClassObject* clazz)
{
LOGVV("INTF: matched at %d", j);
if (!dvmIsPublicMethod(clazz->vtable[j])) {
- LOGW("Implementation of %s.%s is not public",
+ ALOGW("Implementation of %s.%s is not public",
clazz->descriptor, clazz->vtable[j]->name);
dvmThrowIllegalAccessError(
"interface implementation not public");
@@ -4086,7 +4086,7 @@ static bool validateSuperDescriptors(const ClassObject* clazz)
if (meth != clazz->super->vtable[i] &&
!checkMethodDescriptorClasses(meth, clazz->super, clazz))
{
- LOGW("Method mismatch: %s in %s (cl=%p) and super %s (cl=%p)",
+ ALOGW("Method mismatch: %s in %s (cl=%p) and super %s (cl=%p)",
meth->name, clazz->descriptor, clazz->classLoader,
clazz->super->descriptor, clazz->super->classLoader);
dvmThrowLinkageError(
@@ -4119,7 +4119,7 @@ static bool validateSuperDescriptors(const ClassObject* clazz)
meth = clazz->vtable[vtableIndex];
if (!checkMethodDescriptorClasses(meth, iface, meth->clazz)) {
- LOGW("Method mismatch: %s in %s (cl=%p) and "
+ ALOGW("Method mismatch: %s in %s (cl=%p) and "
"iface %s (cl=%p)",
meth->name, clazz->descriptor, clazz->classLoader,
iface->descriptor, iface->classLoader);
@@ -4273,10 +4273,10 @@ bool dvmInitClass(ClassObject* clazz)
* class because the optimization process discards information.
*/
if (IS_CLASS_FLAG_SET(clazz, CLASS_ISOPTIMIZED)) {
- LOGW("Class '%s' was optimized without verification; "
+ ALOGW("Class '%s' was optimized without verification; "
"not verifying now",
clazz->descriptor);
- LOGW(" ('rm /data/dalvik-cache/*' and restart to fix this)");
+ ALOGW(" ('rm /data/dalvik-cache/*' and restart to fix this)");
goto verify_failed;
}
@@ -4331,7 +4331,7 @@ noverify:
}
if (dvmCheckException(self)) {
- LOGW("GLITCH: exception pending at start of class init");
+ ALOGW("GLITCH: exception pending at start of class init");
dvmAbort();
}
@@ -4478,10 +4478,10 @@ noverify:
* need to throw an ExceptionInInitializerError, but we want to
* tuck the original exception into the "cause" field.
*/
- LOGW("Exception %s thrown while initializing %s",
+ ALOGW("Exception %s thrown while initializing %s",
(dvmGetException(self)->clazz)->descriptor, clazz->descriptor);
dvmThrowExceptionInInitializerError();
- //LOGW("+++ replaced");
+ //ALOGW("+++ replaced");
dvmLockObject(self, (Object*) clazz);
clazz->status = CLASS_ERROR;
diff --git a/vm/oo/Object.cpp b/vm/oo/Object.cpp
index 8cc09806a..cd3ae643d 100644
--- a/vm/oo/Object.cpp
+++ b/vm/oo/Object.cpp
@@ -369,7 +369,7 @@ static Method* findMethodInListByDescriptor(const ClassObject* clazz,
size_t argCount = countArgsAndFindReturnType(descriptor, &returnType);
if (returnType == NULL) {
- LOGW("Bogus method descriptor: %s", descriptor);
+ ALOGW("Bogus method descriptor: %s", descriptor);
return NULL;
}
@@ -743,7 +743,7 @@ void dvmDumpObject(const Object* obj)
int i;
if (obj == NULL || obj->clazz == NULL) {
- LOGW("Null or malformed object not dumped");
+ ALOGW("Null or malformed object not dumped");
return;
}
diff --git a/vm/oo/Resolve.cpp b/vm/oo/Resolve.cpp
index e1a99ba1a..a4890a5fc 100644
--- a/vm/oo/Resolve.cpp
+++ b/vm/oo/Resolve.cpp
@@ -125,13 +125,13 @@ ClassObject* dvmResolveClass(const ClassObject* referrer, u4 classIdx,
if (referrer->pDvmDex != resClassCheck->pDvmDex &&
resClassCheck->classLoader != NULL)
{
- LOGW("Class resolved by unexpected DEX:"
+ ALOGW("Class resolved by unexpected DEX:"
" %s(%p):%p ref [%s] %s(%p):%p",
referrer->descriptor, referrer->classLoader,
referrer->pDvmDex,
resClass->descriptor, resClassCheck->descriptor,
resClassCheck->classLoader, resClassCheck->pDvmDex);
- LOGW("(%s had used a different %s during pre-verification)",
+ ALOGW("(%s had used a different %s during pre-verification)",
referrer->descriptor, resClass->descriptor);
dvmThrowIllegalAccessError(
"Class ref in pre-verified class resolved to unexpected "
diff --git a/vm/os/android.cpp b/vm/os/android.cpp
index 4e58e68bb..24ebd5a05 100644
--- a/vm/os/android.cpp
+++ b/vm/os/android.cpp
@@ -48,7 +48,7 @@ static const int kNiceValues[10] = {
void os_changeThreadPriority(Thread* thread, int newPriority)
{
if (newPriority < 1 || newPriority > 10) {
- LOGW("bad priority %d", newPriority);
+ ALOGW("bad priority %d", newPriority);
newPriority = 5;
}
@@ -75,7 +75,7 @@ int os_getThreadPriorityFromSystem()
errno = 0;
int sysprio = getpriority(PRIO_PROCESS, 0);
if (sysprio == -1 && errno != 0) {
- LOGW("getpriority() failed: %s", strerror(errno));
+ ALOGW("getpriority() failed: %s", strerror(errno));
return THREAD_NORM_PRIORITY;
}
@@ -128,7 +128,7 @@ int os_raiseThreadPriority()
void os_lowerThreadPriority(int oldThreadPriority)
{
if (setpriority(PRIO_PROCESS, 0, oldThreadPriority) != 0) {
- LOGW("Unable to reset priority to %d: %s",
+ ALOGW("Unable to reset priority to %d: %s",
oldThreadPriority, strerror(errno));
} else {
ALOGV("Reset priority to %d", oldThreadPriority);
diff --git a/vm/reflect/Annotation.cpp b/vm/reflect/Annotation.cpp
index 4aa5c06b8..e5df65ad1 100644
--- a/vm/reflect/Annotation.cpp
+++ b/vm/reflect/Annotation.cpp
@@ -660,7 +660,7 @@ static Object* createAnnotationMember(const ClassObject* clazz,
elementNameIdx = readUleb128(pPtr);
if (!processAnnotationValue(clazz, pPtr, &avalue, kAllObjects)) {
- LOGW("Failed processing annotation value");
+ ALOGW("Failed processing annotation value");
goto bail;
}
valueObj = (Object*)avalue.value.l;
@@ -676,7 +676,7 @@ static Object* createAnnotationMember(const ClassObject* clazz,
if (name != NULL) {
Method* annoMeth = dvmFindVirtualMethodByName(annoClass, name);
if (annoMeth == NULL) {
- LOGW("WARNING: could not find annotation member %s in %s",
+ ALOGW("WARNING: could not find annotation member %s in %s",
name, annoClass->descriptor);
} else {
methodObj = dvmCreateReflectMethodObject(annoMeth);
@@ -1146,7 +1146,7 @@ static Object* getAnnotationValue(const ClassObject* clazz,
/* find the annotation */
ptr = searchEncodedAnnotation(clazz, pAnnoItem->annotation, annoName);
if (ptr == NULL) {
- LOGW("%s annotation lacks '%s' member", debugAnnoName, annoName);
+ ALOGW("%s annotation lacks '%s' member", debugAnnoName, annoName);
return GAV_FAILED;
}
@@ -1155,7 +1155,7 @@ static Object* getAnnotationValue(const ClassObject* clazz,
/* make sure it has the expected format */
if (avalue.type != expectedType) {
- LOGW("%s %s has wrong type (0x%02x, expected 0x%02x)",
+ ALOGW("%s %s has wrong type (0x%02x, expected 0x%02x)",
debugAnnoName, annoName, avalue.type, expectedType);
return GAV_FAILED;
}
@@ -1412,18 +1412,18 @@ ClassObject* dvmGetEnclosingClass(const ClassObject* clazz)
const u1* ptr;
ptr = searchEncodedAnnotation(clazz, pAnnoItem->annotation, "value");
if (ptr == NULL) {
- LOGW("EnclosingMethod annotation lacks 'value' member");
+ ALOGW("EnclosingMethod annotation lacks 'value' member");
return NULL;
}
/* parse it, verify the type */
AnnotationValue avalue;
if (!processAnnotationValue(clazz, &ptr, &avalue, kAllRaw)) {
- LOGW("EnclosingMethod parse failed");
+ ALOGW("EnclosingMethod parse failed");
return NULL;
}
if (avalue.type != kDexAnnotationMethod) {
- LOGW("EnclosingMethod value has wrong type (0x%02x, expected 0x%02x)",
+ ALOGW("EnclosingMethod value has wrong type (0x%02x, expected 0x%02x)",
avalue.type, kDexAnnotationMethod);
return NULL;
}
@@ -1469,7 +1469,7 @@ bool dvmGetInnerClass(const ClassObject* clazz, StringObject** pName,
const u1* ptr;
ptr = searchEncodedAnnotation(clazz, pAnnoItem->annotation, "name");
if (ptr == NULL) {
- LOGW("InnerClass annotation lacks 'name' member");
+ ALOGW("InnerClass annotation lacks 'name' member");
return false;
}
@@ -1484,7 +1484,7 @@ bool dvmGetInnerClass(const ClassObject* clazz, StringObject** pName,
if (avalue.type != kDexAnnotationNull &&
avalue.type != kDexAnnotationString)
{
- LOGW("InnerClass name has bad type (0x%02x, expected STRING or NULL)",
+ ALOGW("InnerClass name has bad type (0x%02x, expected STRING or NULL)",
avalue.type);
return false;
}
@@ -1494,17 +1494,17 @@ bool dvmGetInnerClass(const ClassObject* clazz, StringObject** pName,
ptr = searchEncodedAnnotation(clazz, pAnnoItem->annotation, "accessFlags");
if (ptr == NULL) {
- LOGW("InnerClass annotation lacks 'accessFlags' member");
+ ALOGW("InnerClass annotation lacks 'accessFlags' member");
return false;
}
/* parse it, verify the type */
if (!processAnnotationValue(clazz, &ptr, &avalue, kAllRaw)) {
- LOGW("InnerClass accessFlags parse failed");
+ ALOGW("InnerClass accessFlags parse failed");
return false;
}
if (avalue.type != kDexAnnotationInt) {
- LOGW("InnerClass value has wrong type (0x%02x, expected 0x%02x)",
+ ALOGW("InnerClass value has wrong type (0x%02x, expected 0x%02x)",
avalue.type, kDexAnnotationInt);
return false;
}
@@ -1833,11 +1833,11 @@ Object* dvmGetAnnotationDefaultValue(const Method* method)
const u1* ptr;
ptr = searchEncodedAnnotation(clazz, pAnnoItem->annotation, "value");
if (ptr == NULL) {
- LOGW("AnnotationDefault annotation lacks 'value'");
+ ALOGW("AnnotationDefault annotation lacks 'value'");
return NULL;
}
if ((*ptr & kDexAnnotationValueTypeMask) != kDexAnnotationAnnotation) {
- LOGW("AnnotationDefault value has wrong type (0x%02x)",
+ ALOGW("AnnotationDefault value has wrong type (0x%02x)",
*ptr & kDexAnnotationValueTypeMask);
return NULL;
}
@@ -2076,7 +2076,7 @@ static ArrayObject* processAnnotationSetRefList(const ClassObject* clazz,
annoArrayArray = dvmAllocArrayByClass(
gDvm.classJavaLangAnnotationAnnotationArrayArray, count, ALLOC_DEFAULT);
if (annoArrayArray == NULL) {
- LOGW("annotation set ref array alloc failed");
+ ALOGW("annotation set ref array alloc failed");
goto bail;
}
@@ -2092,7 +2092,7 @@ static ArrayObject* processAnnotationSetRefList(const ClassObject* clazz,
pAnnoSet,
kDexVisibilityRuntime);
if (annoSet == NULL) {
- LOGW("processAnnotationSet failed");
+ ALOGW("processAnnotationSet failed");
annoArrayArray = NULL;
goto bail;
}
diff --git a/vm/reflect/Reflect.cpp b/vm/reflect/Reflect.cpp
index 861300f34..e43f1ae18 100644
--- a/vm/reflect/Reflect.cpp
+++ b/vm/reflect/Reflect.cpp
@@ -107,7 +107,7 @@ static ClassObject* convertSignaturePartToClass(char** pSignature,
}
if (clazz == NULL) {
- LOGW("Unable to match class for part: '%s'", *pSignature);
+ ALOGW("Unable to match class for part: '%s'", *pSignature);
}
*pSignature = signature;
return clazz;
@@ -535,7 +535,7 @@ Object* dvmCreateReflectMethodObject(const Method* meth)
int slot;
if (dvmCheckException(dvmThreadSelf())) {
- LOGW("WARNING: dvmCreateReflectMethodObject called with "
+ ALOGW("WARNING: dvmCreateReflectMethodObject called with "
"exception pending");
return NULL;
}
@@ -1070,7 +1070,7 @@ DataObject* dvmBoxPrimitive(JValue value, ClassObject* returnType)
wrapperClass = dvmFindSystemClass(classDescriptor);
if (wrapperClass == NULL) {
- LOGW("Unable to find '%s'", classDescriptor);
+ ALOGW("Unable to find '%s'", classDescriptor);
assert(dvmCheckException(dvmThreadSelf()));
return NULL;
}