summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-06 19:16:58 +0000
committerSteve Block <steveblock@google.com>2012-01-08 11:26:30 +0000
commitc1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef (patch)
tree76e90a6ae1910835a56e4dad3f60f42392645703
parente8e1ddccd616e8226b7cc1e4e9fdb327429249e8 (diff)
downloadandroid_dalvik-c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef.tar.gz
android_dalvik-c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef.tar.bz2
android_dalvik-c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef.zip
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220 Also fix an occurrence of LOGW missed in an earlier change. Bug: 5449033 Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
-rw-r--r--dexopt/OptMain.cpp20
-rw-r--r--libdex/DexDataMap.cpp6
-rw-r--r--libdex/DexDebugInfo.cpp4
-rw-r--r--libdex/DexFile.cpp16
-rw-r--r--libdex/DexOptData.cpp10
-rw-r--r--libdex/DexSwapVerify.cpp264
-rw-r--r--libdex/OptInvocation.cpp4
-rw-r--r--libdex/SysUtil.cpp16
-rw-r--r--libdex/ZipArchive.cpp2
-rw-r--r--libnativehelper/JNIHelp.cpp8
-rw-r--r--vm/AllocTracker.cpp4
-rw-r--r--vm/AtomicCache.cpp2
-rw-r--r--vm/BitVector.cpp6
-rw-r--r--vm/CheckJni.cpp30
-rw-r--r--vm/Common.h2
-rw-r--r--vm/Ddm.cpp2
-rw-r--r--vm/Debugger.cpp20
-rw-r--r--vm/DvmDex.cpp10
-rw-r--r--vm/Exception.cpp12
-rw-r--r--vm/Hash.cpp2
-rw-r--r--vm/IndirectRefTable.cpp10
-rw-r--r--vm/Init.cpp32
-rw-r--r--vm/InitRefs.cpp18
-rw-r--r--vm/InlineNative.cpp14
-rw-r--r--vm/JarFile.cpp12
-rw-r--r--vm/Jni.cpp38
-rw-r--r--vm/LinearAlloc.cpp14
-rw-r--r--vm/Misc.cpp2
-rw-r--r--vm/Native.cpp6
-rw-r--r--vm/PointerSet.cpp2
-rw-r--r--vm/Profile.cpp16
-rw-r--r--vm/RawDexFile.cpp16
-rw-r--r--vm/ReferenceTable.cpp4
-rw-r--r--vm/SignalCatcher.cpp10
-rw-r--r--vm/StdioConverter.cpp2
-rw-r--r--vm/Sync.cpp6
-rw-r--r--vm/Thread.cpp42
-rw-r--r--vm/UtfString.cpp2
-rw-r--r--vm/alloc/Alloc.cpp8
-rw-r--r--vm/alloc/CardTable.cpp4
-rw-r--r--vm/alloc/Copying.cpp10
-rw-r--r--vm/alloc/HeapBitmap.cpp2
-rw-r--r--vm/alloc/HeapSource.cpp6
-rw-r--r--vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h4
-rw-r--r--vm/alloc/Verify.cpp4
-rw-r--r--vm/alloc/Visit.cpp4
-rw-r--r--vm/analysis/CodeVerify.cpp10
-rw-r--r--vm/analysis/DexPrepare.cpp52
-rw-r--r--vm/analysis/DexVerify.cpp2
-rw-r--r--vm/analysis/Optimize.cpp2
-rw-r--r--vm/analysis/RegisterMap.cpp50
-rw-r--r--vm/analysis/VerifySubs.cpp2
-rw-r--r--vm/arch/generic/Call.cpp4
-rw-r--r--vm/compiler/Compiler.cpp14
-rw-r--r--vm/compiler/Dataflow.cpp4
-rw-r--r--vm/compiler/Frontend.cpp20
-rw-r--r--vm/compiler/InlineTransformation.cpp2
-rw-r--r--vm/compiler/Loop.cpp28
-rw-r--r--vm/compiler/SSATransformation.cpp2
-rw-r--r--vm/compiler/Utility.cpp16
-rw-r--r--vm/compiler/codegen/RallocUtil.cpp18
-rw-r--r--vm/compiler/codegen/arm/ArchFactory.cpp2
-rw-r--r--vm/compiler/codegen/arm/Assemble.cpp20
-rw-r--r--vm/compiler/codegen/arm/CodegenCommon.cpp4
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.cpp38
-rw-r--r--vm/compiler/codegen/arm/Thumb/Factory.cpp20
-rw-r--r--vm/compiler/codegen/arm/Thumb2/Gen.cpp2
-rw-r--r--vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp4
-rw-r--r--vm/compiler/codegen/arm/armv5te/ArchVariant.cpp4
-rw-r--r--vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp2
-rw-r--r--vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp4
-rw-r--r--vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp2
-rw-r--r--vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp4
-rw-r--r--vm/compiler/codegen/x86/CodegenDriver.cpp2
-rw-r--r--vm/compiler/codegen/x86/ia32/ArchVariant.cpp2
-rw-r--r--vm/hprof/Hprof.cpp8
-rw-r--r--vm/hprof/HprofOutput.cpp2
-rw-r--r--vm/interp/Interp.cpp18
-rw-r--r--vm/interp/Jit.cpp8
-rw-r--r--vm/interp/Stack.cpp14
-rw-r--r--vm/jdwp/ExpandBuf.cpp2
-rw-r--r--vm/jdwp/JdwpAdb.cpp22
-rw-r--r--vm/jdwp/JdwpEvent.cpp4
-rw-r--r--vm/jdwp/JdwpHandler.cpp2
-rw-r--r--vm/jdwp/JdwpMain.cpp6
-rw-r--r--vm/jdwp/JdwpSocket.cpp34
-rw-r--r--vm/mterp/Mterp.cpp6
-rw-r--r--vm/mterp/c/OP_UNUSED_FF.cpp2
-rw-r--r--vm/mterp/c/gotoTargets.cpp6
-rw-r--r--vm/mterp/c/header.cpp10
-rw-r--r--vm/mterp/common/asm-constants.h6
-rw-r--r--vm/mterp/out/InterpC-allstubs.cpp18
-rw-r--r--vm/mterp/out/InterpC-armv5te-vfp.cpp10
-rw-r--r--vm/mterp/out/InterpC-armv5te.cpp10
-rw-r--r--vm/mterp/out/InterpC-armv7-a-neon.cpp10
-rw-r--r--vm/mterp/out/InterpC-armv7-a.cpp10
-rw-r--r--vm/mterp/out/InterpC-portable.cpp18
-rw-r--r--vm/mterp/out/InterpC-x86-atom.cpp16
-rw-r--r--vm/mterp/out/InterpC-x86.cpp16
-rw-r--r--vm/native/dalvik_system_DexFile.cpp2
-rw-r--r--vm/native/dalvik_system_Zygote.cpp26
-rw-r--r--vm/native/java_lang_Class.cpp2
-rw-r--r--vm/native/java_lang_System.cpp2
-rw-r--r--vm/native/java_lang_VMClassLoader.cpp4
-rw-r--r--vm/native/java_lang_reflect_Field.cpp12
-rw-r--r--vm/oo/Array.cpp6
-rw-r--r--vm/oo/Class.cpp42
-rw-r--r--vm/reflect/Annotation.cpp24
-rw-r--r--vm/reflect/Proxy.cpp8
-rw-r--r--vm/reflect/Reflect.cpp6
-rw-r--r--vm/test/TestHash.cpp16
-rw-r--r--vm/test/TestIndirectRefTable.cpp78
112 files changed, 775 insertions, 775 deletions
diff --git a/dexopt/OptMain.cpp b/dexopt/OptMain.cpp
index bdbeff686..3cdf5bea2 100644
--- a/dexopt/OptMain.cpp
+++ b/dexopt/OptMain.cpp
@@ -73,7 +73,7 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
/* make sure we're still at the start of an empty file */
if (lseek(cacheFd, 0, SEEK_END) != 0) {
- LOGE("DexOptZ: new cache file '%s' is not empty", debugFileName);
+ ALOGE("DexOptZ: new cache file '%s' is not empty", debugFileName);
goto bail;
}
@@ -176,7 +176,7 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode,
dexoptFlags) != 0)
{
- LOGE("DexOptZ: VM init failed");
+ ALOGE("DexOptZ: VM init failed");
goto bail;
}
@@ -186,7 +186,7 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
if (!dvmContinueOptimization(cacheFd, dexOffset, uncompLen, debugFileName,
modWhen, crc32, isBootstrap))
{
- LOGE("Optimization failed");
+ ALOGE("Optimization failed");
goto bail;
}
@@ -214,7 +214,7 @@ static int processZipFile(int zipFd, int cacheFd, const char* zipName,
*/
const char* bcp = getenv("BOOTCLASSPATH");
if (bcp == NULL) {
- LOGE("DexOptZ: BOOTCLASSPATH not set");
+ ALOGE("DexOptZ: BOOTCLASSPATH not set");
return -1;
}
@@ -258,7 +258,7 @@ static int processZipFile(int zipFd, int cacheFd, const char* zipName,
char* endp; \
(_var) = _func(*++argv, &endp, 0); \
if (*endp != '\0') { \
- LOGE("%s '%s'", _msg, *argv); \
+ ALOGE("%s '%s'", _msg, *argv); \
goto bail; \
} \
--argc; \
@@ -292,7 +292,7 @@ static int fromZip(int argc, char* const argv[])
const char* dexoptFlags;
if (argc != 6) {
- LOGE("Wrong number of args for --zip (found %d)", argc);
+ ALOGE("Wrong number of args for --zip (found %d)", argc);
goto bail;
}
@@ -429,7 +429,7 @@ static int fromDex(int argc, char* const argv[])
if (argc < 10) {
/* don't have all mandatory args */
- LOGE("Not enough arguments for --dex (found %d)", argc);
+ ALOGE("Not enough arguments for --dex (found %d)", argc);
goto bail;
}
@@ -442,7 +442,7 @@ static int fromDex(int argc, char* const argv[])
*/
GET_ARG(vmBuildVersion, strtol, "bad vm build");
if (vmBuildVersion != DALVIK_VM_BUILD) {
- LOGE("DexOpt: build rev does not match VM: %d vs %d",
+ ALOGE("DexOpt: build rev does not match VM: %d vs %d",
vmBuildVersion, DALVIK_VM_BUILD);
goto bail;
}
@@ -511,7 +511,7 @@ static int fromDex(int argc, char* const argv[])
}
if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode, flags) != 0) {
- LOGE("VM init failed");
+ ALOGE("VM init failed");
goto bail;
}
@@ -521,7 +521,7 @@ static int fromDex(int argc, char* const argv[])
if (!dvmContinueOptimization(fd, offset, length, debugFileName,
modWhen, crc, (flags & DEXOPT_IS_BOOTSTRAP) != 0))
{
- LOGE("Optimization failed");
+ ALOGE("Optimization failed");
goto bail;
}
diff --git a/libdex/DexDataMap.cpp b/libdex/DexDataMap.cpp
index 3553c367d..8405e8c9f 100644
--- a/libdex/DexDataMap.cpp
+++ b/libdex/DexDataMap.cpp
@@ -77,7 +77,7 @@ void dexDataMapAdd(DexDataMap* map, u4 offset, u2 type) {
if ((map->count != 0) &&
(map->offsets[map->count - 1] >= offset)) {
- LOGE("Out-of-order data map offset: %#x then %#x",
+ ALOGE("Out-of-order data map offset: %#x then %#x",
map->offsets[map->count - 1], offset);
return;
}
@@ -130,10 +130,10 @@ bool dexDataMapVerify(DexDataMap* map, u4 offset, u2 type) {
}
if (found < 0) {
- LOGE("No data map entry found @ %#x; expected %x",
+ ALOGE("No data map entry found @ %#x; expected %x",
offset, type);
} else {
- LOGE("Unexpected data map entry @ %#x: expected %x, found %x",
+ ALOGE("Unexpected data map entry @ %#x: expected %x, found %x",
offset, type, found);
}
diff --git a/libdex/DexDebugInfo.cpp b/libdex/DexDebugInfo.cpp
index cbb58d478..6a7b6bb5a 100644
--- a/libdex/DexDebugInfo.cpp
+++ b/libdex/DexDebugInfo.cpp
@@ -130,9 +130,9 @@ static void emitLocalCbIfLive(void *cnxt, int reg, u4 endAddress,
}
static void invalidStream(const char* classDescriptor, const DexProto* proto) {
- IF_LOGE() {
+ IF_ALOGE() {
char* methodDescriptor = dexProtoCopyMethodDescriptor(proto);
- LOGE("Invalid debug info stream. class %s; proto %s",
+ ALOGE("Invalid debug info stream. class %s; proto %s",
classDescriptor, methodDescriptor);
free(methodDescriptor);
}
diff --git a/libdex/DexFile.cpp b/libdex/DexFile.cpp
index 2f6fd4036..54070a2a3 100644
--- a/libdex/DexFile.cpp
+++ b/libdex/DexFile.cpp
@@ -294,7 +294,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
int result = -1;
if (length < sizeof(DexHeader)) {
- LOGE("too short to be a valid .dex");
+ ALOGE("too short to be a valid .dex");
goto bail; /* bad file format */
}
@@ -309,7 +309,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
if (memcmp(data, DEX_OPT_MAGIC, 4) == 0) {
magic = data;
if (memcmp(magic+4, DEX_OPT_MAGIC_VERS, 4) != 0) {
- LOGE("bad opt version (0x%02x %02x %02x %02x)",
+ ALOGE("bad opt version (0x%02x %02x %02x %02x)",
magic[4], magic[5], magic[6], magic[7]);
goto bail;
}
@@ -326,7 +326,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
data += pDexFile->pOptHeader->dexOffset;
length -= pDexFile->pOptHeader->dexOffset;
if (pDexFile->pOptHeader->dexLength > length) {
- LOGE("File truncated? stored len=%d, rem len=%d",
+ ALOGE("File truncated? stored len=%d, rem len=%d",
pDexFile->pOptHeader->dexLength, (int) length);
goto bail;
}
@@ -348,7 +348,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
if (flags & kDexParseVerifyChecksum) {
u4 adler = dexComputeChecksum(pHeader);
if (adler != pHeader->checksum) {
- LOGE("ERROR: bad checksum (%08x vs %08x)",
+ ALOGE("ERROR: bad checksum (%08x vs %08x)",
adler, pHeader->checksum);
if (!(flags & kDexParseContinueOnError))
goto bail;
@@ -360,7 +360,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
if (pOptHeader != NULL) {
adler = dexComputeOptChecksum(pOptHeader);
if (adler != pOptHeader->checksum) {
- LOGE("ERROR: bad opt checksum (%08x vs %08x)",
+ ALOGE("ERROR: bad opt checksum (%08x vs %08x)",
adler, pOptHeader->checksum);
if (!(flags & kDexParseContinueOnError))
goto bail;
@@ -385,7 +385,7 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
if (memcmp(sha1Digest, pHeader->signature, kSHA1DigestLen) != 0) {
char tmpBuf1[kSHA1DigestOutputLen];
char tmpBuf2[kSHA1DigestOutputLen];
- LOGE("ERROR: bad SHA1 digest (%s vs %s)",
+ ALOGE("ERROR: bad SHA1 digest (%s vs %s)",
dexSHA1DigestToStr(sha1Digest, tmpBuf1),
dexSHA1DigestToStr(pHeader->signature, tmpBuf2));
if (!(flags & kDexParseContinueOnError))
@@ -396,14 +396,14 @@ DexFile* dexFileParse(const u1* data, size_t length, int flags)
}
if (pHeader->fileSize != length) {
- LOGE("ERROR: stored file size (%d) != expected (%d)",
+ ALOGE("ERROR: stored file size (%d) != expected (%d)",
(int) pHeader->fileSize, (int) length);
if (!(flags & kDexParseContinueOnError))
goto bail;
}
if (pHeader->classDefsSize == 0) {
- LOGE("ERROR: DEX file has no classes in it, failing");
+ ALOGE("ERROR: DEX file has no classes in it, failing");
goto bail;
}
diff --git a/libdex/DexOptData.cpp b/libdex/DexOptData.cpp
index a0d996d65..b859d63af 100644
--- a/libdex/DexOptData.cpp
+++ b/libdex/DexOptData.cpp
@@ -61,13 +61,13 @@ bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile)
* properly aligned. This test will catch both of these cases.
*/
if (!isValidPointer(pOpt, pOptStart, pOptEnd)) {
- LOGE("Bogus opt data start pointer");
+ ALOGE("Bogus opt data start pointer");
return false;
}
/* Make sure that the opt data length is a whole number of words. */
if ((optLength & 3) != 0) {
- LOGE("Unaligned opt data area end");
+ ALOGE("Unaligned opt data area end");
return false;
}
@@ -76,14 +76,14 @@ bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile)
* one chunk header.
*/
if (optLength < 8) {
- LOGE("Undersized opt data area (%u)", optLength);
+ ALOGE("Undersized opt data area (%u)", optLength);
return false;
}
/* Process chunks until we see the end marker. */
while (*pOpt != kDexChunkEnd) {
if (!isValidPointer(pOpt + 2, pOptStart, pOptEnd)) {
- LOGE("Bogus opt data content pointer at offset %u",
+ ALOGE("Bogus opt data content pointer at offset %u",
((const u1*) pOpt) - data);
return false;
}
@@ -99,7 +99,7 @@ bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile)
const u4* pNextOpt = pOpt + (roundedSize / sizeof(u4));
if (!isValidPointer(pNextOpt, pOptStart, pOptEnd)) {
- LOGE("Opt data area problem for chunk of size %u at offset %u",
+ ALOGE("Opt data area problem for chunk of size %u at offset %u",
size, ((const u1*) pOpt) - data);
return false;
}
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp
index 18445b25e..1835e9ba9 100644
--- a/libdex/DexSwapVerify.cpp
+++ b/libdex/DexSwapVerify.cpp
@@ -299,7 +299,7 @@ static bool swapDexHeader(const CheckState* state, DexHeader* pHeader)
SWAP_OFFSET4(pHeader->dataOff);
if (pHeader->endianTag != kDexEndianConstant) {
- LOGE("Unexpected endian_tag: %#x", pHeader->endianTag);
+ ALOGE("Unexpected endian_tag: %#x", pHeader->endianTag);
return false;
}
@@ -323,12 +323,12 @@ static bool swapDexHeader(const CheckState* state, DexHeader* pHeader)
static bool checkHeaderSection(const CheckState* state, u4 sectionOffset,
u4 sectionCount, u4* endOffset) {
if (sectionCount != 1) {
- LOGE("Multiple header items");
+ ALOGE("Multiple header items");
return false;
}
if (sectionOffset != 0) {
- LOGE("Header at %#x; not at start of file", sectionOffset);
+ ALOGE("Header at %#x; not at start of file", sectionOffset);
return false;
}
@@ -362,7 +362,7 @@ static u4 mapTypeToBitMask(int mapType) {
case kDexTypeEncodedArrayItem: return 1 << 16;
case kDexTypeAnnotationsDirectoryItem: return 1 << 17;
default: {
- LOGE("Unknown map item type %04x", mapType);
+ ALOGE("Unknown map item type %04x", mapType);
return 0;
}
}
@@ -416,13 +416,13 @@ static bool swapMap(CheckState* state, DexMapList* pMap)
if (first) {
first = false;
} else if (lastOffset >= item->offset) {
- LOGE("Out-of-order map item: %#x then %#x",
+ ALOGE("Out-of-order map item: %#x then %#x",
lastOffset, item->offset);
return false;
}
if (item->offset >= state->pHeader->fileSize) {
- LOGE("Map item after end of file: %x, size %#x",
+ ALOGE("Map item after end of file: %x, size %#x",
item->offset, state->pHeader->fileSize);
return false;
}
@@ -436,7 +436,7 @@ static bool swapMap(CheckState* state, DexMapList* pMap)
* the data section.
*/
if (icount > dataItemsLeft) {
- LOGE("Unrealistically many items in the data section: "
+ ALOGE("Unrealistically many items in the data section: "
"at least %d", dataItemCount + icount);
return false;
}
@@ -452,7 +452,7 @@ static bool swapMap(CheckState* state, DexMapList* pMap)
}
if ((usedBits & bit) != 0) {
- LOGE("Duplicate map section of type %#x", item->type);
+ ALOGE("Duplicate map section of type %#x", item->type);
return false;
}
@@ -462,60 +462,60 @@ static bool swapMap(CheckState* state, DexMapList* pMap)
}
if ((usedBits & mapTypeToBitMask(kDexTypeHeaderItem)) == 0) {
- LOGE("Map is missing header entry");
+ ALOGE("Map is missing header entry");
return false;
}
if ((usedBits & mapTypeToBitMask(kDexTypeMapList)) == 0) {
- LOGE("Map is missing map_list entry");
+ ALOGE("Map is missing map_list entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeStringIdItem)) == 0)
&& ((state->pHeader->stringIdsOff != 0)
|| (state->pHeader->stringIdsSize != 0))) {
- LOGE("Map is missing string_ids entry");
+ ALOGE("Map is missing string_ids entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeTypeIdItem)) == 0)
&& ((state->pHeader->typeIdsOff != 0)
|| (state->pHeader->typeIdsSize != 0))) {
- LOGE("Map is missing type_ids entry");
+ ALOGE("Map is missing type_ids entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeProtoIdItem)) == 0)
&& ((state->pHeader->protoIdsOff != 0)
|| (state->pHeader->protoIdsSize != 0))) {
- LOGE("Map is missing proto_ids entry");
+ ALOGE("Map is missing proto_ids entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeFieldIdItem)) == 0)
&& ((state->pHeader->fieldIdsOff != 0)
|| (state->pHeader->fieldIdsSize != 0))) {
- LOGE("Map is missing field_ids entry");
+ ALOGE("Map is missing field_ids entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeMethodIdItem)) == 0)
&& ((state->pHeader->methodIdsOff != 0)
|| (state->pHeader->methodIdsSize != 0))) {
- LOGE("Map is missing method_ids entry");
+ ALOGE("Map is missing method_ids entry");
return false;
}
if (((usedBits & mapTypeToBitMask(kDexTypeClassDefItem)) == 0)
&& ((state->pHeader->classDefsOff != 0)
|| (state->pHeader->classDefsSize != 0))) {
- LOGE("Map is missing class_defs entry");
+ ALOGE("Map is missing class_defs entry");
return false;
}
state->pDataMap = dexDataMapAlloc(dataItemCount);
if (state->pDataMap == NULL) {
- LOGE("Unable to allocate data map (size %#x)", dataItemCount);
+ ALOGE("Unable to allocate data map (size %#x)", dataItemCount);
return false;
}
@@ -526,12 +526,12 @@ static bool swapMap(CheckState* state, DexMapList* pMap)
static bool checkMapSection(const CheckState* state, u4 sectionOffset,
u4 sectionCount, u4* endOffset) {
if (sectionCount != 1) {
- LOGE("Multiple map list items");
+ ALOGE("Multiple map list items");
return false;
}
if (sectionOffset != state->pHeader->mapOff) {
- LOGE("Map not at header-defined offset: %#x, expected %#x",
+ ALOGE("Map not at header-defined offset: %#x, expected %#x",
sectionOffset, state->pHeader->mapOff);
return false;
}
@@ -568,7 +568,7 @@ static void* crossVerifyStringIdItem(const CheckState* state, void* ptr) {
const char* s0 = dexGetStringData(state->pDexFile, item0);
const char* s1 = dexGetStringData(state->pDexFile, item);
if (dexUtf8Cmp(s0, s1) >= 0) {
- LOGE("Out-of-order string_ids: '%s' then '%s'", s0, s1);
+ ALOGE("Out-of-order string_ids: '%s' then '%s'", s0, s1);
return NULL;
}
}
@@ -593,7 +593,7 @@ static void* crossVerifyTypeIdItem(const CheckState* state, void* ptr) {
dexStringById(state->pDexFile, item->descriptorIdx);
if (!dexIsValidTypeDescriptor(descriptor)) {
- LOGE("Invalid type descriptor: '%s'", descriptor);
+ ALOGE("Invalid type descriptor: '%s'", descriptor);
return NULL;
}
@@ -601,7 +601,7 @@ static void* crossVerifyTypeIdItem(const CheckState* state, void* ptr) {
if (item0 != NULL) {
// Check ordering. This relies on string_ids being in order.
if (item0->descriptorIdx >= item->descriptorIdx) {
- LOGE("Out-of-order type_ids: %#x then %#x",
+ ALOGE("Out-of-order type_ids: %#x then %#x",
item0->descriptorIdx, item->descriptorIdx);
return NULL;
}
@@ -630,7 +630,7 @@ static bool shortyDescMatch(char shorty, const char* descriptor, bool
switch (shorty) {
case 'V': {
if (!isReturnType) {
- LOGE("Invalid use of void");
+ ALOGE("Invalid use of void");
return false;
}
// Fall through.
@@ -644,7 +644,7 @@ static bool shortyDescMatch(char shorty, const char* descriptor, bool
case 'S':
case 'Z': {
if ((descriptor[0] != shorty) || (descriptor[1] != '\0')) {
- LOGE("Shorty vs. primitive type mismatch: '%c', '%s'",
+ ALOGE("Shorty vs. primitive type mismatch: '%c', '%s'",
shorty, descriptor);
return false;
}
@@ -652,14 +652,14 @@ static bool shortyDescMatch(char shorty, const char* descriptor, bool
}
case 'L': {
if ((descriptor[0] != 'L') && (descriptor[0] != '[')) {
- LOGE("Shorty vs. type mismatch: '%c', '%s'",
+ ALOGE("Shorty vs. type mismatch: '%c', '%s'",
shorty, descriptor);
return false;
}
break;
}
default: {
- LOGE("Bogus shorty: '%c'", shorty);
+ ALOGE("Bogus shorty: '%c'", shorty);
return false;
}
}
@@ -699,7 +699,7 @@ static void* crossVerifyProtoIdItem(const CheckState* state, void* ptr) {
}
if (*shorty == '\0') {
- LOGE("Shorty is too short");
+ ALOGE("Shorty is too short");
return NULL;
}
@@ -711,7 +711,7 @@ static void* crossVerifyProtoIdItem(const CheckState* state, void* ptr) {
}
if (*shorty != '\0') {
- LOGE("Shorty is too long");
+ ALOGE("Shorty is too long");
return NULL;
}
@@ -719,7 +719,7 @@ static void* crossVerifyProtoIdItem(const CheckState* state, void* ptr) {
if (item0 != NULL) {
// Check ordering. This relies on type_ids being in order.
if (item0->returnTypeIdx > item->returnTypeIdx) {
- LOGE("Out-of-order proto_id return types");
+ ALOGE("Out-of-order proto_id return types");
return NULL;
} else if (item0->returnTypeIdx == item->returnTypeIdx) {
bool badOrder = false;
@@ -751,7 +751,7 @@ static void* crossVerifyProtoIdItem(const CheckState* state, void* ptr) {
}
if (badOrder) {
- LOGE("Out-of-order proto_id arguments");
+ ALOGE("Out-of-order proto_id arguments");
return NULL;
}
}
@@ -779,19 +779,19 @@ static void* crossVerifyFieldIdItem(const CheckState* state, void* ptr) {
s = dexStringByTypeIdx(state->pDexFile, item->classIdx);
if (!dexIsClassDescriptor(s)) {
- LOGE("Invalid descriptor for class_idx: '%s'", s);
+ ALOGE("Invalid descriptor for class_idx: '%s'", s);
return NULL;
}
s = dexStringByTypeIdx(state->pDexFile, item->typeIdx);
if (!dexIsFieldDescriptor(s)) {
- LOGE("Invalid descriptor for type_idx: '%s'", s);
+ ALOGE("Invalid descriptor for type_idx: '%s'", s);
return NULL;
}
s = dexStringById(state->pDexFile, item->nameIdx);
if (!dexIsValidMemberName(s)) {
- LOGE("Invalid name: '%s'", s);
+ ALOGE("Invalid name: '%s'", s);
return NULL;
}
@@ -824,7 +824,7 @@ static void* crossVerifyFieldIdItem(const CheckState* state, void* ptr) {
}
if (bogus) {
- LOGE("Out-of-order field_ids");
+ ALOGE("Out-of-order field_ids");
return NULL;
}
}
@@ -851,13 +851,13 @@ static void* crossVerifyMethodIdItem(const CheckState* state, void* ptr) {
s = dexStringByTypeIdx(state->pDexFile, item->classIdx);
if (!dexIsReferenceDescriptor(s)) {
- LOGE("Invalid descriptor for class_idx: '%s'", s);
+ ALOGE("Invalid descriptor for class_idx: '%s'", s);
return NULL;
}
s = dexStringById(state->pDexFile, item->nameIdx);
if (!dexIsValidMemberName(s)) {
- LOGE("Invalid name: '%s'", s);
+ ALOGE("Invalid name: '%s'", s);
return NULL;
}
@@ -890,7 +890,7 @@ static void* crossVerifyMethodIdItem(const CheckState* state, void* ptr) {
}
if (bogus) {
- LOGE("Out-of-order method_ids");
+ ALOGE("Out-of-order method_ids");
return NULL;
}
}
@@ -971,12 +971,12 @@ static void* crossVerifyClassDefItem(const CheckState* state, void* ptr) {
const char* descriptor = dexStringByTypeIdx(state->pDexFile, classIdx);
if (!dexIsClassDescriptor(descriptor)) {
- LOGE("Invalid class: '%s'", descriptor);
+ ALOGE("Invalid class: '%s'", descriptor);
return NULL;
}
if (setDefinedClassBit(state, classIdx)) {
- LOGE("Duplicate class definition: '%s'", descriptor);
+ ALOGE("Duplicate class definition: '%s'", descriptor);
return NULL;
}
@@ -997,7 +997,7 @@ static void* crossVerifyClassDefItem(const CheckState* state, void* ptr) {
if (item->superclassIdx != kDexNoIndex) {
descriptor = dexStringByTypeIdx(state->pDexFile, item->superclassIdx);
if (!dexIsClassDescriptor(descriptor)) {
- LOGE("Invalid superclass: '%s'", descriptor);
+ ALOGE("Invalid superclass: '%s'", descriptor);
return NULL;
}
}
@@ -1016,7 +1016,7 @@ static void* crossVerifyClassDefItem(const CheckState* state, void* ptr) {
descriptor = dexStringByTypeIdx(state->pDexFile,
dexTypeListGetIdx(interfaces, i));
if (!dexIsClassDescriptor(descriptor)) {
- LOGE("Invalid interface: '%s'", descriptor);
+ ALOGE("Invalid interface: '%s'", descriptor);
return NULL;
}
}
@@ -1034,7 +1034,7 @@ static void* crossVerifyClassDefItem(const CheckState* state, void* ptr) {
for (j = 0; j < i; j++) {
u4 idx2 = dexTypeListGetIdx(interfaces, j);
if (idx1 == idx2) {
- LOGE("Duplicate interface: '%s'",
+ ALOGE("Duplicate interface: '%s'",
dexStringByTypeIdx(state->pDexFile, idx1));
return NULL;
}
@@ -1043,13 +1043,13 @@ static void* crossVerifyClassDefItem(const CheckState* state, void* ptr) {
}
if (!verifyClassDataIsForDef(state, item->classDataOff, item->classIdx)) {
- LOGE("Invalid class_data_item");
+ ALOGE("Invalid class_data_item");
return NULL;
}
if (!verifyAnnotationsDirectoryIsForDef(state, item->annotationsOff,
item->classIdx)) {
- LOGE("Invalid annotations_directory_item");
+ ALOGE("Invalid annotations_directory_item");
return NULL;
}
@@ -1073,7 +1073,7 @@ static u1* swapFieldAnnotations(const CheckState* state, u4 count, u1* addr) {
if (first) {
first = false;
} else if (lastIdx >= item->fieldIdx) {
- LOGE("Out-of-order field_idx: %#x then %#x", lastIdx,
+ ALOGE("Out-of-order field_idx: %#x then %#x", lastIdx,
item->fieldIdx);
return NULL;
}
@@ -1102,7 +1102,7 @@ static u1* swapMethodAnnotations(const CheckState* state, u4 count, u1* addr) {
if (first) {
first = false;
} else if (lastIdx >= item->methodIdx) {
- LOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
+ ALOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
item->methodIdx);
return NULL;
}
@@ -1132,7 +1132,7 @@ static u1* swapParameterAnnotations(const CheckState* state, u4 count,
if (first) {
first = false;
} else if (lastIdx >= item->methodIdx) {
- LOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
+ ALOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
item->methodIdx);
return NULL;
}
@@ -1423,7 +1423,7 @@ static void* crossVerifyAnnotationSetItem(const CheckState* state, void* ptr) {
if (first) {
first = false;
} else if (lastIdx >= idx) {
- LOGE("Out-of-order entry types: %#x then %#x",
+ ALOGE("Out-of-order entry types: %#x then %#x",
lastIdx, idx);
return NULL;
}
@@ -1447,12 +1447,12 @@ static bool verifyFields(const CheckState* state, u4 size,
CHECK_INDEX(field->fieldIdx, state->pHeader->fieldIdsSize);
if (isStatic != expectStatic) {
- LOGE("Field in wrong list @ %d", i);
+ ALOGE("Field in wrong list @ %d", i);
return false;
}
if ((accessFlags & ~ACC_FIELD_MASK) != 0) {
- LOGE("Bogus field access flags %x @ %d", accessFlags, i);
+ ALOGE("Bogus field access flags %x @ %d", accessFlags, i);
return false;
}
}
@@ -1478,24 +1478,24 @@ static bool verifyMethods(const CheckState* state, u4 size,
bool allowSynchronized = (accessFlags & ACC_NATIVE) != 0;
if (isDirect != expectDirect) {
- LOGE("Method in wrong list @ %d", i);
+ ALOGE("Method in wrong list @ %d", i);
return false;
}
if (((accessFlags & ~ACC_METHOD_MASK) != 0)
|| (isSynchronized && !allowSynchronized)) {
- LOGE("Bogus method access flags %x @ %d", accessFlags, i);
+ ALOGE("Bogus method access flags %x @ %d", accessFlags, i);
return false;
}
if (expectCode) {
if (method->codeOff == 0) {
- LOGE("Unexpected zero code_off for access_flags %x",
+ ALOGE("Unexpected zero code_off for access_flags %x",
accessFlags);
return false;
}
} else if (method->codeOff != 0) {
- LOGE("Unexpected non-zero code_off %#x for access_flags %x",
+ ALOGE("Unexpected non-zero code_off %#x for access_flags %x",
method->codeOff, accessFlags);
return false;
}
@@ -1513,7 +1513,7 @@ static bool verifyClassDataItem0(const CheckState* state,
classData->staticFields, true);
if (!okay) {
- LOGE("Trouble with static fields");
+ ALOGE("Trouble with static fields");
return false;
}
@@ -1521,7 +1521,7 @@ static bool verifyClassDataItem0(const CheckState* state,
classData->instanceFields, false);
if (!okay) {
- LOGE("Trouble with instance fields");
+ ALOGE("Trouble with instance fields");
return false;
}
@@ -1529,7 +1529,7 @@ static bool verifyClassDataItem0(const CheckState* state,
classData->directMethods, true);
if (!okay) {
- LOGE("Trouble with direct methods");
+ ALOGE("Trouble with direct methods");
return false;
}
@@ -1537,7 +1537,7 @@ static bool verifyClassDataItem0(const CheckState* state,
classData->virtualMethods, false);
if (!okay) {
- LOGE("Trouble with virtual methods");
+ ALOGE("Trouble with virtual methods");
return false;
}
@@ -1550,7 +1550,7 @@ static void* intraVerifyClassDataItem(const CheckState* state, void* ptr) {
DexClassData* classData = dexReadAndVerifyClassData(&data, state->fileEnd);
if (classData == NULL) {
- LOGE("Unable to parse class_data_item");
+ ALOGE("Unable to parse class_data_item");
return NULL;
}
@@ -1659,12 +1659,12 @@ static u4 setHandlerOffsAndVerify(const CheckState* state,
bool catchAll;
if (!okay) {
- LOGE("Bogus size");
+ ALOGE("Bogus size");
return 0;
}
if ((size < -65536) || (size > 65536)) {
- LOGE("Invalid size: %d", size);
+ ALOGE("Invalid size: %d", size);
return 0;
}
@@ -1682,7 +1682,7 @@ static u4 setHandlerOffsAndVerify(const CheckState* state,
readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus type_idx");
+ ALOGE("Bogus type_idx");
return 0;
}
@@ -1691,12 +1691,12 @@ static u4 setHandlerOffsAndVerify(const CheckState* state,
u4 addr = readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus addr");
+ ALOGE("Bogus addr");
return 0;
}
if (addr >= code->insnsSize) {
- LOGE("Invalid addr: %#x", addr);
+ ALOGE("Invalid addr: %#x", addr);
return 0;
}
}
@@ -1705,12 +1705,12 @@ static u4 setHandlerOffsAndVerify(const CheckState* state,
u4 addr = readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus catch_all_addr");
+ ALOGE("Bogus catch_all_addr");
return 0;
}
if (addr >= code->insnsSize) {
- LOGE("Invalid catch_all_addr: %#x", addr);
+ ALOGE("Invalid catch_all_addr: %#x", addr);
return 0;
}
}
@@ -1731,12 +1731,12 @@ static void* swapTriesAndCatches(const CheckState* state, DexCode* code) {
readAndVerifyUnsignedLeb128(&encodedPtr, state->fileEnd, &okay);
if (!okay) {
- LOGE("Bogus handlers_size");
+ ALOGE("Bogus handlers_size");
return NULL;
}
if ((handlersSize == 0) || (handlersSize >= 65536)) {
- LOGE("Invalid handlers_size: %d", handlersSize);
+ ALOGE("Invalid handlers_size: %d", handlersSize);
return NULL;
}
@@ -1763,12 +1763,12 @@ static void* swapTriesAndCatches(const CheckState* state, DexCode* code) {
SWAP_FIELD2(tries->handlerOff);
if (tries->startAddr < lastEnd) {
- LOGE("Out-of-order try");
+ ALOGE("Out-of-order try");
return NULL;
}
if (tries->startAddr >= code->insnsSize) {
- LOGE("Invalid start_addr: %#x", tries->startAddr);
+ ALOGE("Invalid start_addr: %#x", tries->startAddr);
return NULL;
}
@@ -1779,14 +1779,14 @@ static void* swapTriesAndCatches(const CheckState* state, DexCode* code) {
}
if (i == handlersSize) {
- LOGE("Bogus handler offset: %#x", tries->handlerOff);
+ ALOGE("Bogus handler offset: %#x", tries->handlerOff);
return NULL;
}
lastEnd = tries->startAddr + tries->insnCount;
if (lastEnd > code->insnsSize) {
- LOGE("Invalid insn_count: %#x (end addr %#x)",
+ ALOGE("Invalid insn_count: %#x (end addr %#x)",
tries->insnCount, lastEnd);
return NULL;
}
@@ -1812,7 +1812,7 @@ static void* swapCodeItem(const CheckState* state, void* ptr) {
SWAP_FIELD4(item->insnsSize);
if (item->insSize > item->registersSize) {
- LOGE("insSize (%u) > registersSize (%u)", item->insSize,
+ ALOGE("insSize (%u) > registersSize (%u)", item->insSize,
item->registersSize);
return NULL;
}
@@ -1825,7 +1825,7 @@ static void* swapCodeItem(const CheckState* state, void* ptr) {
* list. Longer parameter lists, though, need to be represented
* in-order in the register file.
*/
- LOGE("outsSize (%u) > registersSize (%u)", item->outsSize,
+ ALOGE("outsSize (%u) > registersSize (%u)", item->outsSize,
item->registersSize);
return NULL;
}
@@ -1845,7 +1845,7 @@ static void* swapCodeItem(const CheckState* state, void* ptr) {
if ((((u4) insns) & 3) != 0) {
// Four-byte alignment for the tries. Verify the spacer is a 0.
if (*insns != 0) {
- LOGE("Non-zero padding: %#x", (u4) *insns);
+ ALOGE("Non-zero padding: %#x", (u4) *insns);
return NULL;
}
}
@@ -1865,13 +1865,13 @@ static void* intraVerifyStringDataItem(const CheckState* state, void* ptr) {
u4 i;
if (!okay) {
- LOGE("Bogus utf16_size");
+ ALOGE("Bogus utf16_size");
return NULL;
}
for (i = 0; i < utf16Size; i++) {
if (data >= fileEnd) {
- LOGE("String data would go beyond end-of-file");
+ ALOGE("String data would go beyond end-of-file");
return NULL;
}
@@ -1882,7 +1882,7 @@ static void* intraVerifyStringDataItem(const CheckState* state, void* ptr) {
case 0x00: {
// Special case of bit pattern 0xxx.
if (byte1 == 0) {
- LOGE("String shorter than indicated utf16_size %#x",
+ ALOGE("String shorter than indicated utf16_size %#x",
utf16Size);
return NULL;
}
@@ -1908,25 +1908,25 @@ static void* intraVerifyStringDataItem(const CheckState* state, void* ptr) {
* Note: 1111 is valid for normal UTF-8, but not the
* modified UTF-8 used here.
*/
- LOGE("Illegal start byte %#x", byte1);
+ ALOGE("Illegal start byte %#x", byte1);
return NULL;
}
case 0x0e: {
// Bit pattern 1110, so there are two additional bytes.
u1 byte2 = *(data++);
if ((byte2 & 0xc0) != 0x80) {
- LOGE("Illegal continuation byte %#x", byte2);
+ ALOGE("Illegal continuation byte %#x", byte2);
return NULL;
}
u1 byte3 = *(data++);
if ((byte3 & 0xc0) != 0x80) {
- LOGE("Illegal continuation byte %#x", byte3);
+ ALOGE("Illegal continuation byte %#x", byte3);
return NULL;
}
u2 value = ((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6)
| (byte3 & 0x3f);
if (value < 0x800) {
- LOGE("Illegal representation for value %x", value);
+ ALOGE("Illegal representation for value %x", value);
return NULL;
}
break;
@@ -1936,12 +1936,12 @@ static void* intraVerifyStringDataItem(const CheckState* state, void* ptr) {
// Bit pattern 110x, so there is one additional byte.
u1 byte2 = *(data++);
if ((byte2 & 0xc0) != 0x80) {
- LOGE("Illegal continuation byte %#x", byte2);
+ ALOGE("Illegal continuation byte %#x", byte2);
return NULL;
}
u2 value = ((byte1 & 0x1f) << 6) | (byte2 & 0x3f);
if ((value != 0) && (value < 0x80)) {
- LOGE("Illegal representation for value %x", value);
+ ALOGE("Illegal representation for value %x", value);
return NULL;
}
break;
@@ -1950,7 +1950,7 @@ static void* intraVerifyStringDataItem(const CheckState* state, void* ptr) {
}
if (*(data++) != '\0') {
- LOGE("String longer than indicated utf16_size %#x", utf16Size);
+ ALOGE("String longer than indicated utf16_size %#x", utf16Size);
return NULL;
}
@@ -1967,7 +1967,7 @@ static void* intraVerifyDebugInfoItem(const CheckState* state, void* ptr) {
readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus line_start");
+ ALOGE("Bogus line_start");
return NULL;
}
@@ -1975,12 +1975,12 @@ static void* intraVerifyDebugInfoItem(const CheckState* state, void* ptr) {
readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus parameters_size");
+ ALOGE("Bogus parameters_size");
return NULL;
}
if (parametersSize > 65536) {
- LOGE("Invalid parameters_size: %#x", parametersSize);
+ ALOGE("Invalid parameters_size: %#x", parametersSize);
return NULL;
}
@@ -1989,7 +1989,7 @@ static void* intraVerifyDebugInfoItem(const CheckState* state, void* ptr) {
readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus parameter_name");
+ ALOGE("Bogus parameter_name");
return NULL;
}
@@ -2091,7 +2091,7 @@ static void* intraVerifyDebugInfoItem(const CheckState* state, void* ptr) {
}
if (!okay) {
- LOGE("Bogus syntax for opcode %02x", opcode);
+ ALOGE("Bogus syntax for opcode %02x", opcode);
return NULL;
}
}
@@ -2131,14 +2131,14 @@ static const u1* verifyEncodedArray(const CheckState* state,
u4 size = readAndVerifyUnsignedLeb128(&data, state->fileEnd, &okay);
if (!okay) {
- LOGE("Bogus encoded_array size");
+ ALOGE("Bogus encoded_array size");
return NULL;
}
while (size--) {
data = verifyEncodedValue(state, data, crossVerify);
if (data == NULL) {
- LOGE("Bogus encoded_array value");
+ ALOGE("Bogus encoded_array value");
return NULL;
}
}
@@ -2159,7 +2159,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
switch (valueType) {
case kDexAnnotationByte: {
if (valueArg != 0) {
- LOGE("Bogus byte size %#x", valueArg);
+ ALOGE("Bogus byte size %#x", valueArg);
return NULL;
}
data++;
@@ -2168,7 +2168,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
case kDexAnnotationShort:
case kDexAnnotationChar: {
if (valueArg > 1) {
- LOGE("Bogus char/short size %#x", valueArg);
+ ALOGE("Bogus char/short size %#x", valueArg);
return NULL;
}
data += valueArg + 1;
@@ -2177,7 +2177,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
case kDexAnnotationInt:
case kDexAnnotationFloat: {
if (valueArg > 3) {
- LOGE("Bogus int/float size %#x", valueArg);
+ ALOGE("Bogus int/float size %#x", valueArg);
return NULL;
}
data += valueArg + 1;
@@ -2190,7 +2190,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationString: {
if (valueArg > 3) {
- LOGE("Bogus string size %#x", valueArg);
+ ALOGE("Bogus string size %#x", valueArg);
return NULL;
}
u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2199,7 +2199,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationType: {
if (valueArg > 3) {
- LOGE("Bogus type size %#x", valueArg);
+ ALOGE("Bogus type size %#x", valueArg);
return NULL;
}
u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2209,7 +2209,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
case kDexAnnotationField:
case kDexAnnotationEnum: {
if (valueArg > 3) {
- LOGE("Bogus field/enum size %#x", valueArg);
+ ALOGE("Bogus field/enum size %#x", valueArg);
return NULL;
}
u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2218,7 +2218,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationMethod: {
if (valueArg > 3) {
- LOGE("Bogus method size %#x", valueArg);
+ ALOGE("Bogus method size %#x", valueArg);
return NULL;
}
u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2227,7 +2227,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationArray: {
if (valueArg != 0) {
- LOGE("Bogus array value_arg %#x", valueArg);
+ ALOGE("Bogus array value_arg %#x", valueArg);
return NULL;
}
data = verifyEncodedArray(state, data, crossVerify);
@@ -2235,7 +2235,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationAnnotation: {
if (valueArg != 0) {
- LOGE("Bogus annotation value_arg %#x", valueArg);
+ ALOGE("Bogus annotation value_arg %#x", valueArg);
return NULL;
}
data = verifyEncodedAnnotation(state, data, crossVerify);
@@ -2243,7 +2243,7 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationNull: {
if (valueArg != 0) {
- LOGE("Bogus null value_arg %#x", valueArg);
+ ALOGE("Bogus null value_arg %#x", valueArg);
return NULL;
}
// Nothing else to do for this type.
@@ -2251,14 +2251,14 @@ static const u1* verifyEncodedValue(const CheckState* state,
}
case kDexAnnotationBoolean: {
if (valueArg > 1) {
- LOGE("Bogus boolean value_arg %#x", valueArg);
+ ALOGE("Bogus boolean value_arg %#x", valueArg);
return NULL;
}
// Nothing else to do for this type.
break;
}
default: {
- LOGE("Bogus value_type %#x", valueType);
+ ALOGE("Bogus value_type %#x", valueType);
return NULL;
}
}
@@ -2275,7 +2275,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
u4 idx = readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus encoded_annotation type_idx");
+ ALOGE("Bogus encoded_annotation type_idx");
return NULL;
}
@@ -2284,7 +2284,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
if (crossVerify) {
const char* descriptor = dexStringByTypeIdx(state->pDexFile, idx);
if (!dexIsClassDescriptor(descriptor)) {
- LOGE("Bogus annotation type: '%s'", descriptor);
+ ALOGE("Bogus annotation type: '%s'", descriptor);
return NULL;
}
}
@@ -2294,7 +2294,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
bool first = true;
if (!okay) {
- LOGE("Bogus encoded_annotation size");
+ ALOGE("Bogus encoded_annotation size");
return NULL;
}
@@ -2302,7 +2302,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
idx = readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
if (!okay) {
- LOGE("Bogus encoded_annotation name_idx");
+ ALOGE("Bogus encoded_annotation name_idx");
return NULL;
}
@@ -2311,7 +2311,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
if (crossVerify) {
const char* name = dexStringById(state->pDexFile, idx);
if (!dexIsValidMemberName(name)) {
- LOGE("Bogus annotation member name: '%s'", name);
+ ALOGE("Bogus annotation member name: '%s'", name);
return NULL;
}
}
@@ -2319,7 +2319,7 @@ static const u1* verifyEncodedAnnotation(const CheckState* state,
if (first) {
first = false;
} else if (lastIdx >= idx) {
- LOGE("Out-of-order encoded_annotation name_idx: %#x then %#x",
+ ALOGE("Out-of-order encoded_annotation name_idx: %#x then %#x",
lastIdx, idx);
return NULL;
}
@@ -2353,7 +2353,7 @@ static void* intraVerifyAnnotationItem(const CheckState* state, void* ptr) {
break;
}
default: {
- LOGE("Bogus annotation visibility: %#x", *data);
+ ALOGE("Bogus annotation visibility: %#x", *data);
return NULL;
}
}
@@ -2402,7 +2402,7 @@ static bool iterateSectionWithOptionalUpdate(CheckState* state,
CHECK_OFFSET_RANGE(offset, newOffset);
while (offset < newOffset) {
if (*ptr != '\0') {
- LOGE("Non-zero padding 0x%02x @ %x", *ptr, offset);
+ ALOGE("Non-zero padding 0x%02x @ %x", *ptr, offset);
return false;
}
ptr++;
@@ -2415,12 +2415,12 @@ static bool iterateSectionWithOptionalUpdate(CheckState* state,
newOffset = fileOffset(state, newPtr);
if (newPtr == NULL) {
- LOGE("Trouble with item %d @ offset %#x", i, offset);
+ ALOGE("Trouble with item %d @ offset %#x", i, offset);
return false;
}
if (newOffset > state->fileLen) {
- LOGE("Item %d @ offset %#x ends out of bounds", i, offset);
+ ALOGE("Item %d @ offset %#x ends out of bounds", i, offset);
return false;
}
@@ -2458,13 +2458,13 @@ static bool checkBoundsAndIterateSection(CheckState* state,
u4 offset, u4 count, u4 expectedOffset, u4 expectedCount,
ItemVisitorFunction* func, u4 alignment, u4* nextOffset) {
if (offset != expectedOffset) {
- LOGE("Bogus offset for section: got %#x; expected %#x",
+ ALOGE("Bogus offset for section: got %#x; expected %#x",
offset, expectedOffset);
return false;
}
if (count != expectedCount) {
- LOGE("Bogus size for section: got %#x; expected %#x",
+ ALOGE("Bogus size for section: got %#x; expected %#x",
count, expectedCount);
return false;
}
@@ -2484,7 +2484,7 @@ static bool iterateDataSection(CheckState* state, u4 offset, u4 count,
assert(nextOffset != NULL);
if ((offset < dataStart) || (offset >= dataEnd)) {
- LOGE("Bogus offset for data subsection: %#x", offset);
+ ALOGE("Bogus offset for data subsection: %#x", offset);
return false;
}
@@ -2494,7 +2494,7 @@ static bool iterateDataSection(CheckState* state, u4 offset, u4 count,
}
if (*nextOffset > dataEnd) {
- LOGE("Out-of-bounds end of data subsection: %#x", *nextOffset);
+ ALOGE("Out-of-bounds end of data subsection: %#x", *nextOffset);
return false;
}
@@ -2527,7 +2527,7 @@ static bool swapEverythingButHeaderAndMap(CheckState* state,
const u1* ptr = (const u1*) filePointer(state, lastOffset);
while (lastOffset < sectionOffset) {
if (*ptr != '\0') {
- LOGE("Non-zero padding 0x%02x before section start @ %x",
+ ALOGE("Non-zero padding 0x%02x before section start @ %x",
*ptr, lastOffset);
okay = false;
break;
@@ -2536,7 +2536,7 @@ static bool swapEverythingButHeaderAndMap(CheckState* state,
lastOffset++;
}
} else if (lastOffset > sectionOffset) {
- LOGE("Section overlap or out-of-order map: %x, %x",
+ ALOGE("Section overlap or out-of-order map: %x, %x",
lastOffset, sectionOffset);
okay = false;
}
@@ -2664,13 +2664,13 @@ static bool swapEverythingButHeaderAndMap(CheckState* state,
break;
}
default: {
- LOGE("Unknown map item type %04x", type);
+ ALOGE("Unknown map item type %04x", type);
return false;
}
}
if (!okay) {
- LOGE("Swap of section type %04x failed", type);
+ ALOGE("Swap of section type %04x failed", type);
}
item++;
@@ -2765,13 +2765,13 @@ static bool crossVerifyEverything(CheckState* state, DexMapList* pMap)
break;
}
default: {
- LOGE("Unknown map item type %04x", item->type);
+ ALOGE("Unknown map item type %04x", item->type);
return false;
}
}
if (!okay) {
- LOGE("Cross-item verify of section type %04x failed",
+ ALOGE("Cross-item verify of section type %04x failed",
item->type);
}
@@ -2788,7 +2788,7 @@ bool dexHasValidMagic(const DexHeader* pHeader)
const u1* version = &magic[4];
if (memcmp(magic, DEX_MAGIC, 4) != 0) {
- LOGE("ERROR: unrecognized magic number (%02x %02x %02x %02x)",
+ ALOGE("ERROR: unrecognized magic number (%02x %02x %02x %02x)",
magic[0], magic[1], magic[2], magic[3]);
return false;
}
@@ -2799,7 +2799,7 @@ bool dexHasValidMagic(const DexHeader* pHeader)
* Magic was correct, but this is an unsupported older or
* newer format variant.
*/
- LOGE("ERROR: unsupported dex version (%02x %02x %02x %02x)",
+ ALOGE("ERROR: unsupported dex version (%02x %02x %02x %02x)",
version[0], version[1], version[2], version[3]);
return false;
}
@@ -2836,7 +2836,7 @@ int dexSwapAndVerify(u1* addr, int len)
if (okay) {
int expectedLen = (int) SWAP4(pHeader->fileSize);
if (len < expectedLen) {
- LOGE("ERROR: Bad length: expected %d, got %d", expectedLen, len);
+ ALOGE("ERROR: Bad length: expected %d, got %d", expectedLen, len);
okay = false;
} else if (len != expectedLen) {
ALOGW("WARNING: Odd length: expected %d, got %d", expectedLen,
@@ -2864,7 +2864,7 @@ int dexSwapAndVerify(u1* addr, int len)
storedFileSize - nonSum);
if (adler != expectedChecksum) {
- LOGE("ERROR: bad checksum (%08lx, expected %08x)",
+ ALOGE("ERROR: bad checksum (%08lx, expected %08x)",
adler, expectedChecksum);
okay = false;
}
@@ -2889,7 +2889,7 @@ int dexSwapAndVerify(u1* addr, int len)
state.pHeader = pHeader;
if (pHeader->headerSize < sizeof(DexHeader)) {
- LOGE("ERROR: Small header size %d, struct %d",
+ ALOGE("ERROR: Small header size %d, struct %d",
pHeader->headerSize, (int) sizeof(DexHeader));
okay = false;
} else if (pHeader->headerSize > sizeof(DexHeader)) {
@@ -2916,13 +2916,13 @@ int dexSwapAndVerify(u1* addr, int len)
okay = okay && crossVerifyEverything(&state, pDexMap);
} else {
- LOGE("ERROR: No map found; impossible to byte-swap and verify");
+ ALOGE("ERROR: No map found; impossible to byte-swap and verify");
okay = false;
}
}
if (!okay) {
- LOGE("ERROR: Byte swap + verify failed");
+ ALOGE("ERROR: Byte swap + verify failed");
}
if (state.pDataMap != NULL) {
@@ -2952,7 +2952,7 @@ int dexSwapAndVerifyIfNecessary(u1* addr, int len)
return dexSwapAndVerify(addr, len);
}
- LOGE("ERROR: Bad magic number (0x%02x %02x %02x %02x)",
+ ALOGE("ERROR: Bad magic number (0x%02x %02x %02x %02x)",
addr[0], addr[1], addr[2], addr[3]);
return 1;
diff --git a/libdex/OptInvocation.cpp b/libdex/OptInvocation.cpp
index 636420a0a..bac2f247d 100644
--- a/libdex/OptInvocation.cpp
+++ b/libdex/OptInvocation.cpp
@@ -63,7 +63,7 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
* the leading "./" out, but it'll do.
*/
if (getcwd(absoluteFile, kBufLen) == NULL) {
- LOGE("Can't get CWD while opening jar file");
+ ALOGE("Can't get CWD while opening jar file");
return NULL;
}
strncat(absoluteFile, "/", kBufLen);
@@ -135,7 +135,7 @@ int dexOptCreateEmptyHeader(int fd)
actual = write(fd, &optHdr, sizeof(optHdr));
if (actual != sizeof(optHdr)) {
int err = errno ? errno : -1;
- LOGE("opt header write failed: %s", strerror(errno));
+ ALOGE("opt header write failed: %s", strerror(errno));
return errno;
}
diff --git a/libdex/SysUtil.cpp b/libdex/SysUtil.cpp
index d3fac5ba5..a412a12c4 100644
--- a/libdex/SysUtil.cpp
+++ b/libdex/SysUtil.cpp
@@ -53,7 +53,7 @@ static void* sysCreateAnonShmem(size_t length)
return ptr;
#else
- LOGE("sysCreateAnonShmem not implemented.");
+ ALOGE("sysCreateAnonShmem not implemented.");
return NULL;
#endif
}
@@ -90,13 +90,13 @@ static int getFileStartAndLength(int fd, off_t *start_, size_t *length_)
(void) lseek(fd, start, SEEK_SET);
if (start == (off_t) -1 || end == (off_t) -1) {
- LOGE("could not determine length of file");
+ ALOGE("could not determine length of file");
return -1;
}
length = end - start;
if (length == 0) {
- LOGE("file is empty");
+ ALOGE("file is empty");
return -1;
}
@@ -131,7 +131,7 @@ int sysLoadFileInShmem(int fd, MemMapping* pMap)
actual = read(fd, memPtr, length);
if (actual != length) {
- LOGE("only read %d of %d bytes", (int) actual, (int) length);
+ ALOGE("only read %d of %d bytes", (int) actual, (int) length);
sysReleaseShmem(pMap);
return -1;
}
@@ -141,7 +141,7 @@ int sysLoadFileInShmem(int fd, MemMapping* pMap)
return 0;
#else
- LOGE("sysLoadFileInShmem not implemented.");
+ ALOGE("sysLoadFileInShmem not implemented.");
return -1;
#endif
}
@@ -301,7 +301,7 @@ int sysMapFileSegmentInShmem(int fd, off_t start, size_t length,
return 0;
#else
- LOGE("sysMapFileSegmentInShmem not implemented.");
+ ALOGE("sysMapFileSegmentInShmem not implemented.");
return -1;
#endif
}
@@ -321,7 +321,7 @@ int sysChangeMapAccess(void* addr, size_t length, int wantReadWrite,
if (addr < pMap->baseAddr ||
(u1*)addr >= (u1*)pMap->baseAddr + pMap->baseLength)
{
- LOGE("Attempted to change %p; map is %p - %p",
+ ALOGE("Attempted to change %p; map is %p - %p",
addr, pMap->baseAddr, (u1*)pMap->baseAddr + pMap->baseLength);
return -1;
}
@@ -394,7 +394,7 @@ int sysWriteFully(int fd, const void* buf, size_t count, const char* logMsg)
ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count));
if (actual < 0) {
int err = errno;
- LOGE("%s: write failed: %s", logMsg, strerror(err));
+ ALOGE("%s: write failed: %s", logMsg, strerror(err));
return err;
} else if (actual != (ssize_t) count) {
ALOGD("%s: partial write (will retry): (%d of %zd)",
diff --git a/libdex/ZipArchive.cpp b/libdex/ZipArchive.cpp
index f242f6447..1cccc3f28 100644
--- a/libdex/ZipArchive.cpp
+++ b/libdex/ZipArchive.cpp
@@ -616,7 +616,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen)
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)",
+ ALOGE("Installed zlib is not compatible with linked version (%s)",
ZLIB_VERSION);
} else {
ALOGW("Call to inflateInit2 failed (zerr=%d)", zerr);
diff --git a/libnativehelper/JNIHelp.cpp b/libnativehelper/JNIHelp.cpp
index d4e4ff3ab..7c0b146d9 100644
--- a/libnativehelper/JNIHelp.cpp
+++ b/libnativehelper/JNIHelp.cpp
@@ -72,12 +72,12 @@ extern "C" int jniRegisterNativeMethods(C_JNIEnv* env, const char* className,
scoped_local_ref<jclass> c(env, findClass(env, className));
if (c.get() == NULL) {
- LOGE("Native registration unable to find class '%s', aborting", className);
+ ALOGE("Native registration unable to find class '%s', aborting", className);
abort();
}
if ((*env)->RegisterNatives(e, c.get(), gMethods, numMethods) < 0) {
- LOGE("RegisterNatives failed for '%s', aborting", className);
+ ALOGE("RegisterNatives failed for '%s', aborting", className);
abort();
}
@@ -220,13 +220,13 @@ extern "C" int jniThrowException(C_JNIEnv* env, const char* className, const cha
scoped_local_ref<jclass> exceptionClass(env, findClass(env, className));
if (exceptionClass.get() == NULL) {
- LOGE("Unable to find exception class %s", className);
+ ALOGE("Unable to find exception class %s", className);
/* ClassNotFoundException now pending */
return -1;
}
if ((*env)->ThrowNew(e, exceptionClass.get(), msg) != JNI_OK) {
- LOGE("Failed throwing '%s' '%s'", className, msg);
+ ALOGE("Failed throwing '%s' '%s'", className, msg);
/* an exception, most likely OOM, will now be pending */
return -1;
}
diff --git a/vm/AllocTracker.cpp b/vm/AllocTracker.cpp
index a3e39e71c..94984ecd9 100644
--- a/vm/AllocTracker.cpp
+++ b/vm/AllocTracker.cpp
@@ -527,7 +527,7 @@ bool dvmGenerateTrackedAllocationReport(u1** pData, size_t* pDataLen)
methodNames = dvmPointerSetAlloc(128);
fileNames = dvmPointerSetAlloc(128);
if (classNames == NULL || methodNames == NULL || fileNames == NULL) {
- LOGE("Failed allocating pointer sets");
+ ALOGE("Failed allocating pointer sets");
goto bail;
}
@@ -569,7 +569,7 @@ bool dvmGenerateTrackedAllocationReport(u1** pData, size_t* pDataLen)
strPtr += outputStringTable(methodNames, strPtr);
strPtr += outputStringTable(fileNames, strPtr);
if (strPtr - buffer != (int)totalSize) {
- LOGE("size mismatch (%d vs %zd)", strPtr - buffer, totalSize);
+ ALOGE("size mismatch (%d vs %zd)", strPtr - buffer, totalSize);
dvmAbort();
}
//dvmPrintHexDump(buffer, totalSize);
diff --git a/vm/AtomicCache.cpp b/vm/AtomicCache.cpp
index 28fcbfef0..a8c82e6ba 100644
--- a/vm/AtomicCache.cpp
+++ b/vm/AtomicCache.cpp
@@ -156,7 +156,7 @@ void dvmUpdateAtomicCache(u4 key1, u4 key2, u4 value, AtomicCacheEntry* pEntry,
newVersion, newVersion & ~ATOMIC_LOCK_FLAG,
(volatile s4*) &pEntry->version) != 0)
{
- //LOGE("unable to reset the instanceof cache ownership");
+ //ALOGE("unable to reset the instanceof cache ownership");
dvmAbort();
}
}
diff --git a/vm/BitVector.cpp b/vm/BitVector.cpp
index 0ef6f6041..53027897f 100644
--- a/vm/BitVector.cpp
+++ b/vm/BitVector.cpp
@@ -104,7 +104,7 @@ void dvmSetBit(BitVector* pBits, unsigned int num)
{
if (num >= pBits->storageSize * sizeof(u4) * 8) {
if (!pBits->expandable) {
- LOGE("Attempt to set bit outside valid range (%d, limit is %d)",
+ ALOGE("Attempt to set bit outside valid range (%d, limit is %d)",
num, pBits->storageSize * sizeof(u4) * 8);
dvmAbort();
}
@@ -114,7 +114,7 @@ void dvmSetBit(BitVector* pBits, unsigned int num)
assert(newSize > pBits->storageSize);
pBits->storage = (u4*)realloc(pBits->storage, newSize * sizeof(u4));
if (pBits->storage == NULL) {
- LOGE("BitVector expansion to %d failed", newSize * sizeof(u4));
+ ALOGE("BitVector expansion to %d failed", newSize * sizeof(u4));
dvmAbort();
}
memset(&pBits->storage[pBits->storageSize], 0x00,
@@ -206,7 +206,7 @@ int dvmCountSetBits(const BitVector* pBits)
static void checkSizes(const BitVector* bv1, const BitVector* bv2)
{
if (bv1->storageSize != bv2->storageSize) {
- LOGE("Mismatched vector sizes (%d, %d)",
+ ALOGE("Mismatched vector sizes (%d, %d)",
bv1->storageSize, bv2->storageSize);
dvmAbort();
}
diff --git a/vm/CheckJni.cpp b/vm/CheckJni.cpp
index 6ca706193..ccb583603 100644
--- a/vm/CheckJni.cpp
+++ b/vm/CheckJni.cpp
@@ -639,7 +639,7 @@ public:
} else if (ch == '.') {
msg += "...";
} else {
- LOGE("unknown trace format specifier %c", ch);
+ ALOGE("unknown trace format specifier %c", ch);
dvmAbort();
}
if (*fmt) {
@@ -694,7 +694,7 @@ public:
va_arg(ap, long); // Skip this argument.
} else if (ch == '.') {
} else {
- LOGE("unknown check format specifier %c", ch);
+ ALOGE("unknown check format specifier %c", ch);
dvmAbort();
}
}
@@ -832,12 +832,12 @@ private:
*/
bool printWarn = false;
if (threadEnv == NULL) {
- LOGE("JNI ERROR: non-VM thread making JNI calls");
+ ALOGE("JNI ERROR: non-VM thread making JNI calls");
// don't set printWarn -- it'll try to call showLocation()
dvmAbort();
} else if ((JNIEnvExt*) mEnv != threadEnv) {
if (dvmThreadSelf()->threadId != threadEnv->envThreadId) {
- LOGE("JNI: threadEnv != thread->env?");
+ ALOGE("JNI: threadEnv != thread->env?");
dvmAbort();
}
@@ -854,7 +854,7 @@ private:
//dvmThrowRuntimeException("invalid use of JNI env ptr");
} else if (((JNIEnvExt*) mEnv)->self != dvmThreadSelf()) {
/* correct JNIEnv*; make sure the "self" pointer is correct */
- LOGE("JNI ERROR: env->self != thread-self (%p vs. %p)",
+ ALOGE("JNI ERROR: env->self != thread-self (%p vs. %p)",
((JNIEnvExt*) mEnv)->self, dvmThreadSelf());
dvmAbort();
}
@@ -1139,7 +1139,7 @@ struct GuardedCopy {
if (memcmp(&pExtra->magic, &kMagicCmp, 4) != 0) {
u1 buf[4];
memcpy(buf, &pExtra->magic, 4);
- LOGE("JNI: guard magic does not match (found 0x%02x%02x%02x%02x) -- incorrect data pointer %p?",
+ ALOGE("JNI: guard magic does not match (found 0x%02x%02x%02x%02x) -- incorrect data pointer %p?",
buf[3], buf[2], buf[1], buf[0], dataBuf); /* assume little endian */
return false;
}
@@ -1150,7 +1150,7 @@ struct GuardedCopy {
const u2* pat = (u2*) fullBuf;
for (size_t i = sizeof(GuardedCopy) / 2; i < (kGuardLen / 2 - sizeof(GuardedCopy)) / 2; i++) {
if (pat[i] != kGuardPattern) {
- LOGE("JNI: guard pattern(1) disturbed at %p + %d", fullBuf, i*2);
+ ALOGE("JNI: guard pattern(1) disturbed at %p + %d", fullBuf, i*2);
return false;
}
}
@@ -1160,7 +1160,7 @@ struct GuardedCopy {
/* odd byte; expected value depends on endian-ness of host */
const u2 patSample = kGuardPattern;
if (fullBuf[offset] != ((const u1*) &patSample)[1]) {
- LOGE("JNI: guard pattern disturbed in odd byte after %p (+%d) 0x%02x 0x%02x",
+ ALOGE("JNI: guard pattern disturbed in odd byte after %p (+%d) 0x%02x 0x%02x",
fullBuf, offset, fullBuf[offset], ((const u1*) &patSample)[1]);
return false;
}
@@ -1171,7 +1171,7 @@ struct GuardedCopy {
pat = (u2*) (fullBuf + offset);
for (size_t i = 0; i < kGuardLen / 4; i++) {
if (pat[i] != kGuardPattern) {
- LOGE("JNI: guard pattern(2) disturbed at %p + %d", fullBuf, offset + i*2);
+ ALOGE("JNI: guard pattern(2) disturbed at %p + %d", fullBuf, offset + i*2);
return false;
}
}
@@ -1185,7 +1185,7 @@ struct GuardedCopy {
uLong adler = adler32(0L, Z_NULL, 0);
adler = adler32(adler, (const Bytef*)dataBuf, len);
if (pExtra->adler != adler) {
- LOGE("JNI: buffer modified (0x%08lx vs 0x%08lx) at addr %p",
+ ALOGE("JNI: buffer modified (0x%08lx vs 0x%08lx) at addr %p",
pExtra->adler, adler, dataBuf);
return false;
}
@@ -1198,7 +1198,7 @@ private:
static u1* debugAlloc(size_t len) {
void* result = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
if (result == MAP_FAILED) {
- LOGE("GuardedCopy::create mmap(%d) failed: %s", len, strerror(errno));
+ ALOGE("GuardedCopy::create mmap(%d) failed: %s", len, strerror(errno));
dvmAbort();
}
return reinterpret_cast<u1*>(result);
@@ -1279,7 +1279,7 @@ static void* releaseGuardedPACopy(JNIEnv* env, jarray jarr, void* dataBuf, int m
ArrayObject* arrObj = (ArrayObject*) dvmDecodeIndirectRef(dvmThreadSelf(), jarr);
if (!GuardedCopy::check(dataBuf, true)) {
- LOGE("JNI: failed guarded copy check in releaseGuardedPACopy");
+ ALOGE("JNI: failed guarded copy check in releaseGuardedPACopy");
abortMaybe();
return NULL;
}
@@ -1708,7 +1708,7 @@ static void Check_ReleaseStringChars(JNIEnv* env, jstring string, const jchar* c
sc.checkNonNull(chars);
if (gDvmJni.forceCopy) {
if (!GuardedCopy::check(chars, false)) {
- LOGE("JNI: failed guarded copy check in ReleaseStringChars");
+ ALOGE("JNI: failed guarded copy check in ReleaseStringChars");
abortMaybe();
return;
}
@@ -1744,7 +1744,7 @@ static void Check_ReleaseStringUTFChars(JNIEnv* env, jstring string, const char*
CHECK_JNI_ENTRY(kFlag_ExcepOkay | kFlag_Release, "Esu", env, string, utf); // TODO: show pointer and truncate string.
if (gDvmJni.forceCopy) {
if (!GuardedCopy::check(utf, false)) {
- LOGE("JNI: failed guarded copy check in ReleaseStringUTFChars");
+ ALOGE("JNI: failed guarded copy check in ReleaseStringUTFChars");
abortMaybe();
return;
}
@@ -1951,7 +1951,7 @@ static void Check_ReleaseStringCritical(JNIEnv* env, jstring string, const jchar
sc.checkNonNull(carray);
if (gDvmJni.forceCopy) {
if (!GuardedCopy::check(carray, false)) {
- LOGE("JNI: failed guarded copy check in ReleaseStringCritical");
+ ALOGE("JNI: failed guarded copy check in ReleaseStringCritical");
abortMaybe();
return;
}
diff --git a/vm/Common.h b/vm/Common.h
index 55ae79bef..abab42374 100644
--- a/vm/Common.h
+++ b/vm/Common.h
@@ -45,7 +45,7 @@
#if !defined(NDEBUG) && defined(WITH_DALVIK_ASSERT)
# undef assert
# define assert(x) \
- ((x) ? ((void)0) : (LOGE("ASSERT FAILED (%s:%d): %s", \
+ ((x) ? ((void)0) : (ALOGE("ASSERT FAILED (%s:%d): %s", \
__FILE__, __LINE__, #x), *(int*)39=39, (void)0) )
#endif
diff --git a/vm/Ddm.cpp b/vm/Ddm.cpp
index dad74841d..d441ec462 100644
--- a/vm/Ddm.cpp
+++ b/vm/Ddm.cpp
@@ -164,7 +164,7 @@ static void broadcast(int event)
Thread* self = dvmThreadSelf();
if (self->status != THREAD_RUNNING) {
- LOGE("ERROR: DDM broadcast with thread status=%d", self->status);
+ ALOGE("ERROR: DDM broadcast with thread status=%d", self->status);
/* try anyway? */
}
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index faf39caef..cbf4305a1 100644
--- a/vm/Debugger.cpp
+++ b/vm/Debugger.cpp
@@ -794,7 +794,7 @@ static bool isTagPrimitive(u1 tag)
case JT_CLASS_LOADER:
return false;
default:
- LOGE("ERROR: unhandled tag '%c'", tag);
+ ALOGE("ERROR: unhandled tag '%c'", tag);
assert(false);
return false;
}
@@ -889,7 +889,7 @@ int dvmDbgGetTagWidth(int tag)
case JT_LONG:
return 8;
default:
- LOGE("ERROR: unhandled tag '%c'", tag);
+ ALOGE("ERROR: unhandled tag '%c'", tag);
assert(false);
return -1;
}
@@ -1504,7 +1504,7 @@ void dvmDbgGetFieldValue(ObjectId objectId, FieldId fieldId, ExpandBuf* pReply)
expandBufAdd8BE(pReply, dvmGetFieldLong(obj, ifield->byteOffset));
break;
default:
- LOGE("ERROR: unhandled field type '%s'", ifield->signature);
+ ALOGE("ERROR: unhandled field type '%s'", ifield->signature);
assert(false);
break;
}
@@ -1551,7 +1551,7 @@ void dvmDbgSetFieldValue(ObjectId objectId, FieldId fieldId, u8 value,
dvmSetFieldLong(obj, field->byteOffset, value);
break;
default:
- LOGE("ERROR: unhandled class type '%s'", field->signature);
+ ALOGE("ERROR: unhandled class type '%s'", field->signature);
assert(false);
break;
}
@@ -1608,7 +1608,7 @@ void dvmDbgGetStaticFieldValue(RefTypeId refTypeId, FieldId fieldId,
expandBufAdd8BE(pReply, value.j);
break;
default:
- LOGE("ERROR: unhandled field type '%s'", sfield->signature);
+ ALOGE("ERROR: unhandled field type '%s'", sfield->signature);
assert(false);
break;
}
@@ -1667,7 +1667,7 @@ void dvmDbgSetStaticFieldValue(RefTypeId refTypeId, FieldId fieldId,
dvmSetStaticFieldDouble(sfield, value.d);
break;
default:
- LOGE("ERROR: unhandled class type '%s'", sfield->signature);
+ ALOGE("ERROR: unhandled class type '%s'", sfield->signature);
assert(false);
break;
}
@@ -2331,7 +2331,7 @@ void dvmDbgGetLocalValue(ObjectId threadId, FrameId frameId, int slot,
set8BE(buf+1, longVal);
break;
default:
- LOGE("ERROR: unhandled tag '%c'", tag);
+ ALOGE("ERROR: unhandled tag '%c'", tag);
assert(false);
break;
}
@@ -2392,7 +2392,7 @@ void dvmDbgSetLocalValue(ObjectId threadId, FrameId frameId, int slot, u1 tag,
case JT_CLASS_LOADER:
/* not expecting these from debugger; fall through to failure */
default:
- LOGE("ERROR: unhandled tag '%c'", tag);
+ ALOGE("ERROR: unhandled tag '%c'", tag);
assert(false);
break;
}
@@ -2581,11 +2581,11 @@ bool dvmDbgConfigureStep(ObjectId threadId, JdwpStepSize size,
thread = threadObjToThread(threadObj);
if (thread == NULL) {
- LOGE("Thread for single-step not found");
+ ALOGE("Thread for single-step not found");
goto bail;
}
if (!dvmIsSuspended(thread)) {
- LOGE("Thread for single-step not suspended");
+ ALOGE("Thread for single-step not suspended");
assert(!"non-susp step"); // I want to know if this can happen
goto bail;
}
diff --git a/vm/DvmDex.cpp b/vm/DvmDex.cpp
index 84f340746..4bad999a3 100644
--- a/vm/DvmDex.cpp
+++ b/vm/DvmDex.cpp
@@ -81,7 +81,7 @@ static DvmDex* allocateAuxStructures(DexFile* pDexFile)
pDvmDex->pResFields == NULL ||
pDvmDex->pInterfaceCache == NULL)
{
- LOGE("Alloc failure in allocateAuxStructures");
+ ALOGE("Alloc failure in allocateAuxStructures");
free(pDvmDex->pResStrings);
free(pDvmDex->pResClasses);
free(pDvmDex->pResMethods);
@@ -112,18 +112,18 @@ int dvmDexFileOpenFromFd(int fd, DvmDex** ppDvmDex)
parseFlags |= kDexParseVerifyChecksum;
if (lseek(fd, 0, SEEK_SET) < 0) {
- LOGE("lseek rewind failed");
+ ALOGE("lseek rewind failed");
goto bail;
}
if (sysMapFileInShmemWritableReadOnly(fd, &memMap) != 0) {
- LOGE("Unable to map file");
+ ALOGE("Unable to map file");
goto bail;
}
pDexFile = dexFileParse((u1*)memMap.addr, memMap.length, parseFlags);
if (pDexFile == NULL) {
- LOGE("DEX parse failed");
+ ALOGE("DEX parse failed");
sysReleaseShmem(&memMap);
goto bail;
}
@@ -167,7 +167,7 @@ int dvmDexFileOpenPartial(const void* addr, int len, DvmDex** ppDvmDex)
pDexFile = dexFileParse((u1*)addr, len, parseFlags);
if (pDexFile == NULL) {
- LOGE("DEX parse failed");
+ ALOGE("DEX parse failed");
goto bail;
}
pDvmDex = allocateAuxStructures(pDexFile);
diff --git a/vm/Exception.cpp b/vm/Exception.cpp
index 081709ab1..8dbec3901 100644
--- a/vm/Exception.cpp
+++ b/vm/Exception.cpp
@@ -120,13 +120,13 @@ void dvmThrowChainedException(ClassObject* excepClass, const char* msg,
* early on in VM initialization. There's nothing better to do
* than just log the message as an error and abort.
*/
- LOGE("Fatal error: %s", msg);
+ ALOGE("Fatal error: %s", msg);
dvmAbort();
}
/* make sure the exception is initialized */
if (!dvmIsClassInitialized(excepClass) && !dvmInitClass(excepClass)) {
- LOGE("ERROR: unable to initialize exception class '%s'",
+ ALOGE("ERROR: unable to initialize exception class '%s'",
excepClass->descriptor);
if (strcmp(excepClass->descriptor, "Ljava/lang/InternalError;") == 0)
dvmAbort();
@@ -147,7 +147,7 @@ void dvmThrowChainedException(ClassObject* excepClass, const char* msg,
*/
if (dvmCheckException(self))
goto bail;
- LOGE("FATAL: unable to allocate exception '%s' '%s'",
+ ALOGE("FATAL: unable to allocate exception '%s' '%s'",
excepClass->descriptor, msg != NULL ? msg : "(no msg)");
dvmAbort();
}
@@ -278,7 +278,7 @@ static bool initException(Object* exception, const char* msg, Object* cause,
if (cause != NULL) {
if (!dvmInstanceof(cause->clazz, gDvm.exThrowable)) {
- LOGE("Tried to init exception with cause '%s'",
+ ALOGE("Tried to init exception with cause '%s'",
cause->clazz->descriptor);
dvmAbort();
}
@@ -539,7 +539,7 @@ void dvmWrapException(const char* newExcepStr)
Object* dvmGetExceptionCause(const Object* exception)
{
if (!dvmInstanceof(exception->clazz, gDvm.exThrowable)) {
- LOGE("Tried to get cause from object of type '%s'",
+ ALOGE("Tried to get cause from object of type '%s'",
exception->clazz->descriptor);
dvmAbort();
}
@@ -1286,7 +1286,7 @@ void dvmThrowExceptionInInitializerError()
* anything fancier, we just abort here with a blatant
* message.
*/
- LOGE("Fatal error during early class initialization:");
+ ALOGE("Fatal error during early class initialization:");
dvmLogExceptionStackTrace();
dvmAbort();
}
diff --git a/vm/Hash.cpp b/vm/Hash.cpp
index ebfc7df56..9bacce0aa 100644
--- a/vm/Hash.cpp
+++ b/vm/Hash.cpp
@@ -220,7 +220,7 @@ void* dvmHashTableLookup(HashTable* pHashTable, u4 itemHash, void* item,
{
if (!resizeHash(pHashTable, pHashTable->tableSize * 2)) {
/* don't really have a way to indicate failure */
- LOGE("Dalvik hash resize failure");
+ ALOGE("Dalvik hash resize failure");
dvmAbort();
}
/* note "pEntry" is now invalid */
diff --git a/vm/IndirectRefTable.cpp b/vm/IndirectRefTable.cpp
index 01a5684f9..69afccd55 100644
--- a/vm/IndirectRefTable.cpp
+++ b/vm/IndirectRefTable.cpp
@@ -93,7 +93,7 @@ IndirectRef IndirectRefTable::add(u4 cookie, Object* obj)
if (topIndex == alloc_entries_) {
/* reached end of allocated space; did we hit buffer max? */
if (topIndex == max_entries_) {
- LOGE("JNI ERROR (app bug): %s reference table overflow (max=%d)",
+ ALOGE("JNI ERROR (app bug): %s reference table overflow (max=%d)",
indirectRefKindToString(kind_), max_entries_);
return NULL;
}
@@ -107,7 +107,7 @@ IndirectRef IndirectRefTable::add(u4 cookie, Object* obj)
IndirectRefSlot* newTable =
(IndirectRefSlot*) realloc(table_, newSize * sizeof(IndirectRefSlot));
if (table_ == NULL) {
- LOGE("JNI ERROR (app bug): unable to expand %s reference table "
+ ALOGE("JNI ERROR (app bug): unable to expand %s reference table "
"(from %d to %d, max=%d)",
indirectRefKindToString(kind_),
alloc_entries_, newSize, max_entries_);
@@ -145,7 +145,7 @@ Object* IndirectRefTable::get(IndirectRef iref) const {
return kInvalidIndirectRefObject;
}
if (kind == kIndirectKindInvalid) {
- LOGE("JNI ERROR (app bug): invalid %s reference %p",
+ ALOGE("JNI ERROR (app bug): invalid %s reference %p",
indirectRefKindToString(kind_), iref);
abortMaybe();
return kInvalidIndirectRefObject;
@@ -158,7 +158,7 @@ Object* IndirectRefTable::get(IndirectRef iref) const {
u4 index = extractIndex(iref);
if (index >= topIndex) {
/* bad -- stale reference? */
- LOGE("JNI ERROR (app bug): accessed stale %s reference %p (index %d in a table of size %d)",
+ ALOGE("JNI ERROR (app bug): accessed stale %s reference %p (index %d in a table of size %d)",
indirectRefKindToString(kind_), iref, index, topIndex);
abortMaybe();
return kInvalidIndirectRefObject;
@@ -174,7 +174,7 @@ Object* IndirectRefTable::get(IndirectRef iref) const {
u4 serial = extractSerial(iref);
if (serial != table_[index].serial) {
- LOGE("JNI ERROR (app bug): attempt to use stale %s reference %p",
+ ALOGE("JNI ERROR (app bug): attempt to use stale %s reference %p",
indirectRefKindToString(kind_), iref);
abortMaybe();
return kInvalidIndirectRefObject;
diff --git a/vm/Init.cpp b/vm/Init.cpp
index 64cf3b40f..80cf9f64e 100644
--- a/vm/Init.cpp
+++ b/vm/Init.cpp
@@ -323,7 +323,7 @@ static bool handleJdwpOption(const char* name, const char* value)
} else if (strcmp(value, "dt_android_adb") == 0) {
gDvm.jdwpTransport = kJdwpTransportAndroidAdb;
} else {
- LOGE("JDWP transport '%s' not supported", value);
+ ALOGE("JDWP transport '%s' not supported", value);
return false;
}
} else if (strcmp(name, "server") == 0) {
@@ -332,7 +332,7 @@ static bool handleJdwpOption(const char* name, const char* value)
else if (*value == 'y')
gDvm.jdwpServer = true;
else {
- LOGE("JDWP option 'server' must be 'y' or 'n'");
+ ALOGE("JDWP option 'server' must be 'y' or 'n'");
return false;
}
} else if (strcmp(name, "suspend") == 0) {
@@ -341,7 +341,7 @@ static bool handleJdwpOption(const char* name, const char* value)
else if (*value == 'y')
gDvm.jdwpSuspend = true;
else {
- LOGE("JDWP option 'suspend' must be 'y' or 'n'");
+ ALOGE("JDWP option 'suspend' must be 'y' or 'n'");
return false;
}
} else if (strcmp(name, "address") == 0) {
@@ -358,12 +358,12 @@ static bool handleJdwpOption(const char* name, const char* value)
value = colon + 1;
}
if (*value == '\0') {
- LOGE("JDWP address missing port");
+ ALOGE("JDWP address missing port");
return false;
}
port = strtol(value, &end, 10);
if (*end != '\0') {
- LOGE("JDWP address has junk in port field '%s'", value);
+ ALOGE("JDWP address has junk in port field '%s'", value);
return false;
}
gDvm.jdwpPort = port;
@@ -400,14 +400,14 @@ static bool parseJdwpOptions(const char* str)
value = strchr(name, '=');
if (value == NULL) {
- LOGE("JDWP opts: garbage at '%s'", name);
+ ALOGE("JDWP opts: garbage at '%s'", name);
goto bail;
}
comma = strchr(name, ','); // use name, not value, for safety
if (comma != NULL) {
if (comma < value) {
- LOGE("JDWP opts: found comma before '=' in '%s'", mangle);
+ ALOGE("JDWP opts: found comma before '=' in '%s'", mangle);
goto bail;
}
*comma = '\0';
@@ -429,11 +429,11 @@ static bool parseJdwpOptions(const char* str)
* Make sure the combination of arguments makes sense.
*/
if (gDvm.jdwpTransport == kJdwpTransportUnknown) {
- LOGE("JDWP opts: must specify transport");
+ ALOGE("JDWP opts: must specify transport");
goto bail;
}
if (!gDvm.jdwpServer && (gDvm.jdwpHost == NULL || gDvm.jdwpPort == 0)) {
- LOGE("JDWP opts: when server=n, must specify host and port");
+ ALOGE("JDWP opts: when server=n, must specify host and port");
goto bail;
}
// transport mandatory
@@ -1105,7 +1105,7 @@ static void busCatcher(int signum, siginfo_t* info, void* context)
{
void* addr = info->si_addr;
- LOGE("Caught a SIGBUS (%d), addr=%p", signum, addr);
+ ALOGE("Caught a SIGBUS (%d), addr=%p", signum, addr);
/*
* If we return at this point the SIGBUS just keeps happening, so we
@@ -1374,9 +1374,9 @@ std::string dvmStartup(int argc, const char* const argv[],
#ifndef NDEBUG
if (!dvmTestHash())
- LOGE("dvmTestHash FAILED");
+ ALOGE("dvmTestHash FAILED");
if (false /*noisy!*/ && !dvmTestIndirectRefTable())
- LOGE("dvmTestIndirectRefTable FAILED");
+ ALOGE("dvmTestIndirectRefTable FAILED");
#endif
if (dvmCheckException(dvmThreadSelf())) {
@@ -1411,7 +1411,7 @@ static bool registerSystemNatives(JNIEnv* pEnv)
self->status = THREAD_NATIVE;
if (jniRegisterSystemMethods(pEnv) < 0) {
- LOGE("jniRegisterSystemMethods failed");
+ ALOGE("jniRegisterSystemMethods failed");
return false;
}
@@ -1527,7 +1527,7 @@ static bool initJdwp()
if (gDvm.jdwpHost != NULL) {
if (strlen(gDvm.jdwpHost) >= sizeof(params.host)-1) {
- LOGE("ERROR: hostname too long: '%s'", gDvm.jdwpHost);
+ ALOGE("ERROR: hostname too long: '%s'", gDvm.jdwpHost);
return false;
}
strcpy(params.host, gDvm.jdwpHost);
@@ -1769,7 +1769,7 @@ void dvmPrintNativeBackTrace()
*/
char** strings = backtrace_symbols(stackFrames, frameCount);
if (strings == NULL) {
- LOGE("backtrace_symbols failed: %s", strerror(errno));
+ ALOGE("backtrace_symbols failed: %s", strerror(errno));
return;
}
@@ -1828,7 +1828,7 @@ void dvmAbort()
result += messageBuffer[i];
}
- LOGE("VM aborting");
+ ALOGE("VM aborting");
fflush(NULL); // flush all open file buffers
diff --git a/vm/InitRefs.cpp b/vm/InitRefs.cpp
index 6fddf9a2f..c4836045b 100644
--- a/vm/InitRefs.cpp
+++ b/vm/InitRefs.cpp
@@ -33,7 +33,7 @@ static bool initClassReference(ClassObject** pClass, const char* name) {
}
if (result == NULL) {
- LOGE("Could not find essential class %s", name);
+ ALOGE("Could not find essential class %s", name);
return false;
}
@@ -156,7 +156,7 @@ static bool initFieldOffset(ClassObject* clazz, int *pOffset,
const char* name, const char* type) {
int offset = dvmFindFieldOffset(clazz, name, type);
if (offset < 0) {
- LOGE("Could not find essential field %s.%s of type %s", clazz->descriptor, name, type);
+ ALOGE("Could not find essential field %s.%s of type %s", clazz->descriptor, name, type);
return false;
}
@@ -279,7 +279,7 @@ static bool initFieldOffsets() {
const struct FieldInfo* fields = classes[i].fields;
if (clazz == NULL) {
- LOGE("Could not find essential class %s for field lookup", className);
+ ALOGE("Could not find essential class %s for field lookup", className);
return false;
}
@@ -299,7 +299,7 @@ static bool initDirectMethodReferenceByClass(Method** pMethod, ClassObject* claz
Method* method = dvmFindDirectMethodByDescriptor(clazz, name, descriptor);
if (method == NULL) {
- LOGE("Could not find essential direct method %s.%s with descriptor %s",
+ ALOGE("Could not find essential direct method %s.%s with descriptor %s",
clazz->descriptor, name, descriptor);
return false;
}
@@ -313,7 +313,7 @@ static bool initDirectMethodReference(Method** pMethod, const char* className,
ClassObject* clazz = dvmFindSystemClassNoInit(className);
if (clazz == NULL) {
- LOGE("Could not find essential class %s for direct method lookup", className);
+ ALOGE("Could not find essential class %s for direct method lookup", className);
return false;
}
@@ -396,14 +396,14 @@ static bool initVirtualMethodOffset(int* pOffset, const char* className,
ClassObject* clazz = dvmFindSystemClassNoInit(className);
if (clazz == NULL) {
- LOGE("Could not find essential class %s for virtual method lookup", className);
+ ALOGE("Could not find essential class %s for virtual method lookup", className);
return false;
}
Method* method = dvmFindVirtualMethodByDescriptor(clazz, name, descriptor);
if (method == NULL) {
- LOGE("Could not find essential virtual method %s.%s with descriptor %s",
+ ALOGE("Could not find essential virtual method %s.%s with descriptor %s",
clazz->descriptor, name, descriptor);
return false;
}
@@ -452,7 +452,7 @@ static bool initFinalizerReference()
static bool verifyStringOffset(const char* name, int actual, int expected) {
if (actual != expected) {
- LOGE("InitRefs: String.%s offset = %d; expected %d", name, actual, expected);
+ ALOGE("InitRefs: String.%s offset = %d; expected %d", name, actual, expected);
return false;
}
@@ -497,7 +497,7 @@ bool dvmFindRequiredClassesAndMembers() {
/* (documented in header) */
bool dvmFindReferenceMembers(ClassObject* classReference) {
if (strcmp(classReference->descriptor, "Ljava/lang/ref/Reference;") != 0) {
- LOGE("Attempt to set up the wrong class as Reference");
+ ALOGE("Attempt to set up the wrong class as Reference");
return false;
}
return initFieldOffset(classReference, &gDvm.offJavaLangRefReference_pendingNext,
diff --git a/vm/InlineNative.cpp b/vm/InlineNative.cpp
index 6e3f3730c..79005486c 100644
--- a/vm/InlineNative.cpp
+++ b/vm/InlineNative.cpp
@@ -180,9 +180,9 @@ static void badMatch(StringObject* thisStrObj, StringObject* compStrObj,
thisStr = dvmCreateCstrFromString(thisStrObj);
compStr = dvmCreateCstrFromString(compStrObj);
- LOGE("%s expected %d got %d", compareType, expectResult, newResult);
- LOGE(" this (o=%d l=%d) '%s'", thisOffset, thisCount, thisStr);
- LOGE(" comp (o=%d l=%d) '%s'", compOffset, compCount, compStr);
+ ALOGE("%s expected %d got %d", compareType, expectResult, newResult);
+ ALOGE(" this (o=%d l=%d) '%s'", thisOffset, thisCount, thisStr);
+ ALOGE(" comp (o=%d l=%d) '%s'", compOffset, compCount, compStr);
dvmPrintHexDumpEx(ANDROID_LOG_INFO, LOG_TAG,
((const u2*) thisArray->contents) + thisOffset, thisCount*2,
kHexDumpLocal);
@@ -823,7 +823,7 @@ Method* dvmFindInlinableMethod(const char* classDescriptor,
*/
ClassObject* clazz = dvmFindClassNoInit(classDescriptor, NULL);
if (clazz == NULL) {
- LOGE("dvmFindInlinableMethod: can't find class '%s'",
+ ALOGE("dvmFindInlinableMethod: can't find class '%s'",
classDescriptor);
dvmClearException(dvmThreadSelf());
return NULL;
@@ -840,7 +840,7 @@ Method* dvmFindInlinableMethod(const char* classDescriptor,
methodSignature);
}
if (method == NULL) {
- LOGE("dvmFindInlinableMethod: can't find method %s.%s %s",
+ ALOGE("dvmFindInlinableMethod: can't find method %s.%s %s",
clazz->descriptor, methodName, methodSignature);
return NULL;
}
@@ -849,13 +849,13 @@ Method* dvmFindInlinableMethod(const char* classDescriptor,
* Check that the method is appropriate for inlining.
*/
if (!dvmIsFinalClass(clazz) && !dvmIsFinalMethod(method)) {
- LOGE("dvmFindInlinableMethod: can't inline non-final method %s.%s",
+ ALOGE("dvmFindInlinableMethod: can't inline non-final method %s.%s",
clazz->descriptor, method->name);
return NULL;
}
if (dvmIsSynchronizedMethod(method) ||
dvmIsDeclaredSynchronizedMethod(method)) {
- LOGE("dvmFindInlinableMethod: can't inline synchronized method %s.%s",
+ ALOGE("dvmFindInlinableMethod: can't inline synchronized method %s.%s",
clazz->descriptor, method->name);
return NULL;
}
diff --git a/vm/JarFile.cpp b/vm/JarFile.cpp
index a3989960e..3a037a057 100644
--- a/vm/JarFile.cpp
+++ b/vm/JarFile.cpp
@@ -136,7 +136,7 @@ DexCacheStatus dvmDexCacheStatus(const char *fileName)
*/
if (!dvmUnlockCachedDexFile(fd)) {
/* uh oh -- this process needs to exit or we'll wedge the system */
- LOGE("Unable to unlock DEX file");
+ ALOGE("Unable to unlock DEX file");
goto bail;
}
@@ -158,8 +158,8 @@ DexCacheStatus dvmDexCacheStatus(const char *fileName)
ALOGV("Using alternate file (odex) for %s ...", fileName);
if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
- LOGE("%s odex has stale dependencies", fileName);
- LOGE("odex source not available -- failing");
+ ALOGE("%s odex has stale dependencies", fileName);
+ ALOGE("odex source not available -- failing");
result = DEX_CACHE_STALE_ODEX;
goto bail;
} else {
@@ -219,7 +219,7 @@ int dvmJarFileOpen(const char* fileName, const char* odexOutputName,
if (fd >= 0) {
ALOGV("Using alternate file (odex) for %s ...", fileName);
if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
- LOGE("%s odex has stale dependencies", fileName);
+ ALOGE("%s odex has stale dependencies", fileName);
free(cachedName);
cachedName = NULL;
close(fd);
@@ -304,7 +304,7 @@ tryArchive:
}
if (!result) {
- LOGE("Unable to extract+optimize DEX from '%s'",
+ ALOGE("Unable to extract+optimize DEX from '%s'",
fileName);
goto bail;
}
@@ -335,7 +335,7 @@ tryArchive:
/* unlock the fd */
if (!dvmUnlockCachedDexFile(fd)) {
/* uh oh -- this process needs to exit or we'll wedge the system */
- LOGE("Unable to unlock DEX file");
+ ALOGE("Unable to unlock DEX file");
goto bail;
}
locked = false;
diff --git a/vm/Jni.cpp b/vm/Jni.cpp
index 39b335669..952084ef7 100644
--- a/vm/Jni.cpp
+++ b/vm/Jni.cpp
@@ -214,7 +214,7 @@ public:
// that we use the correct per-thread indirect reference table.
Thread* self = gDvmJni.workAroundAppJniBugs ? dvmThreadSelf() : mSelf;
if (self != mSelf) {
- LOGE("JNI ERROR: env->self != thread-self (%p vs. %p); auto-correcting", mSelf, self);
+ ALOGE("JNI ERROR: env->self != thread-self (%p vs. %p); auto-correcting", mSelf, self);
mSelf = self;
}
}
@@ -317,7 +317,7 @@ Object* dvmDecodeIndirectRef(Thread* self, jobject jobj) {
{
Object* result = self->jniLocalRefTable.get(jobj);
if (UNLIKELY(result == NULL)) {
- LOGE("JNI ERROR (app bug): use of deleted local reference (%p)", jobj);
+ ALOGE("JNI ERROR (app bug): use of deleted local reference (%p)", jobj);
dvmAbort();
}
return result;
@@ -329,7 +329,7 @@ Object* dvmDecodeIndirectRef(Thread* self, jobject jobj) {
ScopedPthreadMutexLock lock(&gDvm.jniGlobalRefLock);
Object* result = pRefTable->get(jobj);
if (UNLIKELY(result == NULL)) {
- LOGE("JNI ERROR (app bug): use of deleted global reference (%p)", jobj);
+ ALOGE("JNI ERROR (app bug): use of deleted global reference (%p)", jobj);
dvmAbort();
}
return result;
@@ -343,7 +343,7 @@ Object* dvmDecodeIndirectRef(Thread* self, jobject jobj) {
if (result == kClearedJniWeakGlobal) {
result = NULL;
} else if (UNLIKELY(result == NULL)) {
- LOGE("JNI ERROR (app bug): use of deleted weak global reference (%p)", jobj);
+ ALOGE("JNI ERROR (app bug): use of deleted weak global reference (%p)", jobj);
dvmAbort();
}
return result;
@@ -362,7 +362,7 @@ Object* dvmDecodeIndirectRef(Thread* self, jobject jobj) {
static void AddLocalReferenceFailure(IndirectRefTable* pRefTable) {
pRefTable->dump("JNI local");
- LOGE("Failed adding to JNI local ref table (has %zd entries)", pRefTable->capacity());
+ ALOGE("Failed adding to JNI local ref table (has %zd entries)", pRefTable->capacity());
dvmDumpThread(dvmThreadSelf(), false);
dvmAbort(); // spec says call FatalError; this is equivalent
}
@@ -484,7 +484,7 @@ static jobject addGlobalReference(Object* obj) {
jobject jobj = (jobject) gDvm.jniGlobalRefTable.add(IRT_FIRST_SEGMENT, obj);
if (jobj == NULL) {
gDvm.jniGlobalRefTable.dump("JNI global");
- LOGE("Failed adding to JNI global ref table (%zd entries)",
+ ALOGE("Failed adding to JNI global ref table (%zd entries)",
gDvm.jniGlobalRefTable.capacity());
dvmAbort();
}
@@ -508,7 +508,7 @@ static jobject addGlobalReference(Object* obj) {
ALOGW("Excessive JNI global references (%d)", count);
} else {
gDvm.jniGlobalRefTable.dump("JNI global");
- LOGE("Excessive JNI global references (%d)", count);
+ ALOGE("Excessive JNI global references (%d)", count);
dvmAbort();
}
}
@@ -527,7 +527,7 @@ static jobject addWeakGlobalReference(Object* obj) {
jobject jobj = (jobject) table->add(IRT_FIRST_SEGMENT, obj);
if (jobj == NULL) {
gDvm.jniWeakGlobalRefTable.dump("JNI weak global");
- LOGE("Failed adding to JNI weak global ref table (%zd entries)", table->capacity());
+ ALOGE("Failed adding to JNI weak global ref table (%zd entries)", table->capacity());
dvmAbort();
}
return jobj;
@@ -589,7 +589,7 @@ static void pinPrimitiveArray(ArrayObject* arrayObj) {
if (!dvmAddToReferenceTable(&gDvm.jniPinRefTable, (Object*)arrayObj)) {
dvmDumpReferenceTable(&gDvm.jniPinRefTable, "JNI pinned array");
- LOGE("Failed adding to JNI pinned array ref table (%d entries)",
+ ALOGE("Failed adding to JNI pinned array ref table (%d entries)",
(int) dvmReferenceTableEntries(&gDvm.jniPinRefTable));
dvmDumpThread(dvmThreadSelf(), false);
dvmAbort();
@@ -688,15 +688,15 @@ static void dumpMethods(Method* methods, size_t methodCount, const char* name) {
Method* method = &methods[i];
if (strcmp(name, method->name) == 0) {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGE("Candidate: %s.%s:%s", method->clazz->descriptor, name, desc);
+ ALOGE("Candidate: %s.%s:%s", method->clazz->descriptor, name, desc);
free(desc);
}
}
}
static void dumpCandidateMethods(ClassObject* clazz, const char* methodName, const char* signature) {
- LOGE("ERROR: couldn't find native method");
- LOGE("Requested: %s.%s:%s", clazz->descriptor, methodName, signature);
+ ALOGE("ERROR: couldn't find native method");
+ ALOGE("Requested: %s.%s:%s", clazz->descriptor, methodName, signature);
dumpMethods(clazz->virtualMethods, clazz->virtualMethodCount, methodName);
dumpMethods(clazz->directMethods, clazz->directMethodCount, methodName);
}
@@ -739,7 +739,7 @@ static bool dvmRegisterJNIMethod(ClassObject* clazz, const char* methodName,
if (dvmIsSynchronizedMethod(method)) {
// Synchronization is usually provided by the JNI bridge,
// but we won't have one.
- LOGE("fast JNI method %s.%s:%s cannot be synchronized",
+ ALOGE("fast JNI method %s.%s:%s cannot be synchronized",
clazz->descriptor, methodName, signature);
return false;
}
@@ -747,7 +747,7 @@ static bool dvmRegisterJNIMethod(ClassObject* clazz, const char* methodName,
// There's no real reason for this constraint, but since we won't
// be supplying a JNIEnv* or a jobject 'this', you're effectively
// static anyway, so it seems clearer to say so.
- LOGE("fast JNI method %s.%s:%s cannot be non-static",
+ ALOGE("fast JNI method %s.%s:%s cannot be non-static",
clazz->descriptor, methodName, signature);
return false;
}
@@ -957,14 +957,14 @@ static void trackMonitorEnter(Thread* self, Object* obj) {
assert(refTable->maxEntries == 0);
if (!dvmInitReferenceTable(refTable, kInitialSize, INT_MAX)) {
- LOGE("Unable to initialize monitor tracking table");
+ ALOGE("Unable to initialize monitor tracking table");
dvmAbort();
}
}
if (!dvmAddToReferenceTable(refTable, obj)) {
/* ran out of memory? could throw exception instead */
- LOGE("Unable to add entry to monitor tracking table");
+ ALOGE("Unable to add entry to monitor tracking table");
dvmAbort();
} else {
LOGVV("--- added monitor %p", obj);
@@ -978,7 +978,7 @@ static void trackMonitorExit(Thread* self, Object* obj) {
ReferenceTable* pRefTable = &self->jniMonitorRefTable;
if (!dvmRemoveFromReferenceTable(pRefTable, pRefTable->table, obj)) {
- LOGE("JNI monitor %p not found in tracking list", obj);
+ ALOGE("JNI monitor %p not found in tracking list", obj);
/* keep going? */
} else {
LOGVV("--- removed monitor %p", obj);
@@ -1401,7 +1401,7 @@ static void ExceptionClear(JNIEnv* env) {
*/
static void FatalError(JNIEnv* env, const char* msg) {
//dvmChangeStatus(NULL, THREAD_RUNNING);
- LOGE("JNI posting fatal error: %s", msg);
+ ALOGE("JNI posting fatal error: %s", msg);
dvmAbort();
}
@@ -3349,7 +3349,7 @@ void dvmDestroyJNIEnv(JNIEnv* env) {
void dvmLateEnableCheckedJni() {
JNIEnvExt* extEnv = dvmGetJNIEnvForThread();
if (extEnv == NULL) {
- LOGE("dvmLateEnableCheckedJni: thread has no JNIEnv");
+ ALOGE("dvmLateEnableCheckedJni: thread has no JNIEnv");
return;
}
JavaVMExt* extVm = (JavaVMExt*) gDvmJni.jniVm;
diff --git a/vm/LinearAlloc.cpp b/vm/LinearAlloc.cpp
index d5490cd27..de49bf354 100644
--- a/vm/LinearAlloc.cpp
+++ b/vm/LinearAlloc.cpp
@@ -134,7 +134,7 @@ LinearAllocHdr* dvmLinearAllocCreate(Object* classLoader)
fd = ashmem_create_region("dalvik-LinearAlloc", DEFAULT_MAX_LENGTH);
if (fd < 0) {
- LOGE("ashmem LinearAlloc failed %s", strerror(errno));
+ ALOGE("ashmem LinearAlloc failed %s", strerror(errno));
free(pHdr);
return NULL;
}
@@ -142,7 +142,7 @@ LinearAllocHdr* dvmLinearAllocCreate(Object* classLoader)
pHdr->mapAddr = (char*)mmap(NULL, pHdr->mapLength, PROT_READ | PROT_WRITE,
MAP_PRIVATE, fd, 0);
if (pHdr->mapAddr == MAP_FAILED) {
- LOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
+ ALOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
strerror(errno));
free(pHdr);
close(fd);
@@ -156,7 +156,7 @@ LinearAllocHdr* dvmLinearAllocCreate(Object* classLoader)
pHdr->mapAddr = mmap(NULL, pHdr->mapLength, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (pHdr->mapAddr == MAP_FAILED) {
- LOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
+ ALOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
strerror(errno));
free(pHdr);
return NULL;
@@ -312,7 +312,7 @@ void* dvmLinearAlloc(Object* classLoader, size_t size)
* works if the users of these functions actually free everything
* they allocate.
*/
- LOGE("LinearAlloc exceeded capacity (%d), last=%d",
+ ALOGE("LinearAlloc exceeded capacity (%d), last=%d",
pHdr->mapLength, (int) size);
dvmAbort();
}
@@ -354,7 +354,7 @@ void* dvmLinearAlloc(Object* classLoader, size_t size)
LOGVV("--- calling mprotect(start=%d len=%d RW)", start, len);
cc = mprotect(pHdr->mapAddr + start, len, PROT_READ | PROT_WRITE);
if (cc != 0) {
- LOGE("LinearAlloc mprotect (+%d %d) failed: %s",
+ ALOGE("LinearAlloc mprotect (+%d %d) failed: %s",
start, len, strerror(errno));
/* we're going to fail soon, might as do it now */
dvmAbort();
@@ -487,7 +487,7 @@ static void updatePages(Object* classLoader, void* mem, int direction)
}
if (pHdr->writeRefCount[i] == 0) {
- LOGE("Can't make page %d any less writable", i);
+ ALOGE("Can't make page %d any less writable", i);
dvmAbort();
}
pHdr->writeRefCount[i]--;
@@ -502,7 +502,7 @@ static void updatePages(Object* classLoader, void* mem, int direction)
* Trying to mark writable.
*/
if (pHdr->writeRefCount[i] >= 32767) {
- LOGE("Can't make page %d any more writable", i);
+ ALOGE("Can't make page %d any more writable", i);
dvmAbort();
}
if (pHdr->writeRefCount[i] == 0) {
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index b00325080..1299c22ce 100644
--- a/vm/Misc.cpp
+++ b/vm/Misc.cpp
@@ -184,7 +184,7 @@ void dvmPrintDebugMessage(const DebugOutputTarget* target, const char* format,
vfprintf(target->data.file.fp, format, args);
break;
default:
- LOGE("unexpected 'which' %d", target->which);
+ ALOGE("unexpected 'which' %d", target->which);
break;
}
diff --git a/vm/Native.cpp b/vm/Native.cpp
index 0c2d6d353..6ccd1ea8a 100644
--- a/vm/Native.cpp
+++ b/vm/Native.cpp
@@ -97,8 +97,8 @@ void dvmResolveNativeMethod(const u4* args, JValue* pResult,
free(desc);
}
if (dvmIsSynchronizedMethod(method)) {
- LOGE("ERROR: internal-native can't be declared 'synchronized'");
- LOGE("Failing on %s.%s", method->clazz->descriptor, method->name);
+ ALOGE("ERROR: internal-native can't be declared 'synchronized'");
+ ALOGE("Failing on %s.%s", method->clazz->descriptor, method->name);
dvmAbort(); // harsh, but this is VM-internal problem
}
DalvikBridgeFunc dfunc = (DalvikBridgeFunc) infunc;
@@ -753,7 +753,7 @@ bail:
static void* lookupSharedLibMethod(const Method* method)
{
if (gDvm.nativeLibs == NULL) {
- LOGE("Unexpected init state: nativeLibs not ready");
+ ALOGE("Unexpected init state: nativeLibs not ready");
dvmAbort();
}
return (void*) dvmHashForeach(gDvm.nativeLibs, findMethodInLib,
diff --git a/vm/PointerSet.cpp b/vm/PointerSet.cpp
index d34fcff2e..21fea1554 100644
--- a/vm/PointerSet.cpp
+++ b/vm/PointerSet.cpp
@@ -133,7 +133,7 @@ bool dvmPointerSetAddEntry(PointerSet* pSet, const void* ptr)
LOGVV("expanding %p to %d", pSet, pSet->alloc);
newList = (const void**)realloc(pSet->list, pSet->alloc * sizeof(void*));
if (newList == NULL) {
- LOGE("Failed expanding ptr set (alloc=%d)", pSet->alloc);
+ ALOGE("Failed expanding ptr set (alloc=%d)", pSet->alloc);
dvmAbort();
}
pSet->list = newList;
diff --git a/vm/Profile.cpp b/vm/Profile.cpp
index 3be0694a2..572abff71 100644
--- a/vm/Profile.cpp
+++ b/vm/Profile.cpp
@@ -124,7 +124,7 @@ static inline u8 getThreadCpuTimeInUsec()
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
if (!(tm.tv_nsec >= 0 && tm.tv_nsec < 1*1000*1000*1000)) {
- LOGE("bad nsec: %ld", tm.tv_nsec);
+ ALOGE("bad nsec: %ld", tm.tv_nsec);
dvmAbort();
}
return tm.tv_sec * 1000000LL + tm.tv_nsec / 1000;
@@ -209,7 +209,7 @@ bool dvmProfilingStartup()
MAP_SHARED, fd, 0);
close(fd);
if (gDvm.emulatorTracePage == MAP_FAILED) {
- LOGE("Unable to mmap /dev/qemu_trace");
+ ALOGE("Unable to mmap /dev/qemu_trace");
gDvm.emulatorTracePage = NULL;
} else {
*(u4*) gDvm.emulatorTracePage = 0;
@@ -246,7 +246,7 @@ static void updateActiveProfilers(ExecutionSubModes newMode, bool enable)
oldValue = gDvm.activeProfilers;
newValue = oldValue + (enable ? 1 : -1);
if (newValue < 0) {
- LOGE("Can't have %d active profilers", newValue);
+ ALOGE("Can't have %d active profilers", newValue);
dvmAbort();
}
} while (android_atomic_release_cas(oldValue, newValue,
@@ -394,7 +394,7 @@ void dvmMethodTraceStart(const char* traceFileName, int traceFd, int bufferSize,
}
if (state->traceFile == NULL) {
int err = errno;
- LOGE("Unable to open trace file '%s': %s",
+ ALOGE("Unable to open trace file '%s': %s",
traceFileName, strerror(err));
dvmThrowExceptionFmt(gDvm.exRuntimeException,
"Unable to open trace file '%s': %s",
@@ -652,7 +652,7 @@ void dvmMethodTraceStop()
state->traceFile = open_memstream(&memStreamPtr, &memStreamSize);
if (state->traceFile == NULL) {
/* not expected */
- LOGE("Unable to open memstream");
+ ALOGE("Unable to open memstream");
dvmAbort();
}
}
@@ -707,7 +707,7 @@ void dvmMethodTraceStop()
/* append the profiling data */
if (fwrite(state->buf, finalCurOffset, 1, state->traceFile) != 1) {
int err = errno;
- LOGE("trace fwrite(%d) failed: %s",
+ ALOGE("trace fwrite(%d) failed: %s",
finalCurOffset, strerror(err));
dvmThrowExceptionFmt(gDvm.exRuntimeException,
"Trace data write failed: %s", strerror(err));
@@ -953,7 +953,7 @@ void dvmEmulatorTraceStart()
void dvmEmulatorTraceStop()
{
if (gDvm.emulatorTraceEnableCount == 0) {
- LOGE("ERROR: emulator tracing not enabled");
+ ALOGE("ERROR: emulator tracing not enabled");
return;
}
/* in theory we should make this an atomic inc; in practice not important */
@@ -981,7 +981,7 @@ void dvmStartInstructionCounting()
void dvmStopInstructionCounting()
{
if (gDvm.instructionCountEnableCount == 0) {
- LOGE("ERROR: instruction counting not enabled");
+ ALOGE("ERROR: instruction counting not enabled");
dvmAbort();
}
gDvm.instructionCountEnableCount--;
diff --git a/vm/RawDexFile.cpp b/vm/RawDexFile.cpp
index d8df65507..45987671f 100644
--- a/vm/RawDexFile.cpp
+++ b/vm/RawDexFile.cpp
@@ -33,7 +33,7 @@
static int copyFileToFile(int destFd, int srcFd, size_t size)
{
if (lseek(srcFd, 0, SEEK_SET) != 0) {
- LOGE("lseek failure: %s", strerror(errno));
+ ALOGE("lseek failure: %s", strerror(errno));
return -1;
}
@@ -49,7 +49,7 @@ static int getModTimeAndSize(int fd, u4* modTime, size_t* size)
int result = fstat(fd, &buf);
if (result < 0) {
- LOGE("Unable to determine mod time: %s", strerror(errno));
+ ALOGE("Unable to determine mod time: %s", strerror(errno));
return -1;
}
@@ -76,12 +76,12 @@ static int verifyMagicAndGetAdler32(int fd, u4 *adler32)
ssize_t amt = read(fd, headerStart, sizeof(headerStart));
if (amt < 0) {
- LOGE("Unable to read header: %s", strerror(errno));
+ ALOGE("Unable to read header: %s", strerror(errno));
return -1;
}
if (amt != sizeof(headerStart)) {
- LOGE("Unable to read full header (only got %d bytes)", (int) amt);
+ ALOGE("Unable to read full header (only got %d bytes)", (int) amt);
return -1;
}
@@ -132,12 +132,12 @@ int dvmRawDexFileOpen(const char* fileName, const char* odexOutputName,
dvmSetCloseOnExec(dexFd);
if (verifyMagicAndGetAdler32(dexFd, &adler32) < 0) {
- LOGE("Error with header for %s", fileName);
+ ALOGE("Error with header for %s", fileName);
goto bail;
}
if (getModTimeAndSize(dexFd, &modTime, &fileSize) < 0) {
- LOGE("Error with stat for %s", fileName);
+ ALOGE("Error with stat for %s", fileName);
goto bail;
}
@@ -194,7 +194,7 @@ int dvmRawDexFileOpen(const char* fileName, const char* odexOutputName,
}
if (!result) {
- LOGE("Unable to extract+optimize DEX from '%s'", fileName);
+ ALOGE("Unable to extract+optimize DEX from '%s'", fileName);
goto bail;
}
@@ -218,7 +218,7 @@ int dvmRawDexFileOpen(const char* fileName, const char* odexOutputName,
/* unlock the fd */
if (!dvmUnlockCachedDexFile(optFd)) {
/* uh oh -- this process needs to exit or we'll wedge the system */
- LOGE("Unable to unlock DEX file");
+ ALOGE("Unable to unlock DEX file");
goto bail;
}
locked = false;
diff --git a/vm/ReferenceTable.cpp b/vm/ReferenceTable.cpp
index 2e96f8002..24180d4bf 100644
--- a/vm/ReferenceTable.cpp
+++ b/vm/ReferenceTable.cpp
@@ -78,7 +78,7 @@ bool dvmAddToReferenceTable(ReferenceTable* pRef, Object* obj)
newTable = (Object**) realloc(pRef->table, newSize * sizeof(Object*));
if (newTable == NULL) {
- LOGE("Unable to expand ref table (from %d to %d %d-byte entries)",
+ ALOGE("Unable to expand ref table (from %d to %d %d-byte entries)",
pRef->allocEntries, newSize, sizeof(Object*));
return false;
}
@@ -310,7 +310,7 @@ void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
// Make a copy of the table, and sort it.
Object** tableCopy = (Object**)malloc(sizeof(Object*) * count);
if (tableCopy == NULL) {
- LOGE("Unable to copy table with %d elements", count);
+ ALOGE("Unable to copy table with %d elements", count);
return;
}
memcpy(tableCopy, refs, sizeof(Object*) * count);
diff --git a/vm/SignalCatcher.cpp b/vm/SignalCatcher.cpp
index 2d686c9cc..c29f19ad1 100644
--- a/vm/SignalCatcher.cpp
+++ b/vm/SignalCatcher.cpp
@@ -156,7 +156,7 @@ static void handleSigQuit()
/* write to memory buffer */
FILE* memfp = open_memstream(&traceBuf, &traceLen);
if (memfp == NULL) {
- LOGE("Unable to create memstream for stack traces");
+ ALOGE("Unable to create memstream for stack traces");
traceBuf = NULL; /* make sure it didn't touch this */
/* continue on */
} else {
@@ -186,12 +186,12 @@ static void handleSigQuit()
*/
int fd = open(gDvm.stackTraceFile, O_WRONLY | O_APPEND | O_CREAT, 0666);
if (fd < 0) {
- LOGE("Unable to open stack trace file '%s': %s",
+ ALOGE("Unable to open stack trace file '%s': %s",
gDvm.stackTraceFile, strerror(errno));
} else {
ssize_t actual = write(fd, traceBuf, traceLen);
if (actual != (ssize_t) traceLen) {
- LOGE("Failed to write stack traces to %s (%d of %zd): %s",
+ ALOGE("Failed to write stack traces to %s (%d of %zd): %s",
gDvm.stackTraceFile, (int) actual, traceLen,
strerror(errno));
} else {
@@ -219,7 +219,7 @@ static void handleSigUsr1()
void printAllClass(void *ptr)
{
ClassObject **classPP = (ClassObject **) ptr;
- LOGE("class %s", (*classPP)->descriptor);
+ ALOGE("class %s", (*classPP)->descriptor);
}
@@ -315,7 +315,7 @@ loop:
break;
#endif
default:
- LOGE("unexpected signal %d", rcvd);
+ ALOGE("unexpected signal %d", rcvd);
break;
}
}
diff --git a/vm/StdioConverter.cpp b/vm/StdioConverter.cpp
index 0153ff2ea..f420c4d13 100644
--- a/vm/StdioConverter.cpp
+++ b/vm/StdioConverter.cpp
@@ -163,7 +163,7 @@ static void* stdioConverterThreadStart(void* arg)
if (fdCount < 0) {
if (errno != EINTR) {
- LOGE("select on stdout/stderr failed");
+ ALOGE("select on stdout/stderr failed");
break;
}
ALOGD("Got EINTR, ignoring");
diff --git a/vm/Sync.cpp b/vm/Sync.cpp
index 4010432dc..8a3803eb4 100644
--- a/vm/Sync.cpp
+++ b/vm/Sync.cpp
@@ -98,11 +98,11 @@ Monitor* dvmCreateMonitor(Object* obj)
mon = (Monitor*) calloc(1, sizeof(Monitor));
if (mon == NULL) {
- LOGE("Unable to allocate monitor");
+ ALOGE("Unable to allocate monitor");
dvmAbort();
}
if (((u4)mon & 7) != 0) {
- LOGE("Misaligned monitor: %p", mon);
+ ALOGE("Misaligned monitor: %p", mon);
dvmAbort();
}
mon->obj = obj;
@@ -1365,7 +1365,7 @@ retry:
dvmUnlockThreadList();
goto retry;
}
- LOGE("object %p has an unknown hash state %#x", obj, hashState);
+ ALOGE("object %p has an unknown hash state %#x", obj, hashState);
dvmDumpThread(dvmThreadSelf(), false);
dvmAbort();
return 0; /* Quiet the compiler. */
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index 1ee00a88a..f0217b43f 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -255,7 +255,7 @@ bool dvmThreadStartup()
/* allocate a TLS slot */
if (pthread_key_create(&gDvm.pthreadKeySelf, threadExitCheck) != 0) {
- LOGE("ERROR: pthread_key_create failed");
+ ALOGE("ERROR: pthread_key_create failed");
return false;
}
@@ -488,7 +488,7 @@ static void lockThreadSuspend(const char* who, SuspendCause why)
if (sleepIter == 0)
startWhen = dvmGetRelativeTimeUsec();
if (!dvmIterativeSleep(sleepIter++, kSpinSleepTime, startWhen)) {
- LOGE("threadid=%d: couldn't get thread-suspend lock (%s:%s),"
+ ALOGE("threadid=%d: couldn't get thread-suspend lock (%s:%s),"
" bailing",
self->threadId, who, getSuspendCauseStr(why));
/* threads are not suspended, thread dump could crash */
@@ -699,14 +699,14 @@ bool dvmPrepMainThread()
* we create an instance of them.
*/
if (!dvmInitClass(gDvm.classJavaLangClass)) {
- LOGE("'Class' class failed to initialize");
+ ALOGE("'Class' class failed to initialize");
return false;
}
if (!dvmInitClass(gDvm.classJavaLangThreadGroup) ||
!dvmInitClass(gDvm.classJavaLangThread) ||
!dvmInitClass(gDvm.classJavaLangVMThread))
{
- LOGE("thread classes failed to initialize");
+ ALOGE("thread classes failed to initialize");
return false;
}
@@ -720,7 +720,7 @@ bool dvmPrepMainThread()
*/
threadObj = dvmAllocObject(gDvm.classJavaLangThread, ALLOC_DEFAULT);
if (threadObj == NULL) {
- LOGE("unable to allocate main thread object");
+ ALOGE("unable to allocate main thread object");
return false;
}
dvmReleaseTrackedAlloc(threadObj, NULL);
@@ -736,7 +736,7 @@ bool dvmPrepMainThread()
dvmCallMethod(thread, init, threadObj, &unused, groupObj, threadNameStr,
THREAD_NORM_PRIORITY, false);
if (dvmCheckException(thread)) {
- LOGE("exception thrown while constructing main thread object");
+ ALOGE("exception thrown while constructing main thread object");
return false;
}
@@ -745,7 +745,7 @@ bool dvmPrepMainThread()
*/
vmThreadObj = dvmAllocObject(gDvm.classJavaLangVMThread, ALLOC_DEFAULT);
if (vmThreadObj == NULL) {
- LOGE("unable to allocate main vmthread object");
+ ALOGE("unable to allocate main vmthread object");
return false;
}
dvmReleaseTrackedAlloc(vmThreadObj, NULL);
@@ -754,7 +754,7 @@ bool dvmPrepMainThread()
"(Ljava/lang/Thread;)V");
dvmCallMethod(thread, init, vmThreadObj, &unused, threadObj);
if (dvmCheckException(thread)) {
- LOGE("exception thrown while constructing main vmthread object");
+ ALOGE("exception thrown while constructing main vmthread object");
return false;
}
@@ -1024,7 +1024,7 @@ static void setThreadSelf(Thread* thread)
* here to ensure we clean up after ourselves.
*/
if (thread != NULL) {
- LOGE("pthread_setspecific(%p) failed, err=%d", thread, cc);
+ ALOGE("pthread_setspecific(%p) failed, err=%d", thread, cc);
dvmAbort(); /* the world is fundamentally hosed */
}
}
@@ -1075,12 +1075,12 @@ static void threadExitCheck(void* arg)
self->threadExitCheckCount++;
int cc = pthread_setspecific(gDvm.pthreadKeySelf, self);
if (cc != 0) {
- LOGE("threadid=%d: unable to re-add thread to TLS",
+ ALOGE("threadid=%d: unable to re-add thread to TLS",
self->threadId);
dvmAbort();
}
} else {
- LOGE("threadid=%d: native thread exited without detaching",
+ ALOGE("threadid=%d: native thread exited without detaching",
self->threadId);
dvmAbort();
}
@@ -1104,7 +1104,7 @@ static void assignThreadId(Thread* thread)
*/
int num = dvmAllocBit(gDvm.threadIdMap);
if (num < 0) {
- LOGE("Ran out of thread IDs");
+ ALOGE("Ran out of thread IDs");
dvmAbort(); // TODO: make this a non-fatal error result
}
@@ -1311,7 +1311,7 @@ bool dvmCreateInterpThread(Object* threadObj, int reqStackSize)
* resource limits. VirtualMachineError is probably too severe,
* so use OutOfMemoryError.
*/
- LOGE("Thread creation failed (err=%s)", strerror(errno));
+ ALOGE("Thread creation failed (err=%s)", strerror(errno));
dvmSetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread, NULL);
@@ -1659,7 +1659,7 @@ bool dvmCreateInternalThread(pthread_t* pHandle, const char* name,
if (pthread_create(pHandle, &threadAttr, internalThreadStart,
pArgs) != 0)
{
- LOGE("internal thread creation failed");
+ ALOGE("internal thread creation failed");
free(pArgs->name);
free(pArgs);
return false;
@@ -1894,7 +1894,7 @@ bool dvmAttachCurrentThread(const JavaVMAttachArgs* pArgs, bool isDaemon)
dvmCallMethod(self, init, threadObj, &unused, (Object*)pArgs->group,
threadNameStr, os_getThreadPriorityFromSystem(), isDaemon);
if (dvmCheckException(self)) {
- LOGE("exception thrown while constructing attached thread object");
+ ALOGE("exception thrown while constructing attached thread object");
goto fail_unlink;
}
@@ -2020,7 +2020,7 @@ void dvmDetachCurrentThread()
}
if (!topIsNative) {
- LOGE("ERROR: detaching thread with interp frames (count=%d)",
+ ALOGE("ERROR: detaching thread with interp frames (count=%d)",
curDepth);
dvmDumpThread(self, false);
dvmAbort();
@@ -2487,11 +2487,11 @@ static void waitForThreadSuspend(Thread* self, Thread* thread)
spinSleepTime = MORE_SLEEP;
if (retryCount++ == kMaxRetries) {
- LOGE("Fatal spin-on-suspend, dumping threads");
+ ALOGE("Fatal spin-on-suspend, dumping threads");
dvmDumpAllThreads(false);
/* log this after -- long traces will scroll off log */
- LOGE("threadid=%d: stuck on threadid=%d, giving up",
+ ALOGE("threadid=%d: stuck on threadid=%d, giving up",
self->threadId, thread->threadId);
/* try to get a debuggerd dump from the spinning thread */
@@ -2992,13 +2992,13 @@ static Object* getStaticThreadGroup(const char* fieldName)
groupField = dvmFindStaticField(gDvm.classJavaLangThreadGroup,
fieldName, "Ljava/lang/ThreadGroup;");
if (groupField == NULL) {
- LOGE("java.lang.ThreadGroup does not have an '%s' field", fieldName);
+ ALOGE("java.lang.ThreadGroup does not have an '%s' field", fieldName);
dvmThrowInternalError("bad definition for ThreadGroup");
return NULL;
}
groupObj = dvmGetStaticFieldObject(groupField);
if (groupObj == NULL) {
- LOGE("java.lang.ThreadGroup.%s not initialized", fieldName);
+ ALOGE("java.lang.ThreadGroup.%s not initialized", fieldName);
dvmThrowInternalError(NULL);
return NULL;
}
@@ -3180,7 +3180,7 @@ static int getSchedulerGroup(int tid, char* buf, size_t bufLen)
return -1;
out_bad_data:
- LOGE("Bad cgroup data {%s}", lineBuf);
+ ALOGE("Bad cgroup data {%s}", lineBuf);
snprintf(buf, bufLen, "[data-parse-failed]");
fclose(fp);
return -1;
diff --git a/vm/UtfString.cpp b/vm/UtfString.cpp
index 63d116eac..2307fb4a0 100644
--- a/vm/UtfString.cpp
+++ b/vm/UtfString.cpp
@@ -48,7 +48,7 @@ static StringObject* makeStringObject(u4 charsLength, ArrayObject** pChars)
if (!dvmIsClassInitialized(gDvm.classJavaLangString)) {
/* Perform first-time use initialization of the class. */
if (!dvmInitClass(gDvm.classJavaLangString)) {
- LOGE("FATAL: Could not initialize class String");
+ ALOGE("FATAL: Could not initialize class String");
dvmAbort();
}
}
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index 8a9eb4ed3..cfcb9687d 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -99,14 +99,14 @@ static Object* createStockException(const char* descriptor, const char* msg)
/* find class, initialize if necessary */
clazz = dvmFindSystemClass(descriptor);
if (clazz == NULL) {
- LOGE("Unable to find %s", descriptor);
+ ALOGE("Unable to find %s", descriptor);
return NULL;
}
init = dvmFindDirectMethodByDescriptor(clazz, "<init>",
"(Ljava/lang/String;)V");
if (init == NULL) {
- LOGE("Unable to find String-arg constructor for %s", descriptor);
+ ALOGE("Unable to find String-arg constructor for %s", descriptor);
return NULL;
}
@@ -259,7 +259,7 @@ void dvmAddTrackedAlloc(Object* obj, Thread* self)
assert(obj != NULL);
assert(self != NULL);
if (!dvmAddToReferenceTable(&self->internalLocalRefTable, obj)) {
- LOGE("threadid=%d: unable to add %p to internal ref table",
+ ALOGE("threadid=%d: unable to add %p to internal ref table",
self->threadId, obj);
dvmDumpThread(self, false);
dvmAbort();
@@ -284,7 +284,7 @@ void dvmReleaseTrackedAlloc(Object* obj, Thread* self)
if (!dvmRemoveFromReferenceTable(&self->internalLocalRefTable,
self->internalLocalRefTable.table, obj))
{
- LOGE("threadid=%d: failed to remove %p from internal ref table",
+ ALOGE("threadid=%d: failed to remove %p from internal ref table",
self->threadId, obj);
dvmAbort();
}
diff --git a/vm/alloc/CardTable.cpp b/vm/alloc/CardTable.cpp
index da395e77d..2c81fd149 100644
--- a/vm/alloc/CardTable.cpp
+++ b/vm/alloc/CardTable.cpp
@@ -255,7 +255,7 @@ static void dumpWhiteReferenceVisitor(void *addr, void *arg)
if (dvmHeapBitmapIsObjectBitSet(ctx->markBits, obj)) {
return;
}
- LOGE("object %p is white", obj);
+ ALOGE("object %p is white", obj);
}
/*
@@ -380,7 +380,7 @@ static void verifyCardTableCallback(Object *obj, void *arg)
} else if (isPushedOnMarkStack(obj)) {
return;
} else {
- LOGE("Verify failed, object %p is gray and on an unmarked card", obj);
+ ALOGE("Verify failed, object %p is gray and on an unmarked card", obj);
dvmDumpObject(obj);
dvmVisitObject(dumpWhiteReferenceVisitor, obj, &ctx);
dumpReferences(obj);
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index 0940e9d6c..49c676052 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -338,7 +338,7 @@ static void *allocateBlocks(HeapSource *heapSource, size_t blocks)
return addr;
}
/* Insufficient space, fail. */
- LOGE("Insufficient space, %zu blocks, %zu blocks allocated and %zu bytes allocated",
+ ALOGE("Insufficient space, %zu blocks, %zu blocks allocated and %zu bytes allocated",
heapSource->totalBlocks,
heapSource->allocBlocks,
heapSource->bytesAllocated);
@@ -1000,7 +1000,7 @@ static void enqueueReference(Object *ref)
assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queue) != NULL);
assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queueNext) == NULL);
if (!dvmHeapAddRefToLargeTable(&gDvm.gcHeap->referenceOperations, ref)) {
- LOGE("no room for any more reference operations");
+ ALOGE("no room for any more reference operations");
dvmAbort();
}
}
@@ -1579,9 +1579,9 @@ static void scavengeThreadStack(Thread *thread)
saveArea->xtra.currentPc, thread->currentPc2,
method->clazz->descriptor, method->name, method->insns);
if (saveArea->xtra.currentPc != NULL)
- LOGE(" pc inst = 0x%04x", *saveArea->xtra.currentPc);
+ ALOGE(" pc inst = 0x%04x", *saveArea->xtra.currentPc);
if (thread->currentPc2 != NULL)
- LOGE(" pc2 inst = 0x%04x", *thread->currentPc2);
+ ALOGE(" pc2 inst = 0x%04x", *thread->currentPc2);
dvmDumpThread(thread, false);
}
} else {
@@ -1668,7 +1668,7 @@ static void scavengeThreadStack(Thread *thread)
#if WITH_EXTRA_GC_CHECKS > 0
if ((rval & 0x3) != 0 || !dvmIsValidObject((Object*) rval)) {
/* this is very bad */
- LOGE("PGC: invalid ref in reg %d: 0x%08x",
+ ALOGE("PGC: invalid ref in reg %d: 0x%08x",
method->registersSize-1 - i, rval);
} else
#endif
diff --git a/vm/alloc/HeapBitmap.cpp b/vm/alloc/HeapBitmap.cpp
index 8b6528717..d6a737b2a 100644
--- a/vm/alloc/HeapBitmap.cpp
+++ b/vm/alloc/HeapBitmap.cpp
@@ -34,7 +34,7 @@ bool dvmHeapBitmapInit(HeapBitmap *hb, const void *base, size_t maxSize,
bitsLen = HB_OFFSET_TO_INDEX(maxSize) * sizeof(*hb->bits);
bits = dvmAllocRegion(bitsLen, PROT_READ | PROT_WRITE, name);
if (bits == NULL) {
- LOGE("Could not mmap %zd-byte ashmem region '%s'", bitsLen, name);
+ ALOGE("Could not mmap %zd-byte ashmem region '%s'", bitsLen, name);
return false;
}
hb->bits = (unsigned long *)bits;
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp
index 949e8aba8..c0ad07df5 100644
--- a/vm/alloc/HeapSource.cpp
+++ b/vm/alloc/HeapSource.cpp
@@ -347,7 +347,7 @@ static bool addNewHeap(HeapSource *hs)
assert(hs != NULL);
if (hs->numHeaps >= HEAP_SOURCE_MAX_HEAP_COUNT) {
- LOGE("Attempt to create too many heaps (%zd >= %zd)",
+ ALOGE("Attempt to create too many heaps (%zd >= %zd)",
hs->numHeaps, HEAP_SOURCE_MAX_HEAP_COUNT);
dvmAbort();
return false;
@@ -512,7 +512,7 @@ GcHeap* dvmHeapSourceStartup(size_t startSize, size_t maximumSize,
assert(gHs == NULL);
if (!(startSize <= growthLimit && growthLimit <= maximumSize)) {
- LOGE("Bad heap size parameters (start=%zd, max=%zd, limit=%zd)",
+ ALOGE("Bad heap size parameters (start=%zd, max=%zd, limit=%zd)",
startSize, maximumSize, growthLimit);
return NULL;
}
@@ -575,7 +575,7 @@ GcHeap* dvmHeapSourceStartup(size_t startSize, size_t maximumSize,
goto fail;
}
if (!allocMarkStack(&gcHeap->markContext.stack, hs->maximumSize)) {
- LOGE("Can't create markStack");
+ ALOGE("Can't create markStack");
dvmHeapBitmapDelete(&hs->markBits);
dvmHeapBitmapDelete(&hs->liveBits);
goto fail;
diff --git a/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h b/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
index 4c9f608e2..89492d557 100644
--- a/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
+++ b/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
@@ -8,8 +8,8 @@
#include <unistd.h>
#include <limits.h>
-#define LOGW(...) printf("W/" __VA_ARGS__)
-#define LOGE(...) printf("E/" __VA_ARGS__)
+#define ALOGW(...) printf("W/" __VA_ARGS__)
+#define ALOGE(...) printf("E/" __VA_ARGS__)
inline void dvmAbort(void) {
exit(1);
diff --git a/vm/alloc/Verify.cpp b/vm/alloc/Verify.cpp
index 31998f898..93a090ab0 100644
--- a/vm/alloc/Verify.cpp
+++ b/vm/alloc/Verify.cpp
@@ -93,11 +93,11 @@ static void verifyReference(void *addr, void *arg)
if (!isValid) {
Object **parent = (Object **)arg;
if (*parent != NULL) {
- LOGE("Verify of object %p failed", *parent);
+ ALOGE("Verify of object %p failed", *parent);
dvmDumpObject(*parent);
*parent = NULL;
}
- LOGE("Verify of reference %p @ %p failed", obj, addr);
+ ALOGE("Verify of reference %p @ %p failed", obj, addr);
dvmDumpObject(obj);
}
}
diff --git a/vm/alloc/Visit.cpp b/vm/alloc/Visit.cpp
index 7eaff07ac..410b66ee0 100644
--- a/vm/alloc/Visit.cpp
+++ b/vm/alloc/Visit.cpp
@@ -134,9 +134,9 @@ static void visitThreadStack(RootVisitor *visitor, Thread *thread, void *arg)
#if WITH_EXTRA_GC_CHECKS
if (fp[i] != 0 && !dvmIsValidObject((Object *)fp[i])) {
/* this is very bad */
- LOGE("PGC: invalid ref in reg %d: %#x",
+ ALOGE("PGC: invalid ref in reg %d: %#x",
method->registersSize - 1 - i, fp[i]);
- LOGE("PGC: %s.%s addr %#x",
+ ALOGE("PGC: %s.%s addr %#x",
method->clazz->descriptor, method->name,
saveArea->xtra.currentPc - method->insns);
continue;
diff --git a/vm/analysis/CodeVerify.cpp b/vm/analysis/CodeVerify.cpp
index 3d8d2fa5f..74f3cfc66 100644
--- a/vm/analysis/CodeVerify.cpp
+++ b/vm/analysis/CodeVerify.cpp
@@ -250,7 +250,7 @@ static void checkMergeTab()
for (i = 0; i < kRegTypeMAX; i++) {
for (j = i; j < kRegTypeMAX; j++) {
if (gDvmMergeTab[i][j] != gDvmMergeTab[j][i]) {
- LOGE("Symmetry violation: %d,%d vs %d,%d", i, j, j, i);
+ ALOGE("Symmetry violation: %d,%d vs %d,%d", i, j, j, i);
dvmAbort();
}
}
@@ -1534,7 +1534,7 @@ static void setRegisterType(RegisterLine* registerLine, u4 vdst,
case kRegTypeLongHi:
case kRegTypeDoubleHi:
/* should never set these explicitly */
- LOGE("BUG: explicit set of high register type");
+ ALOGE("BUG: explicit set of high register type");
dvmAbort();
break;
@@ -1559,7 +1559,7 @@ static void setRegisterType(RegisterLine* registerLine, u4 vdst,
/* bad type - fall through */
case kRegTypeConflict: // should only be set during a merge
- LOGE("BUG: set register to unknown type %d", newType);
+ ALOGE("BUG: set register to unknown type %d", newType);
dvmAbort();
break;
}
@@ -1728,7 +1728,7 @@ static void markRefsAsInitialized(RegisterLine* registerLine, int insnRegCount,
clazz = getUninitInstance(uninitMap, regTypeToUninitIndex(uninitType));
if (clazz == NULL) {
- LOGE("VFY: unable to find type=%#x (idx=%d)",
+ ALOGE("VFY: unable to find type=%#x (idx=%d)",
uninitType, regTypeToUninitIndex(uninitType));
*pFailure = VERIFY_ERROR_GENERIC;
return;
@@ -3327,7 +3327,7 @@ static bool replaceFailingInstruction(const Method* meth, InsnFlags* insnFlags,
break;
default:
/* whoops */
- LOGE("ERROR: stomped a %d-unit instruction with a verifier error",
+ ALOGE("ERROR: stomped a %d-unit instruction with a verifier error",
width);
dvmAbort();
}
diff --git a/vm/analysis/DexPrepare.cpp b/vm/analysis/DexPrepare.cpp
index 7985481b6..54bb16cef 100644
--- a/vm/analysis/DexPrepare.cpp
+++ b/vm/analysis/DexPrepare.cpp
@@ -81,22 +81,22 @@ static bool directoryIsValid(const std::string& fileName)
struct stat sb;
if (stat(dirName.c_str(), &sb) < 0) {
- LOGE("Could not stat dex cache directory '%s': %s", dirName.c_str(), strerror(errno));
+ ALOGE("Could not stat dex cache directory '%s': %s", dirName.c_str(), strerror(errno));
return false;
}
if (!S_ISDIR(sb.st_mode)) {
- LOGE("Dex cache directory isn't a directory: %s", dirName.c_str());
+ ALOGE("Dex cache directory isn't a directory: %s", dirName.c_str());
return false;
}
if (access(dirName.c_str(), W_OK) < 0) {
- LOGE("Dex cache directory isn't writable: %s", dirName.c_str());
+ ALOGE("Dex cache directory isn't writable: %s", dirName.c_str());
return false;
}
if (access(dirName.c_str(), R_OK) < 0) {
- LOGE("Dex cache directory isn't readable: %s", dirName.c_str());
+ ALOGE("Dex cache directory isn't readable: %s", dirName.c_str());
return false;
}
@@ -148,7 +148,7 @@ retry:
// TODO: write an equivalent of strerror_r that returns a std::string.
const std::string errnoString(strerror(errno));
if (directoryIsValid(cacheFileName)) {
- LOGE("Can't open dex cache file '%s': %s", cacheFileName, errnoString.c_str());
+ ALOGE("Can't open dex cache file '%s': %s", cacheFileName, errnoString.c_str());
}
}
return fd;
@@ -173,7 +173,7 @@ retry:
}
dvmChangeStatus(NULL, oldStatus);
if (cc != 0) {
- LOGE("Can't lock dex cache '%s': %d", cacheFileName, cc);
+ ALOGE("Can't lock dex cache '%s': %d", cacheFileName, cc);
close(fd);
return -1;
}
@@ -188,7 +188,7 @@ retry:
*/
cc = fstat(fd, &fdStat);
if (cc != 0) {
- LOGE("Can't stat open file '%s'", cacheFileName);
+ ALOGE("Can't stat open file '%s'", cacheFileName);
LOGVV("DexOpt: unlocking cache file %s", cacheFileName);
goto close_fail;
}
@@ -472,7 +472,7 @@ bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength,
else
execv(execFile, const_cast<char**>(argv));
- LOGE("execv '%s'%s failed: %s", execFile,
+ ALOGE("execv '%s'%s failed: %s", execFile,
kUseValgrind ? " [valgrind]" : "", strerror(errno));
exit(1);
} else {
@@ -495,7 +495,7 @@ bool dvmOptimizeDexFile(int fd, off_t dexOffset, long dexLength,
}
dvmChangeStatus(NULL, oldStatus);
if (gotPid != pid) {
- LOGE("waitpid failed: wanted %d, got %d: %s",
+ ALOGE("waitpid failed: wanted %d, got %d: %s",
(int) pid, (int) gotPid, strerror(errno));
return false;
}
@@ -538,11 +538,11 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
/* quick test so we don't blow up on empty file */
if (dexLength < (int) sizeof(DexHeader)) {
- LOGE("too small to be DEX");
+ ALOGE("too small to be DEX");
return false;
}
if (dexOffset < (int) sizeof(DexOptHeader)) {
- LOGE("not enough room for opt header");
+ ALOGE("not enough room for opt header");
return false;
}
@@ -566,7 +566,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
mapAddr = mmap(NULL, dexOffset + dexLength, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
if (mapAddr == MAP_FAILED) {
- LOGE("unable to mmap DEX cache: %s", strerror(errno));
+ ALOGE("unable to mmap DEX cache: %s", strerror(errno));
goto bail;
}
@@ -607,7 +607,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
u1* dexAddr = ((u1*) mapAddr) + dexOffset;
if (dvmDexFileOpenPartial(dexAddr, dexLength, &pDvmDex) != 0) {
- LOGE("Unable to create DexFile");
+ ALOGE("Unable to create DexFile");
success = false;
} else {
/*
@@ -618,7 +618,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
if (gDvm.generateRegisterMaps) {
pRegMapBuilder = dvmGenerateRegisterMaps(pDvmDex);
if (pRegMapBuilder == NULL) {
- LOGE("Failed generating register maps");
+ ALOGE("Failed generating register maps");
success = false;
}
}
@@ -643,7 +643,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
* Exclude this code when doing clean shutdown for valgrind.
*/
if (munmap(mapAddr, dexOffset + dexLength) != 0) {
- LOGE("munmap failed: %s", strerror(errno));
+ ALOGE("munmap failed: %s", strerror(errno));
goto bail;
}
#endif
@@ -659,7 +659,7 @@ bool dvmContinueOptimization(int fd, off_t dexOffset, long dexLength,
depsOffset = lseek(fd, 0, SEEK_END);
if (depsOffset < 0) {
- LOGE("lseek to EOF failed: %s", strerror(errno));
+ ALOGE("lseek to EOF failed: %s", strerror(errno));
goto bail;
}
adjOffset = (depsOffset + 7) & ~(0x07);
@@ -809,7 +809,7 @@ static bool rewriteDex(u1* addr, int len, bool doVerify, bool doOpt,
* for it.
*/
if (dvmDexFileOpenPartial(addr, len, &pDvmDex) != 0) {
- LOGE("Unable to create DexFile");
+ ALOGE("Unable to create DexFile");
goto bail;
}
@@ -953,7 +953,7 @@ static bool loadAllClasses(DvmDex* pDvmDex)
* list, but it costs very little to do it in all cases.)
*/
if (!dvmInitClass(gDvm.classJavaLangClass)) {
- LOGE("ERROR: failed to initialize the class Class!");
+ ALOGE("ERROR: failed to initialize the class Class!");
return false;
}
@@ -1107,7 +1107,7 @@ static const char* getCacheFileName(const ClassPathEntry* cpe)
case kCpeDex:
return dvmGetRawDexFileCacheFileName((RawDexFile*) cpe->ptr);
default:
- LOGE("DexOpt: unexpected cpe kind %d", cpe->kind);
+ ALOGE("DexOpt: unexpected cpe kind %d", cpe->kind);
dvmAbort();
return NULL;
}
@@ -1128,7 +1128,7 @@ static const u1* getSignature(const ClassPathEntry* cpe)
pDvmDex = dvmGetRawDexFileDex((RawDexFile*) cpe->ptr);
break;
default:
- LOGE("unexpected cpe kind %d", cpe->kind);
+ ALOGE("unexpected cpe kind %d", cpe->kind);
dvmAbort();
pDvmDex = NULL; // make gcc happy
}
@@ -1181,7 +1181,7 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
* the first thing in the file.
*/
if (lseek(fd, 0, SEEK_SET) != 0) {
- LOGE("DexOpt: failed to seek to start of file: %s", strerror(errno));
+ ALOGE("DexOpt: failed to seek to start of file: %s", strerror(errno));
goto bail;
}
@@ -1191,10 +1191,10 @@ bool dvmCheckOptHeaderAndDependencies(int fd, bool sourceAvail, u4 modWhen,
*/
actual = read(fd, &optHdr, sizeof(optHdr));
if (actual < 0) {
- LOGE("DexOpt: failed reading opt header: %s", strerror(errno));
+ ALOGE("DexOpt: failed reading opt header: %s", strerror(errno));
goto bail;
} else if (actual != sizeof(optHdr)) {
- LOGE("DexOpt: failed reading opt header (got %d of %zd)",
+ ALOGE("DexOpt: failed reading opt header (got %d of %zd)",
(int) actual, sizeof(optHdr));
goto bail;
}
@@ -1404,7 +1404,7 @@ static int writeDependencies(int fd, u4 modWhen, u4 crc)
int len = strlen(cacheFileName) +1;
if (ptr + 4 + len + kSHA1DigestLen > buf + bufLen) {
- LOGE("DexOpt: overran buffer");
+ ALOGE("DexOpt: overran buffer");
dvmAbort();
}
@@ -1519,7 +1519,7 @@ static bool computeFileChecksum(int fd, off_t start, size_t length, u4* pSum)
uLong adler;
if (lseek(fd, start, SEEK_SET) != start) {
- LOGE("Unable to seek to start of checksum area (%ld): %s",
+ ALOGE("Unable to seek to start of checksum area (%ld): %s",
(long) start, strerror(errno));
return false;
}
@@ -1530,7 +1530,7 @@ static bool computeFileChecksum(int fd, off_t start, size_t length, u4* pSum)
size_t wanted = (length < sizeof(readBuf)) ? length : sizeof(readBuf);
actual = read(fd, readBuf, wanted);
if (actual <= 0) {
- LOGE("Read failed (%d) while computing checksum (len=%zu): %s",
+ ALOGE("Read failed (%d) while computing checksum (len=%zu): %s",
(int) actual, length, strerror(errno));
return false;
}
diff --git a/vm/analysis/DexVerify.cpp b/vm/analysis/DexVerify.cpp
index 82d68470d..c47c30120 100644
--- a/vm/analysis/DexVerify.cpp
+++ b/vm/analysis/DexVerify.cpp
@@ -1179,7 +1179,7 @@ static bool verifyInstructions(VerifierData* vdata)
case OP_UNUSED_79:
case OP_UNUSED_7A:
case OP_UNUSED_FF:
- LOGE("VFY: unexpected opcode %04x", decInsn.opcode);
+ ALOGE("VFY: unexpected opcode %04x", decInsn.opcode);
okay = false;
break;
diff --git a/vm/analysis/Optimize.cpp b/vm/analysis/Optimize.cpp
index 9e299f3ef..953924eb4 100644
--- a/vm/analysis/Optimize.cpp
+++ b/vm/analysis/Optimize.cpp
@@ -80,7 +80,7 @@ bool dvmCreateInlineSubsTable()
* Not expected. We only use this for key methods in core
* classes, so we should always be able to find them.
*/
- LOGE("Unable to find method for inlining: %s.%s:%s",
+ ALOGE("Unable to find method for inlining: %s.%s:%s",
ops[i].classDescriptor, ops[i].methodName,
ops[i].methodSignature);
return false;
diff --git a/vm/analysis/RegisterMap.cpp b/vm/analysis/RegisterMap.cpp
index 742bb128c..c62ec4760 100644
--- a/vm/analysis/RegisterMap.cpp
+++ b/vm/analysis/RegisterMap.cpp
@@ -197,7 +197,7 @@ RegisterMap* dvmGenerateRegisterMapV(VerifierData* vdata)
int bufSize;
if (vdata->method->registersSize >= 2048) {
- LOGE("ERROR: register map can't handle %d registers",
+ ALOGE("ERROR: register map can't handle %d registers",
vdata->method->registersSize);
goto bail;
}
@@ -231,7 +231,7 @@ RegisterMap* dvmGenerateRegisterMapV(VerifierData* vdata)
}
if (gcPointCount >= 65536) {
/* we could handle this, but in practice we don't get near this */
- LOGE("ERROR: register map can't handle %d gc points in one method",
+ ALOGE("ERROR: register map can't handle %d gc points in one method",
gcPointCount);
goto bail;
}
@@ -294,7 +294,7 @@ RegisterMap* dvmGenerateRegisterMapV(VerifierData* vdata)
RegisterMap* pUncompMap;
pUncompMap = uncompressMapDifferential(pCompMap);
if (pUncompMap == NULL) {
- LOGE("Map failed to uncompress - %s.%s",
+ ALOGE("Map failed to uncompress - %s.%s",
vdata->method->clazz->descriptor,
vdata->method->name);
free(pCompMap);
@@ -302,7 +302,7 @@ RegisterMap* dvmGenerateRegisterMapV(VerifierData* vdata)
dvmAbort();
} else {
if (compareMaps(pMap, pUncompMap) != 0) {
- LOGE("Map comparison failed - %s.%s",
+ ALOGE("Map comparison failed - %s.%s",
vdata->method->clazz->descriptor,
vdata->method->name);
free(pCompMap);
@@ -413,7 +413,7 @@ static void dumpRegisterMap(const RegisterMap* pMap, int registersSize)
break;
default:
/* can't happen */
- LOGE("Can only dump Compact8 / Compact16 maps (not %d)", format);
+ ALOGE("Can only dump Compact8 / Compact16 maps (not %d)", format);
return;
}
@@ -488,7 +488,7 @@ static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap)
}
if ((vdata->method->registersSize + 7) / 8 != pMap->regWidth) {
- LOGE("GLITCH: registersSize=%d, regWidth=%d",
+ ALOGE("GLITCH: registersSize=%d, regWidth=%d",
vdata->method->registersSize, pMap->regWidth);
return false;
}
@@ -506,13 +506,13 @@ static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap)
break;
default:
/* shouldn't happen */
- LOGE("GLITCH: bad format (%d)", format);
+ ALOGE("GLITCH: bad format (%d)", format);
dvmAbort();
}
const RegType* regs = vdata->registerLines[addr].regTypes;
if (regs == NULL) {
- LOGE("GLITCH: addr %d has no data", addr);
+ ALOGE("GLITCH: addr %d has no data", addr);
return false;
}
@@ -534,7 +534,7 @@ static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap)
regIsRef = isReferenceType(type);
if (bitIsRef != regIsRef) {
- LOGE("GLITCH: addr %d reg %d: bit=%d reg=%d(%d)",
+ ALOGE("GLITCH: addr %d reg %d: bit=%d reg=%d(%d)",
addr, i, bitIsRef, regIsRef, type);
return false;
}
@@ -590,7 +590,7 @@ static size_t computeRegisterMapSize(const RegisterMap* pMap)
return len + (ptr - (u1*) pMap);
}
default:
- LOGE("Bad register map format %d", format);
+ ALOGE("Bad register map format %d", format);
dvmAbort();
return 0;
}
@@ -644,7 +644,7 @@ static bool writeMapsAllMethods(DvmDex* pDvmDex, const ClassObject* clazz,
/* artificial limit */
if (clazz->virtualMethodCount + clazz->directMethodCount >= 65536) {
- LOGE("Too many methods in %s", clazz->descriptor);
+ ALOGE("Too many methods in %s", clazz->descriptor);
return false;
}
@@ -764,7 +764,7 @@ static size_t writeMapsAllClasses(DvmDex* pDvmDex, u1* basePtr, size_t length)
if (ptr - basePtr >= (int)length) {
/* a bit late */
- LOGE("Buffer overrun");
+ ALOGE("Buffer overrun");
dvmAbort();
}
@@ -849,7 +849,7 @@ const void* dvmRegisterMapGetClassData(const DexFile* pDexFile, u4 classIdx,
return NULL;
if (classIdx >= pClassPool->numClasses) {
- LOGE("bad class index (%d vs %d)", classIdx, pClassPool->numClasses);
+ ALOGE("bad class index (%d vs %d)", classIdx, pClassPool->numClasses);
dvmAbort();
}
@@ -910,7 +910,7 @@ const u1* dvmRegisterMapGetLine(const RegisterMap* pMap, int addr)
addrWidth = 2;
break;
default:
- LOGE("Unknown format %d", format);
+ ALOGE("Unknown format %d", format);
dvmAbort();
return NULL;
}
@@ -1012,7 +1012,7 @@ const RegisterMap* dvmGetExpandedRegisterMap0(Method* method)
/* (if we use this at a time other than during GC, fix/remove this test) */
if (true) {
if (!gDvm.zygote && dvmTryLockMutex(&gDvm.gcHeapLock) == 0) {
- LOGE("GLITCH: dvmGetExpandedRegisterMap not called at GC time");
+ ALOGE("GLITCH: dvmGetExpandedRegisterMap not called at GC time");
dvmAbort();
}
}
@@ -1035,13 +1035,13 @@ const RegisterMap* dvmGetExpandedRegisterMap0(Method* method)
newMap = uncompressMapDifferential(curMap);
break;
default:
- LOGE("Unknown format %d in dvmGetExpandedRegisterMap", format);
+ ALOGE("Unknown format %d in dvmGetExpandedRegisterMap", format);
dvmAbort();
newMap = NULL; // make gcc happy
}
if (newMap == NULL) {
- LOGE("Map failed to uncompress (fmt=%d) %s.%s",
+ ALOGE("Map failed to uncompress (fmt=%d) %s.%s",
format, method->clazz->descriptor, method->name);
return NULL;
}
@@ -1265,7 +1265,7 @@ static void computeMapStats(RegisterMap* pMap, const Method* method)
break;
default:
/* shouldn't happen */
- LOGE("GLITCH: bad format (%d)", format);
+ ALOGE("GLITCH: bad format (%d)", format);
dvmAbort();
}
@@ -1282,7 +1282,7 @@ static void computeMapStats(RegisterMap* pMap, const Method* method)
int addrDiff = addr - prevAddr;
if (addrDiff < 0) {
- LOGE("GLITCH: address went backward (0x%04x->0x%04x, %s.%s)",
+ ALOGE("GLITCH: address went backward (0x%04x->0x%04x, %s.%s)",
prevAddr, addr, method->clazz->descriptor, method->name);
} else if (addrDiff > kMaxGcPointGap) {
if (REGISTER_MAP_VERBOSE) {
@@ -1331,14 +1331,14 @@ static void computeMapStats(RegisterMap* pMap, const Method* method)
if (bitNum >= method->registersSize) {
/* stuff off the end should be zero in both */
- LOGE("WEIRD: bit=%d (%d/%d), prev=%02x cur=%02x",
+ ALOGE("WEIRD: bit=%d (%d/%d), prev=%02x cur=%02x",
bit, regByte, method->registersSize,
prev, cur);
assert(false);
}
int idx = (int) (bitNum * div);
if (!(idx >= 0 && idx < kNumUpdatePosns)) {
- LOGE("FAIL: bitNum=%d (of %d) div=%.3f idx=%d",
+ ALOGE("FAIL: bitNum=%d (of %d) div=%.3f idx=%d",
bitNum, method->registersSize, div, idx);
assert(false);
}
@@ -1464,7 +1464,7 @@ static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
addrWidth = 2;
break;
default:
- LOGE("ERROR: can't compress map with format=%d", format);
+ ALOGE("ERROR: can't compress map with format=%d", format);
return NULL;
}
@@ -1700,7 +1700,7 @@ static RegisterMap* uncompressMapDifferential(const RegisterMap* pMap)
int regWidth, numEntries, newAddrWidth, newMapSize;
if (format != kRegMapFormatDifferential) {
- LOGE("Not differential (%d)", format);
+ ALOGE("Not differential (%d)", format);
return NULL;
}
@@ -1811,14 +1811,14 @@ static RegisterMap* uncompressMapDifferential(const RegisterMap* pMap)
}
if (dstPtr - (u1*) pNewMap != newMapSize) {
- LOGE("ERROR: output %d bytes, expected %d",
+ ALOGE("ERROR: output %d bytes, expected %d",
dstPtr - (u1*) pNewMap, newMapSize);
free(pNewMap);
return NULL;
}
if (srcPtr - srcStart != expectedSrcLen) {
- LOGE("ERROR: consumed %d bytes, expected %d",
+ ALOGE("ERROR: consumed %d bytes, expected %d",
srcPtr - srcStart, expectedSrcLen);
free(pNewMap);
return NULL;
diff --git a/vm/analysis/VerifySubs.cpp b/vm/analysis/VerifySubs.cpp
index 2651c6866..7240dd0ff 100644
--- a/vm/analysis/VerifySubs.cpp
+++ b/vm/analysis/VerifySubs.cpp
@@ -80,7 +80,7 @@ void dvmLogUnableToResolveClass(const char* missingClassDescr,
std::string dotMissingClass = dvmHumanReadableDescriptor(missingClassDescr);
std::string dotFromClass = dvmHumanReadableDescriptor(meth->clazz->descriptor);
- LOGE("Could not find class '%s', referenced from method %s.%s",
+ ALOGE("Could not find class '%s', referenced from method %s.%s",
dotMissingClass.c_str(), dotFromClass.c_str(), meth->name);
}
diff --git a/vm/arch/generic/Call.cpp b/vm/arch/generic/Call.cpp
index c23e7c823..ed239d40e 100644
--- a/vm/arch/generic/Call.cpp
+++ b/vm/arch/generic/Call.cpp
@@ -41,7 +41,7 @@ static ffi_type* getFfiType(char sigType)
case '[':
case 'L': return &ffi_type_pointer;
default:
- LOGE("bad ffitype 0x%02x", sigType);
+ ALOGE("bad ffitype 0x%02x", sigType);
dvmAbort();
return NULL;
}
@@ -104,7 +104,7 @@ void dvmPlatformInvoke(void* pEnv, ClassObject* clazz, int argInfo, int argc,
* Prep the CIF (Call InterFace object).
*/
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, dstArg, retType, types) != FFI_OK) {
- LOGE("ffi_prep_cif failed");
+ ALOGE("ffi_prep_cif failed");
dvmAbort();
}
diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp
index 4236d53b9..b9b310516 100644
--- a/vm/compiler/Compiler.cpp
+++ b/vm/compiler/Compiler.cpp
@@ -68,7 +68,7 @@ void dvmCompilerForceWorkEnqueue(const u2 *pc, WorkOrderKind kind, void* info)
if (!success) {
retries++;
if (retries > ENQUEUE_MAX_RETRIES) {
- LOGE("JIT: compiler queue wedged - forcing reset");
+ ALOGE("JIT: compiler queue wedged - forcing reset");
gDvmJit.codeCacheFull = true; // Force reset
success = true; // Because we'll drop the order now anyway
} else {
@@ -169,7 +169,7 @@ bool dvmCompilerSetupCodeCache(void)
/* Allocate the code cache */
fd = ashmem_create_region("dalvik-jit-code-cache", gDvmJit.codeCacheSize);
if (fd < 0) {
- LOGE("Could not create %u-byte ashmem region for the JIT code cache",
+ ALOGE("Could not create %u-byte ashmem region for the JIT code cache",
gDvmJit.codeCacheSize);
return false;
}
@@ -178,7 +178,7 @@ bool dvmCompilerSetupCodeCache(void)
MAP_PRIVATE , fd, 0);
close(fd);
if (gDvmJit.codeCache == MAP_FAILED) {
- LOGE("Failed to mmap the JIT code cache: %s", strerror(errno));
+ ALOGE("Failed to mmap the JIT code cache: %s", strerror(errno));
return false;
}
@@ -213,7 +213,7 @@ bool dvmCompilerSetupCodeCache(void)
PROTECT_CODE_CACHE_ATTRS);
if (result == -1) {
- LOGE("Failed to remove the write permission for the code cache");
+ ALOGE("Failed to remove the write permission for the code cache");
dvmAbort();
}
@@ -418,7 +418,7 @@ static bool compilerThreadStartup(void)
pJitTable = (JitEntry*)
calloc(gDvmJit.jitTableSize, sizeof(*pJitTable));
if (!pJitTable) {
- LOGE("jit table allocation failed");
+ ALOGE("jit table allocation failed");
dvmUnlockMutex(&gDvmJit.tableLock);
goto fail;
}
@@ -432,7 +432,7 @@ static bool compilerThreadStartup(void)
*/
pJitProfTable = (unsigned char *)malloc(JIT_PROF_SIZE);
if (!pJitProfTable) {
- LOGE("jit prof table allocation failed");
+ ALOGE("jit prof table allocation failed");
free(pJitProfTable);
dvmUnlockMutex(&gDvmJit.tableLock);
goto fail;
@@ -448,7 +448,7 @@ static bool compilerThreadStartup(void)
pJitTraceProfCounters = (JitTraceProfCounters*)
calloc(1, sizeof(*pJitTraceProfCounters));
if (!pJitTraceProfCounters) {
- LOGE("jit trace prof counters allocation failed");
+ ALOGE("jit trace prof counters allocation failed");
dvmUnlockMutex(&gDvmJit.tableLock);
goto fail;
}
diff --git a/vm/compiler/Dataflow.cpp b/vm/compiler/Dataflow.cpp
index e4d0e41fa..7bed8396a 100644
--- a/vm/compiler/Dataflow.cpp
+++ b/vm/compiler/Dataflow.cpp
@@ -864,7 +864,7 @@ char *dvmCompilerGetDalvikDisassembly(const DecodedInstruction *insn,
offset = (int) insn->vA;
break;
default:
- LOGE("Unexpected branch format %d / opcode %#x", dalvikFormat,
+ ALOGE("Unexpected branch format %d / opcode %#x", dalvikFormat,
opcode);
dvmAbort();
break;
@@ -974,7 +974,7 @@ char *dvmCompilerFullDisassembler(const CompilationUnit *cUnit,
delta = (int) insn->vA;
break;
default:
- LOGE("Unexpected branch format: %d", dalvikFormat);
+ ALOGE("Unexpected branch format: %d", dalvikFormat);
dvmAbort();
break;
}
diff --git a/vm/compiler/Frontend.cpp b/vm/compiler/Frontend.cpp
index 176983e91..a36eedbb6 100644
--- a/vm/compiler/Frontend.cpp
+++ b/vm/compiler/Frontend.cpp
@@ -357,22 +357,22 @@ CompilerMethodStats *dvmCompilerAnalyzeMethodBody(const Method *method,
#if 0
/* Uncomment the following to explore various callee patterns */
if (attributes & METHOD_IS_THROW_FREE) {
- LOGE("%s%s is inlinable%s", method->clazz->descriptor, method->name,
+ ALOGE("%s%s is inlinable%s", method->clazz->descriptor, method->name,
(attributes & METHOD_IS_EMPTY) ? " empty" : "");
}
if (attributes & METHOD_IS_LEAF) {
- LOGE("%s%s is leaf %d%s", method->clazz->descriptor, method->name,
+ ALOGE("%s%s is leaf %d%s", method->clazz->descriptor, method->name,
insnSize, insnSize < 5 ? " (small)" : "");
}
if (attributes & (METHOD_IS_GETTER | METHOD_IS_SETTER)) {
- LOGE("%s%s is %s", method->clazz->descriptor, method->name,
+ ALOGE("%s%s is %s", method->clazz->descriptor, method->name,
attributes & METHOD_IS_GETTER ? "getter": "setter");
}
if (attributes ==
(METHOD_IS_LEAF | METHOD_IS_THROW_FREE | METHOD_IS_CALLEE)) {
- LOGE("%s%s is inlinable non setter/getter", method->clazz->descriptor,
+ ALOGE("%s%s is inlinable non setter/getter", method->clazz->descriptor,
method->name);
}
#endif
@@ -519,7 +519,7 @@ static BasicBlock *splitBlock(CompilationUnit *cUnit,
insn = insn->next;
}
if (insn == NULL) {
- LOGE("Break split failed");
+ ALOGE("Break split failed");
dvmAbort();
}
BasicBlock *bottomBlock = dvmCompilerNewBB(kDalvikByteCode,
@@ -814,7 +814,7 @@ static bool verifyPredInfo(CompilationUnit *cUnit, BasicBlock *bb)
dvmGetBlockName(bb, blockName1);
dvmGetBlockName(predBB, blockName2);
dvmDumpCFG(cUnit, "/sdcard/cfg/");
- LOGE("Successor %s not found from %s",
+ ALOGE("Successor %s not found from %s",
blockName1, blockName2);
dvmAbort();
}
@@ -909,7 +909,7 @@ static void processCanBranch(CompilationUnit *cUnit, BasicBlock *curBlock,
target += (int) insn->dalvikInsn.vB;
break;
default:
- LOGE("Unexpected opcode(%d) with kInstrCanBranch set",
+ ALOGE("Unexpected opcode(%d) with kInstrCanBranch set",
insn->dalvikInsn.opcode);
dvmAbort();
}
@@ -999,7 +999,7 @@ static void processCanSwitch(CompilationUnit *cUnit, BasicBlock *curBlock,
}
if (curBlock->successorBlockList.blockListType != kNotUsed) {
- LOGE("Successor block list already in use: %d",
+ ALOGE("Successor block list already in use: %d",
curBlock->successorBlockList.blockListType);
dvmAbort();
}
@@ -1050,13 +1050,13 @@ static void processCanThrow(CompilationUnit *cUnit, BasicBlock *curBlock,
DexCatchIterator iterator;
if (!dexFindCatchHandler(&iterator, dexCode, curOffset)) {
- LOGE("Catch block not found in dexfile for insn %x in %s",
+ ALOGE("Catch block not found in dexfile for insn %x in %s",
curOffset, method->name);
dvmAbort();
}
if (curBlock->successorBlockList.blockListType != kNotUsed) {
- LOGE("Successor block list already in use: %d",
+ ALOGE("Successor block list already in use: %d",
curBlock->successorBlockList.blockListType);
dvmAbort();
}
diff --git a/vm/compiler/InlineTransformation.cpp b/vm/compiler/InlineTransformation.cpp
index 53278a7fb..650340c5e 100644
--- a/vm/compiler/InlineTransformation.cpp
+++ b/vm/compiler/InlineTransformation.cpp
@@ -73,7 +73,7 @@ static bool inlineGetter(CompilationUnit *cUnit,
/* Expecting vA to be the destination register */
if (dfFlags & (DF_UA | DF_UA_WIDE)) {
- LOGE("opcode %d has DF_UA set (not expected)", getterInsn.opcode);
+ ALOGE("opcode %d has DF_UA set (not expected)", getterInsn.opcode);
dvmAbort();
}
diff --git a/vm/compiler/Loop.cpp b/vm/compiler/Loop.cpp
index 90c97d767..50e7c4852 100644
--- a/vm/compiler/Loop.cpp
+++ b/vm/compiler/Loop.cpp
@@ -26,11 +26,11 @@
static void dumpConstants(CompilationUnit *cUnit)
{
int i;
- LOGE("LOOP starting offset: %x", cUnit->entryBlock->startOffset);
+ ALOGE("LOOP starting offset: %x", cUnit->entryBlock->startOffset);
for (i = 0; i < cUnit->numSSARegs; i++) {
if (dvmIsBitSet(cUnit->isConstantV, i)) {
int subNReg = dvmConvertSSARegToDalvik(cUnit, i);
- LOGE("CONST: s%d(v%d_%d) has %d", i,
+ ALOGE("CONST: s%d(v%d_%d) has %d", i,
DECODE_REG(subNReg), DECODE_SUB(subNReg),
cUnit->constantValues[i]);
}
@@ -48,7 +48,7 @@ static void dumpIVList(CompilationUnit *cUnit)
int iv = dvmConvertSSARegToDalvik(cUnit, ivInfo->ssaReg);
/* Basic IV */
if (ivInfo->ssaReg == ivInfo->basicSSAReg) {
- LOGE("BIV %d: s%d(v%d_%d) + %d", i,
+ ALOGE("BIV %d: s%d(v%d_%d) + %d", i,
ivInfo->ssaReg,
DECODE_REG(iv), DECODE_SUB(iv),
ivInfo->inc);
@@ -56,7 +56,7 @@ static void dumpIVList(CompilationUnit *cUnit)
} else {
int biv = dvmConvertSSARegToDalvik(cUnit, ivInfo->basicSSAReg);
- LOGE("DIV %d: s%d(v%d_%d) = %d * s%d(v%d_%d) + %d", i,
+ ALOGE("DIV %d: s%d(v%d_%d) = %d * s%d(v%d_%d) + %d", i,
ivInfo->ssaReg,
DECODE_REG(iv), DECODE_SUB(iv),
ivInfo->m,
@@ -80,13 +80,13 @@ static void dumpHoistedChecks(CompilationUnit *cUnit)
dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
int idxReg = DECODE_REG(
dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
- LOGE("Array access %d", i);
- LOGE(" arrayReg %d", arrayReg);
- LOGE(" idxReg %d", idxReg);
- LOGE(" endReg %d", loopAnalysis->endConditionReg);
- LOGE(" maxC %d", arrayAccessInfo->maxC);
- LOGE(" minC %d", arrayAccessInfo->minC);
- LOGE(" opcode %d", loopAnalysis->loopBranchOpcode);
+ ALOGE("Array access %d", i);
+ ALOGE(" arrayReg %d", arrayReg);
+ ALOGE(" idxReg %d", idxReg);
+ ALOGE(" endReg %d", loopAnalysis->endConditionReg);
+ ALOGE(" maxC %d", arrayAccessInfo->maxC);
+ ALOGE(" minC %d", arrayAccessInfo->minC);
+ ALOGE(" opcode %d", loopAnalysis->loopBranchOpcode);
}
}
@@ -149,7 +149,7 @@ static Opcode negateOpcode(Opcode opcode)
case OP_IF_LEZ:
return OP_IF_GTZ;
default:
- LOGE("opcode %d cannot be negated", opcode);
+ ALOGE("opcode %d cannot be negated", opcode);
dvmAbort();
break;
}
@@ -391,7 +391,7 @@ static bool doLoopBodyCodeMotion(CompilationUnit *cUnit)
break;
default:
refIdx = 0;
- LOGE("Jit: bad case in doLoopBodyCodeMotion");
+ ALOGE("Jit: bad case in doLoopBodyCodeMotion");
dvmCompilerAbort(cUnit);
}
@@ -504,7 +504,7 @@ static void genHoistedChecks(CompilationUnit *cUnit)
dvmCompilerAppendMIR(entry, boundCheckMIR);
}
} else {
- LOGE("Jit: bad case in genHoistedChecks");
+ ALOGE("Jit: bad case in genHoistedChecks");
dvmCompilerAbort(cUnit);
}
}
diff --git a/vm/compiler/SSATransformation.cpp b/vm/compiler/SSATransformation.cpp
index 542fff55d..7dde59411 100644
--- a/vm/compiler/SSATransformation.cpp
+++ b/vm/compiler/SSATransformation.cpp
@@ -366,7 +366,7 @@ static void computeSuccLiveIn(BitVector *dest,
dest->storageSize != src2->storageSize ||
dest->expandable != src1->expandable ||
dest->expandable != src2->expandable) {
- LOGE("Incompatible set properties");
+ ALOGE("Incompatible set properties");
dvmAbort();
}
diff --git a/vm/compiler/Utility.cpp b/vm/compiler/Utility.cpp
index b45530110..2fe94d2e8 100644
--- a/vm/compiler/Utility.cpp
+++ b/vm/compiler/Utility.cpp
@@ -27,7 +27,7 @@ bool dvmCompilerHeapInit(void)
arenaHead =
(ArenaMemBlock *) malloc(sizeof(ArenaMemBlock) + ARENA_DEFAULT_SIZE);
if (arenaHead == NULL) {
- LOGE("No memory left to create compiler heap memory");
+ ALOGE("No memory left to create compiler heap memory");
return false;
}
arenaHead->blockSize = ARENA_DEFAULT_SIZE;
@@ -69,7 +69,7 @@ retry:
ArenaMemBlock *newArena = (ArenaMemBlock *)
malloc(sizeof(ArenaMemBlock) + blockSize);
if (newArena == NULL) {
- LOGE("Arena allocation failure");
+ ALOGE("Arena allocation failure");
dvmAbort();
}
newArena->blockSize = blockSize;
@@ -326,7 +326,7 @@ bool dvmCompilerSetBit(BitVector *pBits, unsigned int num)
bool dvmCompilerClearBit(BitVector *pBits, unsigned int num)
{
if (num >= pBits->storageSize * sizeof(u4) * 8) {
- LOGE("Trying to clear a bit that is not set in the vector yet!");
+ ALOGE("Trying to clear a bit that is not set in the vector yet!");
dvmAbort();
}
@@ -347,17 +347,17 @@ void dvmDebugBitVector(char *msg, const BitVector *bv, int length)
{
int i;
- LOGE("%s", msg);
+ ALOGE("%s", msg);
for (i = 0; i < length; i++) {
if (dvmIsBitSet(bv, i)) {
- LOGE(" Bit %d is set", i);
+ ALOGE(" Bit %d is set", i);
}
}
}
void dvmCompilerAbort(CompilationUnit *cUnit)
{
- LOGE("Jit: aborting trace compilation, reverting to interpreter");
+ ALOGE("Jit: aborting trace compilation, reverting to interpreter");
/* Force a traceback in debug builds */
assert(0);
/*
@@ -372,14 +372,14 @@ void dvmDumpBlockBitVector(const GrowableList *blocks, char *msg,
{
int i;
- LOGE("%s", msg);
+ ALOGE("%s", msg);
for (i = 0; i < length; i++) {
if (dvmIsBitSet(bv, i)) {
BasicBlock *bb =
(BasicBlock *) dvmGrowableListGetElement(blocks, i);
char blockName[BLOCK_NAME_LEN];
dvmGetBlockName(bb, blockName);
- LOGE("Bit %d / %s is set", i, blockName);
+ ALOGE("Bit %d / %s is set", i, blockName);
}
}
}
diff --git a/vm/compiler/codegen/RallocUtil.cpp b/vm/compiler/codegen/RallocUtil.cpp
index 27d1f0597..f4a46f0f9 100644
--- a/vm/compiler/codegen/RallocUtil.cpp
+++ b/vm/compiler/codegen/RallocUtil.cpp
@@ -71,13 +71,13 @@ extern void dvmCompilerInitPool(RegisterInfo *regs, int *regNums, int num)
static void dumpRegPool(RegisterInfo *p, int numRegs)
{
int i;
- LOGE("================================================");
+ ALOGE("================================================");
for (i=0; i < numRegs; i++ ){
- LOGE("R[%d]: U:%d, P:%d, part:%d, LV:%d, D:%d, SR:%d, ST:%x, EN:%x",
+ ALOGE("R[%d]: U:%d, P:%d, part:%d, LV:%d, D:%d, SR:%d, ST:%x, EN:%x",
p[i].reg, p[i].inUse, p[i].pair, p[i].partner, p[i].live,
p[i].dirty, p[i].sReg,(int)p[i].defStart, (int)p[i].defEnd);
}
- LOGE("================================================");
+ ALOGE("================================================");
}
static RegisterInfo *getRegInfo(CompilationUnit *cUnit, int reg)
@@ -97,7 +97,7 @@ static RegisterInfo *getRegInfo(CompilationUnit *cUnit, int reg)
return &p[i];
}
}
- LOGE("Tried to get info on a non-existant temp: r%d",reg);
+ ALOGE("Tried to get info on a non-existant temp: r%d",reg);
dvmCompilerAbort(cUnit);
return NULL;
}
@@ -223,7 +223,7 @@ static int allocTempBody(CompilationUnit *cUnit, RegisterInfo *p, int numTemps,
next++;
}
if (required) {
- LOGE("No free temp registers");
+ ALOGE("No free temp registers");
dvmCompilerAbort(cUnit);
}
return -1; // No register available
@@ -272,7 +272,7 @@ extern int dvmCompilerAllocTempDouble(CompilationUnit *cUnit)
}
next += 2;
}
- LOGE("No free temp registers");
+ ALOGE("No free temp registers");
dvmCompilerAbort(cUnit);
return -1;
}
@@ -333,7 +333,7 @@ static RegisterInfo *allocLive(CompilationUnit *cUnit, int sReg,
cUnit->regPool->numFPTemps, sReg);
break;
default:
- LOGE("Invalid register type");
+ ALOGE("Invalid register type");
dvmCompilerAbort(cUnit);
}
return res;
@@ -360,7 +360,7 @@ extern void dvmCompilerFreeTemp(CompilationUnit *cUnit, int reg)
return;
}
}
- LOGE("Tried to free a non-existant temp: r%d",reg);
+ ALOGE("Tried to free a non-existant temp: r%d",reg);
dvmCompilerAbort(cUnit);
}
@@ -430,7 +430,7 @@ extern void dvmCompilerLockTemp(CompilationUnit *cUnit, int reg)
return;
}
}
- LOGE("Tried to lock a non-existant temp: r%d",reg);
+ ALOGE("Tried to lock a non-existant temp: r%d",reg);
dvmCompilerAbort(cUnit);
}
diff --git a/vm/compiler/codegen/arm/ArchFactory.cpp b/vm/compiler/codegen/arm/ArchFactory.cpp
index 5a03b17ad..2daa7bcba 100644
--- a/vm/compiler/codegen/arm/ArchFactory.cpp
+++ b/vm/compiler/codegen/arm/ArchFactory.cpp
@@ -40,7 +40,7 @@ static TGT_LIR *genRegImmCheck(CompilationUnit *cUnit,
branch->generic.target = (LIR *) exceptionLabel;
return exceptionLabel;
} else {
- LOGE("Catch blocks not handled yet");
+ ALOGE("Catch blocks not handled yet");
dvmAbort();
return NULL;
}
diff --git a/vm/compiler/codegen/arm/Assemble.cpp b/vm/compiler/codegen/arm/Assemble.cpp
index 09d2bc18b..9842eaf17 100644
--- a/vm/compiler/codegen/arm/Assemble.cpp
+++ b/vm/compiler/codegen/arm/Assemble.cpp
@@ -958,7 +958,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit,
intptr_t target = lirTarget->generic.offset;
int delta = target - pc;
if (delta & 0x3) {
- LOGE("PC-rel distance is not multiples of 4: %d", delta);
+ ALOGE("PC-rel distance is not multiples of 4: %d", delta);
dvmCompilerAbort(cUnit);
}
if ((lir->opcode == kThumb2LdrPcRel12) && (delta > 4091)) {
@@ -1035,7 +1035,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit,
intptr_t target = targetLIR->generic.offset;
int delta = target - pc;
if (delta > 2046 || delta < -2048) {
- LOGE("Unconditional branch distance out of range: %d", delta);
+ ALOGE("Unconditional branch distance out of range: %d", delta);
dvmCompilerAbort(cUnit);
}
lir->operands[0] = delta >> 1;
@@ -1437,7 +1437,7 @@ void dvmCompilerAssembleLIR(CompilationUnit *cUnit, JitTranslationInfo *info)
/* Allocate enough space for the code block */
cUnit->codeBuffer = (unsigned char *)dvmCompilerNew(chainCellOffset, true);
if (cUnit->codeBuffer == NULL) {
- LOGE("Code buffer allocation failure");
+ ALOGE("Code buffer allocation failure");
info->discardResult = true;
return;
}
@@ -1467,7 +1467,7 @@ void dvmCompilerAssembleLIR(CompilationUnit *cUnit, JitTranslationInfo *info)
case kRetryHalve:
return;
default:
- LOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
+ ALOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
dvmAbort();
}
@@ -1939,7 +1939,7 @@ static u4* unchainSingle(JitEntry *trace)
predChainCell->clazz = PREDICTED_CHAIN_CLAZZ_INIT;
break;
default:
- LOGE("Unexpected chaining type: %d", i);
+ ALOGE("Unexpected chaining type: %d", i);
dvmAbort(); // dvmAbort OK here - can't safely recover
}
COMPILER_TRACE_CHAINING(
@@ -2418,7 +2418,7 @@ static int selfVerificationLoad(int addr, int size)
data = *((u4*) addr);
break;
default:
- LOGE("*** ERROR: BAD SIZE IN selfVerificationLoad: %d", size);
+ ALOGE("*** ERROR: BAD SIZE IN selfVerificationLoad: %d", size);
data = 0;
dvmAbort();
}
@@ -2498,7 +2498,7 @@ static void selfVerificationStore(int addr, int data, int size)
*((u4*) addr) = data;
break;
default:
- LOGE("*** ERROR: BAD SIZE IN selfVerificationSave: %d", size);
+ ALOGE("*** ERROR: BAD SIZE IN selfVerificationSave: %d", size);
dvmAbort();
}
}
@@ -2712,7 +2712,7 @@ void dvmSelfVerificationMemOpDecode(int lr, int* sp)
if (insn & 0x400000) rt |= 0x10;
rt = rt << 1;
} else {
- LOGE("*** ERROR: UNRECOGNIZED VECTOR MEM OP: %x", opcode4);
+ ALOGE("*** ERROR: UNRECOGNIZED VECTOR MEM OP: %x", opcode4);
dvmAbort();
}
rt += 14;
@@ -2745,7 +2745,7 @@ void dvmSelfVerificationMemOpDecode(int lr, int* sp)
offset = 0;
break;
default:
- LOGE("*** ERROR: UNRECOGNIZED THUMB2 MEM OP: %x", opcode12);
+ ALOGE("*** ERROR: UNRECOGNIZED THUMB2 MEM OP: %x", opcode12);
offset = 0;
dvmAbort();
}
@@ -2895,7 +2895,7 @@ void dvmSelfVerificationMemOpDecode(int lr, int* sp)
offset = 0;
break;
default:
- LOGE("*** ERROR: UNRECOGNIZED THUMB MEM OP: %x", opcode5);
+ ALOGE("*** ERROR: UNRECOGNIZED THUMB MEM OP: %x", opcode5);
offset = 0;
dvmAbort();
}
diff --git a/vm/compiler/codegen/arm/CodegenCommon.cpp b/vm/compiler/codegen/arm/CodegenCommon.cpp
index ae41fe9af..07f3ac765 100644
--- a/vm/compiler/codegen/arm/CodegenCommon.cpp
+++ b/vm/compiler/codegen/arm/CodegenCommon.cpp
@@ -62,7 +62,7 @@ static void setMemRefType(ArmLIR *lir, bool isLoad, int memType)
*maskPtr |= ENCODE_MUST_NOT_ALIAS;
break;
default:
- LOGE("Jit: invalid memref kind - %d", memType);
+ ALOGE("Jit: invalid memref kind - %d", memType);
assert(0); // Bail if debug build, set worst-case in the field
*maskPtr |= ENCODE_ALL;
}
@@ -302,7 +302,7 @@ static ArmLIR *newLIR3(CompilationUnit *cUnit, ArmOpcode opcode,
{
ArmLIR *insn = (ArmLIR *) dvmCompilerNew(sizeof(ArmLIR), true);
if (!(EncodingMap[opcode].flags & IS_TERTIARY_OP)) {
- LOGE("Bad LIR3: %s[%d]",EncodingMap[opcode].name,opcode);
+ ALOGE("Bad LIR3: %s[%d]",EncodingMap[opcode].name,opcode);
}
assert(isPseudoOpcode(opcode) ||
(EncodingMap[opcode].flags & IS_TERTIARY_OP));
diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp
index 57fd38808..d7017b0fe 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/CodegenDriver.cpp
@@ -738,7 +738,7 @@ static bool genArithOpLong(CompilationUnit *cUnit, MIR *mir,
return false;
}
default:
- LOGE("Invalid long arith op");
+ ALOGE("Invalid long arith op");
dvmCompilerAbort(cUnit);
}
if (!callOut) {
@@ -840,7 +840,7 @@ static bool genArithOpInt(CompilationUnit *cUnit, MIR *mir,
op = kOpLsr;
break;
default:
- LOGE("Invalid word arith op: %#x(%d)",
+ ALOGE("Invalid word arith op: %#x(%d)",
mir->dalvikInsn.opcode, mir->dalvikInsn.opcode);
dvmCompilerAbort(cUnit);
}
@@ -1477,7 +1477,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir)
{
Opcode dalvikOpcode = mir->dalvikInsn.opcode;
if ((dalvikOpcode >= OP_UNUSED_3E) && (dalvikOpcode <= OP_UNUSED_43)) {
- LOGE("Codegen: got unused opcode %#x",dalvikOpcode);
+ ALOGE("Codegen: got unused opcode %#x",dalvikOpcode);
return true;
}
switch (dalvikOpcode) {
@@ -1491,7 +1491,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir)
case OP_UNUSED_79:
case OP_UNUSED_7A:
case OP_UNUSED_FF:
- LOGE("Codegen: got unused opcode %#x",dalvikOpcode);
+ ALOGE("Codegen: got unused opcode %#x",dalvikOpcode);
return true;
case OP_NOP:
break;
@@ -1586,7 +1586,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (strPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null string");
+ ALOGE("Unexpected null string");
dvmAbort();
}
@@ -1602,7 +1602,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (classPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null class");
+ ALOGE("Unexpected null class");
dvmAbort();
}
@@ -1630,7 +1630,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (fieldPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null static field");
+ ALOGE("Unexpected null static field");
dvmAbort();
}
@@ -1674,7 +1674,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (fieldPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null static field");
+ ALOGE("Unexpected null static field");
dvmAbort();
}
@@ -1711,7 +1711,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (fieldPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null static field");
+ ALOGE("Unexpected null static field");
dvmAbort();
}
@@ -1761,7 +1761,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (fieldPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null static field");
+ ALOGE("Unexpected null static field");
dvmAbort();
}
@@ -1784,7 +1784,7 @@ static bool handleFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
if (classPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null class");
+ ALOGE("Unexpected null class");
dvmAbort();
}
@@ -2129,7 +2129,7 @@ static bool handleFmt21t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
break;
default:
cond = (ArmConditionCode)0;
- LOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode);
+ ALOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode);
dvmCompilerAbort(cUnit);
}
genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]);
@@ -2416,7 +2416,7 @@ static bool handleFmt22c(CompilationUnit *cUnit, MIR *mir)
if (fieldPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null instance field");
+ ALOGE("Unexpected null instance field");
dvmAbort();
}
@@ -2443,7 +2443,7 @@ static bool handleFmt22c(CompilationUnit *cUnit, MIR *mir)
if (classPtr == NULL) {
BAIL_LOOP_COMPILATION();
- LOGE("Unexpected null class");
+ ALOGE("Unexpected null class");
dvmAbort();
}
@@ -2632,7 +2632,7 @@ static bool handleFmt22t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
break;
default:
cond = (ArmConditionCode)0;
- LOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode);
+ ALOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode);
dvmCompilerAbort(cUnit);
}
genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]);
@@ -4465,7 +4465,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit)
}
}
if (notHandled) {
- LOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
+ ALOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
mir->offset,
dalvikOpcode, dexGetOpcodeName(dalvikOpcode),
dalvikFormat);
@@ -4549,7 +4549,7 @@ gen_fallthrough:
chainingBlock->startOffset);
break;
default:
- LOGE("Bad blocktype %d", chainingBlock->blockType);
+ ALOGE("Bad blocktype %d", chainingBlock->blockType);
dvmCompilerAbort(cUnit);
}
}
@@ -4620,7 +4620,7 @@ bool dvmCompilerDoWork(CompilerWorkOrder *work)
break;
default:
isCompile = false;
- LOGE("Jit: unknown work order type");
+ ALOGE("Jit: unknown work order type");
assert(0); // Bail if debug build, discard otherwise
}
if (!success)
@@ -4681,7 +4681,7 @@ bool dvmCompilerArchInit()
for (i = 0; i < kArmLast; i++) {
if (EncodingMap[i].opcode != i) {
- LOGE("Encoding order for %s is wrong: expecting %d, seeing %d",
+ ALOGE("Encoding order for %s is wrong: expecting %d, seeing %d",
EncodingMap[i].name, i, EncodingMap[i].opcode);
dvmAbort(); // OK to dvmAbort - build error
}
diff --git a/vm/compiler/codegen/arm/Thumb/Factory.cpp b/vm/compiler/codegen/arm/Thumb/Factory.cpp
index 9cdd75f46..1b65a03ac 100644
--- a/vm/compiler/codegen/arm/Thumb/Factory.cpp
+++ b/vm/compiler/codegen/arm/Thumb/Factory.cpp
@@ -148,7 +148,7 @@ static ArmLIR *opNone(CompilationUnit *cUnit, OpKind op)
opcode = kThumbBUncond;
break;
default:
- LOGE("Jit: bad case in opNone");
+ ALOGE("Jit: bad case in opNone");
dvmCompilerAbort(cUnit);
}
return newLIR0(cUnit, opcode);
@@ -170,7 +170,7 @@ static ArmLIR *opImm(CompilationUnit *cUnit, OpKind op, int value)
opcode = kThumbPop;
break;
default:
- LOGE("Jit: bad case in opCondBranch");
+ ALOGE("Jit: bad case in opCondBranch");
dvmCompilerAbort(cUnit);
}
return newLIR1(cUnit, opcode, value);
@@ -184,7 +184,7 @@ static ArmLIR *opReg(CompilationUnit *cUnit, OpKind op, int rDestSrc)
opcode = kThumbBlxR;
break;
default:
- LOGE("Jit: bad case in opReg");
+ ALOGE("Jit: bad case in opReg");
dvmCompilerAbort(cUnit);
}
return newLIR1(cUnit, opcode, rDestSrc);
@@ -230,7 +230,7 @@ static ArmLIR *opRegImm(CompilationUnit *cUnit, OpKind op, int rDestSrc1,
}
break;
default:
- LOGE("Jit: bad case in opRegImm");
+ ALOGE("Jit: bad case in opRegImm");
dvmCompilerAbort(cUnit);
break;
}
@@ -351,7 +351,7 @@ static ArmLIR *opRegRegImm(CompilationUnit *cUnit, OpKind op, int rDest,
}
return res;
default:
- LOGE("Jit: bad case in opRegRegImm");
+ ALOGE("Jit: bad case in opRegRegImm");
dvmCompilerAbort(cUnit);
break;
}
@@ -449,7 +449,7 @@ static ArmLIR *opRegReg(CompilationUnit *cUnit, OpKind op, int rDestSrc1,
opRegRegImm(cUnit, kOpLsr, rDestSrc1, rDestSrc1, 16);
return res;
default:
- LOGE("Jit: bad case in opRegReg");
+ ALOGE("Jit: bad case in opRegReg");
dvmCompilerAbort(cUnit);
break;
}
@@ -495,7 +495,7 @@ static ArmLIR *loadBaseIndexed(CompilationUnit *cUnit, int rBase,
opcode = kThumbLdrsbRRR;
break;
default:
- LOGE("Jit: bad case in loadBaseIndexed");
+ ALOGE("Jit: bad case in loadBaseIndexed");
dvmCompilerAbort(cUnit);
}
res = newLIR3(cUnit, opcode, rDest, rBase, rNewIndex);
@@ -533,7 +533,7 @@ static ArmLIR *storeBaseIndexed(CompilationUnit *cUnit, int rBase,
opcode = kThumbStrbRRR;
break;
default:
- LOGE("Jit: bad case in storeBaseIndexed");
+ ALOGE("Jit: bad case in storeBaseIndexed");
dvmCompilerAbort(cUnit);
}
res = newLIR3(cUnit, opcode, rSrc, rBase, rNewIndex);
@@ -650,7 +650,7 @@ static ArmLIR *loadBaseDispBody(CompilationUnit *cUnit, MIR *mir, int rBase,
opcode = kThumbLdrsbRRR;
break;
default:
- LOGE("Jit: bad case in loadBaseIndexedBody");
+ ALOGE("Jit: bad case in loadBaseIndexedBody");
dvmCompilerAbort(cUnit);
}
if (shortForm) {
@@ -767,7 +767,7 @@ static ArmLIR *storeBaseDispBody(CompilationUnit *cUnit, int rBase,
}
break;
default:
- LOGE("Jit: bad case in storeBaseIndexedBody");
+ ALOGE("Jit: bad case in storeBaseIndexedBody");
dvmCompilerAbort(cUnit);
}
if (shortForm) {
diff --git a/vm/compiler/codegen/arm/Thumb2/Gen.cpp b/vm/compiler/codegen/arm/Thumb2/Gen.cpp
index fcf0fe34c..ea6454779 100644
--- a/vm/compiler/codegen/arm/Thumb2/Gen.cpp
+++ b/vm/compiler/codegen/arm/Thumb2/Gen.cpp
@@ -186,7 +186,7 @@ static ArmLIR *genIT(CompilationUnit *cUnit, ArmConditionCode code,
case 0:
break;
default:
- LOGE("Jit: bad case in genIT");
+ ALOGE("Jit: bad case in genIT");
dvmCompilerAbort(cUnit);
}
mask = (mask3 << 3) | (mask2 << 2) | (mask1 << 1) |
diff --git a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
index 5188417c9..3b5c08332 100644
--- a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
@@ -77,7 +77,7 @@ bool dvmCompilerArchVariantInit(void)
*/
if ((offsetof(Thread, jitToInterpEntries) +
sizeof(struct JitToInterpEntries)) >= 128) {
- LOGE("Thread.jitToInterpEntries size overflow");
+ ALOGE("Thread.jitToInterpEntries size overflow");
dvmAbort();
}
@@ -98,7 +98,7 @@ int dvmCompilerTargetOptHint(int key)
res = 2;
break;
default:
- LOGE("Unknown target optimization hint key: %d",key);
+ ALOGE("Unknown target optimization hint key: %d",key);
res = 0;
}
return res;
diff --git a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
index f394aa1c8..f2d4815ac 100644
--- a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
@@ -77,7 +77,7 @@ bool dvmCompilerArchVariantInit(void)
*/
if ((offsetof(Thread, jitToInterpEntries) +
sizeof(struct JitToInterpEntries)) >= 128) {
- LOGE("Thread.jitToInterpEntries size overflow");
+ ALOGE("Thread.jitToInterpEntries size overflow");
dvmAbort();
}
@@ -98,7 +98,7 @@ int dvmCompilerTargetOptHint(int key)
res = 2;
break;
default:
- LOGE("Unknown target optimization hint key: %d",key);
+ ALOGE("Unknown target optimization hint key: %d",key);
res = 0;
}
return res;
diff --git a/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp b/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
index 20779f3e9..a0dba0a56 100644
--- a/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
@@ -16,6 +16,6 @@
void dvmCompilerMethodMIR2LIR(CompilationUnit *cUnit)
{
- LOGE("Method-based JIT not supported for the v5te target");
+ ALOGE("Method-based JIT not supported for the v5te target");
dvmAbort();
}
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
index c3fe518e0..e3b27243c 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
@@ -72,7 +72,7 @@ bool dvmCompilerArchVariantInit(void)
*/
if ((offsetof(Thread, jitToInterpEntries) +
sizeof(struct JitToInterpEntries)) >= 128) {
- LOGE("Thread.jitToInterpEntries size overflow");
+ ALOGE("Thread.jitToInterpEntries size overflow");
dvmAbort();
}
@@ -93,7 +93,7 @@ int dvmCompilerTargetOptHint(int key)
res = 7;
break;
default:
- LOGE("Unknown target optimization hint key: %d",key);
+ ALOGE("Unknown target optimization hint key: %d",key);
res = 0;
}
return res;
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
index 8df16c6d1..222b88044 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
@@ -395,7 +395,7 @@ static bool methodBlockCodeGen(CompilationUnit *cUnit, BasicBlock *bb)
}
if (notHandled) {
- LOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
+ ALOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
mir->offset,
dalvikOpcode, dexGetOpcodeName(dalvikOpcode),
dalvikFormat);
diff --git a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
index c3fe518e0..e3b27243c 100644
--- a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
@@ -72,7 +72,7 @@ bool dvmCompilerArchVariantInit(void)
*/
if ((offsetof(Thread, jitToInterpEntries) +
sizeof(struct JitToInterpEntries)) >= 128) {
- LOGE("Thread.jitToInterpEntries size overflow");
+ ALOGE("Thread.jitToInterpEntries size overflow");
dvmAbort();
}
@@ -93,7 +93,7 @@ int dvmCompilerTargetOptHint(int key)
res = 7;
break;
default:
- LOGE("Unknown target optimization hint key: %d",key);
+ ALOGE("Unknown target optimization hint key: %d",key);
res = 0;
}
return res;
diff --git a/vm/compiler/codegen/x86/CodegenDriver.cpp b/vm/compiler/codegen/x86/CodegenDriver.cpp
index 789d4317e..9c7bf1eab 100644
--- a/vm/compiler/codegen/x86/CodegenDriver.cpp
+++ b/vm/compiler/codegen/x86/CodegenDriver.cpp
@@ -239,7 +239,7 @@ bool dvmCompilerDoWork(CompilerWorkOrder *work)
}
default:
res = false;
- LOGE("Jit: unknown work order type");
+ ALOGE("Jit: unknown work order type");
assert(0); // Bail if debug build, discard otherwise
}
return res;
diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
index 9f17522a5..ff97d9527 100644
--- a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
+++ b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
@@ -91,7 +91,7 @@ int dvmCompilerTargetOptHint(int key)
res = 2;
break;
default:
- LOGE("Unknown target optimization hint key: %d",key);
+ ALOGE("Unknown target optimization hint key: %d",key);
res = 0;
}
return res;
diff --git a/vm/hprof/Hprof.cpp b/vm/hprof/Hprof.cpp
index c0a6c7fcd..5a772a090 100644
--- a/vm/hprof/Hprof.cpp
+++ b/vm/hprof/Hprof.cpp
@@ -43,7 +43,7 @@ hprof_context_t* hprofStartup(const char *outputFileName, int fd,
hprof_context_t *ctx = (hprof_context_t *)malloc(sizeof(*ctx));
if (ctx == NULL) {
- LOGE("hprof: can't allocate context.");
+ ALOGE("hprof: can't allocate context.");
return NULL;
}
@@ -69,7 +69,7 @@ bool hprofShutdown(hprof_context_t *tailCtx)
*/
hprof_context_t *headCtx = (hprof_context_t *)malloc(sizeof(*headCtx));
if (headCtx == NULL) {
- LOGE("hprof: can't allocate context.");
+ ALOGE("hprof: can't allocate context.");
hprofFreeContext(tailCtx);
return false;
}
@@ -115,13 +115,13 @@ bool hprofShutdown(hprof_context_t *tailCtx)
if (headCtx->fd >= 0) {
outFd = dup(headCtx->fd);
if (outFd < 0) {
- LOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
+ ALOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
/* continue to fail-handler below */
}
} else {
outFd = open(tailCtx->fileName, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (outFd < 0) {
- LOGE("can't open %s: %s", headCtx->fileName, strerror(errno));
+ ALOGE("can't open %s: %s", headCtx->fileName, strerror(errno));
/* continue to fail-handler below */
}
}
diff --git a/vm/hprof/HprofOutput.cpp b/vm/hprof/HprofOutput.cpp
index 63934381e..95bc4c2c3 100644
--- a/vm/hprof/HprofOutput.cpp
+++ b/vm/hprof/HprofOutput.cpp
@@ -74,7 +74,7 @@ void hprofContextInit(hprof_context_t *ctx, char *fileName, int fd,
FILE* fp = open_memstream(&ctx->fileDataPtr, &ctx->fileDataSize);
if (fp == NULL) {
/* not expected */
- LOGE("hprof: open_memstream failed: %s", strerror(errno));
+ ALOGE("hprof: open_memstream failed: %s", strerror(errno));
dvmAbort();
}
diff --git a/vm/interp/Interp.cpp b/vm/interp/Interp.cpp
index 83150ee45..408255fd9 100644
--- a/vm/interp/Interp.cpp
+++ b/vm/interp/Interp.cpp
@@ -317,7 +317,7 @@ static void dvmBreakpointSetRemove(BreakpointSet* pSet, Method* method,
if (idx < 0) {
/* breakpoint not found in set -- unexpected */
if (*(u1*)addr == OP_BREAKPOINT) {
- LOGE("Unable to restore breakpoint opcode (%s.%s +%#x)",
+ ALOGE("Unable to restore breakpoint opcode (%s.%s +%#x)",
method->clazz->descriptor, method->name, instrOffset);
dvmAbort();
} else {
@@ -462,7 +462,7 @@ u1 dvmGetOriginalOpcode(const u2* addr)
if (!dvmBreakpointSetOriginalOpcode(pSet, addr, &orig)) {
orig = *(u1*)addr;
if (orig == OP_BREAKPOINT) {
- LOGE("GLITCH: can't find breakpoint, opcode is still set");
+ ALOGE("GLITCH: can't find breakpoint, opcode is still set");
dvmAbort();
}
}
@@ -865,7 +865,7 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
* during single-step.
*/
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGE("HEY: invalid 'this' ptr %p (%s.%s %s)", thisPtr,
+ ALOGE("HEY: invalid 'this' ptr %p (%s.%s %s)", thisPtr,
method->clazz->descriptor, method->name, desc);
free(desc);
dvmAbort();
@@ -920,15 +920,15 @@ void dvmInterpCheckTrackedRefs(Thread* self, const Method* method,
count = dvmReferenceTableEntries(&self->internalLocalRefTable);
- LOGE("TRACK: unreleased internal reference (prev=%d total=%d)",
+ ALOGE("TRACK: unreleased internal reference (prev=%d total=%d)",
debugTrackedRefStart, count);
desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGE(" current method is %s.%s %s", method->clazz->descriptor,
+ ALOGE(" current method is %s.%s %s", method->clazz->descriptor,
method->name, desc);
free(desc);
top = self->internalLocalRefTable.table + debugTrackedRefStart;
while (top < self->internalLocalRefTable.nextEntry) {
- LOGE(" %p (%s)",
+ ALOGE(" %p (%s)",
*top,
((*top)->clazz != NULL) ? (*top)->clazz->descriptor : "");
top++;
@@ -1179,7 +1179,7 @@ static void copySwappedArrayData(void* dest, const u2* src, u4 size, u2 width)
}
break;
default:
- LOGE("Unexpected width %d in copySwappedArrayData", width);
+ ALOGE("Unexpected width %d in copySwappedArrayData", width);
dvmAbort();
break;
}
@@ -1616,7 +1616,7 @@ void dvmArmSafePointCallback(Thread* thread, SafePointCallback funct,
if ((funct != thread->callback) ||
(arg != thread->callbackArg)) {
// Yes - report failure and die
- LOGE("ArmSafePointCallback failed, thread %d", thread->threadId);
+ ALOGE("ArmSafePointCallback failed, thread %d", thread->threadId);
dvmUnlockMutex(&thread->callbackMutex);
dvmAbort();
}
@@ -1944,7 +1944,7 @@ void dvmInterpret(Thread* self, const Method* method, JValue* pResult)
if (method->clazz->status < CLASS_INITIALIZING ||
method->clazz->status == CLASS_ERROR)
{
- LOGE("ERROR: tried to execute code in unprepared class '%s' (%d)",
+ ALOGE("ERROR: tried to execute code in unprepared class '%s' (%d)",
method->clazz->descriptor, method->clazz->status);
dvmDumpThread(self, false);
dvmAbort();
diff --git a/vm/interp/Jit.cpp b/vm/interp/Jit.cpp
index 8cae67ea7..9f87705fc 100644
--- a/vm/interp/Jit.cpp
+++ b/vm/interp/Jit.cpp
@@ -926,7 +926,7 @@ void dvmCheckJit(const u2* pc, Thread* self)
sizeof(JitTraceRun) * (self->currTraceRun+1));
if (desc == NULL) {
- LOGE("Out of memory in trace selection");
+ ALOGE("Out of memory in trace selection");
dvmJitStopTranslationRequests();
self->jitState = kJitDone;
allDone = true;
@@ -965,7 +965,7 @@ void dvmCheckJit(const u2* pc, Thread* self)
allDone = true;
break;
default:
- LOGE("Unexpected JIT state: %d", self->jitState);
+ ALOGE("Unexpected JIT state: %d", self->jitState);
dvmAbort();
break;
}
@@ -1284,7 +1284,7 @@ void dvmJitCheckTraceRequest(Thread* self)
case kJitDone:
break;
default:
- LOGE("Unexpected JIT state: %d", self->jitState);
+ ALOGE("Unexpected JIT state: %d", self->jitState);
dvmAbort();
}
} else {
@@ -1410,7 +1410,7 @@ JitTraceCounter_t *dvmJitNextTraceCounter()
JitTraceCounter_t *p =
(JitTraceCounter_t*) calloc(JIT_PROF_BLOCK_ENTRIES, sizeof(*p));
if (!p) {
- LOGE("Failed to allocate block of trace profile counters");
+ ALOGE("Failed to allocate block of trace profile counters");
dvmAbort();
}
gDvmJit.pJitTraceProfCounters->buckets[idx] = p;
diff --git a/vm/interp/Stack.cpp b/vm/interp/Stack.cpp
index aa164393b..a1f8d7130 100644
--- a/vm/interp/Stack.cpp
+++ b/vm/interp/Stack.cpp
@@ -335,7 +335,7 @@ static bool dvmPopFrame(Thread* self)
saveBlock = SAVEAREA_FROM_FP(saveBlock->prevFrame);
}
if (saveBlock->method != NULL) {
- LOGE("PopFrame missed the break");
+ ALOGE("PopFrame missed the break");
assert(false);
dvmAbort(); // stack trashed -- nowhere to go in this thread
}
@@ -504,7 +504,7 @@ void dvmCallMethodV(Thread* self, const Method* method, Object* obj,
#ifndef NDEBUG
if (verifyCount != method->insSize) {
- LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+ ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
method->insSize, clazz->descriptor, method->name);
assert(false);
goto bail;
@@ -599,7 +599,7 @@ void dvmCallMethodA(Thread* self, const Method* method, Object* obj,
*ins++ = args->z; /* 8 bits, zero or non-zero */
break;
default:
- LOGE("Invalid char %c in short signature of %s.%s",
+ ALOGE("Invalid char %c in short signature of %s.%s",
*(desc-1), clazz->descriptor, method->name);
assert(false);
goto bail;
@@ -611,7 +611,7 @@ void dvmCallMethodA(Thread* self, const Method* method, Object* obj,
#ifndef NDEBUG
if (verifyCount != method->insSize) {
- LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+ ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
method->insSize, clazz->descriptor, method->name);
assert(false);
goto bail;
@@ -717,7 +717,7 @@ Object* dvmInvokeMethod(Object* obj, const Method* method,
#ifndef NDEBUG
if (verifyCount != method->insSize) {
- LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+ ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
method->insSize, clazz->descriptor, method->name);
assert(false);
goto bail;
@@ -1007,7 +1007,7 @@ void dvmHandleStackOverflow(Thread* self, const Method* method)
/*
* Already did, nothing to do but bail.
*/
- LOGE("DalvikVM: double-overflow of stack in threadid=%d; aborting",
+ ALOGE("DalvikVM: double-overflow of stack in threadid=%d; aborting",
self->threadId);
dvmDumpThread(self, false);
dvmAbort();
@@ -1060,7 +1060,7 @@ void dvmCleanupStackOverflow(Thread* self, const Object* exception)
newStackEnd = (self->interpStackStart - self->interpStackSize)
+ STACK_OVERFLOW_RESERVE;
if ((u1*)self->interpSave.curFrame <= newStackEnd) {
- LOGE("Can't shrink stack: curFrame is in reserved area (%p %p)",
+ ALOGE("Can't shrink stack: curFrame is in reserved area (%p %p)",
self->interpStackEnd, self->interpSave.curFrame);
dvmDumpThread(self, false);
dvmAbort();
diff --git a/vm/jdwp/ExpandBuf.cpp b/vm/jdwp/ExpandBuf.cpp
index b8ff9337a..cc3557e47 100644
--- a/vm/jdwp/ExpandBuf.cpp
+++ b/vm/jdwp/ExpandBuf.cpp
@@ -95,7 +95,7 @@ static void ensureSpace(ExpandBuf* pBuf, int newCount)
newPtr = (u1*) realloc(pBuf->storage, pBuf->maxLen);
if (newPtr == NULL) {
- LOGE("realloc(%d) failed", pBuf->maxLen);
+ ALOGE("realloc(%d) failed", pBuf->maxLen);
abort();
}
diff --git a/vm/jdwp/JdwpAdb.cpp b/vm/jdwp/JdwpAdb.cpp
index c21fb4e07..87db1d24b 100644
--- a/vm/jdwp/JdwpAdb.cpp
+++ b/vm/jdwp/JdwpAdb.cpp
@@ -201,13 +201,13 @@ retry:
netState->controlSock = socket(PF_UNIX, SOCK_STREAM, 0);
if (netState->controlSock < 0) {
- LOGE("Could not create ADB control socket:%s",
+ ALOGE("Could not create ADB control socket:%s",
strerror(errno));
return false;
}
if (pipe(netState->wakeFds) < 0) {
- LOGE("pipe failed");
+ ALOGE("pipe failed");
return false;
}
@@ -234,7 +234,7 @@ retry:
if (!ret) {
if (!socket_peer_is_trusted(netState->controlSock)) {
if (shutdown(netState->controlSock, SHUT_RDWR)) {
- LOGE("trouble shutting down socket: %s", strerror(errno));
+ ALOGE("trouble shutting down socket: %s", strerror(errno));
}
return false;
}
@@ -249,7 +249,7 @@ retry:
break;
}
- LOGE("Weird, can't send JDWP process pid to ADB: %s",
+ ALOGE("Weird, can't send JDWP process pid to ADB: %s",
strerror(errno));
return false;
}
@@ -275,7 +275,7 @@ retry:
if (netState->clientSock < 0) {
if (++retryCount > 5) {
- LOGE("adb connection max retries exceeded");
+ ALOGE("adb connection max retries exceeded");
return false;
}
goto retry;
@@ -463,7 +463,7 @@ static bool handlePacket(JdwpState* state)
ssize_t cc = netState->writePacket(pReply);
if (cc != (ssize_t) expandBufGetLength(pReply)) {
- LOGE("Failed sending reply to debugger: %s", strerror(errno));
+ ALOGE("Failed sending reply to debugger: %s", strerror(errno));
expandBufFree(pReply);
return false;
}
@@ -558,7 +558,7 @@ static bool processIncoming(JdwpState* state)
if (selCount < 0) {
if (errno == EINTR)
continue;
- LOGE("select failed: %s", strerror(errno));
+ ALOGE("select failed: %s", strerror(errno));
goto fail;
}
@@ -624,7 +624,7 @@ static bool processIncoming(JdwpState* state)
if (memcmp(netState->inputBuffer,
kMagicHandshake, kMagicHandshakeLen) != 0)
{
- LOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
+ ALOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
goto fail;
}
@@ -632,7 +632,7 @@ static bool processIncoming(JdwpState* state)
cc = write(netState->clientSock, netState->inputBuffer,
kMagicHandshakeLen);
if (cc != kMagicHandshakeLen) {
- LOGE("Failed writing handshake bytes: %s (%d of %d)",
+ ALOGE("Failed writing handshake bytes: %s (%d of %d)",
strerror(errno), cc, (int) kMagicHandshakeLen);
goto fail;
}
@@ -676,7 +676,7 @@ static bool sendRequest(JdwpState* state, ExpandBuf* pReq)
ssize_t cc = netState->writePacket(pReq);
if (cc != (ssize_t) expandBufGetLength(pReq)) {
- LOGE("Failed sending req to debugger: %s (%d of %d)",
+ ALOGE("Failed sending req to debugger: %s (%d of %d)",
strerror(errno), (int) cc, (int) expandBufGetLength(pReq));
return false;
}
@@ -711,7 +711,7 @@ static bool sendBufferedRequest(JdwpState* state, const struct iovec* iov,
ssize_t actual = netState->writeBufferedPacket(iov, iovcnt);
if ((size_t)actual != expected) {
- LOGE("Failed sending b-req to debugger: %s (%d of %zu)",
+ ALOGE("Failed sending b-req to debugger: %s (%d of %zu)",
strerror(errno), (int) actual, expected);
return false;
}
diff --git a/vm/jdwp/JdwpEvent.cpp b/vm/jdwp/JdwpEvent.cpp
index ca31a7d42..c9aa5898a 100644
--- a/vm/jdwp/JdwpEvent.cpp
+++ b/vm/jdwp/JdwpEvent.cpp
@@ -423,7 +423,7 @@ static bool patternMatch(const char* pattern, const char* target)
int targetLen = strlen(target);
patLen--;
// TODO: remove printf when we find a test case to verify this
- LOGE(">>> comparing '%s' to '%s'",
+ ALOGE(">>> comparing '%s' to '%s'",
pattern+1, target + (targetLen-patLen));
if (targetLen < patLen)
@@ -517,7 +517,7 @@ static bool modsMatch(JdwpState* state, JdwpEvent* pEvent, ModBasket* basket)
return false;
break;
default:
- LOGE("unhandled mod kind %d", pMod->modKind);
+ ALOGE("unhandled mod kind %d", pMod->modKind);
assert(false);
break;
}
diff --git a/vm/jdwp/JdwpHandler.cpp b/vm/jdwp/JdwpHandler.cpp
index fce8a9a75..b41139a4c 100644
--- a/vm/jdwp/JdwpHandler.cpp
+++ b/vm/jdwp/JdwpHandler.cpp
@@ -1927,7 +1927,7 @@ void dvmJdwpProcessRequest(JdwpState* state, const JdwpReqHeader* pHeader,
}
}
if (i == NELEM(gHandlerMap)) {
- LOGE("REQ: UNSUPPORTED (cmd=%d/%d dataLen=%d id=0x%06x)",
+ ALOGE("REQ: UNSUPPORTED (cmd=%d/%d dataLen=%d id=0x%06x)",
pHeader->cmdSet, pHeader->cmd, dataLen, pHeader->id);
if (dataLen > 0)
dvmPrintHexDumpDbg(buf, dataLen, LOG_TAG);
diff --git a/vm/jdwp/JdwpMain.cpp b/vm/jdwp/JdwpMain.cpp
index 6e9062252..d3e223407 100644
--- a/vm/jdwp/JdwpMain.cpp
+++ b/vm/jdwp/JdwpMain.cpp
@@ -105,7 +105,7 @@ JdwpState* dvmJdwpStartup(const JdwpStartupParams* pParams)
/* TODO */
break;
default:
- LOGE("Unknown transport %d", pParams->transport);
+ ALOGE("Unknown transport %d", pParams->transport);
assert(false);
goto fail;
}
@@ -158,7 +158,7 @@ JdwpState* dvmJdwpStartup(const JdwpStartupParams* pParams)
dvmChangeStatus(NULL, THREAD_RUNNING);
if (!dvmJdwpIsActive(state)) {
- LOGE("JDWP connection failed");
+ ALOGE("JDWP connection failed");
goto fail;
}
@@ -316,7 +316,7 @@ static void* jdwpThreadStart(void* arg)
while (true) {
// sanity check -- shouldn't happen?
if (dvmThreadSelf()->status != THREAD_VMWAIT) {
- LOGE("JDWP thread no longer in VMWAIT (now %d); resetting",
+ ALOGE("JDWP thread no longer in VMWAIT (now %d); resetting",
dvmThreadSelf()->status);
dvmDbgThreadWaiting();
}
diff --git a/vm/jdwp/JdwpSocket.cpp b/vm/jdwp/JdwpSocket.cpp
index 50f0b3b2e..ad0a287ca 100644
--- a/vm/jdwp/JdwpSocket.cpp
+++ b/vm/jdwp/JdwpSocket.cpp
@@ -100,7 +100,7 @@ static bool prepareSocket(JdwpState* state, const JdwpStartupParams* pParams)
}
}
if (state->netState == NULL) {
- LOGE("JDWP net startup failed (req port=%d)", pParams->port);
+ ALOGE("JDWP net startup failed (req port=%d)", pParams->port);
return false;
}
} else {
@@ -150,7 +150,7 @@ static JdwpNetState* netStartup(short port)
netState->listenSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (netState->listenSock < 0) {
- LOGE("Socket create failed: %s", strerror(errno));
+ ALOGE("Socket create failed: %s", strerror(errno));
goto fail;
}
@@ -158,7 +158,7 @@ static JdwpNetState* netStartup(short port)
if (setsockopt(netState->listenSock, SOL_SOCKET, SO_REUSEADDR, &one,
sizeof(one)) < 0)
{
- LOGE("setsockopt(SO_REUSEADDR) failed: %s", strerror(errno));
+ ALOGE("setsockopt(SO_REUSEADDR) failed: %s", strerror(errno));
goto fail;
}
@@ -179,7 +179,7 @@ static JdwpNetState* netStartup(short port)
LOGVV("+++ bound to port %d", netState->listenPort);
if (listen(netState->listenSock, 5) != 0) {
- LOGE("Listen failed: %s", strerror(errno));
+ ALOGE("Listen failed: %s", strerror(errno));
goto fail;
}
@@ -293,7 +293,7 @@ static bool isFdReadable(int sock)
if (FD_ISSET(sock, &readfds)) /* make sure it's our fd */
return true;
- LOGE("WEIRD: odd behavior in select (count=%d)", count);
+ ALOGE("WEIRD: odd behavior in select (count=%d)", count);
return false;
}
#endif
@@ -361,7 +361,7 @@ static bool acceptConnection(JdwpState* state)
if (errno == EINVAL)
LOGVV("accept failed: %s", strerror(errno));
else
- LOGE("accept failed: %s", strerror(errno));
+ ALOGE("accept failed: %s", strerror(errno));
return false;
}
} while (sock < 0);
@@ -379,7 +379,7 @@ static bool acceptConnection(JdwpState* state)
setNoDelay(netState->clientSock);
if (pipe(netState->wakePipe) < 0) {
- LOGE("pipe failed");
+ ALOGE("pipe failed");
return false;
}
@@ -445,7 +445,7 @@ static bool establishConnection(JdwpState* state)
netState = state->netState;
netState->clientSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (netState->clientSock < 0) {
- LOGE("Unable to create socket: %s", strerror(errno));
+ ALOGE("Unable to create socket: %s", strerror(errno));
return false;
}
@@ -453,7 +453,7 @@ static bool establishConnection(JdwpState* state)
* Try to connect.
*/
if (connect(netState->clientSock, &addr.addrPlain, sizeof(addr)) != 0) {
- LOGE("Unable to connect to %s:%d: %s",
+ ALOGE("Unable to connect to %s:%d: %s",
inet_ntoa(addr.addrInet.sin_addr), ntohs(addr.addrInet.sin_port),
strerror(errno));
close(netState->clientSock);
@@ -470,7 +470,7 @@ static bool establishConnection(JdwpState* state)
setNoDelay(netState->clientSock);
if (pipe(netState->wakePipe) < 0) {
- LOGE("pipe failed");
+ ALOGE("pipe failed");
return false;
}
@@ -621,7 +621,7 @@ static bool handlePacket(JdwpState* state)
ssize_t cc = netState->writePacket(pReply);
if (cc != (ssize_t) expandBufGetLength(pReply)) {
- LOGE("Failed sending reply to debugger: %s", strerror(errno));
+ ALOGE("Failed sending reply to debugger: %s", strerror(errno));
expandBufFree(pReply);
return false;
}
@@ -714,7 +714,7 @@ static bool processIncoming(JdwpState* state)
if (selCount < 0) {
if (errno == EINTR)
continue;
- LOGE("select failed: %s", strerror(errno));
+ ALOGE("select failed: %s", strerror(errno));
goto fail;
}
@@ -722,7 +722,7 @@ static bool processIncoming(JdwpState* state)
FD_ISSET(netState->wakePipe[0], &readfds))
{
if (netState->listenSock >= 0)
- LOGE("Exit wake set, but not exiting?");
+ ALOGE("Exit wake set, but not exiting?");
else
ALOGD("Got wake-up signal, bailing out of select");
goto fail;
@@ -784,7 +784,7 @@ static bool processIncoming(JdwpState* state)
if (memcmp(netState->inputBuffer,
kMagicHandshake, kMagicHandshakeLen) != 0)
{
- LOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
+ ALOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
goto fail;
}
@@ -792,7 +792,7 @@ static bool processIncoming(JdwpState* state)
cc = write(netState->clientSock, netState->inputBuffer,
kMagicHandshakeLen);
if (cc != kMagicHandshakeLen) {
- LOGE("Failed writing handshake bytes: %s (%d of %d)",
+ ALOGE("Failed writing handshake bytes: %s (%d of %d)",
strerror(errno), cc, (int) kMagicHandshakeLen);
goto fail;
}
@@ -836,7 +836,7 @@ static bool sendRequest(JdwpState* state, ExpandBuf* pReq)
ssize_t cc = netState->writePacket(pReq);
if (cc != (ssize_t) expandBufGetLength(pReq)) {
- LOGE("Failed sending req to debugger: %s (%d of %d)",
+ ALOGE("Failed sending req to debugger: %s (%d of %d)",
strerror(errno), (int) cc, (int) expandBufGetLength(pReq));
return false;
}
@@ -871,7 +871,7 @@ static bool sendBufferedRequest(JdwpState* state, const struct iovec* iov,
ssize_t actual = netState->writeBufferedPacket(iov, iovcnt);
if ((size_t)actual != expected) {
- LOGE("Failed sending b-req to debugger: %s (%d of %zu)",
+ ALOGE("Failed sending b-req to debugger: %s (%d of %zu)",
strerror(errno), (int) actual, expected);
return false;
}
diff --git a/vm/mterp/Mterp.cpp b/vm/mterp/Mterp.cpp
index 9f9556f3b..b5cb9a528 100644
--- a/vm/mterp/Mterp.cpp
+++ b/vm/mterp/Mterp.cpp
@@ -41,7 +41,7 @@ bool dvmCheckAsmConstants()
#include "mterp/common/asm-constants.h"
if (failed) {
- LOGE("Please correct the values in mterp/common/asm-constants.h");
+ ALOGE("Please correct the values in mterp/common/asm-constants.h");
dvmAbort();
}
@@ -56,8 +56,8 @@ bool dvmCheckAsmConstants()
int interpSize = (uintptr_t) dvmAsmInstructionEnd -
(uintptr_t) dvmAsmInstructionStart;
if (interpSize != 0 && interpSize != kNumPackedOpcodes*width) {
- LOGE("ERROR: unexpected asm interp size %d", interpSize);
- LOGE("(did an instruction handler exceed %d bytes?)", width);
+ ALOGE("ERROR: unexpected asm interp size %d", interpSize);
+ ALOGE("(did an instruction handler exceed %d bytes?)", width);
dvmAbort();
}
#endif
diff --git a/vm/mterp/c/OP_UNUSED_FF.cpp b/vm/mterp/c/OP_UNUSED_FF.cpp
index f4743db9b..1348aec93 100644
--- a/vm/mterp/c/OP_UNUSED_FF.cpp
+++ b/vm/mterp/c/OP_UNUSED_FF.cpp
@@ -2,7 +2,7 @@ HANDLE_OPCODE(OP_UNUSED_FF)
/*
* In portable interp, most unused opcodes will fall through to here.
*/
- LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+ ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
dvmAbort();
FINISH(1);
OP_END
diff --git a/vm/mterp/c/gotoTargets.cpp b/vm/mterp/c/gotoTargets.cpp
index 6df3b9a37..b335273ec 100644
--- a/vm/mterp/c/gotoTargets.cpp
+++ b/vm/mterp/c/gotoTargets.cpp
@@ -65,7 +65,7 @@ GOTO_TARGET(filledNewArray, bool methodCallRange, bool)
GOTO_exceptionThrown();
} else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
/* TODO: requires multiple "fill in" loops with different widths */
- LOGE("non-int primitives not implemented");
+ ALOGE("non-int primitives not implemented");
dvmThrowInternalError(
"filled-new-array not implemented for anything but 'int'");
GOTO_exceptionThrown();
@@ -582,7 +582,7 @@ GOTO_TARGET(returnFromMethod)
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
@@ -959,7 +959,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
diff --git a/vm/mterp/c/header.cpp b/vm/mterp/c/header.cpp
index 44d706413..d0e55f5ea 100644
--- a/vm/mterp/c/header.cpp
+++ b/vm/mterp/c/header.cpp
@@ -95,7 +95,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -314,14 +314,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -346,14 +346,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
diff --git a/vm/mterp/common/asm-constants.h b/vm/mterp/common/asm-constants.h
index b6d82d6ac..bbc043cb3 100644
--- a/vm/mterp/common/asm-constants.h
+++ b/vm/mterp/common/asm-constants.h
@@ -12,19 +12,19 @@
*/
# define MTERP_OFFSET(_name, _type, _field, _offset) \
if (OFFSETOF_MEMBER(_type, _field) != _offset) { \
- LOGE("Bad asm offset %s (%d), should be %d", \
+ ALOGE("Bad asm offset %s (%d), should be %d", \
#_name, _offset, OFFSETOF_MEMBER(_type, _field)); \
failed = true; \
}
# define MTERP_SIZEOF(_name, _type, _size) \
if (sizeof(_type) != (_size)) { \
- LOGE("Bad asm sizeof %s (%d), should be %d", \
+ ALOGE("Bad asm sizeof %s (%d), should be %d", \
#_name, (_size), sizeof(_type)); \
failed = true; \
}
# define MTERP_CONSTANT(_name, _value) \
if ((_name) != (_value)) { \
- LOGE("Bad asm constant %s (%d), should be %d", \
+ ALOGE("Bad asm constant %s (%d), should be %d", \
#_name, (_value), (_name)); \
failed = true; \
}
diff --git a/vm/mterp/out/InterpC-allstubs.cpp b/vm/mterp/out/InterpC-allstubs.cpp
index b266e61f0..5a78dc4ad 100644
--- a/vm/mterp/out/InterpC-allstubs.cpp
+++ b/vm/mterp/out/InterpC-allstubs.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -3005,7 +3005,7 @@ HANDLE_OPCODE(OP_UNUSED_FF)
/*
* In portable interp, most unused opcodes will fall through to here.
*/
- LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+ ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
dvmAbort();
FINISH(1);
OP_END
@@ -3141,7 +3141,7 @@ GOTO_TARGET(filledNewArray, bool methodCallRange, bool)
GOTO_exceptionThrown();
} else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
/* TODO: requires multiple "fill in" loops with different widths */
- LOGE("non-int primitives not implemented");
+ ALOGE("non-int primitives not implemented");
dvmThrowInternalError(
"filled-new-array not implemented for anything but 'int'");
GOTO_exceptionThrown();
@@ -3658,7 +3658,7 @@ GOTO_TARGET(returnFromMethod)
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
@@ -4035,7 +4035,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.cpp b/vm/mterp/out/InterpC-armv5te-vfp.cpp
index 01246ae33..406bcaed1 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.cpp
+++ b/vm/mterp/out/InterpC-armv5te-vfp.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
diff --git a/vm/mterp/out/InterpC-armv5te.cpp b/vm/mterp/out/InterpC-armv5te.cpp
index 870e6829a..b06e25df9 100644
--- a/vm/mterp/out/InterpC-armv5te.cpp
+++ b/vm/mterp/out/InterpC-armv5te.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.cpp b/vm/mterp/out/InterpC-armv7-a-neon.cpp
index bd9fe284b..250c2dc0c 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.cpp
+++ b/vm/mterp/out/InterpC-armv7-a-neon.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
diff --git a/vm/mterp/out/InterpC-armv7-a.cpp b/vm/mterp/out/InterpC-armv7-a.cpp
index 54b450932..747c4cf66 100644
--- a/vm/mterp/out/InterpC-armv7-a.cpp
+++ b/vm/mterp/out/InterpC-armv7-a.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
diff --git a/vm/mterp/out/InterpC-portable.cpp b/vm/mterp/out/InterpC-portable.cpp
index 2abcb8d9b..b32432de7 100644
--- a/vm/mterp/out/InterpC-portable.cpp
+++ b/vm/mterp/out/InterpC-portable.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -3018,7 +3018,7 @@ HANDLE_OPCODE(OP_UNUSED_FF)
/*
* In portable interp, most unused opcodes will fall through to here.
*/
- LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+ ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
dvmAbort();
FINISH(1);
OP_END
@@ -3091,7 +3091,7 @@ GOTO_TARGET(filledNewArray, bool methodCallRange, bool)
GOTO_exceptionThrown();
} else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
/* TODO: requires multiple "fill in" loops with different widths */
- LOGE("non-int primitives not implemented");
+ ALOGE("non-int primitives not implemented");
dvmThrowInternalError(
"filled-new-array not implemented for anything but 'int'");
GOTO_exceptionThrown();
@@ -3608,7 +3608,7 @@ GOTO_TARGET(returnFromMethod)
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
@@ -3985,7 +3985,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
diff --git a/vm/mterp/out/InterpC-x86-atom.cpp b/vm/mterp/out/InterpC-x86-atom.cpp
index b204ff930..00a1e5019 100644
--- a/vm/mterp/out/InterpC-x86-atom.cpp
+++ b/vm/mterp/out/InterpC-x86-atom.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -1380,7 +1380,7 @@ GOTO_TARGET(filledNewArray, bool methodCallRange, bool)
GOTO_exceptionThrown();
} else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
/* TODO: requires multiple "fill in" loops with different widths */
- LOGE("non-int primitives not implemented");
+ ALOGE("non-int primitives not implemented");
dvmThrowInternalError(
"filled-new-array not implemented for anything but 'int'");
GOTO_exceptionThrown();
@@ -1897,7 +1897,7 @@ GOTO_TARGET(returnFromMethod)
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
@@ -2274,7 +2274,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
diff --git a/vm/mterp/out/InterpC-x86.cpp b/vm/mterp/out/InterpC-x86.cpp
index 616e31f0e..ea441d7a6 100644
--- a/vm/mterp/out/InterpC-x86.cpp
+++ b/vm/mterp/out/InterpC-x86.cpp
@@ -102,7 +102,7 @@
{ \
char* desc; \
desc = dexProtoCopyMethodDescriptor(&curMethod->prototype); \
- LOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
+ ALOGE("Invalid branch %d at 0x%04x in %s.%s %s", \
myoff, (int) (pc - curMethod->insns), \
curMethod->clazz->descriptor, curMethod->name, desc); \
free(desc); \
@@ -321,14 +321,14 @@ static inline bool checkForNull(Object* obj)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -353,14 +353,14 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc)
}
#ifdef WITH_EXTRA_OBJECT_VALIDATION
if (!dvmIsHeapAddress(obj)) {
- LOGE("Invalid object %p", obj);
+ ALOGE("Invalid object %p", obj);
dvmAbort();
}
#endif
#ifndef NDEBUG
if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
/* probable heap corruption */
- LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+ ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
dvmAbort();
}
#endif
@@ -1322,7 +1322,7 @@ GOTO_TARGET(filledNewArray, bool methodCallRange, bool)
GOTO_exceptionThrown();
} else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
/* TODO: requires multiple "fill in" loops with different widths */
- LOGE("non-int primitives not implemented");
+ ALOGE("non-int primitives not implemented");
dvmThrowInternalError(
"filled-new-array not implemented for anything but 'int'");
GOTO_exceptionThrown();
@@ -1839,7 +1839,7 @@ GOTO_TARGET(returnFromMethod)
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
@@ -2216,7 +2216,7 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall,
{
FINISH(3);
} else {
- //LOGE("Unknown invoke instr %02x at %d",
+ //ALOGE("Unknown invoke instr %02x at %d",
// invokeInstr, (int) (pc - curMethod->insns));
assert(false);
}
diff --git a/vm/native/dalvik_system_DexFile.cpp b/vm/native/dalvik_system_DexFile.cpp
index ad03e8119..f328a1983 100644
--- a/vm/native/dalvik_system_DexFile.cpp
+++ b/vm/native/dalvik_system_DexFile.cpp
@@ -122,7 +122,7 @@ static void addToDexFileTable(DexOrJar* pDexOrJar) {
dvmHashTableUnlock(gDvm.userDexFiles);
if (result != pDexOrJar) {
- LOGE("Pointer has already been added?");
+ ALOGE("Pointer has already been added?");
dvmAbort();
}
diff --git a/vm/native/dalvik_system_Zygote.cpp b/vm/native/dalvik_system_Zygote.cpp
index 8d6ef4f58..4e71e4fb4 100644
--- a/vm/native/dalvik_system_Zygote.cpp
+++ b/vm/native/dalvik_system_Zygote.cpp
@@ -206,7 +206,7 @@ static int setrlimitsFromArray(ArrayObject* rlimits)
int err;
if (rlimit_tuple->length != 3) {
- LOGE("rlimits array must have a second dimension of size 3");
+ ALOGE("rlimits array must have a second dimension of size 3");
return -1;
}
@@ -236,7 +236,7 @@ static void Dalvik_dalvik_system_Zygote_fork(const u4* args, JValue* pResult)
}
if (!dvmGcPreZygoteFork()) {
- LOGE("pre-fork heap failed");
+ ALOGE("pre-fork heap failed");
dvmAbort();
}
@@ -312,14 +312,14 @@ static void enableDebugFeatures(u4 debugFlags)
* to disable that
*/
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
- LOGE("could not set dumpable bit flag for pid %d: %s",
+ ALOGE("could not set dumpable bit flag for pid %d: %s",
getpid(), strerror(errno));
} else {
struct rlimit rl;
rl.rlim_cur = 0;
rl.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &rl) < 0) {
- LOGE("could not disable core file generation for pid %d: %s",
+ ALOGE("could not disable core file generation for pid %d: %s",
getpid(), strerror(errno));
}
}
@@ -391,7 +391,7 @@ static pid_t forkAndSpecializeCommon(const u4* args, bool isSystemServer)
}
if (!dvmGcPreZygoteFork()) {
- LOGE("pre-fork heap failed");
+ ALOGE("pre-fork heap failed");
dvmAbort();
}
@@ -413,7 +413,7 @@ static pid_t forkAndSpecializeCommon(const u4* args, bool isSystemServer)
err = prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
if (err < 0) {
- LOGE("cannot PR_SET_KEEPCAPS: %s", strerror(errno));
+ ALOGE("cannot PR_SET_KEEPCAPS: %s", strerror(errno));
dvmAbort();
}
}
@@ -423,32 +423,32 @@ static pid_t forkAndSpecializeCommon(const u4* args, bool isSystemServer)
err = setgroupsIntarray(gids);
if (err < 0) {
- LOGE("cannot setgroups(): %s", strerror(errno));
+ ALOGE("cannot setgroups(): %s", strerror(errno));
dvmAbort();
}
err = setrlimitsFromArray(rlimits);
if (err < 0) {
- LOGE("cannot setrlimit(): %s", strerror(errno));
+ ALOGE("cannot setrlimit(): %s", strerror(errno));
dvmAbort();
}
err = setgid(gid);
if (err < 0) {
- LOGE("cannot setgid(%d): %s", gid, strerror(errno));
+ ALOGE("cannot setgid(%d): %s", gid, strerror(errno));
dvmAbort();
}
err = setuid(uid);
if (err < 0) {
- LOGE("cannot setuid(%d): %s", uid, strerror(errno));
+ ALOGE("cannot setuid(%d): %s", uid, strerror(errno));
dvmAbort();
}
err = setCapabilities(permittedCapabilities, effectiveCapabilities);
if (err != 0) {
- LOGE("cannot set capabilities (%llx,%llx): %s",
+ ALOGE("cannot set capabilities (%llx,%llx): %s",
permittedCapabilities, effectiveCapabilities, strerror(err));
dvmAbort();
}
@@ -465,7 +465,7 @@ static pid_t forkAndSpecializeCommon(const u4* args, bool isSystemServer)
unsetSignalHandler();
gDvm.zygote = false;
if (!dvmInitAfterZygote()) {
- LOGE("error in post-zygote initialization");
+ ALOGE("error in post-zygote initialization");
dvmAbort();
}
} else if (pid > 0) {
@@ -509,7 +509,7 @@ static void Dalvik_dalvik_system_Zygote_forkSystemServer(
* we recheck here just to make sure that all is well.
*/
if (waitpid(pid, &status, WNOHANG) == pid) {
- LOGE("System server process %d has died. Restarting Zygote!", pid);
+ ALOGE("System server process %d has died. Restarting Zygote!", pid);
kill(getpid(), SIGKILL);
}
}
diff --git a/vm/native/java_lang_Class.cpp b/vm/native/java_lang_Class.cpp
index 46606d8b7..93455e764 100644
--- a/vm/native/java_lang_Class.cpp
+++ b/vm/native/java_lang_Class.cpp
@@ -382,7 +382,7 @@ static void Dalvik_java_lang_Class_getNameNative(const u4* args, JValue* pResult
case 'D': name = "double"; break;
case 'V': name = "void"; break;
default: {
- LOGE("Unknown primitive type '%c'", descriptor[0]);
+ ALOGE("Unknown primitive type '%c'", descriptor[0]);
assert(false);
RETURN_PTR(NULL);
}
diff --git a/vm/native/java_lang_System.cpp b/vm/native/java_lang_System.cpp
index 00bd87f23..6ebf4f3b9 100644
--- a/vm/native/java_lang_System.cpp
+++ b/vm/native/java_lang_System.cpp
@@ -204,7 +204,7 @@ static void Dalvik_java_lang_System_arraycopy(const u4* args, JValue* pResult)
length * 8);
break;
default: /* illegal array type */
- LOGE("Weird array type '%s'", srcClass->descriptor);
+ ALOGE("Weird array type '%s'", srcClass->descriptor);
dvmAbort();
}
} else {
diff --git a/vm/native/java_lang_VMClassLoader.cpp b/vm/native/java_lang_VMClassLoader.cpp
index 0640d952c..eeff688b2 100644
--- a/vm/native/java_lang_VMClassLoader.cpp
+++ b/vm/native/java_lang_VMClassLoader.cpp
@@ -39,7 +39,7 @@ static void Dalvik_java_lang_VMClassLoader_defineClass(const u4* args,
char* name = NULL;
name = dvmCreateCstrFromString(nameObj);
- LOGE("ERROR: defineClass(%p, %s, %p, %d, %d)",
+ ALOGE("ERROR: defineClass(%p, %s, %p, %d, %d)",
loader, name, data, offset, len);
dvmThrowUnsupportedOperationException(
"can't load this type of class file");
@@ -64,7 +64,7 @@ static void Dalvik_java_lang_VMClassLoader_defineClass2(const u4* args,
int offset = args[2];
int len = args[3];
- LOGE("ERROR: defineClass(%p, %p, %d, %d)",
+ ALOGE("ERROR: defineClass(%p, %p, %d, %d)",
loader, data, offset, len);
dvmThrowUnsupportedOperationException(
"can't load this type of class file");
diff --git a/vm/native/java_lang_reflect_Field.cpp b/vm/native/java_lang_reflect_Field.cpp
index d1918bc5e..dac784bf7 100644
--- a/vm/native/java_lang_reflect_Field.cpp
+++ b/vm/native/java_lang_reflect_Field.cpp
@@ -172,7 +172,7 @@ static void getStaticFieldValue(const StaticField* sfield, JValue* value)
value->l = dvmGetStaticFieldObjectVolatile(sfield);
break;
default:
- LOGE("Unhandled field signature '%s'", sfield->signature);
+ ALOGE("Unhandled field signature '%s'", sfield->signature);
dvmAbort();
}
}
@@ -219,7 +219,7 @@ static void getInstFieldValue(const InstField* ifield, Object* obj,
value->l = dvmGetFieldObject(obj, ifield->byteOffset);
break;
default:
- LOGE("Unhandled field signature '%s'", ifield->signature);
+ ALOGE("Unhandled field signature '%s'", ifield->signature);
dvmAbort();
}
} else {
@@ -254,7 +254,7 @@ static void getInstFieldValue(const InstField* ifield, Object* obj,
value->l = dvmGetFieldObjectVolatile(obj, ifield->byteOffset);
break;
default:
- LOGE("Unhandled field signature '%s'", ifield->signature);
+ ALOGE("Unhandled field signature '%s'", ifield->signature);
dvmAbort();
}
}
@@ -321,7 +321,7 @@ static void setStaticFieldValue(StaticField* sfield, const JValue* value)
dvmSetStaticFieldObjectVolatile(sfield, (Object*)value->l);
break;
default:
- LOGE("Unhandled field signature '%s'", sfield->signature);
+ ALOGE("Unhandled field signature '%s'", sfield->signature);
dvmAbort();
}
}
@@ -366,7 +366,7 @@ static void setInstFieldValue(InstField* ifield, Object* obj,
dvmSetFieldObject(obj, ifield->byteOffset, (Object *)value->l);
break;
default:
- LOGE("Unhandled field signature '%s'", ifield->signature);
+ ALOGE("Unhandled field signature '%s'", ifield->signature);
dvmAbort();
}
#if ANDROID_SMP != 0
@@ -410,7 +410,7 @@ static void setInstFieldValue(InstField* ifield, Object* obj,
dvmSetFieldObjectVolatile(obj, ifield->byteOffset, (Object*)value->l);
break;
default:
- LOGE("Unhandled field signature '%s'", ifield->signature);
+ ALOGE("Unhandled field signature '%s'", ifield->signature);
dvmAbort();
}
}
diff --git a/vm/oo/Array.cpp b/vm/oo/Array.cpp
index 056198895..00ec6d901 100644
--- a/vm/oo/Array.cpp
+++ b/vm/oo/Array.cpp
@@ -150,7 +150,7 @@ ArrayObject* dvmAllocPrimitiveArray(char type, size_t length, int allocFlags)
width = 8;
break;
default:
- LOGE("Unknown primitive type '%c'", type);
+ ALOGE("Unknown primitive type '%c'", type);
dvmAbort();
return NULL; // Keeps the compiler happy.
}
@@ -413,7 +413,7 @@ static ClassObject* createArrayClass(const char* descriptor, Object* loader)
dvmFindSystemClassNoInit("Ljava/io/Serializable;");
dvmLinearReadOnly(newClass->classLoader, newClass->interfaces);
if (newClass->interfaces[0] == NULL || newClass->interfaces[1] == NULL) {
- LOGE("Unable to create array class '%s': missing interfaces",
+ ALOGE("Unable to create array class '%s': missing interfaces",
descriptor);
dvmFreeClassInnards(newClass);
dvmThrowInternalError("missing array ifaces");
@@ -614,7 +614,7 @@ size_t dvmArrayClassElementWidth(const ClassObject* arrayClass)
case 'Z': return 1; /* boolean */
}
}
- LOGE("class %p has an unhandled descriptor '%s'", arrayClass, descriptor);
+ ALOGE("class %p has an unhandled descriptor '%s'", arrayClass, descriptor);
dvmDumpThread(dvmThreadSelf(), false);
dvmAbort();
return 0; /* Quiet the compiler. */
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp
index b53ea3f8e..eecbb3ac8 100644
--- a/vm/oo/Class.cpp
+++ b/vm/oo/Class.cpp
@@ -410,7 +410,7 @@ bool dvmClassStartup()
{
/* make this a requirement -- don't currently support dirs in path */
if (strcmp(gDvm.bootClassPathStr, ".") == 0) {
- LOGE("ERROR: must specify non-'.' bootclasspath");
+ ALOGE("ERROR: must specify non-'.' bootclasspath");
return false;
}
@@ -609,7 +609,7 @@ static bool prepareCpe(ClassPathEntry* cpe, bool isBootstrap)
return false;
}
if (S_ISDIR(sb.st_mode)) {
- LOGE("Directory classpath elements are not supported: %s", cpe->fileName);
+ ALOGE("Directory classpath elements are not supported: %s", cpe->fileName);
return false;
}
@@ -632,7 +632,7 @@ static bool prepareCpe(ClassPathEntry* cpe, bool isBootstrap)
return true;
}
} else {
- LOGE("Unknown type suffix '%s'", suffix);
+ ALOGE("Unknown type suffix '%s'", suffix);
}
ALOGD("Unable to process classpath element '%s'", cpe->fileName);
@@ -700,7 +700,7 @@ static ClassPathEntry* processClassPath(const char* pathStr, bool isBootstrap)
} else {
if (isBootstrap &&
dvmPathToAbsolutePortion(cp) == NULL) {
- LOGE("Non-absolute bootclasspath entry '%s'", cp);
+ ALOGE("Non-absolute bootclasspath entry '%s'", cp);
free(cpe);
cpe = NULL;
goto bail;
@@ -737,7 +737,7 @@ static ClassPathEntry* processClassPath(const char* pathStr, bool isBootstrap)
* There's no way the vm will be doing anything if this is the
* case, so just bail out (reasonably) gracefully.
*/
- LOGE("No valid entries found in bootclasspath '%s'", pathStr);
+ ALOGE("No valid entries found in bootclasspath '%s'", pathStr);
gDvm.lastMessage = pathStr;
dvmAbort();
}
@@ -811,7 +811,7 @@ static DvmDex* searchBootPathForClass(const char* descriptor,
}
break;
default:
- LOGE("Unknown kind %d", cpe->kind);
+ ALOGE("Unknown kind %d", cpe->kind);
assert(false);
break;
}
@@ -1495,7 +1495,7 @@ static ClassObject* findClassNoInit(const char* descriptor, Object* loader,
* making it an informative abort rather than an assert).
*/
if (dvmCheckException(self)) {
- LOGE("Class lookup %s attempted with exception pending", descriptor);
+ ALOGE("Class lookup %s attempted with exception pending", descriptor);
ALOGW("Pending exception is:");
dvmLogExceptionStackTrace();
dvmDumpAllThreads(false);
@@ -1874,7 +1874,7 @@ static ClassObject* loadClassFromDex0(DvmDex* pDvmDex,
if (classMapData != NULL &&
pHeader->directMethodsSize + pHeader->virtualMethodsSize != numMethods)
{
- LOGE("ERROR: in %s, direct=%d virtual=%d, maps have %d",
+ ALOGE("ERROR: in %s, direct=%d virtual=%d, maps have %d",
newClass->descriptor, pHeader->directMethodsSize,
pHeader->virtualMethodsSize, numMethods);
assert(false);
@@ -2132,8 +2132,8 @@ static void freeMethodInnards(Method* meth)
static void cloneMethod(Method* dst, const Method* src)
{
if (src->registerMap != NULL) {
- LOGE("GLITCH: only expected abstract methods here");
- LOGE(" cloning %s.%s", src->clazz->descriptor, src->name);
+ ALOGE("GLITCH: only expected abstract methods here");
+ ALOGE(" cloning %s.%s", src->clazz->descriptor, src->name);
dvmAbort();
}
memcpy(dst, src, sizeof(Method));
@@ -2425,7 +2425,7 @@ static bool precacheReferenceOffsets(ClassObject* clazz)
}
dvmLinearReadOnly(clazz->classLoader, clazz->ifields);
if (i == clazz->ifieldRefCount) {
- LOGE("Unable to reorder 'referent' in %s", clazz->descriptor);
+ ALOGE("Unable to reorder 'referent' in %s", clazz->descriptor);
return false;
}
@@ -2434,7 +2434,7 @@ static bool precacheReferenceOffsets(ClassObject* clazz)
* info about the class.
*/
if (!dvmFindReferenceMembers(clazz)) {
- LOGE("Trouble with Reference setup");
+ ALOGE("Trouble with Reference setup");
return false;
}
@@ -2521,12 +2521,12 @@ bool dvmLinkClass(ClassObject* clazz)
(strcmp(clazz->descriptor, "Ljava/lang/Class;") == 0))
{
if (gDvm.classJavaLangClass->ifieldCount > CLASS_FIELD_SLOTS) {
- LOGE("java.lang.Class has %d instance fields (expected at most %d)",
+ ALOGE("java.lang.Class has %d instance fields (expected at most %d)",
gDvm.classJavaLangClass->ifieldCount, CLASS_FIELD_SLOTS);
dvmAbort();
}
if (gDvm.classJavaLangClass->sfieldCount != CLASS_SFIELD_SLOTS) {
- LOGE("java.lang.Class has %d static fields (expected %d)",
+ ALOGE("java.lang.Class has %d static fields (expected %d)",
gDvm.classJavaLangClass->sfieldCount, CLASS_SFIELD_SLOTS);
dvmAbort();
}
@@ -2757,7 +2757,7 @@ bool dvmLinkClass(ClassObject* clazz)
int count = clazz->virtualMethodCount;
if (count != (u2) count) {
- LOGE("Too many methods (%d) in interface '%s'", count,
+ ALOGE("Too many methods (%d) in interface '%s'", count,
clazz->descriptor);
goto bail;
}
@@ -2801,7 +2801,7 @@ bool dvmLinkClass(ClassObject* clazz)
if ((clazz->classLoader == NULL)
&& (strcmp(clazz->descriptor, "Ljava/lang/ref/Reference;") == 0)) {
if (!precacheReferenceOffsets(clazz)) {
- LOGE("failed pre-caching Reference offsets");
+ ALOGE("failed pre-caching Reference offsets");
dvmThrowInternalError(NULL);
goto bail;
}
@@ -2942,7 +2942,7 @@ static bool createVtable(ClassObject* clazz)
}
if (actualCount != (u2) actualCount) {
- LOGE("Too many methods (%d) in class '%s'", actualCount,
+ ALOGE("Too many methods (%d) in class '%s'", actualCount,
clazz->descriptor);
goto bail;
}
@@ -2955,7 +2955,7 @@ static bool createVtable(ClassObject* clazz)
clazz->vtable = (Method **)dvmLinearRealloc(clazz->classLoader,
clazz->vtable, sizeof(*(clazz->vtable)) * actualCount);
if (clazz->vtable == NULL) {
- LOGE("vtable realloc failed");
+ ALOGE("vtable realloc failed");
goto bail;
} else {
LOGVV("+++ reduced vtable from %d to %d",
@@ -2968,7 +2968,7 @@ static bool createVtable(ClassObject* clazz)
/* java/lang/Object case */
int count = clazz->virtualMethodCount;
if (count != (u2) count) {
- LOGE("Too many methods (%d) in base class '%s'", count,
+ ALOGE("Too many methods (%d) in base class '%s'", count,
clazz->descriptor);
goto bail;
}
@@ -3819,7 +3819,7 @@ static void initSFields(ClassObject* clazz)
* that this can't happen at least due to a data integrity
* problem.
*/
- LOGE("Static initializer parse failed for %s at index %d",
+ ALOGE("Static initializer parse failed for %s at index %d",
clazz->descriptor, i);
dvmAbort();
}
@@ -3887,7 +3887,7 @@ static void initSFields(ClassObject* clazz)
* Something up above had a problem. TODO: See comment
* above the switch about verfication.
*/
- LOGE("Bogus static initialization: value type %d in field type "
+ ALOGE("Bogus static initialization: value type %d in field type "
"%s for %s at index %d",
value.type, descriptor, clazz->descriptor, i);
dvmAbort();
diff --git a/vm/reflect/Annotation.cpp b/vm/reflect/Annotation.cpp
index e5df65ad1..233db0881 100644
--- a/vm/reflect/Annotation.cpp
+++ b/vm/reflect/Annotation.cpp
@@ -489,7 +489,7 @@ static bool processAnnotationValue(const ClassObject* clazz,
newArray = dvmAllocArrayByClass(gDvm.classJavaLangObjectArray,
size, ALLOC_DEFAULT);
if (newArray == NULL) {
- LOGE("annotation element array alloc failed (%d)", size);
+ ALOGE("annotation element array alloc failed (%d)", size);
return false;
}
@@ -531,7 +531,7 @@ static bool processAnnotationValue(const ClassObject* clazz,
width = 0;
break;
default:
- LOGE("Bad annotation element value byte 0x%02x (0x%02x)",
+ ALOGE("Bad annotation element value byte 0x%02x (0x%02x)",
valueType, valueType & kDexAnnotationValueTypeMask);
assert(false);
return false;
@@ -580,7 +580,7 @@ static Object* convertReturnType(Object* valueObj, ClassObject* methodReturn)
* (valueObj->clazz->descriptor+1, valueObj->clazz->classLoader).
*/
if (strcmp(valueObj->clazz->descriptor, "[Ljava/lang/Object;") != 0) {
- LOGE("Unexpected src type class (%s)", valueObj->clazz->descriptor);
+ ALOGE("Unexpected src type class (%s)", valueObj->clazz->descriptor);
return NULL;
}
srcElemClass = gDvm.classJavaLangObject;
@@ -605,7 +605,7 @@ static Object* convertReturnType(Object* valueObj, ClassObject* methodReturn)
newArray = dvmAllocArrayByClass(methodReturn, length, ALLOC_DEFAULT);
if (newArray == NULL) {
- LOGE("Failed creating duplicate annotation class (%s %d)",
+ ALOGE("Failed creating duplicate annotation class (%s %d)",
methodReturn->descriptor, length);
goto bail;
}
@@ -617,7 +617,7 @@ static Object* convertReturnType(Object* valueObj, ClassObject* methodReturn)
success = dvmUnboxObjectArray(newArray, srcArray, dstElemClass);
}
if (!success) {
- LOGE("Annotation array copy failed");
+ ALOGE("Annotation array copy failed");
dvmReleaseTrackedAlloc((Object*)newArray, self);
newArray = NULL;
goto bail;
@@ -686,7 +686,7 @@ static Object* createAnnotationMember(const ClassObject* clazz,
if (newMember == NULL || nameObj == NULL || methodObj == NULL ||
methodReturn == NULL)
{
- LOGE("Failed creating annotation element (m=%p n=%p a=%p r=%p)",
+ ALOGE("Failed creating annotation element (m=%p n=%p a=%p r=%p)",
newMember, nameObj, methodObj, methodReturn);
goto bail;
}
@@ -755,7 +755,7 @@ static Object* processEncodedAnnotation(const ClassObject* clazz,
if (annoClass == NULL) {
annoClass = dvmResolveClass(clazz, typeIdx, true);
if (annoClass == NULL) {
- LOGE("Unable to resolve %s annotation class %d",
+ ALOGE("Unable to resolve %s annotation class %d",
clazz->descriptor, typeIdx);
assert(dvmCheckException(self));
return NULL;
@@ -778,7 +778,7 @@ static Object* processEncodedAnnotation(const ClassObject* clazz,
gDvm.classOrgApacheHarmonyLangAnnotationAnnotationMemberArray,
size, ALLOC_DEFAULT);
if (elementArray == NULL) {
- LOGE("failed to allocate annotation member array (%d elements)",
+ ALOGE("failed to allocate annotation member array (%d elements)",
size);
goto bail;
}
@@ -1000,7 +1000,7 @@ static bool skipAnnotationValue(const ClassObject* clazz, const u1** pPtr)
width = 0;
break;
default:
- LOGE("Bad annotation element value byte 0x%02x", valueType);
+ ALOGE("Bad annotation element value byte 0x%02x", valueType);
assert(false);
return false;
}
@@ -1616,7 +1616,7 @@ static u4 getMethodIdx(const Method* method)
if (hi < lo) {
/* this should be impossible -- the method came out of this DEX */
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGE("Unable to find method %s.%s %s in DEX file!",
+ ALOGE("Unable to find method %s.%s %s in DEX file!",
method->clazz->descriptor, method->name, desc);
free(desc);
dvmAbort();
@@ -1925,7 +1925,7 @@ static u4 getFieldIdx(const Field* field)
if (hi < lo) {
/* this should be impossible -- the field came out of this DEX */
- LOGE("Unable to find field %s.%s %s in DEX file!",
+ ALOGE("Unable to find field %s.%s %s in DEX file!",
field->clazz->descriptor, field->name, field->signature);
dvmAbort();
}
@@ -2254,7 +2254,7 @@ bool dvmEncodedArrayIteratorGetNext(EncodedArrayIterator* iterator,
value, kPrimitivesOrObjects);
if (! processed) {
- LOGE("Failed to process array element %d from %p",
+ ALOGE("Failed to process array element %d from %p",
iterator->size - iterator->elementsLeft,
iterator->encodedArray);
iterator->elementsLeft = 0;
diff --git a/vm/reflect/Proxy.cpp b/vm/reflect/Proxy.cpp
index 94a87c286..02d43eb1d 100644
--- a/vm/reflect/Proxy.cpp
+++ b/vm/reflect/Proxy.cpp
@@ -200,7 +200,7 @@ ClassObject* dvmGenerateProxyClass(StringObject* str, ArrayObject* interfaces,
* with a duplicate name.
*/
if (!dvmAddClassToHash(newClass)) {
- LOGE("ERROR: attempted to generate %s more than once",
+ ALOGE("ERROR: attempted to generate %s more than once",
newClass->descriptor);
goto bail;
}
@@ -492,7 +492,7 @@ static int copyWithoutDuplicates(Method** allMethods, int allCount,
gDvm.classJavaLangClassArray, commonCount,
ALLOC_DEFAULT);
if (throwArray == NULL) {
- LOGE("common-throw array alloc failed");
+ ALOGE("common-throw array alloc failed");
return -1;
}
@@ -893,7 +893,7 @@ static void proxyInvoker(const u4* args, JValue* pResult,
invoke = dvmFindVirtualMethodHierByDescriptor(handler->clazz, "invoke",
"(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;");
if (invoke == NULL) {
- LOGE("Unable to find invoke()");
+ ALOGE("Unable to find invoke()");
dvmAbort();
}
@@ -925,7 +925,7 @@ static void proxyInvoker(const u4* args, JValue* pResult,
returnType = dvmGetBoxedReturnType(method);
if (returnType == NULL) {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGE("Could not determine return type for '%s'", desc);
+ ALOGE("Could not determine return type for '%s'", desc);
free(desc);
assert(dvmCheckException(self));
goto bail;
diff --git a/vm/reflect/Reflect.cpp b/vm/reflect/Reflect.cpp
index e43f1ae18..c5d7fbee6 100644
--- a/vm/reflect/Reflect.cpp
+++ b/vm/reflect/Reflect.cpp
@@ -49,12 +49,12 @@ bool dvmValidateBoxClasses()
clazz = dvmFindClassNoInit(*ccp, NULL);
if (clazz == NULL) {
- LOGE("Couldn't find '%s'", *ccp);
+ ALOGE("Couldn't find '%s'", *ccp);
return false;
}
if (clazz->ifieldCount != 1) {
- LOGE("Found %d instance fields in '%s'",
+ ALOGE("Found %d instance fields in '%s'",
clazz->ifieldCount, *ccp);
return false;
}
@@ -1165,7 +1165,7 @@ ClassObject* dvmGetBoxedReturnType(const Method* meth)
default: {
/* should not have passed verification */
char* desc = dexProtoCopyMethodDescriptor(&meth->prototype);
- LOGE("Bad return type in signature '%s'", desc);
+ ALOGE("Bad return type in signature '%s'", desc);
free(desc);
dvmThrowInternalError(NULL);
return NULL;
diff --git a/vm/test/TestHash.cpp b/vm/test/TestHash.cpp
index a58ee3f42..52e421b1b 100644
--- a/vm/test/TestHash.cpp
+++ b/vm/test/TestHash.cpp
@@ -44,7 +44,7 @@ static void dumpForeach(HashTable* pTab)
//printf("Print from foreach:\n");
dvmHashForeach(pTab, printFunc, &count);
if (count != kNumTestEntries) {
- LOGE("TestHash foreach test failed");
+ ALOGE("TestHash foreach test failed");
assert(false);
}
}
@@ -67,7 +67,7 @@ static void dumpIterator(HashTable* pTab)
count++;
}
if (count != kNumTestEntries) {
- LOGE("TestHash iterator test failed");
+ ALOGE("TestHash iterator test failed");
assert(false);
}
}
@@ -108,7 +108,7 @@ bool dvmTestHash()
str = (const char*) dvmHashTableLookup(pTab, hash, tmpStr,
(HashCompareFunc) strcmp, false);
if (str == NULL) {
- LOGE("TestHash: failure: could not find '%s'", tmpStr);
+ ALOGE("TestHash: failure: could not find '%s'", tmpStr);
/* return false */
}
}
@@ -121,7 +121,7 @@ bool dvmTestHash()
if (str == NULL) {
/* good */
} else {
- LOGE("TestHash found nonexistent string (improper add?)");
+ ALOGE("TestHash found nonexistent string (improper add?)");
}
dumpForeach(pTab);
@@ -150,7 +150,7 @@ bool dvmTestHash()
/* remove the first one */
if (!dvmHashTableRemove(pTab, hash, (void*)str1))
- LOGE("TestHash failed to delete item");
+ ALOGE("TestHash failed to delete item");
else
free((void*)str1); // "Remove" doesn't call the free func
@@ -163,18 +163,18 @@ bool dvmTestHash()
count++;
}
if (count != 1) {
- LOGE("TestHash wrong number of entries (%d)", count);
+ ALOGE("TestHash wrong number of entries (%d)", count);
}
/* see if we can find them */
str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"one",
(HashCompareFunc) strcmp,false);
if (str != NULL)
- LOGE("TestHash deleted entry has returned!");
+ ALOGE("TestHash deleted entry has returned!");
str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"two",
(HashCompareFunc) strcmp,false);
if (str == NULL)
- LOGE("TestHash entry vanished");
+ ALOGE("TestHash entry vanished");
/* force a table realloc to exercise tombstone removal */
for (i = 0; i < 20; i++) {
diff --git a/vm/test/TestIndirectRefTable.cpp b/vm/test/TestIndirectRefTable.cpp
index 0997d61ae..f1442547c 100644
--- a/vm/test/TestIndirectRefTable.cpp
+++ b/vm/test/TestIndirectRefTable.cpp
@@ -79,7 +79,7 @@ static bool basicTest()
iref0 = (IndirectRef) 0x11110;
if (irt.remove(cookie, iref0)) {
- LOGE("unexpectedly successful removal");
+ ALOGE("unexpectedly successful removal");
goto bail;
}
@@ -91,14 +91,14 @@ static bool basicTest()
iref1 = irt.add(cookie, obj1);
iref2 = irt.add(cookie, obj2);
if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
- LOGE("trivial add1 failed");
+ ALOGE("trivial add1 failed");
goto bail;
}
if (irt.get(iref0) != obj0 ||
irt.get(iref1) != obj1 ||
irt.get(iref2) != obj2) {
- LOGE("objects don't match expected values %p %p %p vs. %p %p %p",
+ ALOGE("objects don't match expected values %p %p %p vs. %p %p %p",
irt.get(iref0), irt.get(iref1), irt.get(iref2),
obj0, obj1, obj2);
goto bail;
@@ -110,19 +110,19 @@ static bool basicTest()
!irt.remove(cookie, iref1) ||
!irt.remove(cookie, iref2))
{
- LOGE("fifo deletion failed");
+ ALOGE("fifo deletion failed");
goto bail;
}
/* table should be empty now */
if (irt.capacity() != 0) {
- LOGE("fifo del not empty");
+ ALOGE("fifo del not empty");
goto bail;
}
/* get invalid entry (off the end of the list) */
if (irt.get(iref0) != kInvalidIndirectRefObject) {
- LOGE("stale entry get succeeded unexpectedly");
+ ALOGE("stale entry get succeeded unexpectedly");
goto bail;
}
@@ -134,7 +134,7 @@ static bool basicTest()
iref1 = irt.add(cookie, obj1);
iref2 = irt.add(cookie, obj2);
if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
- LOGE("trivial add2 failed");
+ ALOGE("trivial add2 failed");
goto bail;
}
@@ -142,13 +142,13 @@ static bool basicTest()
!irt.remove(cookie, iref1) ||
!irt.remove(cookie, iref0))
{
- LOGE("lifo deletion failed");
+ ALOGE("lifo deletion failed");
goto bail;
}
/* table should be empty now */
if (irt.capacity() != 0) {
- LOGE("lifo del not empty");
+ ALOGE("lifo del not empty");
goto bail;
}
@@ -161,34 +161,34 @@ static bool basicTest()
iref1 = irt.add(cookie, obj1);
iref2 = irt.add(cookie, obj2);
if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
- LOGE("trivial add3 failed");
+ ALOGE("trivial add3 failed");
goto bail;
}
if (irt.capacity() != 3) {
- LOGE("expected 3 entries, found %d", irt.capacity());
+ ALOGE("expected 3 entries, found %d", irt.capacity());
goto bail;
}
if (!irt.remove(cookie, iref1) || irt.remove(cookie, iref1)) {
- LOGE("unorder deletion1 failed");
+ ALOGE("unorder deletion1 failed");
goto bail;
}
/* get invalid entry (from hole) */
if (irt.get(iref1) != kInvalidIndirectRefObject) {
- LOGE("hole get succeeded unexpectedly");
+ ALOGE("hole get succeeded unexpectedly");
goto bail;
}
if (!irt.remove(cookie, iref2) || !irt.remove(cookie, iref0)) {
- LOGE("unorder deletion2 failed");
+ ALOGE("unorder deletion2 failed");
goto bail;
}
/* table should be empty now */
if (irt.capacity() != 0) {
- LOGE("unorder del not empty");
+ ALOGE("unorder del not empty");
goto bail;
}
@@ -203,32 +203,32 @@ static bool basicTest()
iref2 = irt.add(cookie, obj2);
iref3 = irt.add(cookie, obj3);
if (iref0 == NULL || iref1 == NULL || iref2 == NULL || iref3 == NULL) {
- LOGE("trivial add4 failed");
+ ALOGE("trivial add4 failed");
goto bail;
}
if (!irt.remove(cookie, iref1)) {
- LOGE("remove 1 of 4 failed");
+ ALOGE("remove 1 of 4 failed");
goto bail;
}
iref1 = irt.add(cookie, obj1);
if (irt.capacity() != 4) {
- LOGE("hole not filled");
+ ALOGE("hole not filled");
goto bail;
}
if (!irt.remove(cookie, iref1) || !irt.remove(cookie, iref3)) {
- LOGE("remove 1/3 failed");
+ ALOGE("remove 1/3 failed");
goto bail;
}
if (irt.capacity() != 3) {
- LOGE("should be 3 after two deletions");
+ ALOGE("should be 3 after two deletions");
goto bail;
}
if (!irt.remove(cookie, iref2) || !irt.remove(cookie, iref0)) {
- LOGE("remove 2/0 failed");
+ ALOGE("remove 2/0 failed");
goto bail;
}
if (irt.capacity() != 0) {
- LOGE("not empty after split remove");
+ ALOGE("not empty after split remove");
goto bail;
}
@@ -242,15 +242,15 @@ static bool basicTest()
irt.remove(cookie, iref0);
iref1 = irt.add(cookie, obj1);
if (irt.remove(cookie, iref0)) {
- LOGE("mismatched del succeeded (%p vs %p)", iref0, iref1);
+ ALOGE("mismatched del succeeded (%p vs %p)", iref0, iref1);
goto bail;
}
if (!irt.remove(cookie, iref1)) {
- LOGE("switched del failed");
+ ALOGE("switched del failed");
goto bail;
}
if (irt.capacity() != 0) {
- LOGE("switching del not empty");
+ ALOGE("switching del not empty");
goto bail;
}
@@ -265,22 +265,22 @@ static bool basicTest()
if (iref0 != iref1) {
/* try 0, should not work */
if (irt.remove(cookie, iref0)) {
- LOGE("temporal del succeeded (%p vs %p)", iref0, iref1);
+ ALOGE("temporal del succeeded (%p vs %p)", iref0, iref1);
goto bail;
}
}
if (!irt.remove(cookie, iref1)) {
- LOGE("temporal cleanup failed");
+ ALOGE("temporal cleanup failed");
goto bail;
}
if (irt.capacity() != 0) {
- LOGE("temporal del not empty");
+ ALOGE("temporal del not empty");
goto bail;
}
DBUG_MSG("+++ START null lookup\n");
if (irt.get(NULL) != kInvalidIndirectRefObject) {
- LOGE("null lookup succeeded");
+ ALOGE("null lookup succeeded");
goto bail;
}
@@ -288,7 +288,7 @@ static bool basicTest()
iref0 = irt.add(cookie, obj0);
irt.remove(cookie, iref0);
if (irt.get(iref0) != kInvalidIndirectRefObject) {
- LOGE("stale lookup succeeded");
+ ALOGE("stale lookup succeeded");
goto bail;
}
@@ -300,38 +300,38 @@ static bool basicTest()
for (i = 0; i < kTableMax; i++) {
manyRefs[i] = irt.add(cookie, obj0);
if (manyRefs[i] == NULL) {
- LOGE("Failed adding %d of %d", i, kTableMax);
+ ALOGE("Failed adding %d of %d", i, kTableMax);
goto bail;
}
}
if (irt.add(cookie, obj0) != NULL) {
- LOGE("Table overflow succeeded");
+ ALOGE("Table overflow succeeded");
goto bail;
}
if (irt.capacity() != (size_t)kTableMax) {
- LOGE("Expected %d entries, found %d", kTableMax, irt.capacity());
+ ALOGE("Expected %d entries, found %d", kTableMax, irt.capacity());
goto bail;
}
irt.dump("table with 20 entries, all filled");
for (i = 0; i < kTableMax-1; i++) {
if (!irt.remove(cookie, manyRefs[i])) {
- LOGE("multi-remove failed at %d", i);
+ ALOGE("multi-remove failed at %d", i);
goto bail;
}
}
irt.dump("table with 20 entries, 19 of them holes");
/* because of removal order, should have 20 entries, 19 of them holes */
if (irt.capacity() != (size_t)kTableMax) {
- LOGE("Expected %d entries (with holes), found %d",
+ ALOGE("Expected %d entries (with holes), found %d",
kTableMax, irt.capacity());
goto bail;
}
if (!irt.remove(cookie, manyRefs[kTableMax-1])) {
- LOGE("multi-remove final failed");
+ ALOGE("multi-remove final failed");
goto bail;
}
if (irt.capacity() != 0) {
- LOGE("multi-del not empty");
+ ALOGE("multi-del not empty");
goto bail;
}
@@ -410,12 +410,12 @@ static bool performanceTest()
bool dvmTestIndirectRefTable()
{
if (!basicTest()) {
- LOGE("IRT basic test failed");
+ ALOGE("IRT basic test failed");
return false;
}
if (!performanceTest()) {
- LOGE("IRT performance test failed");
+ ALOGE("IRT performance test failed");
return false;
}