int matchOffset = match - bcp;
if (matchOffset > 0 && bcp[matchOffset-1] == ':')
matchOffset--;
- LOGV("DexOptZ: found '%s' in bootclasspath, cutting off at %d",
+ ALOGV("DexOptZ: found '%s' in bootclasspath, cutting off at %d",
zipName, matchOffset);
bcpCopy = strdup(bcp);
bcpCopy[matchOffset] = '\0';
GET_ARG(crc, strtoul, "bad crc");
GET_ARG(flags, strtol, "bad flags");
- LOGV("Args: fd=%d off=%ld len=%ld name='%s' mod=%#x crc=%#x flg=%d (argc=%d)",
+ ALOGV("Args: fd=%d off=%ld len=%ld name='%s' mod=%#x crc=%#x flg=%d (argc=%d)",
fd, offset, length, debugFileName, modWhen, crc, flags, argc);
assert(argc > 0);
bcpLen = 0;
for (i = 0, argp = argv; i < argc; i++) {
++argp;
- LOGV("DEP: '%s'", *argp);
+ ALOGV("DEP: '%s'", *argp);
bcpLen += strlen(*argp) + 1;
}
assert((int) strlen(bootClassPath) == bcpLen-1);
}
- LOGV(" bootclasspath is '%s'", bootClassPath);
+ ALOGV(" bootclasspath is '%s'", bootClassPath);
/* start the VM partway */
#endif
free(bootClassPath);
- LOGV("DexOpt command complete (result=%d)", result);
+ ALOGV("DexOpt command complete (result=%d)", result);
return result;
}
totalProbes += numProbes;
}
- LOGV("Class lookup: classes=%d slots=%d (%d%% occ) alloc=%d"
+ ALOGV("Class lookup: classes=%d slots=%d (%d%% occ) alloc=%d"
" total=%d max=%d",
pDexFile->pHeader->classDefsSize, numEntries,
(100 * pDexFile->pHeader->classDefsSize) / numEntries,
}
pDexFile->pOptHeader = (const DexOptHeader*) data;
- LOGV("Good opt header, DEX offset is %d, flags=0x%02x",
+ ALOGV("Good opt header, DEX offset is %d, flags=0x%02x",
pDexFile->pOptHeader->dexOffset, pDexFile->pOptHeader->flags);
/* parse the optimized dex file tables */
if (!(flags & kDexParseContinueOnError))
goto bail;
} else {
- LOGV("+++ adler32 checksum (%08x) verified", adler);
+ ALOGV("+++ adler32 checksum (%08x) verified", adler);
}
const DexOptHeader* pOptHeader = pDexFile->pOptHeader;
if (!(flags & kDexParseContinueOnError))
goto bail;
} else {
- LOGV("+++ adler32 opt checksum (%08x) verified", adler);
+ ALOGV("+++ adler32 opt checksum (%08x) verified", adler);
}
}
}
if (!(flags & kDexParseContinueOnError))
goto bail;
} else {
- LOGV("+++ sha1 digest verified");
+ ALOGV("+++ sha1 digest verified");
}
}
pDexFile->pClassLookup = (const DexClassLookup*) pOptData;
break;
case kDexChunkRegisterMaps:
- LOGV("+++ found register maps, size=%u", size);
+ ALOGV("+++ found register maps, size=%u", size);
pDexFile->pRegisterMapPool = pOptData;
break;
default:
bool okay = true;
memset(&state, 0, sizeof(state));
- LOGV("+++ swapping and verifying");
+ ALOGV("+++ swapping and verifying");
/*
* Note: The caller must have verified that "len" is at least as
*/
strncat(nameBuf, absoluteFile, kBufLen);
- LOGV("Cache file for '%s' '%s' is '%s'", fileName, subFileName, nameBuf);
+ ALOGV("Cache file for '%s' '%s' is '%s'", fileName, subFileName, nameBuf);
return strdup(nameBuf);
}
if (mprotect(memPtr, length, PROT_READ) < 0) {
/* this fails with EACCESS on FAT filesystems, e.g. /sdcard */
int err = errno;
- LOGV("mprotect(%p, %d, PROT_READ) failed: %s",
+ ALOGV("mprotect(%p, %d, PROT_READ) failed: %s",
memPtr, length, strerror(err));
LOGD("mprotect(RO) failed (%d), file will remain read-write", err);
}
int prot = wantReadWrite ? (PROT_READ|PROT_WRITE) : (PROT_READ);
if (mprotect(alignAddr, alignLength, prot) != 0) {
int err = errno;
- LOGV("mprotect (%p,%zd,%d) failed: %s",
+ ALOGV("mprotect (%p,%zd,%d) failed: %s",
alignAddr, alignLength, prot, strerror(errno));
return (errno != 0) ? errno : -1;
}
LOGW("munmap(%p, %d) failed: %s",
pMap->baseAddr, (int)pMap->baseLength, strerror(errno));
} else {
- LOGV("munmap(%p, %d) succeeded", pMap->baseAddr, pMap->baseLength);
+ ALOGV("munmap(%p, %d) succeeded", pMap->baseAddr, pMap->baseLength);
pMap->baseAddr = NULL;
pMap->baseLength = 0;
}
int i;
for (i = readAmount - kEOCDLen; i >= 0; i--) {
if (scanBuf[i] == 0x50 && get4LE(&scanBuf[i]) == kEOCDSignature) {
- LOGV("+++ Found EOCD at buf+%d", i);
+ ALOGV("+++ Found EOCD at buf+%d", i);
break;
}
}
return -1;
}
- LOGV("+++ numEntries=%d dirSize=%d dirOffset=%d",
+ ALOGV("+++ numEntries=%d dirSize=%d dirOffset=%d",
numEntries, dirSize, dirOffset);
/*
*/
off_t fileLength = lseek(fd, 0, SEEK_END);
if (fileLength < kEOCDLen) {
- LOGV("Zip: length %ld is too small to be zip", (long) fileLength);
+ ALOGV("Zip: length %ld is too small to be zip", (long) fileLength);
return -1;
}
goto bail;
}
}
- LOGV("+++ zip good scan %d entries", numEntries);
+ ALOGV("+++ zip good scan %d entries", numEntries);
result = 0;
{
int fd, err;
- LOGV("Opening as zip '%s' %p", fileName, pArchive);
+ ALOGV("Opening as zip '%s' %p", fileName, pArchive);
memset(pArchive, 0, sizeof(ZipArchive));
fd = open(fileName, O_RDONLY | O_BINARY, 0);
if (fd < 0) {
err = errno ? errno : -1;
- LOGV("Unable to open '%s': %s", fileName, strerror(err));
+ ALOGV("Unable to open '%s': %s", fileName, strerror(err));
return err;
}
goto bail;
if (parseZipArchive(pArchive) != 0) {
- LOGV("Zip: parsing '%s' failed", debugFileName);
+ ALOGV("Zip: parsing '%s' failed", debugFileName);
goto bail;
}
*/
void dexZipCloseArchive(ZipArchive* pArchive)
{
- LOGV("Closing archive %p", pArchive);
+ ALOGV("Closing archive %p", pArchive);
if (pArchive->mFd >= 0)
close(pArchive->mFd);
{
JNIEnv* e = reinterpret_cast<JNIEnv*>(env);
- LOGV("Registering %s natives", className);
+ ALOGV("Registering %s natives", className);
scoped_local_ref<jclass> c(env, findClass(env, className));
if (c.get() == NULL) {
const char* objType = objClazz->descriptor;
if (strcmp(declType, objType) == 0) {
/* names match; ignore class loader issues and allow it */
- LOGV("Check %s.%s: %s io %s (FAST-OK)",
+ ALOGV("Check %s.%s: %s io %s (FAST-OK)",
method->clazz->descriptor, method->name, objType, declType);
} else {
/*
abortMaybe();
return;
} else {
- LOGV("Check %s.%s: %s io %s (SLOW-OK)",
+ ALOGV("Check %s.%s: %s io %s (SLOW-OK)",
method->clazz->descriptor, method->name, objType, declType);
}
}
_ctype* result = baseEnv(env)->Get##_jname##ArrayElements(env, array, isCopy); \
if (gDvmJni.forceCopy && result != NULL) { \
if (noCopy == kNoCopyMagic) { \
- LOGV("FC: not copying %p %x", array, noCopy); \
+ ALOGV("FC: not copying %p %x", array, noCopy); \
} else { \
result = (_ctype*) createGuardedPACopy(env, array, isCopy); \
} \
sc.checkNonNull(elems); \
if (gDvmJni.forceCopy) { \
if ((uintptr_t)elems == kNoCopyMagic) { \
- LOGV("FC: not freeing %p", array); \
+ ALOGV("FC: not freeing %p", array); \
elems = NULL; /* base JNI call doesn't currently need */ \
} else { \
elems = (_ctype*) releaseGuardedPACopy(env, array, elems, mode); \
#define CLZ(x) __builtin_clz(x)
/*
- * If "very verbose" logging is enabled, make it equivalent to LOGV.
+ * If "very verbose" logging is enabled, make it equivalent to ALOGV.
* Otherwise, make it disappear.
*
* Define this above the #include "Dalvik.h" to enable for only a
*/
/* #define VERY_VERBOSE_LOG */
#if defined(VERY_VERBOSE_LOG)
-# define LOGVV LOGV
-# define IF_LOGVV() IF_LOGV()
+# define LOGVV ALOGV
+# define IF_LOGVV() IF_ALOGV()
#else
# define LOGVV(...) ((void)0)
# define IF_LOGVV() if (false)
offset = dvmGetFieldInt(chunk, gDvm.offDalvikDdmcChunk_offset);
length = dvmGetFieldInt(chunk, gDvm.offDalvikDdmcChunk_length);
- LOGV("DDM reply: type=0x%08x data=%p offset=%d length=%d",
+ ALOGV("DDM reply: type=0x%08x data=%p offset=%d length=%d",
type, replyData, offset, length);
if (length == 0 || replyData == NULL)
*pReplyLen = length + kChunkHdrLen;
result = true;
- LOGV("dvmHandleDdm returning type=%.4s buf=%p len=%d",
+ ALOGV("dvmHandleDdm returning type=%.4s buf=%p len=%d",
(char*) reply, reply, length);
bail:
{
// TODO: any init
- LOGV("Broadcasting DDM connect");
+ ALOGV("Broadcasting DDM connect");
broadcast(CONNECTED);
}
*/
void dvmDdmDisconnected()
{
- LOGV("Broadcasting DDM disconnect");
+ ALOGV("Broadcasting DDM disconnect");
broadcast(DISCONNECTED);
gDvm.ddmThreadNotification = false;
void dvmDbgRegisterObjectId(ObjectId id)
{
Object* obj = (Object*)(u4) id;
- LOGV("+++ registering %p (%s)", obj, obj->clazz->descriptor);
+ ALOGV("+++ registering %p (%s)", obj, obj->clazz->descriptor);
registerObject(obj, kObjectId, true);
}
{
assert(!gDvm.debuggerConnected);
- LOGV("JDWP has attached");
+ ALOGV("JDWP has attached");
assert(dvmHashTableNumEntries(gDvm.dbgRegistry) == 0);
gDvm.debuggerConnected = true;
}
pObjects = (Object**) data;
pObjects += firstIndex;
- LOGV(" --> copying %d object IDs", count);
+ ALOGV(" --> copying %d object IDs", count);
//assert(tag == JT_OBJECT); // could be object or "refined" type
for (i = 0; i < count; i++, pObjects++) {
if (isTagPrimitive(tag)) {
int width = dvmDbgGetTagWidth(tag);
- LOGV(" --> setting %d '%c' width=%d", count, tag, width);
+ ALOGV(" --> setting %d '%c' width=%d", count, tag, width);
copyValuesFromBE(data + firstIndex*width, buf, count, width);
} else {
pObjects = (Object**) data;
pObjects += firstIndex;
- LOGV(" --> setting %d objects", count);
+ ALOGV(" --> setting %d objects", count);
/* should do array type check here */
for (i = 0; i < count; i++) {
else if (slot == 0) // always remap slot 0
newSlot = kSlot0Sub;
- LOGV("untweak: %d to %d", slot, newSlot);
+ ALOGV("untweak: %d to %d", slot, newSlot);
return newSlot;
}
newSlot = method->registersSize - method->insSize;
}
- LOGV("untweak: %d to %d", slot, newSlot);
+ ALOGV("untweak: %d to %d", slot, newSlot);
return newSlot;
}
reg = (u2) tweakSlot(reg, name);
- LOGV(" %2d: %d(%d) '%s' '%s' slot=%d",
+ ALOGV(" %2d: %d(%d) '%s' '%s' slot=%d",
pContext->numItems, startAddress, endAddress - startAddress,
name, descriptor, reg);
tag = tagFromObject(objVal);
expandBufAdd1(pReply, tag);
expandBufAddObjectId(pReply, objectToObjectId(objVal));
- LOGV(" --> ifieldId %x --> tag '%c' %p", fieldId, tag, objVal);
+ ALOGV(" --> ifieldId %x --> tag '%c' %p", fieldId, tag, objVal);
} else {
- LOGV(" --> ifieldId %x --> tag '%c'", fieldId, tag);
+ ALOGV(" --> ifieldId %x --> tag '%c'", fieldId, tag);
expandBufAdd1(pReply, tag);
switch (tag) {
tag = tagFromObject(objVal);
expandBufAdd1(pReply, tag);
expandBufAddObjectId(pReply, objectToObjectId(objVal));
- LOGV(" --> sfieldId %x --> tag '%c' %p", fieldId, tag, objVal);
+ ALOGV(" --> sfieldId %x --> tag '%c' %p", fieldId, tag, objVal);
} else {
JValue value;
- LOGV(" --> sfieldId %x --> tag '%c'", fieldId, tag);
+ ALOGV(" --> sfieldId %x --> tag '%c'", fieldId, tag);
expandBufAdd1(pReply, tag);
switch (tag) {
Thread* self = dvmThreadSelf();
ThreadStatus oldStatus = dvmChangeStatus(self, THREAD_VMWAIT);
- LOGV(" Transferring control to event thread");
+ ALOGV(" Transferring control to event thread");
dvmLockMutex(&targetThread->invokeReq.lock);
if ((options & INVOKE_SINGLE_THREADED) == 0) {
- LOGV(" Resuming all threads");
+ ALOGV(" Resuming all threads");
dvmResumeAllThreads(SUSPEND_FOR_DEBUG_EVENT);
} else {
- LOGV(" Resuming event thread only");
+ ALOGV(" Resuming event thread only");
dvmResumeThread(targetThread);
}
&targetThread->invokeReq.lock);
}
dvmUnlockMutex(&targetThread->invokeReq.lock);
- LOGV(" Control has returned from event thread");
+ ALOGV(" Control has returned from event thread");
/* wait for thread to re-suspend itself */
dvmWaitForSuspend(targetThread);
* so we want to resume the target thread once to keep the books straight.
*/
if ((options & INVOKE_SINGLE_THREADED) == 0) {
- LOGV(" Suspending all threads");
+ ALOGV(" Suspending all threads");
dvmSuspendAllThreads(SUSPEND_FOR_DEBUG_EVENT);
- LOGV(" Resuming event thread to balance the count");
+ ALOGV(" Resuming event thread to balance the count");
dvmResumeThread(targetThread);
}
assert(sizeof(jvalue) == sizeof(u8));
- IF_LOGV() {
+ IF_ALOGV() {
char* desc = dexProtoCopyMethodDescriptor(&meth->prototype);
- LOGV("JDWP invoking method %p/%p %s.%s:%s",
+ ALOGV("JDWP invoking method %p/%p %s.%s:%s",
pReq->method, meth, meth->clazz->descriptor, meth->name, desc);
free(desc);
}
void dvmDbgDdmSendChunkV(int type, const struct iovec* iov, int iovcnt)
{
if (gDvm.jdwpState == NULL) {
- LOGV("Debugger thread not active, ignoring DDM send (t=0x%08x)",
+ ALOGV("Debugger thread not active, ignoring DDM send (t=0x%08x)",
type);
return;
}
pDvmDex->pResFields = (struct Field**)
calloc(fieldCount, sizeof(struct Field*));
- LOGV("+++ DEX %p: allocateAux %d+%d+%d+%d * 4 = %d bytes",
+ ALOGV("+++ DEX %p: allocateAux %d+%d+%d+%d * 4 = %d bytes",
pDvmDex, stringCount, classCount, methodCount, fieldCount,
(stringCount + classCount + methodCount + fieldCount) * 4);
dexFileFree(pDvmDex->pDexFile);
- LOGV("+++ DEX %p: freeing aux structs", pDvmDex);
+ ALOGV("+++ DEX %p: freeing aux structs", pDvmDex);
free(pDvmDex->pResStrings);
free(pDvmDex->pResClasses);
free(pDvmDex->pResMethods);
bool dvmDexChangeDex1(DvmDex* pDvmDex, u1* addr, u1 newVal)
{
if (*addr == newVal) {
- LOGV("+++ byte at %p is already 0x%02x", addr, newVal);
+ ALOGV("+++ byte at %p is already 0x%02x", addr, newVal);
return true;
}
*/
dvmLockMutex(&pDvmDex->modLock);
- LOGV("+++ change byte at %p from 0x%02x to 0x%02x", addr, *addr, newVal);
+ ALOGV("+++ change byte at %p from 0x%02x to 0x%02x", addr, *addr, newVal);
if (sysChangeMapAccess(addr, 1, true, &pDvmDex->memMap) != 0) {
LOGD("NOTE: DEX page access change (->RW) failed");
/* expected on files mounted from FAT; keep going (may crash) */
bool dvmDexChangeDex2(DvmDex* pDvmDex, u2* addr, u2 newVal)
{
if (*addr == newVal) {
- LOGV("+++ value at %p is already 0x%04x", addr, newVal);
+ ALOGV("+++ value at %p is already 0x%04x", addr, newVal);
return true;
}
*/
dvmLockMutex(&pDvmDex->modLock);
- LOGV("+++ change 2byte at %p from 0x%04x to 0x%04x", addr, *addr, newVal);
+ ALOGV("+++ change 2byte at %p from 0x%04x to 0x%04x", addr, *addr, newVal);
if (sysChangeMapAccess(addr, 2, true, &pDvmDex->memMap) != 0) {
LOGD("NOTE: DEX page access change (->RW) failed");
/* expected on files mounted from FAT; keep going (may crash) */
*/
if (gDvm.optimizing) {
/* need the exception object, but can't invoke interpreted code */
- LOGV("Skipping init of exception %s '%s'",
+ ALOGV("Skipping init of exception %s '%s'",
excepClass->descriptor, msg);
} else {
assert(excepClass == exception->clazz);
if (handler->typeIdx == kDexNoIndex) {
/* catch-all */
- LOGV("Match on catch-all block at 0x%02x in %s.%s for %s",
+ ALOGV("Match on catch-all block at 0x%02x in %s.%s for %s",
relPc, method->clazz->descriptor,
method->name, excepClass->descriptor);
return handler->address;
// excepClass->descriptor, pEntry->excepClass->descriptor);
if (dvmInstanceof(excepClass, throwable)) {
- LOGV("Match on catch block at 0x%02x in %s.%s for %s",
+ ALOGV("Match on catch block at 0x%02x in %s.%s for %s",
relPc, method->clazz->descriptor,
method->name, excepClass->descriptor);
return handler->address;
}
}
- LOGV("No matching catch block at 0x%02x in %s for %s",
+ ALOGV("No matching catch block at 0x%02x in %s for %s",
relPc, method->name, excepClass->descriptor);
return -1;
}
if (idx < bottomIndex) {
/* wrong segment */
- LOGV("Attempt to remove index outside index area (%d vs %d-%d)",
+ ALOGV("Attempt to remove index outside index area (%d vs %d-%d)",
idx, bottomIndex, topIndex);
return false;
}
int numHoles = segmentState.parts.numHoles - prevState.parts.numHoles;
if (numHoles != 0) {
while (--topIndex > bottomIndex && numHoles != 0) {
- LOGV("+++ checking for hole at %d (cookie=0x%08x) val=%p",
+ ALOGV("+++ checking for hole at %d (cookie=0x%08x) val=%p",
topIndex-1, cookie, table_[topIndex-1]);
if (table_[topIndex-1] != NULL) {
break;
}
- LOGV("+++ ate hole at %d", topIndex-1);
+ ALOGV("+++ ate hole at %d", topIndex-1);
numHoles--;
}
segmentState.parts.numHoles = numHoles + prevState.parts.numHoles;
segmentState.parts.topIndex = topIndex;
} else {
segmentState.parts.topIndex = topIndex-1;
- LOGV("+++ ate last entry %d", topIndex-1);
+ ALOGV("+++ ate last entry %d", topIndex-1);
}
} else {
/*
* the hole count.
*/
if (table_[idx] == NULL) {
- LOGV("--- WEIRD: removing null entry %d", idx);
+ ALOGV("--- WEIRD: removing null entry %d", idx);
return false;
}
if (workAroundAppJniBugs == false && !checkEntry("remove", iref, idx)) {
table_[idx] = NULL;
segmentState.parts.numHoles++;
- LOGV("+++ left hole at %d, holes=%d", idx, segmentState.parts.numHoles);
+ ALOGV("+++ left hole at %d, holes=%d", idx, segmentState.parts.numHoles);
}
return true;
{
int i;
- LOGV("VM options (%d):", argc);
+ ALOGV("VM options (%d):", argc);
for (i = 0; i < argc; i++)
- LOGV(" %d: '%s'", i, argv[i]);
+ ALOGV(" %d: '%s'", i, argv[i]);
/*
* Over-allocate AssertionControl array for convenience. If allocated,
dvmFprintf(stderr, "Bad value for -Xgc");
return -1;
}
- LOGV("Precise GC configured %s", gDvm.preciseGc ? "ON" : "OFF");
+ ALOGV("Precise GC configured %s", gDvm.preciseGc ? "ON" : "OFF");
} else if (strcmp(argv[i], "-Xcheckdexsum") == 0) {
gDvm.verifyDexChecksum = true;
assert(gDvm.initializing);
- LOGV("VM init args (%d):", argc);
+ ALOGV("VM init args (%d):", argc);
for (int i = 0; i < argc; i++) {
- LOGV(" %d: '%s'", i, argv[i]);
+ ALOGV(" %d: '%s'", i, argv[i]);
}
setCommandLineDefaults();
/* Configure group scheduling capabilities */
if (!access("/dev/cpuctl/tasks", F_OK)) {
- LOGV("Using kernel group scheduling");
+ ALOGV("Using kernel group scheduling");
gDvm.kernelGroupScheduling = 1;
} else {
- LOGV("Using kernel scheduler policies");
+ ALOGV("Using kernel scheduler policies");
}
/* configure signal handling */
}
/* mterp setup */
- LOGV("Using executionMode %d", gDvm.executionMode);
+ ALOGV("Using executionMode %d", gDvm.executionMode);
dvmCheckAsmConstants();
/*
endJdwp = dvmGetRelativeTimeUsec();
- LOGV("thread-start heap=%d quit=%d jdwp=%d total=%d usec",
+ ALOGV("thread-start heap=%d quit=%d jdwp=%d total=%d usec",
(int)(endHeap-startHeap), (int)(endQuit-startQuit),
(int)(endJdwp-startJdwp), (int)(endJdwp-startHeap));
*/
void dvmShutdown()
{
- LOGV("VM shutting down");
+ ALOGV("VM shutting down");
if (CALC_CACHE_STATS)
dvmDumpAtomicCacheStats(gDvm.instanceofCache);
}
gDvm.inlinedMethods[opIndex] = method;
- IF_LOGV() {
+ IF_ALOGV() {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGV("Registered for profile: %s.%s %s",
+ ALOGV("Registered for profile: %s.%s %s",
method->clazz->descriptor, method->name, desc);
free(desc);
}
*pCachedName = buf;
return fd;
}
- LOGV("Couldn't open %s: %s", buf, strerror(errno));
+ ALOGV("Couldn't open %s: %s", buf, strerror(errno));
bail:
free(buf);
return -1;
* See if there's an up-to-date copy of the optimized dex
* in the cache, but don't create one if there isn't.
*/
- LOGV("dvmDexCacheStatus: Checking cache for %s", fileName);
+ ALOGV("dvmDexCacheStatus: Checking cache for %s", fileName);
cachedName = dexOptGenerateCacheFileName(fileName, kDexInJarName);
if (cachedName == NULL)
return DEX_CACHE_BAD_ARCHIVE;
dexGetZipEntryModTime(&archive, entry),
dexGetZipEntryCrc32(&archive, entry),
/*isBootstrap=*/false, &newFile, /*createIfMissing=*/false);
- LOGV("dvmOpenCachedDexFile returned fd %d", fd);
+ ALOGV("dvmOpenCachedDexFile returned fd %d", fd);
if (fd < 0) {
result = DEX_CACHE_STALE;
goto bail;
goto bail;
}
- LOGV("Using alternate file (odex) for %s ...", 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");
result = DEX_CACHE_STALE_ODEX;
goto bail;
} else {
- LOGV("%s odex has good dependencies", fileName);
+ ALOGV("%s odex has good dependencies", fileName);
}
}
result = DEX_CACHE_OK;
*/
fd = openAlternateSuffix(fileName, "odex", O_RDONLY, &cachedName);
if (fd >= 0) {
- LOGV("Using alternate file (odex) for %s ...", fileName);
+ ALOGV("Using alternate file (odex) for %s ...", fileName);
if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
LOGE("%s odex has stale dependencies", fileName);
free(cachedName);
fd = -1;
goto tryArchive;
} else {
- LOGV("%s odex has good dependencies", fileName);
+ ALOGV("%s odex has good dependencies", fileName);
//TODO: make sure that the .odex actually corresponds
// to the classes.dex inside the archive (if present).
// For typical use there will be no classes.dex.
} else {
cachedName = strdup(odexOutputName);
}
- LOGV("dvmJarFileOpen: Checking cache for %s (%s)",
+ ALOGV("dvmJarFileOpen: Checking cache for %s (%s)",
fileName, cachedName);
fd = dvmOpenCachedDexFile(fileName, cachedName,
dexGetZipEntryModTime(&archive, entry),
locked = false;
}
- LOGV("Successfully opened '%s' in '%s'", kDexInJarName, fileName);
+ ALOGV("Successfully opened '%s' in '%s'", kDexInJarName, fileName);
*ppJarFile = (JarFile*) calloc(1, sizeof(JarFile));
(*ppJarFile)->archive = archive;
if (*signature == '!') {
fastJni = true;
++signature;
- LOGV("fast JNI method %s.%s:%s detected", clazz->descriptor, methodName, signature);
+ ALOGV("fast JNI method %s.%s:%s detected", clazz->descriptor, methodName, signature);
}
Method* method = dvmFindDirectMethodByDescriptor(clazz, methodName, signature);
if (method->nativeFunc != dvmResolveNativeMethod) {
/* this is allowed, but unusual */
- LOGV("Note: %s.%s:%s was already registered", clazz->descriptor, methodName, signature);
+ ALOGV("Note: %s.%s:%s was already registered", clazz->descriptor, methodName, signature);
}
method->fastJni = fastJni;
dvmUseJNIBridge(method, fnPtr);
- LOGV("JNI-registered %s.%s:%s", clazz->descriptor, methodName, signature);
+ ALOGV("JNI-registered %s.%s:%s", clazz->descriptor, methodName, signature);
return true;
}
return;
}
- //LOGV("JNI: set element %d in array %p to %p", index, array, value);
+ //ALOGV("JNI: set element %d in array %p to %p", index, array, value);
Object* obj = dvmDecodeIndirectRef(env, jobj);
dvmSetObjectArrayElement(arrayObj, index, obj);
dvmLockThreadList(NULL);
if (gDvm.nonDaemonThreadCount == 0) {
// dead or dying
- LOGV("Refusing to attach thread '%s' -- VM is shutting down",
+ ALOGV("Refusing to attach thread '%s' -- VM is shutting down",
(thr_args == NULL) ? "(unknown)" : args->name);
dvmUnlockThreadList();
return JNI_ERR;
if (self == NULL) {
JNIEnv* tmpEnv;
if (AttachCurrentThread(vm, &tmpEnv, NULL) != JNI_OK) {
- LOGV("Unable to reattach main for Destroy; assuming VM is shutting down (count=%d)",
+ ALOGV("Unable to reattach main for Destroy; assuming VM is shutting down (count=%d)",
gDvm.nonDaemonThreadCount);
goto shutdown;
} else {
- LOGV("Attached to wait for shutdown in Destroy");
+ ALOGV("Attached to wait for shutdown in Destroy");
}
}
dvmChangeStatus(self, THREAD_VMWAIT);
dvmChangeStatus(NULL, THREAD_NATIVE);
*p_env = (JNIEnv*) pEnv;
*p_vm = (JavaVM*) pVM;
- LOGV("CreateJavaVM succeeded");
+ ALOGV("CreateJavaVM succeeded");
return JNI_OK;
}
dvmInitMutex(&pHdr->lock);
- LOGV("LinearAlloc: created region at %p-%p",
+ ALOGV("LinearAlloc: created region at %p-%p",
pHdr->mapAddr, pHdr->mapAddr + pHdr->mapLength-1);
return pHdr;
//dvmLinearAllocDump(classLoader);
if (gDvm.verboseShutdown) {
- LOGV("Unmapping linear allocator base=%p", pHdr->mapAddr);
+ ALOGV("Unmapping linear allocator base=%p", pHdr->mapAddr);
LOGD("LinearAlloc %p used %d of %d (%d%%)",
classLoader, pHdr->curOffset, pHdr->mapLength,
(pHdr->curOffset * 100) / pHdr->mapLength);
getHeader(classLoader)->curOffset));
const u4* pLen = getBlockHeader(mem);
- LOGV("--- LinearRealloc(%d) old=%d", newSize, *pLen);
+ ALOGV("--- LinearRealloc(%d) old=%d", newSize, *pLen);
/* handle size reduction case */
if (*pLen >= newSize) {
sprintf(nameBuf, "/proc/self/task/%d/stat", (int) tid);
fd = open(nameBuf, O_RDONLY);
if (fd < 0) {
- LOGV("Unable to open '%s': %s", nameBuf, strerror(errno));
+ ALOGV("Unable to open '%s': %s", nameBuf, strerror(errno));
return false;
}
return true;
}
- LOGV("+++ retrieving %s OnLoad status", pEntry->pathName);
+ ALOGV("+++ retrieving %s OnLoad status", pEntry->pathName);
bool result;
dvmLockMutex(&pEntry->onLoadLock);
dvmChangeStatus(self, oldStatus);
}
if (pEntry->onLoadResult == kOnLoadOkay) {
- LOGV("+++ earlier OnLoad(%s) okay", pEntry->pathName);
+ ALOGV("+++ earlier OnLoad(%s) okay", pEntry->pathName);
result = true;
} else {
- LOGV("+++ earlier OnLoad(%s) failed", pEntry->pathName);
+ ALOGV("+++ earlier OnLoad(%s) failed", pEntry->pathName);
result = false;
}
dvmUnlockMutex(&pEntry->onLoadLock);
int len;
if (meth->clazz->classLoader != pLib->classLoader) {
- LOGV("+++ not scanning '%s' for '%s' (wrong CL)",
+ ALOGV("+++ not scanning '%s' for '%s' (wrong CL)",
pLib->pathName, meth->name);
return 0;
} else
- LOGV("+++ scanning '%s' for '%s'", pLib->pathName, meth->name);
+ ALOGV("+++ scanning '%s' for '%s'", pLib->pathName, meth->name);
/*
* First, we try it without the signature.
if (mangleCM == NULL)
goto bail;
- LOGV("+++ calling dlsym(%s)", mangleCM);
+ ALOGV("+++ calling dlsym(%s)", mangleCM);
func = dlsym(pLib->handle, mangleCM);
if (func == NULL) {
mangleSig =
sprintf(mangleCMSig, "%s__%s", mangleCM, mangleSig);
- LOGV("+++ calling dlsym(%s)", mangleCMSig);
+ ALOGV("+++ calling dlsym(%s)", mangleCMSig);
func = dlsym(pLib->handle, mangleCMSig);
if (func != NULL) {
- LOGV("Found '%s' with dlsym", mangleCMSig);
+ ALOGV("Found '%s' with dlsym", mangleCMSig);
}
} else {
- LOGV("Found '%s' with dlsym", mangleCM);
+ ALOGV("Found '%s' with dlsym", mangleCM);
}
bail:
*/
int fd = open("/dev/qemu_trace", O_RDWR);
if (fd < 0) {
- LOGV("Unable to open /dev/qemu_trace");
+ ALOGV("Unable to open /dev/qemu_trace");
} else {
gDvm.emulatorTracePage = mmap(0, SYSTEM_PAGE_SIZE, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
cachedName = strdup(odexOutputName);
}
- LOGV("dvmRawDexFileOpen: Checking cache for %s (%s)",
+ ALOGV("dvmRawDexFileOpen: Checking cache for %s (%s)",
fileName, cachedName);
optFd = dvmOpenCachedDexFile(fileName, cachedName, modTime,
locked = false;
}
- LOGV("Successfully opened '%s'", fileName);
+ ALOGV("Successfully opened '%s'", fileName);
*ppRawDexFile = (RawDexFile*) calloc(1, sizeof(RawDexFile));
(*ppRawDexFile)->cacheFileName = cachedName;
if (moveCount != 0) {
/* remove from middle, slide the rest down */
memmove(ptr, ptr+1, moveCount * sizeof(Object*));
- //LOGV("LREF delete %p, shift %d down", obj, moveCount);
+ //ALOGV("LREF delete %p, shift %d down", obj, moveCount);
} else {
/* last entry, falls off the end */
- //LOGV("LREF delete %p from end", obj);
+ //ALOGV("LREF delete %p from end", obj);
}
return true;
pthread_kill(gDvm.signalCatcherHandle, SIGQUIT);
pthread_join(gDvm.signalCatcherHandle, NULL);
- LOGV("signal catcher has shut down");
+ ALOGV("signal catcher has shut down");
}
UNUSED_PARAMETER(arg);
- LOGV("Signal catcher thread started (threadid=%d)", self->threadId);
+ ALOGV("Signal catcher thread started (threadid=%d)", self->threadId);
/* set up mask with signals we want to handle */
sigemptyset(&mask);
cc = sigwait(&mask, &rcvd);
if (cc != 0) {
if (cc == EINTR) {
- //LOGV("sigwait: EINTR");
+ //ALOGV("sigwait: EINTR");
goto loop;
}
assert(!"bad result from sigwait");
#endif
endSec = ts->tv_sec + msec / 1000;
if (endSec >= 0x7fffffff) {
- LOGV("NOTE: end time exceeds epoch");
+ ALOGV("NOTE: end time exceeds epoch");
endSec = 0x7ffffffe;
}
ts->tv_sec = endSec;
goto retry;
}
} else {
- LOGV("(%d) spin on lock %p: %#x (%#x) %#x",
+ ALOGV("(%d) spin on lock %p: %#x (%#x) %#x",
threadId, &obj->lock, 0, *thinp, thin);
/*
* The lock is owned by another thread. Notify the VM
* Let the VM know we are no longer waiting and
* try again.
*/
- LOGV("(%d) lock %p surprise-fattened",
+ ALOGV("(%d) lock %p surprise-fattened",
threadId, &obj->lock);
dvmChangeStatus(self, oldStatus);
goto retry;
}
}
- LOGV("(%d) spin on lock done %p: %#x (%#x) %#x",
+ ALOGV("(%d) spin on lock done %p: %#x (%#x) %#x",
threadId, &obj->lock, 0, *thinp, thin);
/*
* We have acquired the thin lock. Let the VM know that
* Fatten the lock.
*/
inflateMonitor(self, obj);
- LOGV("(%d) lock %p fattened", threadId, &obj->lock);
+ ALOGV("(%d) lock %p fattened", threadId, &obj->lock);
}
} else {
/*
* any other thread gets a chance.
*/
inflateMonitor(self, obj);
- LOGV("(%d) lock %p fattened by wait()", self->threadId, &obj->lock);
+ ALOGV("(%d) lock %p fattened by wait()", self->threadId, &obj->lock);
}
mon = LW_MONITOR(obj->lock);
waitMonitor(self, mon, msec, nsec, interruptShouldThrow);
// Change this to enable logging on cgroup errors
#define ENABLE_CGROUP_ERR_LOGGING 0
-// change this to LOGV/LOGD to debug thread activity
+// change this to ALOGV/LOGD to debug thread activity
#define LOG_THREAD LOGVV
/*
}
std::string threadName(dvmGetThreadName(target));
- LOGV("threadid=%d: suspending daemon id=%d name='%s'",
+ ALOGV("threadid=%d: suspending daemon id=%d name='%s'",
threadId, target->threadId, threadName.c_str());
/* mark as suspended */
}
if (allSuspended) {
- LOGV("threadid=%d: all daemons have suspended", threadId);
+ ALOGV("threadid=%d: all daemons have suspended", threadId);
break;
} else {
if (!complained) {
Method* init;
JValue unused;
- LOGV("+++ finishing prep on main VM thread");
+ ALOGV("+++ finishing prep on main VM thread");
/* main thread is always first in list at this point */
thread = gDvm.threadList;
*/
setThreadSelf(thread);
- LOGV("threadid=%d: interp stack at %p",
+ ALOGV("threadid=%d: interp stack at %p",
thread->threadId, thread->interpStackStart - thread->interpStackSize);
/*
Thread* self = (Thread*) arg;
assert(self != NULL);
- LOGV("threadid=%d: threadExitCheck(%p) count=%d",
+ ALOGV("threadid=%d: threadExitCheck(%p) count=%d",
self->threadId, arg, self->threadExitCheckCount);
if (self->status == THREAD_ZOMBIE) {
Method* run = self->threadObj->clazz->vtable[gDvm.voffJavaLangThread_run];
JValue unused;
- LOGV("threadid=%d: calling run()", self->threadId);
+ ALOGV("threadid=%d: calling run()", self->threadId);
assert(strcmp(run->name, "run") == 0);
dvmCallMethod(self, run, self->threadObj, &unused);
- LOGV("threadid=%d: exiting", self->threadId);
+ ALOGV("threadid=%d: exiting", self->threadId);
/*
* Remove the thread from various lists, report its death, and free
if (gDvm.nonDaemonThreadCount == 0) {
int cc;
- LOGV("threadid=%d: last non-daemon thread", self->threadId);
+ ALOGV("threadid=%d: last non-daemon thread", self->threadId);
//dvmDumpAllThreads(false);
// cond var guarded by threadListLock, which we already hold
cc = pthread_cond_signal(&gDvm.vmExitCond);
}
}
- LOGV("threadid=%d: bye!", self->threadId);
+ ALOGV("threadid=%d: bye!", self->threadId);
releaseThreadId(self);
dvmUnlockThreadList();
/* Create a new heap for post-fork zygote allocations. We only
* try once, even if it fails.
*/
- LOGV("Splitting out new zygote heap");
+ ALOGV("Splitting out new zygote heap");
gDvm.newZygoteHeapAllocated = true;
return addNewHeap(hs);
}
hs->targetUtilization =
(size_t)(newTarget * (float)HEAP_UTILIZATION_MAX);
- LOGV("Set heap target utilization to %zd/%d (%f)",
+ ALOGV("Set heap target utilization to %zd/%d (%f)",
hs->targetUtilization, HEAP_UTILIZATION_MAX, newTarget);
}
if (clazz == NULL) {
dvmClearOptException(dvmThreadSelf());
if (strchr(pDescriptor, '$') != NULL) {
- LOGV("VFY: unable to find class referenced in signature (%s)",
+ ALOGV("VFY: unable to find class referenced in signature (%s)",
pDescriptor);
} else {
LOG_VFY("VFY: unable to find class referenced in signature (%s)",
if (fieldClass == NULL) {
dvmClearOptException(dvmThreadSelf());
- LOGV("VFY: unable to find class '%s' for field %s.%s, trying Object",
+ ALOGV("VFY: unable to find class '%s' for field %s.%s, trying Object",
field->signature, meth->clazz->descriptor, field->name);
fieldClass = gDvm.classJavaLangObject;
} else {
* working on it, we'll block here until they complete. Because
* we're waiting on an external resource, we go into VMWAIT mode.
*/
- LOGV("DexOpt: locking cache file %s (fd=%d, boot=%d)",
+ ALOGV("DexOpt: locking cache file %s (fd=%d, boot=%d)",
cacheFileName, fd, isBootstrap);
ThreadStatus oldStatus = dvmChangeStatus(NULL, THREAD_VMWAIT);
cc = flock(fd, LOCK_EX | LOCK_NB);
close(fd);
return -1;
}
- LOGV("DexOpt: locked cache file");
+ ALOGV("DexOpt: locked cache file");
/*
* Check to see if the fd we opened and locked matches the file in
if (cc != 0)
goto close_fail;
*pNewFile = true;
- LOGV("DexOpt: successfully initialized new cache file");
+ ALOGV("DexOpt: successfully initialized new cache file");
} else {
bool expectVerify, expectOpt;
expectOpt = true;
}
- LOGV("checking deps, expecting vfy=%d opt=%d",
+ ALOGV("checking deps, expecting vfy=%d opt=%d",
expectVerify, expectOpt);
if (!dvmCheckOptHeaderAndDependencies(fd, true, modWhen, crc,
close(fd);
goto retry;
} else {
- LOGV("DexOpt: good deps in cache file");
+ ALOGV("DexOpt: good deps in cache file");
}
}
kUseValgrind ? " [valgrind]" : "", strerror(errno));
exit(1);
} else {
- LOGV("DexOpt: waiting for verify+opt, pid=%d", (int) pid);
+ ALOGV("DexOpt: waiting for verify+opt, pid=%d", (int) pid);
int status;
pid_t gotPid;
assert(gDvm.optimizing);
- LOGV("Continuing optimization (%s, isb=%d)", fileName, isBootstrap);
+ ALOGV("Continuing optimization (%s, isb=%d)", fileName, isBootstrap);
assert(dexOffset >= 0);
}
adjOffset = (depsOffset + 7) & ~(0x07);
if (adjOffset != depsOffset) {
- LOGV("Adjusting deps start from %d to %d",
+ ALOGV("Adjusting deps start from %d to %d",
(int) depsOffset, (int) adjOffset);
depsOffset = adjOffset;
lseek(fd, depsOffset, SEEK_SET);
adjOffset = (optOffset + 7) & ~(0x07);
if (adjOffset != optOffset) {
- LOGV("Adjusting opt start from %d to %d",
+ ALOGV("Adjusting opt start from %d to %d",
(int) optOffset, (int) adjOffset);
optOffset = adjOffset;
lseek(fd, optOffset, SEEK_SET);
if (sysWriteFully(fd, &optHdr, sizeof(optHdr), "DexOpt opt header") != 0)
goto bail;
- LOGV("Successfully wrote DEX header");
+ ALOGV("Successfully wrote DEX header");
result = true;
//dvmRegisterMapDumpStats();
u4 idx;
int loaded = 0;
- LOGV("DexOpt: +++ trying to load %d classes", count);
+ ALOGV("DexOpt: +++ trying to load %d classes", count);
dvmSetBootPathExtraDex(pDvmDex);
classDescriptor =
dexStringByTypeIdx(pDvmDex->pDexFile, pClassDef->classIdx);
- LOGV("+++ loading '%s'", classDescriptor);
+ ALOGV("+++ loading '%s'", classDescriptor);
//newClass = dvmDefineClass(pDexFile, classDescriptor,
// NULL);
newClass = dvmFindSystemClassNoInit(classDescriptor);
if (newClass == NULL) {
- LOGV("DexOpt: failed loading '%s'", classDescriptor);
+ ALOGV("DexOpt: failed loading '%s'", classDescriptor);
dvmClearOptException(dvmThreadSelf());
} else if (newClass->pDvmDex != pDvmDex) {
/*
loaded++;
}
}
- LOGV("DexOpt: +++ successfully loaded %d classes", loaded);
+ ALOGV("DexOpt: +++ successfully loaded %d classes", loaded);
dvmSetBootPathExtraDex(NULL);
return true;
} else {
// TODO: log when in verbose mode
- LOGV("DexOpt: not optimizing unavailable class '%s'",
+ ALOGV("DexOpt: not optimizing unavailable class '%s'",
classDescriptor);
}
}
verified = true;
} else {
// TODO: log when in verbose mode
- LOGV("DexOpt: '%s' failed verification", classDescriptor);
+ ALOGV("DexOpt: '%s' failed verification", classDescriptor);
}
}
bool needVerify = (gDvm.dexOptMode == OPTIMIZE_MODE_VERIFIED ||
gDvm.dexOptMode == OPTIMIZE_MODE_FULL);
if (!verified && needVerify) {
- LOGV("DexOpt: not optimizing '%s': not verified",
+ ALOGV("DexOpt: not optimizing '%s': not verified",
classDescriptor);
} else {
dvmOptimizeClass(clazz, false);
u4 numDeps;
numDeps = read4LE(&ptr);
- LOGV("+++ DexOpt: numDeps = %d", numDeps);
+ ALOGV("+++ DexOpt: numDeps = %d", numDeps);
for (cpe = gDvm.bootClassPath; cpe->ptr != NULL; cpe++) {
const char* cacheFileName =
dvmPathToAbsolutePortion(getCacheFileName(cpe));
}
ptr += kSHA1DigestLen;
- LOGV("DexOpt: dep match on '%s'", cacheFileName);
+ ALOGV("DexOpt: dep match on '%s'", cacheFileName);
numDeps--;
}
dvmPathToAbsolutePortion(getCacheFileName(cpe));
assert(cacheFileName != NULL); /* guaranteed by Class.c */
- LOGV("+++ DexOpt: found dep '%s'", cacheFileName);
+ ALOGV("+++ DexOpt: found dep '%s'", cacheFileName);
numDeps++;
bufLen += strlen(cacheFileName) +1;
assert(sizeof(header) == 8);
- LOGV("Writing chunk, type=%.4s size=%d", (char*) &type, size);
+ ALOGV("Writing chunk, type=%.4s size=%d", (char*) &type, size);
header.ts.type = type;
header.ts.size = (u4) size;
/* if necessary, pad to 64-bit alignment */
if ((size & 7) != 0) {
int padSize = 8 - (size & 7);
- LOGV("size was %d, inserting %d pad bytes", size, padSize);
+ ALOGV("size was %d, inserting %d pad bytes", size, padSize);
lseek(fd, padSize, SEEK_CUR);
}
}
if (resClass == NULL) {
/* not found, exception should be raised */
- LOGV("DexOpt: class %d (%s) not found",
+ ALOGV("DexOpt: class %d (%s) not found",
classIdx,
dexStringByTypeIdx(pDvmDex->pDexFile, classIdx));
if (pFailure != NULL) {
if (volatileOpc != OP_NOP && dvmIsVolatileField(instField)) {
updateOpcode(method, insns, volatileOpc);
- LOGV("DexOpt: rewrote ifield access %s.%s --> volatile",
+ ALOGV("DexOpt: rewrote ifield access %s.%s --> volatile",
instField->clazz->descriptor, instField->name);
} else if (quickOpc != OP_NOP && instField->byteOffset < 65536) {
updateOpcode(method, insns, quickOpc);
dvmUpdateCodeUnit(method, insns+1, (u2) instField->byteOffset);
- LOGV("DexOpt: rewrote ifield access %s.%s --> %d",
+ ALOGV("DexOpt: rewrote ifield access %s.%s --> %d",
instField->clazz->descriptor, instField->name,
instField->byteOffset);
} else {
- LOGV("DexOpt: no rewrite of ifield access %s.%s",
+ ALOGV("DexOpt: no rewrite of ifield access %s.%s",
instField->clazz->descriptor, instField->name);
}
if (dvmIsVolatileField(instField)) {
updateOpcode(method, insns, volatileOpc);
- LOGV("DexOpt: rewrote jumbo ifield access %s.%s --> volatile",
+ ALOGV("DexOpt: rewrote jumbo ifield access %s.%s --> volatile",
instField->clazz->descriptor, instField->name);
} else {
- LOGV("DexOpt: no rewrite of jumbo ifield access %s.%s",
+ ALOGV("DexOpt: no rewrite of jumbo ifield access %s.%s",
instField->clazz->descriptor, instField->name);
}
}
if (dvmIsVolatileField(staticField)) {
updateOpcode(method, insns, volatileOpc);
- LOGV("DexOpt: rewrote sfield access %s.%s --> volatile",
+ ALOGV("DexOpt: rewrote sfield access %s.%s --> volatile",
staticField->clazz->descriptor, staticField->name);
}
}
* Can't find the class that the method is a part of, or don't
* have permission to access the class.
*/
- LOGV("DexOpt: can't find called method's class (?.%s)",
+ ALOGV("DexOpt: can't find called method's class (?.%s)",
dexStringById(pDvmDex->pDexFile, pMethodId->nameIdx));
if (pFailure != NULL) { assert(!VERIFY_OK(*pFailure)); }
return NULL;
}
if (resMethod == NULL) {
- LOGV("DexOpt: couldn't find method '%s'",
+ ALOGV("DexOpt: couldn't find method '%s'",
dexStringById(pDvmDex->pDexFile, pMethodId->nameIdx));
if (pFailure != NULL)
*pFailure = VERIFY_ERROR_NO_METHOD;
calledMethod = dvmOptResolveMethod(clazz, methodIdx, methodType, NULL);
if (calledMethod == NULL) {
- LOGV("+++ DexOpt inline: can't find %d", methodIdx);
+ ALOGV("+++ DexOpt inline: can't find %d", methodIdx);
return false;
}
calledMethod = dvmOptResolveMethod(clazz, methodIdx, methodType, NULL);
if (calledMethod == NULL) {
- LOGV("+++ DexOpt inline/range: can't find %d", methodIdx);
+ ALOGV("+++ DexOpt inline/range: can't find %d", methodIdx);
return false;
}
*/
bufSize = kHeaderSize + gcPointCount * (bytesForAddr + regWidth);
- LOGV("+++ grm: %s.%s (adr=%d gpc=%d rwd=%d bsz=%d)",
+ ALOGV("+++ grm: %s.%s (adr=%d gpc=%d rwd=%d bsz=%d)",
vdata->method->clazz->descriptor, vdata->method->name,
bytesForAddr, gcPointCount, regWidth, bufSize);
}
}
- LOGV("mapData=%p pMap=%p bufSize=%d", mapData, pMap, bufSize);
+ ALOGV("mapData=%p pMap=%p bufSize=%d", mapData, pMap, bufSize);
assert(mapData - (const u1*) pMap == bufSize);
if (REGISTER_MAP_VERIFY && !verifyMap(vdata, pMap))
clazz->directMethodCount, clazz->virtualMethodCount,
(ptr - basePtr) - offsetTable[idx]);
} else {
- LOGV("%4d NOT mapadding '%s'", idx, classDescriptor);
+ ALOGV("%4d NOT mapadding '%s'", idx, classDescriptor);
assert(offsetTable[idx] == 0);
}
}
return NULL;
}
- LOGV("TOTAL size of register maps: %d", actual);
+ ALOGV("TOTAL size of register maps: %d", actual);
pBuilder->data = pBuilder->memMap.addr;
pBuilder->size = actual;
u4 classOffset = pClassPool->classDataOffset[classIdx];
if (classOffset == 0) {
- LOGV("+++ no map for classIdx=%d", classIdx);
+ ALOGV("+++ no map for classIdx=%d", classIdx);
return NULL;
}
}
#endif
- IF_LOGV() {
+ IF_ALOGV() {
char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGV("Expanding map -> %s.%s:%s",
+ ALOGV("Expanding map -> %s.%s:%s",
method->clazz->descriptor, method->name, desc);
free(desc);
}
}
if (numEntries <= 1) {
- LOGV("Can't compress map with 0 or 1 entries");
+ ALOGV("Can't compress map with 0 or 1 entries");
return NULL;
}
addr |= (*mapData++) << 8;
if (addr >= 128) {
- LOGV("Can't compress map with starting address >= 128");
+ ALOGV("Can't compress map with starting address >= 128");
return NULL;
}
* (pointless) conditional branch to the next instruction will
* trip over this.
*/
- LOGV("ODD: point set for targ=0x%04x (%p) already had block "
+ ALOGV("ODD: point set for targ=0x%04x (%p) already had block "
"fir=0x%04x (%p)",
targetIdx, targetBlock, curBlock->firstAddr, curBlock);
}
handlerList = handlerListAlloc;
}
- LOGV("+++ start=%x end=%x numHan=%d",
+ ALOGV("+++ start=%x end=%x numHan=%d",
tryStart, tryEnd, numHandlers);
tryIndex++;
int newSize = pSet->alloc + kBreakpointGrowth;
Breakpoint* newVec;
- LOGV("+++ increasing breakpoint set size to %d", newSize);
+ ALOGV("+++ increasing breakpoint set size to %d", newSize);
/* pSet->breakpoints will be NULL on first entry */
newVec = (Breakpoint*)realloc(pSet->breakpoints, newSize * sizeof(Breakpoint));
*/
assert(*(u1*)addr != OP_BREAKPOINT);
if (dvmIsClassVerified(method->clazz)) {
- LOGV("Class %s verified, adding breakpoint at %p",
+ ALOGV("Class %s verified, adding breakpoint at %p",
method->clazz->descriptor, addr);
if (instructionIsMagicNop(addr)) {
- LOGV("Refusing to set breakpoint on %04x at %s.%s + %#x",
+ ALOGV("Refusing to set breakpoint on %04x at %s.%s + %#x",
*addr, method->clazz->descriptor, method->name,
instrOffset);
} else {
OP_BREAKPOINT);
}
} else {
- LOGV("Class %s NOT verified, deferring breakpoint at %p",
+ ALOGV("Class %s NOT verified, deferring breakpoint at %p",
method->clazz->descriptor, addr);
}
} else {
* It might already be there or it might not; either way,
* flush it out.
*/
- LOGV("Flushing breakpoint at %p for %s",
+ ALOGV("Flushing breakpoint at %p for %s",
pBreak->addr, clazz->descriptor);
if (instructionIsMagicNop(pBreak->addr)) {
- LOGV("Refusing to flush breakpoint on %04x at %s.%s + %#x",
+ ALOGV("Refusing to flush breakpoint on %04x at %s.%s + %#x",
*pBreak->addr, pBreak->method->clazz->descriptor,
pBreak->method->name, pBreak->addr - pBreak->method->insns);
} else {
* frames are only inserted when calling from native->interp, so we
* don't need to worry about one being here.
*/
- LOGV("##### init step while in native method");
+ ALOGV("##### init step while in native method");
fp = prevFp;
assert(!dvmIsBreakFrame((u4*)fp));
assert(dvmIsNativeMethod(SAVEAREA_FROM_FP(fp)->method));
dvmComputeVagueFrameDepth(thread, thread->interpSave.curFrame);
pCtrl->active = true;
- LOGV("##### step init: thread=%p meth=%p '%s' line=%d frameDepth=%d depth=%s size=%s",
+ ALOGV("##### step init: thread=%p meth=%p '%s' line=%d frameDepth=%d depth=%s size=%s",
pCtrl->thread, pCtrl->method, pCtrl->method->name,
pCtrl->line, pCtrl->frameDepth,
dvmJdwpStepDepthStr(pCtrl->depth),
* we may or may not actually send a message to the debugger.
*/
if (GET_OPCODE(*pc) == OP_BREAKPOINT) {
- LOGV("+++ breakpoint hit at %p", pc);
+ ALOGV("+++ breakpoint hit at %p", pc);
eventFlags |= DBG_BREAKPOINT;
}
}
if (doStop) {
- LOGV("#####S %s", msg);
+ ALOGV("#####S %s", msg);
eventFlags |= DBG_SINGLE_STEP;
}
}
if (absMethod == NULL) {
absMethod = dvmResolveInterfaceMethod(method->clazz, methodIdx);
if (absMethod == NULL) {
- LOGV("+ unknown method");
+ ALOGV("+ unknown method");
return NULL;
}
}
{
JdwpNetState* netState;
- LOGV("ADB transport startup");
+ ALOGV("ADB transport startup");
state->netState = netState = new JdwpNetState;
if (netState == NULL)
} while (ret < 0 && errno == EINTR);
if (ret >= 0) {
- LOGV("PID sent as '%.*s' to ADB", 4, buff);
+ ALOGV("PID sent as '%.*s' to ADB", 4, buff);
break;
}
strerror(errno));
return false;
}
- LOGV("Can't connect to ADB control socket:%s",
+ ALOGV("Can't connect to ADB control socket:%s",
strerror(errno));
usleep( sleep_ms*1000 );
}
}
- LOGV("trying to receive file descriptor from ADB");
+ ALOGV("trying to receive file descriptor from ADB");
/* now we can receive a client file descriptor */
netState->clientSock = receiveClientFd(netState);
if (netState->shuttingDown)
}
goto retry;
} else {
- LOGV("received file descriptor %d from ADB", netState->clientSock);
+ ALOGV("received file descriptor %d from ADB", netState->clientSock);
netState->awaitingHandshake = 1;
netState->inputCount = 0;
return true;
if (netState->clientSock < 0)
return;
- LOGV("+++ closed JDWP <-> ADB connection");
+ ALOGV("+++ closed JDWP <-> ADB connection");
close(netState->clientSock);
netState->clientSock = -1;
}
if (netState->wakeFds[1] >= 0) {
- LOGV("+++ writing to wakePipe");
+ ALOGV("+++ writing to wakePipe");
write(netState->wakeFds[1], "", 1);
}
}
}
expandBufFree(pReply);
} else {
- LOGV("reply?!");
+ ALOGV("reply?!");
assert(false);
}
- LOGV("----------");
+ ALOGV("----------");
consumeBytes(netState, length);
return true;
}
if (maxfd < 0) {
- LOGV("+++ all fds are closed");
+ ALOGV("+++ all fds are closed");
return false;
}
return true;
} else if (readCount == 0) {
/* EOF hit -- far end went away */
- LOGV("+++ peer disconnected");
+ ALOGV("+++ peer disconnected");
goto fail;
} else
break;
consumeBytes(netState, kMagicHandshakeLen);
netState->awaitingHandshake = false;
- LOGV("+++ handshake complete");
+ ALOGV("+++ handshake complete");
return true;
}
if (netState->clientSock < 0) {
/* can happen with some DDMS events */
- LOGV("NOT sending request -- no debugger is attached");
+ ALOGV("NOT sending request -- no debugger is attached");
return false;
}
if (netState->clientSock < 0) {
/* can happen with some DDMS events */
- LOGV("NOT sending request -- no debugger is attached");
+ ALOGV("NOT sending request -- no debugger is attached");
return false;
}
if (pEvent->mods[i].modKind == MK_COUNT &&
pEvent->mods[i].count.count == 0)
{
- LOGV("##### Removing expired event");
+ ALOGV("##### Removing expired event");
unregisterEvent(state, pEvent);
dvmJdwpEventFree(pEvent);
break;
dvmJdwpSetWaitForEventThread(state, dvmDbgGetThreadSelfId());
/* leave pReq->invokeNeeded raised so we can check reentrancy */
- LOGV("invoking method...");
+ ALOGV("invoking method...");
dvmDbgExecuteMethod(pReq);
pReq->err = ERR_NONE;
/* clear this before signaling */
pReq->invokeNeeded = false;
- LOGV("invoke complete, signaling and self-suspending");
+ ALOGV("invoke complete, signaling and self-suspending");
dvmDbgLockMutex(&pReq->lock);
dvmDbgCondSignal(&pReq->cv);
dvmDbgUnlockMutex(&pReq->lock);
* go to sleep indefinitely.
*/
while (state->eventThreadId != 0) {
- LOGV("event in progress (0x%llx), 0x%llx sleeping",
+ ALOGV("event in progress (0x%llx), 0x%llx sleeping",
state->eventThreadId, threadId);
waited = true;
dvmDbgCondWait(&state->eventThreadCond, &state->eventThreadLock);
}
if (waited || threadId != 0)
- LOGV("event token grabbed (0x%llx)", threadId);
+ ALOGV("event token grabbed (0x%llx)", threadId);
if (threadId != 0)
state->eventThreadId = threadId;
dvmDbgLockMutex(&state->eventThreadLock);
assert(state->eventThreadId != 0);
- LOGV("cleared event token (0x%llx)", state->eventThreadId);
+ ALOGV("cleared event token (0x%llx)", state->eventThreadId);
state->eventThreadId = 0;
ExpandBuf* pReq = NULL;
if (true) {
- LOGV("EVENT: %s", dvmJdwpEventKindStr(EK_VM_START));
- LOGV(" suspendPolicy=%s", dvmJdwpSuspendPolicyStr(suspendPolicy));
+ ALOGV("EVENT: %s", dvmJdwpEventKindStr(EK_VM_START));
+ ALOGV(" suspendPolicy=%s", dvmJdwpSuspendPolicyStr(suspendPolicy));
pReq = eventPrep();
expandBufAdd1(pReq, suspendPolicy);
* this is mostly paranoia.)
*/
if (basket.threadId == state->debugThreadId) {
- LOGV("Ignoring location event in JDWP thread");
+ ALOGV("Ignoring location event in JDWP thread");
free(nameAlloc);
return false;
}
* method invocation to complete.
*/
if (invokeInProgress(state)) {
- LOGV("Not checking breakpoints during invoke (%s)", basket.className);
+ ALOGV("Not checking breakpoints during invoke (%s)", basket.className);
free(nameAlloc);
return false;
}
ExpandBuf* pReq = NULL;
if (matchCount != 0) {
- LOGV("EVENT: %s(%d total) %s.%s thread=%llx code=%llx)",
+ ALOGV("EVENT: %s(%d total) %s.%s thread=%llx code=%llx)",
dvmJdwpEventKindStr(matchList[0]->eventKind), matchCount,
basket.className,
dvmDbgGetMethodName(pLoc->classId, pLoc->methodId),
basket.threadId, pLoc->idx);
suspendPolicy = scanSuspendPolicy(matchList, matchCount);
- LOGV(" suspendPolicy=%s",
+ ALOGV(" suspendPolicy=%s",
dvmJdwpSuspendPolicyStr(suspendPolicy));
pReq = eventPrep();
ExpandBuf* pReq = NULL;
if (matchCount != 0) {
- LOGV("EVENT: %s(%d total) thread=%llx)",
+ ALOGV("EVENT: %s(%d total) thread=%llx)",
dvmJdwpEventKindStr(matchList[0]->eventKind), matchCount,
basket.threadId);
suspendPolicy = scanSuspendPolicy(matchList, matchCount);
- LOGV(" suspendPolicy=%s",
+ ALOGV(" suspendPolicy=%s",
dvmJdwpSuspendPolicyStr(suspendPolicy));
pReq = eventPrep();
*/
bool dvmJdwpPostVMDeath(JdwpState* state)
{
- LOGV("EVENT: %s", dvmJdwpEventKindStr(EK_VM_DEATH));
+ ALOGV("EVENT: %s", dvmJdwpEventKindStr(EK_VM_DEATH));
ExpandBuf* pReq = eventPrep();
expandBufAdd1(pReq, SP_NONE);
/* don't try to post an exception caused by the debugger */
if (invokeInProgress(state)) {
- LOGV("Not posting exception hit during invoke (%s)",basket.className);
+ ALOGV("Not posting exception hit during invoke (%s)",basket.className);
free(nameAlloc);
return false;
}
ExpandBuf* pReq = NULL;
if (matchCount != 0) {
- LOGV("EVENT: %s(%d total) thread=%llx exceptId=%llx caught=%d)",
+ ALOGV("EVENT: %s(%d total) thread=%llx exceptId=%llx caught=%d)",
dvmJdwpEventKindStr(matchList[0]->eventKind), matchCount,
basket.threadId, exceptionId, basket.caught);
- LOGV(" throw: %d %llx %x %lld (%s.%s)", pThrowLoc->typeTag,
+ ALOGV(" throw: %d %llx %x %lld (%s.%s)", pThrowLoc->typeTag,
pThrowLoc->classId, pThrowLoc->methodId, pThrowLoc->idx,
dvmDbgGetClassDescriptor(pThrowLoc->classId),
dvmDbgGetMethodName(pThrowLoc->classId, pThrowLoc->methodId));
if (pCatchLoc->classId == 0) {
- LOGV(" catch: (not caught)");
+ ALOGV(" catch: (not caught)");
} else {
- LOGV(" catch: %d %llx %x %lld (%s.%s)", pCatchLoc->typeTag,
+ ALOGV(" catch: %d %llx %x %lld (%s.%s)", pCatchLoc->typeTag,
pCatchLoc->classId, pCatchLoc->methodId, pCatchLoc->idx,
dvmDbgGetClassDescriptor(pCatchLoc->classId),
dvmDbgGetMethodName(pCatchLoc->classId, pCatchLoc->methodId));
}
suspendPolicy = scanSuspendPolicy(matchList, matchCount);
- LOGV(" suspendPolicy=%s",
+ ALOGV(" suspendPolicy=%s",
dvmJdwpSuspendPolicyStr(suspendPolicy));
pReq = eventPrep();
/* suppress class prep caused by debugger */
if (invokeInProgress(state)) {
- LOGV("Not posting class prep caused by invoke (%s)",basket.className);
+ ALOGV("Not posting class prep caused by invoke (%s)",basket.className);
free(nameAlloc);
return false;
}
ExpandBuf* pReq = NULL;
if (matchCount != 0) {
- LOGV("EVENT: %s(%d total) thread=%llx)",
+ ALOGV("EVENT: %s(%d total) thread=%llx)",
dvmJdwpEventKindStr(matchList[0]->eventKind), matchCount,
basket.threadId);
suspendPolicy = scanSuspendPolicy(matchList, matchCount);
- LOGV(" suspendPolicy=%s",
+ ALOGV(" suspendPolicy=%s",
dvmJdwpSuspendPolicyStr(suspendPolicy));
if (basket.threadId == state->debugThreadId) {
* should set threadId to null and if any threads were supposed
* to be suspended then we suspend all other threads.
*/
- LOGV(" NOTE: class prepare in debugger thread!");
+ ALOGV(" NOTE: class prepare in debugger thread!");
basket.threadId = 0;
if (suspendPolicy == SP_EVENT_THREAD)
suspendPolicy = SP_ALL;
u4 numArgs = read4BE(&buf);
- LOGV(" --> threadId=%llx objectId=%llx", threadId, objectId);
- LOGV(" classId=%llx methodId=%x %s.%s",
+ ALOGV(" --> threadId=%llx objectId=%llx", threadId, objectId);
+ ALOGV(" classId=%llx methodId=%x %s.%s",
classId, methodId,
dvmDbgGetClassDescriptor(classId),
dvmDbgGetMethodName(classId, methodId));
- LOGV(" %d args:", numArgs);
+ ALOGV(" %d args:", numArgs);
u8* argArray = NULL;
if (numArgs > 0)
int width = dvmDbgGetTagWidth(typeTag);
u8 value = jdwpReadValue(&buf, width);
- LOGV(" '%c'(%d): 0x%llx", typeTag, width, value);
+ ALOGV(" '%c'(%d): 0x%llx", typeTag, width, value);
argArray[i] = value;
}
u4 options = read4BE(&buf); /* enum InvokeOptions bit flags */
- LOGV(" options=0x%04x%s%s", options,
+ ALOGV(" options=0x%04x%s%s", options,
(options & INVOKE_SINGLE_THREADED) ? " (SINGLE_THREADED)" : "",
(options & INVOKE_NONVIRTUAL) ? " (NONVIRTUAL)" : "");
expandBufAdd1(pReply, JT_OBJECT);
expandBufAddObjectId(pReply, exceptObjId);
- LOGV(" --> returned '%c' 0x%llx (except=%08llx)",
+ ALOGV(" --> returned '%c' 0x%llx (except=%08llx)",
resultTag, resultValue, exceptObjId);
/* show detailed debug output */
if (resultTag == JT_STRING && exceptObjId == 0) {
if (resultValue != 0) {
char* str = dvmDbgStringToUtf8(resultValue);
- LOGV(" string '%s'", str);
+ ALOGV(" string '%s'", str);
free(str);
} else {
- LOGV(" string (null)");
+ ALOGV(" string (null)");
}
}
}
{
size_t strLen;
char* classDescriptor = readNewUtf8String(&buf, &strLen);
- LOGV(" Req for class by signature '%s'", classDescriptor);
+ ALOGV(" Req for class by signature '%s'", classDescriptor);
/*
* TODO: if a class with the same name has been loaded multiple times
RefTypeId refTypeId;
if (!dvmDbgFindLoadedClassBySignature(classDescriptor, &refTypeId)) {
/* not currently loaded */
- LOGV(" --> no match!");
+ ALOGV(" --> no match!");
numClasses = 0;
} else {
/* just the one */
size_t strLen;
char* str = readNewUtf8String(&buf, &strLen);
- LOGV(" Req to create string '%s'", str);
+ ALOGV(" Req to create string '%s'", str);
ObjectId stringId = dvmDbgCreateString(str);
if (stringId == 0)
{
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
- LOGV(" Req for signature of refTypeId=0x%llx", refTypeId);
+ ALOGV(" Req for signature of refTypeId=0x%llx", refTypeId);
const char* signature = dvmDbgGetSignature(refTypeId);
expandBufAddUtf8String(pReply, (const u1*) signature);
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
u4 numFields = read4BE(&buf);
- LOGV(" RT_GetValues %u:", numFields);
+ ALOGV(" RT_GetValues %u:", numFields);
expandBufAdd4BE(pReply, numFields);
for (u4 i = 0; i < numFields; i++) {
{
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
- LOGV(" Req for interfaces in %llx (%s)", refTypeId,
+ ALOGV(" Req for interfaces in %llx (%s)", refTypeId,
dvmDbgGetClassDescriptor(refTypeId));
dvmDbgOutputAllInterfaces(refTypeId, pReply);
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
ObjectId classObjId = dvmDbgGetClassObject(refTypeId);
- LOGV(" RefTypeId %llx -> ObjectId %llx", refTypeId, classObjId);
+ ALOGV(" RefTypeId %llx -> ObjectId %llx", refTypeId, classObjId);
expandBufAddObjectId(pReply, classObjId);
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
- LOGV(" Req for signature of refTypeId=0x%llx", refTypeId);
+ ALOGV(" Req for signature of refTypeId=0x%llx", refTypeId);
const char* signature = dvmDbgGetSignature(refTypeId);
if (signature != NULL) {
expandBufAddUtf8String(pReply, (const u1*) signature);
const u1* buf, int dataLen, ExpandBuf* pReply)
{
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
- LOGV(" Req for fields in refTypeId=0x%llx", refTypeId);
- LOGV(" --> '%s'", dvmDbgGetSignature(refTypeId));
+ ALOGV(" Req for fields in refTypeId=0x%llx", refTypeId);
+ ALOGV(" --> '%s'", dvmDbgGetSignature(refTypeId));
dvmDbgOutputAllFields(refTypeId, true, pReply);
{
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
- LOGV(" Req for methods in refTypeId=0x%llx", refTypeId);
- LOGV(" --> '%s'", dvmDbgGetSignature(refTypeId));
+ ALOGV(" Req for methods in refTypeId=0x%llx", refTypeId);
+ ALOGV(" --> '%s'", dvmDbgGetSignature(refTypeId));
dvmDbgOutputAllMethods(refTypeId, true, pReply);
RefTypeId classId = dvmReadRefTypeId(&buf);
u4 values = read4BE(&buf);
- LOGV(" Req to set %d values in classId=%llx", values, classId);
+ ALOGV(" Req to set %d values in classId=%llx", values, classId);
for (u4 i = 0; i < values; i++) {
FieldId fieldId = dvmReadFieldId(&buf);
int width = dvmDbgGetTagWidth(fieldTag);
u8 value = jdwpReadValue(&buf, width);
- LOGV(" --> field=%x tag=%c -> %lld", fieldId, fieldTag, value);
+ ALOGV(" --> field=%x tag=%c -> %lld", fieldId, fieldTag, value);
dvmDbgSetStaticFieldValue(classId, fieldId, value, width);
}
ObjectId threadId = dvmReadObjectId(&buf);
MethodId methodId = dvmReadMethodId(&buf);
- LOGV("Creating instance of %s", dvmDbgGetClassDescriptor(classId));
+ ALOGV("Creating instance of %s", dvmDbgGetClassDescriptor(classId));
ObjectId objectId = dvmDbgCreateObject(classId);
if (objectId == 0)
return ERR_OUT_OF_MEMORY;
RefTypeId arrayTypeId = dvmReadRefTypeId(&buf);
u4 length = read4BE(&buf);
- LOGV("Creating array %s[%u]",
+ ALOGV("Creating array %s[%u]",
dvmDbgGetClassDescriptor(arrayTypeId), length);
ObjectId objectId = dvmDbgCreateArrayObject(arrayTypeId, length);
if (objectId == 0)
RefTypeId refTypeId = dvmReadRefTypeId(&buf);
MethodId methodId = dvmReadMethodId(&buf);
- LOGV(" Req for line table in %s.%s",
+ ALOGV(" Req for line table in %s.%s",
dvmDbgGetClassDescriptor(refTypeId),
dvmDbgGetMethodName(refTypeId,methodId));
RefTypeId classId = dvmReadRefTypeId(&buf);
MethodId methodId = dvmReadMethodId(&buf);
- LOGV(" Req for LocalVarTab in class=%s method=%s",
+ ALOGV(" Req for LocalVarTab in class=%s method=%s",
dvmDbgGetClassDescriptor(classId),
dvmDbgGetMethodName(classId, methodId));
const u1* buf, int dataLen, ExpandBuf* pReply)
{
ObjectId objectId = dvmReadObjectId(&buf);
- LOGV(" Req for type of objectId=0x%llx", objectId);
+ ALOGV(" Req for type of objectId=0x%llx", objectId);
u1 refTypeTag;
RefTypeId typeId;
ObjectId objectId = dvmReadObjectId(&buf);
u4 numFields = read4BE(&buf);
- LOGV(" Req for %d fields from objectId=0x%llx", numFields, objectId);
+ ALOGV(" Req for %d fields from objectId=0x%llx", numFields, objectId);
expandBufAdd4BE(pReply, numFields);
ObjectId objectId = dvmReadObjectId(&buf);
u4 numFields = read4BE(&buf);
- LOGV(" Req to set %d fields in objectId=0x%llx", numFields, objectId);
+ ALOGV(" Req to set %d fields in objectId=0x%llx", numFields, objectId);
for (u4 i = 0; i < numFields; i++) {
FieldId fieldId = dvmReadFieldId(&buf);
int width = dvmDbgGetTagWidth(fieldTag);
u8 value = jdwpReadValue(&buf, width);
- LOGV(" --> fieldId=%x tag='%c'(%d) value=%lld",
+ ALOGV(" --> fieldId=%x tag='%c'(%d) value=%lld",
fieldId, fieldTag, width, value);
dvmDbgSetFieldValue(objectId, fieldId, value, width);
ObjectId objectId;
objectId = dvmReadObjectId(&buf);
- LOGV(" Req IsCollected(0x%llx)", objectId);
+ ALOGV(" Req IsCollected(0x%llx)", objectId);
// TODO: currently returning false; must integrate with GC
expandBufAdd1(pReply, 0);
ObjectId stringObject = dvmReadObjectId(&buf);
char* str = dvmDbgStringToUtf8(stringObject);
- LOGV(" Req for str %llx --> '%s'", stringObject, str);
+ ALOGV(" Req for str %llx --> '%s'", stringObject, str);
expandBufAddUtf8String(pReply, (u1*) str);
free(str);
{
ObjectId threadId = dvmReadObjectId(&buf);
- LOGV(" Req for name of thread 0x%llx", threadId);
+ ALOGV(" Req for name of thread 0x%llx", threadId);
char* name = dvmDbgGetThreadName(threadId);
if (name == NULL)
return ERR_INVALID_THREAD;
LOGI(" Warning: ignoring request to suspend self");
return ERR_THREAD_NOT_SUSPENDED;
}
- LOGV(" Req to suspend thread 0x%llx", threadId);
+ ALOGV(" Req to suspend thread 0x%llx", threadId);
dvmDbgSuspendThread(threadId);
LOGI(" Warning: ignoring request to resume self");
return ERR_NONE;
}
- LOGV(" Req to resume thread 0x%llx", threadId);
+ ALOGV(" Req to resume thread 0x%llx", threadId);
dvmDbgResumeThread(threadId);
{
ObjectId threadId = dvmReadObjectId(&buf);
- LOGV(" Req for status of thread 0x%llx", threadId);
+ ALOGV(" Req for status of thread 0x%llx", threadId);
u4 threadStatus;
u4 suspendStatus;
if (!dvmDbgGetThreadStatus(threadId, &threadStatus, &suspendStatus))
return ERR_INVALID_THREAD;
- LOGV(" --> %s, %s", dvmJdwpThreadStatusStr(threadStatus),
+ ALOGV(" --> %s, %s", dvmJdwpThreadStatusStr(threadStatus),
dvmJdwpSuspendStatusStr(suspendStatus));
expandBufAdd4BE(pReply, threadStatus);
if (!dvmDbgThreadExists(threadId))
return ERR_INVALID_THREAD;
if (!dvmDbgIsSuspended(threadId)) {
- LOGV(" Rejecting req for frames in running thread '%s' (%llx)",
+ ALOGV(" Rejecting req for frames in running thread '%s' (%llx)",
dvmDbgGetThreadName(threadId), threadId);
return ERR_THREAD_NOT_SUSPENDED;
}
int frameCount = dvmDbgGetThreadFrameCount(threadId);
- LOGV(" Request for frames: threadId=%llx start=%d length=%d [count=%d]",
+ ALOGV(" Request for frames: threadId=%llx start=%d length=%d [count=%d]",
threadId, startFrame, length, frameCount);
if (frameCount <= 0)
return ERR_THREAD_NOT_SUSPENDED; /* == 0 means 100% native */
if (!dvmDbgThreadExists(threadId))
return ERR_INVALID_THREAD;
if (!dvmDbgIsSuspended(threadId)) {
- LOGV(" Rejecting req for frames in running thread '%s' (%llx)",
+ ALOGV(" Rejecting req for frames in running thread '%s' (%llx)",
dvmDbgGetThreadName(threadId), threadId);
return ERR_THREAD_NOT_SUSPENDED;
}
const u1* buf, int dataLen, ExpandBuf* pReply)
{
ObjectId threadGroupId = dvmReadObjectId(&buf);
- LOGV(" Req for name of threadGroupId=0x%llx", threadGroupId);
+ ALOGV(" Req for name of threadGroupId=0x%llx", threadGroupId);
char* name = dvmDbgGetThreadGroupName(threadGroupId);
if (name != NULL)
const u1* buf, int dataLen, ExpandBuf* pReply)
{
ObjectId threadGroupId = dvmReadObjectId(&buf);
- LOGV(" Req for threads in threadGroupId=0x%llx", threadGroupId);
+ ALOGV(" Req for threads in threadGroupId=0x%llx", threadGroupId);
ObjectId* pThreadIds;
u4 threadCount;
const u1* buf, int dataLen, ExpandBuf* pReply)
{
ObjectId arrayId = dvmReadObjectId(&buf);
- LOGV(" Req for length of array 0x%llx", arrayId);
+ ALOGV(" Req for length of array 0x%llx", arrayId);
u4 arrayLength = dvmDbgGetArrayLength(arrayId);
- LOGV(" --> %d", arrayLength);
+ ALOGV(" --> %d", arrayLength);
expandBufAdd4BE(pReply, arrayLength);
u4 length = read4BE(&buf);
u1 tag = dvmDbgGetArrayElementTag(arrayId);
- LOGV(" Req for array values 0x%llx first=%d len=%d (elem tag=%c)",
+ ALOGV(" Req for array values 0x%llx first=%d len=%d (elem tag=%c)",
arrayId, firstIndex, length, tag);
expandBufAdd1(pReply, tag);
u4 firstIndex = read4BE(&buf);
u4 values = read4BE(&buf);
- LOGV(" Req to set array values 0x%llx first=%d count=%d",
+ ALOGV(" Req to set array values 0x%llx first=%d count=%d",
arrayId, firstIndex, values);
if (!dvmDbgSetArrayElements(arrayId, firstIndex, values, buf))
pEvent->requestId = requestId;
- LOGV(" --> event requestId=%#x", requestId);
+ ALOGV(" --> event requestId=%#x", requestId);
/* add it to the list */
JdwpError err = dvmJdwpRegisterEvent(state, pEvent);
eventKind = read1(&buf);
u4 requestId = read4BE(&buf);
- LOGV(" Req to clear eventKind=%d requestId=%#x", eventKind, requestId);
+ ALOGV(" Req to clear eventKind=%d requestId=%#x", eventKind, requestId);
dvmJdwpUnregisterEventById(state, requestId);
FrameId frameId = dvmReadFrameId(&buf);
u4 slots = read4BE(&buf);
- LOGV(" Req for %d slots in threadId=%llx frameId=%llx",
+ ALOGV(" Req for %d slots in threadId=%llx frameId=%llx",
slots, threadId, frameId);
expandBufAdd4BE(pReply, slots); /* "int values" */
u4 slot = read4BE(&buf);
u1 reqSigByte = read1(&buf);
- LOGV(" --> slot %d '%c'", slot, reqSigByte);
+ ALOGV(" --> slot %d '%c'", slot, reqSigByte);
int width = dvmDbgGetTagWidth(reqSigByte);
u1* ptr = expandBufAddSpace(pReply, width+1);
FrameId frameId = dvmReadFrameId(&buf);
u4 slots = read4BE(&buf);
- LOGV(" Req to set %d slots in threadId=%llx frameId=%llx",
+ ALOGV(" Req to set %d slots in threadId=%llx frameId=%llx",
slots, threadId, frameId);
for (u4 i = 0; i < slots; i++) {
int width = dvmDbgGetTagWidth(sigByte);
u8 value = jdwpReadValue(&buf, width);
- LOGV(" --> slot %d '%c' %llx", slot, sigByte, value);
+ ALOGV(" --> slot %d '%c' %llx", slot, sigByte, value);
dvmDbgSetLocalValue(threadId, frameId, slot, sigByte, value, width);
}
return ERR_INVALID_FRAMEID;
u1 objectTag = dvmDbgGetObjectTag(objectId);
- LOGV(" Req for 'this' in thread=%llx frame=%llx --> %llx %s '%c'",
+ ALOGV(" Req for 'this' in thread=%llx frame=%llx --> %llx %s '%c'",
threadId, frameId, objectId, dvmDbgGetObjectTypeName(objectId),
(char)objectTag);
{
RefTypeId classObjectId = dvmReadRefTypeId(&buf);
- LOGV(" Req for refTypeId for class=%llx (%s)",
+ ALOGV(" Req for refTypeId for class=%llx (%s)",
classObjectId, dvmDbgGetClassDescriptor(classObjectId));
/* just hand the type back to them */
u1* replyBuf = NULL;
int replyLen = -1;
- LOGV(" Handling DDM packet (%.4s)", buf);
+ ALOGV(" Handling DDM packet (%.4s)", buf);
/*
* On first DDM packet, notify all handlers that DDM is running.
if (gHandlerMap[i].cmdSet == pHeader->cmdSet &&
gHandlerMap[i].cmd == pHeader->cmd)
{
- LOGV("REQ: %s (cmd=%d/%d dataLen=%d id=0x%06x)",
+ ALOGV("REQ: %s (cmd=%d/%d dataLen=%d id=0x%06x)",
gHandlerMap[i].descr, pHeader->cmdSet, pHeader->cmd,
dataLen, pHeader->id);
result = (*gHandlerMap[i].func)(state, buf, dataLen, pReply);
respLen = expandBufGetLength(pReply) - kJDWPHeaderLen;
IF_ALOG(LOG_VERBOSE, LOG_TAG) {
- LOGV("reply: dataLen=%d err=%s(%d)%s", respLen,
+ ALOGV("reply: dataLen=%d err=%s(%d)%s", respLen,
dvmJdwpErrorStr(result), result,
result != ERR_NONE ? " **FAILED**" : "");
if (respLen > 0)
{
JdwpState* state = (JdwpState*) arg;
- LOGV("JDWP: thread running");
+ ALOGV("JDWP: thread running");
/*
* Finish initializing "state", then notify the creating thread that
/* back to running, for thread shutdown */
dvmDbgThreadRunning();
- LOGV("JDWP: thread exiting");
+ ALOGV("JDWP: thread exiting");
return NULL;
}
/* initializing or in the middle of something? */
if (last == 0) {
- LOGV("+++ last=busy");
+ ALOGV("+++ last=busy");
return 0;
}
s8 now = dvmJdwpGetNowMsec();
assert(now > last);
- LOGV("+++ debugger interval=%lld", now - last);
+ ALOGV("+++ debugger interval=%lld", now - last);
return now - last;
}
inet_aton("127.0.0.1", &addr.addrInet.sin_addr);
if (bind(netState->listenSock, &addr.addrPlain, sizeof(addr)) != 0) {
- LOGV("attempt to bind to port %u failed: %s", port, strerror(errno));
+ ALOGV("attempt to bind to port %u failed: %s", port, strerror(errno));
goto fail;
}
/* if we might be sitting in select, kick us loose */
if (netState->wakePipe[1] >= 0) {
- LOGV("+++ writing to wakePipe");
+ ALOGV("+++ writing to wakePipe");
(void) write(netState->wakePipe[1], "", 1);
}
}
netState->remoteAddr = addr.addrInet.sin_addr;
netState->remotePort = ntohs(addr.addrInet.sin_port);
- LOGV("+++ accepted connection from %s:%u",
+ ALOGV("+++ accepted connection from %s:%u",
inet_ntoa(netState->remoteAddr), netState->remotePort);
netState->clientSock = sock;
netState->awaitingHandshake = true;
netState->inputCount = 0;
- LOGV("Setting TCP_NODELAY on accepted socket");
+ ALOGV("Setting TCP_NODELAY on accepted socket");
setNoDelay(netState->clientSock);
if (pipe(netState->wakePipe) < 0) {
if (netState->clientSock < 0)
return;
- LOGV("+++ closed connection to %s:%u",
+ ALOGV("+++ closed connection to %s:%u",
inet_ntoa(netState->remoteAddr), netState->remotePort);
close(netState->clientSock);
dataLen = length - (buf - packetBuf);
- LOGV("--- %s: dataLen=%u id=0x%08x flags=0x%02x cmd=%d/%d",
+ ALOGV("--- %s: dataLen=%u id=0x%08x flags=0x%02x cmd=%d/%d",
reply ? "reply" : "req",
dataLen, id, flags, cmdSet, cmd);
if (dataLen > 0)
}
expandBufFree(pReply);
} else {
- LOGV("reply?!");
+ ALOGV("reply?!");
assert(false);
}
- LOGV("----------");
+ ALOGV("----------");
consumeBytes(netState, length);
return true;
maxfd = netState->wakePipe[0];
if (maxfd < 0) {
- LOGV("+++ all fds are closed");
+ ALOGV("+++ all fds are closed");
return false;
}
consumeBytes(netState, kMagicHandshakeLen);
netState->awaitingHandshake = false;
- LOGV("+++ handshake complete");
+ ALOGV("+++ handshake complete");
return true;
}
/*dumpPacket(expandBufGetBuffer(pReq));*/
if (netState->clientSock < 0) {
/* can happen with some DDMS events */
- LOGV("NOT sending request -- no debugger is attached");
+ ALOGV("NOT sending request -- no debugger is attached");
return false;
}
if (netState->clientSock < 0) {
/* can happen with some DDMS events */
- LOGV("NOT sending request -- no debugger is attached");
+ ALOGV("NOT sending request -- no debugger is attached");
return false;
}
if (!checkForNull(obj))
GOTO_exceptionThrown();
if (!dvmCanPutArrayElement(obj->clazz, arrayObj->clazz)) {
- LOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
+ ALOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
obj->clazz->descriptor, obj,
arrayObj->obj.clazz->descriptor, arrayObj);
dvmThrowArrayStoreExceptionIncompatibleElement(obj->clazz, arrayObj->clazz);
* the thread resumed.
*/
u1 originalOpcode = dvmGetOriginalOpcode(pc);
- LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
+ ALOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
INST_REPLACE_OP(inst, originalOpcode));
inst = INST_REPLACE_OP(inst, originalOpcode);
FINISH_BKPT(originalOpcode);
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- LOGV("Handling exception %s at %s:%d",
+ ALOGV("Handling exception %s at %s:%d",
exception->clazz->descriptor, curMethod->name,
dvmLineNumFromPC(curMethod, pc - curMethod->insns));
bottom = (u1*) newSaveArea - methodToCall->outsSize * sizeof(u4);
if (bottom < self->interpStackEnd) {
/* stack overflow */
- LOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
+ ALOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
self->interpStackStart, self->interpStackEnd, bottom,
(u1*) fp - bottom, self->interpStackSize,
methodToCall->name);
* it, jump to our local exception handling.
*/
if (dvmCheckException(self)) {
- LOGV("Exception thrown by/below native code");
+ ALOGV("Exception thrown by/below native code");
GOTO_exceptionThrown();
}
if (!checkForNull(obj))
GOTO_exceptionThrown();
if (!dvmCanPutArrayElement(obj->clazz, arrayObj->clazz)) {
- LOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
+ ALOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
obj->clazz->descriptor, obj,
arrayObj->obj.clazz->descriptor, arrayObj);
dvmThrowArrayStoreExceptionIncompatibleElement(obj->clazz, arrayObj->clazz);
* the thread resumed.
*/
u1 originalOpcode = dvmGetOriginalOpcode(pc);
- LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
+ ALOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
INST_REPLACE_OP(inst, originalOpcode));
inst = INST_REPLACE_OP(inst, originalOpcode);
FINISH_BKPT(originalOpcode);
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- LOGV("Handling exception %s at %s:%d",
+ ALOGV("Handling exception %s at %s:%d",
exception->clazz->descriptor, curMethod->name,
dvmLineNumFromPC(curMethod, pc - curMethod->insns));
bottom = (u1*) newSaveArea - methodToCall->outsSize * sizeof(u4);
if (bottom < self->interpStackEnd) {
/* stack overflow */
- LOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
+ ALOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
self->interpStackStart, self->interpStackEnd, bottom,
(u1*) fp - bottom, self->interpStackSize,
methodToCall->name);
* it, jump to our local exception handling.
*/
if (dvmCheckException(self)) {
- LOGV("Exception thrown by/below native code");
+ ALOGV("Exception thrown by/below native code");
GOTO_exceptionThrown();
}
if (!checkForNull(obj))
GOTO_exceptionThrown();
if (!dvmCanPutArrayElement(obj->clazz, arrayObj->clazz)) {
- LOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
+ ALOGV("Can't put a '%s'(%p) into array type='%s'(%p)",
obj->clazz->descriptor, obj,
arrayObj->obj.clazz->descriptor, arrayObj);
dvmThrowArrayStoreExceptionIncompatibleElement(obj->clazz, arrayObj->clazz);
* the thread resumed.
*/
u1 originalOpcode = dvmGetOriginalOpcode(pc);
- LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
+ ALOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
INST_REPLACE_OP(inst, originalOpcode));
inst = INST_REPLACE_OP(inst, originalOpcode);
FINISH_BKPT(originalOpcode);
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- LOGV("Handling exception %s at %s:%d",
+ ALOGV("Handling exception %s at %s:%d",
exception->clazz->descriptor, curMethod->name,
dvmLineNumFromPC(curMethod, pc - curMethod->insns));
bottom = (u1*) newSaveArea - methodToCall->outsSize * sizeof(u4);
if (bottom < self->interpStackEnd) {
/* stack overflow */
- LOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
+ ALOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
self->interpStackStart, self->interpStackEnd, bottom,
(u1*) fp - bottom, self->interpStackSize,
methodToCall->name);
* it, jump to our local exception handling.
*/
if (dvmCheckException(self)) {
- LOGV("Exception thrown by/below native code");
+ ALOGV("Exception thrown by/below native code");
GOTO_exceptionThrown();
}
* the thread resumed.
*/
u1 originalOpcode = dvmGetOriginalOpcode(pc);
- LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
+ ALOGV("+++ break 0x%02x (0x%04x -> 0x%04x)", originalOpcode, inst,
INST_REPLACE_OP(inst, originalOpcode));
inst = INST_REPLACE_OP(inst, originalOpcode);
FINISH_BKPT(originalOpcode);
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- LOGV("Handling exception %s at %s:%d",
+ ALOGV("Handling exception %s at %s:%d",
exception->clazz->descriptor, curMethod->name,
dvmLineNumFromPC(curMethod, pc - curMethod->insns));
bottom = (u1*) newSaveArea - methodToCall->outsSize * sizeof(u4);
if (bottom < self->interpStackEnd) {
/* stack overflow */
- LOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
+ ALOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
self->interpStackStart, self->interpStackEnd, bottom,
(u1*) fp - bottom, self->interpStackSize,
methodToCall->name);
* it, jump to our local exception handling.
*/
if (dvmCheckException(self)) {
- LOGV("Exception thrown by/below native code");
+ ALOGV("Exception thrown by/below native code");
GOTO_exceptionThrown();
}
dvmAddTrackedAlloc(exception, self);
dvmClearException(self);
- LOGV("Handling exception %s at %s:%d",
+ ALOGV("Handling exception %s at %s:%d",
exception->clazz->descriptor, curMethod->name,
dvmLineNumFromPC(curMethod, pc - curMethod->insns));
bottom = (u1*) newSaveArea - methodToCall->outsSize * sizeof(u4);
if (bottom < self->interpStackEnd) {
/* stack overflow */
- LOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
+ ALOGV("Stack overflow on method call (start=%p end=%p newBot=%p(%d) size=%d '%s')",
self->interpStackStart, self->interpStackEnd, bottom,
(u1*) fp - bottom, self->interpStackSize,
methodToCall->name);
* it, jump to our local exception handling.
*/
if (dvmCheckException(self)) {
- LOGV("Exception thrown by/below native code");
+ ALOGV("Exception thrown by/below native code");
GOTO_exceptionThrown();
}
pMeth->signature, method) == 0)
{
/* match */
- //LOGV("+++ match on %s.%s %s at %p",
+ //ALOGV("+++ match on %s.%s %s at %p",
// className, methodName, methodSignature, pMeth->fnPtr);
return pMeth->fnPtr;
}
{
DexOrJar* pDexOrJar = (DexOrJar*) vptr;
- LOGV("Freeing DexOrJar '%s'", pDexOrJar->fileName);
+ ALOGV("Freeing DexOrJar '%s'", pDexOrJar->fileName);
if (pDexOrJar->isDex)
dvmRawDexFileFree(pDexOrJar->pRawDexFile);
*/
if (hasDexExtension(sourceName)
&& dvmRawDexFileOpen(sourceName, outputName, &pRawDexFile, false) == 0) {
- LOGV("Opening DEX file '%s' (DEX)", sourceName);
+ ALOGV("Opening DEX file '%s' (DEX)", sourceName);
pDexOrJar = (DexOrJar*) malloc(sizeof(DexOrJar));
pDexOrJar->isDex = true;
pDexOrJar->pRawDexFile = pRawDexFile;
pDexOrJar->pDexMemory = NULL;
} else if (dvmJarFileOpen(sourceName, outputName, &pJarFile, false) == 0) {
- LOGV("Opening DEX file '%s' (Jar)", sourceName);
+ ALOGV("Opening DEX file '%s' (Jar)", sourceName);
pDexOrJar = (DexOrJar*) malloc(sizeof(DexOrJar));
pDexOrJar->isDex = false;
pDexOrJar->pJarFile = pJarFile;
pDexOrJar->pDexMemory = NULL;
} else {
- LOGV("Unable to open DEX file '%s'", sourceName);
+ ALOGV("Unable to open DEX file '%s'", sourceName);
dvmThrowIOException("unable to open DEX file");
}
memcpy(pBytes, fileContentsObj->contents, length);
if (dvmRawDexFileOpenArray(pBytes, length, &pRawDexFile) != 0) {
- LOGV("Unable to open in-memory DEX file");
+ ALOGV("Unable to open in-memory DEX file");
free(pBytes);
dvmThrowRuntimeException("unable to open in-memory DEX file");
RETURN_VOID();
}
- LOGV("Opening in-memory DEX");
+ ALOGV("Opening in-memory DEX");
pDexOrJar = (DexOrJar*) malloc(sizeof(DexOrJar));
pDexOrJar->isDex = true;
pDexOrJar->pRawDexFile = pRawDexFile;
if (!validateCookie(cookie))
RETURN_VOID();
- LOGV("Closing DEX file %p (%s)", pDexOrJar, pDexOrJar->fileName);
+ ALOGV("Closing DEX file %p (%s)", pDexOrJar, pDexOrJar->fileName);
/*
* We can't just free arbitrary DEX files because they have bits and
pDexOrJar->fileName);
}
dvmHashTableUnlock(gDvm.userDexFiles);
- LOGV("+++ freeing DexFile '%s' resources", pDexOrJar->fileName);
+ ALOGV("+++ freeing DexFile '%s' resources", pDexOrJar->fileName);
dvmFreeDexOrJar(pDexOrJar);
} else {
- LOGV("+++ NOT freeing DexFile '%s' resources", pDexOrJar->fileName);
+ ALOGV("+++ NOT freeing DexFile '%s' resources", pDexOrJar->fileName);
}
RETURN_VOID();
name = dvmCreateCstrFromString(nameObj);
descriptor = dvmDotToDescriptor(name);
- LOGV("--- Explicit class load '%s' l=%p c=0x%08x",
+ ALOGV("--- Explicit class load '%s' l=%p c=0x%08x",
descriptor, loader, cookie);
free(name);
RETURN_VOID();
}
status = dvmDexCacheStatus(name);
- LOGV("dvmDexCacheStatus(%s) returned %d", name, status);
+ ALOGV("dvmDexCacheStatus(%s) returned %d", name, status);
result = true;
switch (status) {
const RegisterMap* pMap;
pMap = dvmGetExpandedRegisterMap(method);
if (pMap == NULL) {
- LOGV("No map for %s.%s %s",
+ ALOGV("No map for %s.%s %s",
classAndMethodDesc, methodName, methodDescr);
} else {
- LOGV("Found map %s.%s %s",
+ ALOGV("Found map %s.%s %s",
classAndMethodDesc, methodName, methodDescr);
result = true;
}
} else {
- LOGV("Unable to find %s.%s %s",
+ ALOGV("Unable to find %s.%s %s",
classAndMethodDesc, methodName, methodDescr);
}
ALOG(LOG_DEBUG, ZYGOTE_LOG_TAG, "Process %d exited cleanly (%d)",
(int) pid, WEXITSTATUS(status));
} else {
- IF_LOGV(/*should use ZYGOTE_LOG_TAG*/) {
+ IF_ALOGV(/*should use ZYGOTE_LOG_TAG*/) {
ALOG(LOG_VERBOSE, ZYGOTE_LOG_TAG,
"Process %d exited cleanly (%d)",
(int) pid, WEXITSTATUS(status));
"Process %d terminated by signal (%d)",
(int) pid, WTERMSIG(status));
} else {
- IF_LOGV(/*should use ZYGOTE_LOG_TAG*/) {
+ IF_ALOGV(/*should use ZYGOTE_LOG_TAG*/) {
ALOG(LOG_VERBOSE, ZYGOTE_LOG_TAG,
"Process %d terminated by signal (%d)",
(int) pid, WTERMSIG(status));
*/
static void enableDebugFeatures(u4 debugFlags)
{
- LOGV("debugFlags is 0x%02x", debugFlags);
+ ALOGV("debugFlags is 0x%02x", debugFlags);
gDvm.jdwpAllowed = ((debugFlags & DEBUG_ENABLE_DEBUGGER) != 0);
capdata.effective = effective;
capdata.permitted = permitted;
- LOGV("CAPSET perm=%llx eff=%llx", permitted, effective);
+ ALOGV("CAPSET perm=%llx eff=%llx", permitted, effective);
if (capset(&capheader, &capdata) != 0)
return errno;
#endif /*HAVE_ANDROID_OS*/
if (pCtrl->pkgOrClassLen > pkgLen ||
memcmp(pCtrl->pkgOrClass, className, pCtrl->pkgOrClassLen) != 0)
{
- LOGV("ASRT: pkg no match: '%s'(%d) vs '%s'",
+ ALOGV("ASRT: pkg no match: '%s'(%d) vs '%s'",
className, pkgLen, pCtrl->pkgOrClass);
} else {
- LOGV("ASRT: pkg match: '%s'(%d) vs '%s' --> %d",
+ ALOGV("ASRT: pkg match: '%s'(%d) vs '%s' --> %d",
className, pkgLen, pCtrl->pkgOrClass, pCtrl->enable);
enable = pCtrl->enable;
}
if (pCtrl->pkgOrClass == NULL) {
/* -esa/-dsa; see if class is a "system" class */
if (strncmp(className, "java/", 5) != 0) {
- LOGV("ASRT: sys no match: '%s'", className);
+ ALOGV("ASRT: sys no match: '%s'", className);
} else {
- LOGV("ASRT: sys match: '%s' --> %d",
+ ALOGV("ASRT: sys match: '%s' --> %d",
className, pCtrl->enable);
enable = pCtrl->enable;
}
} else if (*pCtrl->pkgOrClass == '\0') {
- LOGV("ASRT: class all: '%s' --> %d",
+ ALOGV("ASRT: class all: '%s' --> %d",
className, pCtrl->enable);
enable = pCtrl->enable;
} else {
if (strcmp(pCtrl->pkgOrClass, className) != 0) {
- LOGV("ASRT: cls no match: '%s' vs '%s'",
+ ALOGV("ASRT: cls no match: '%s' vs '%s'",
className, pCtrl->pkgOrClass);
} else {
- LOGV("ASRT: cls match: '%s' vs '%s' --> %d",
+ ALOGV("ASRT: cls match: '%s' vs '%s' --> %d",
className, pCtrl->pkgOrClass, pCtrl->enable);
enable = pCtrl->enable;
}
int numDim, i;
int* dimensions;
- LOGV("createMultiArray: '%s' [%d]",
+ ALOGV("createMultiArray: '%s' [%d]",
elementClass->descriptor, dimArray->length);
assert(elementClass != NULL); // verified by caller
ClassObject* clazz;
assert(descriptor[0] == '[');
- //LOGV("dvmFindArrayClass: '%s' %p", descriptor, loader);
+ //ALOGV("dvmFindArrayClass: '%s' %p", descriptor, loader);
clazz = dvmLookupClass(descriptor, loader, false);
if (clazz == NULL) {
- LOGV("Array class '%s' %p not found; creating", descriptor, loader);
+ ALOGV("Array class '%s' %p not found; creating", descriptor, loader);
clazz = createArrayClass(descriptor, loader);
if (clazz != NULL)
dvmAddInitiatingLoader(clazz, loader);
descriptor, loader, elementClass->classLoader);
newClass = dvmLookupClass(descriptor, elementClass->classLoader, false);
if (newClass != NULL) {
- LOGV("--- we already have %s in %p, don't need in %p",
+ ALOGV("--- we already have %s in %p, don't need in %p",
descriptor, elementClass->classLoader, loader);
return newClass;
}
}
dvmReleaseTrackedAlloc((Object*) newClass, NULL);
- LOGV("Created array class '%s' %p (access=0x%04x.%04x)",
+ ALOGV("Created array class '%s' %p (access=0x%04x.%04x)",
descriptor, newClass->classLoader,
newClass->accessFlags >> 16,
newClass->accessFlags & JAVA_FLAGS_MASK);
descriptor);
while (cpe->kind != kCpeLastEntry) {
- //LOGV("+++ checking '%s' (%d)", cpe->fileName, cpe->kind);
+ //ALOGV("+++ checking '%s' (%d)", cpe->fileName, cpe->kind);
switch (cpe->kind) {
case kCpeJar:
const ClassPathEntry* cpe = gDvm.bootClassPath;
StringObject* urlObj = NULL;
- LOGV("+++ searching for resource '%s' in %d(%s)",
+ ALOGV("+++ searching for resource '%s' in %d(%s)",
name, idx, cpe[idx].fileName);
/* we could use direct array index, but I don't entirely trust "idx" */
}
break;
case kCpeDex:
- LOGV("No resources in DEX files");
+ ALOGV("No resources in DEX files");
goto bail;
default:
assert(false);
goto bail;
}
- LOGV("+++ using URL='%s'", urlBuf);
+ ALOGV("+++ using URL='%s'", urlBuf);
urlObj = dvmCreateStringFromCstr(urlBuf);
bail:
* the wait-for-class code centralized.
*/
if (found && !unprepOkay && !dvmIsClassLinked((ClassObject*)found)) {
- LOGV("Ignoring not-yet-ready %s, using slow path",
+ ALOGV("Ignoring not-yet-ready %s, using slow path",
((ClassObject*)found)->descriptor);
found = NULL;
}
hashcmpClassByClass, true);
dvmHashTableUnlock(gDvm.loadedClasses);
- LOGV("+++ dvmAddClassToHash '%s' %p (isnew=%d) --> %p",
+ ALOGV("+++ dvmAddClassToHash '%s' %p (isnew=%d) --> %p",
clazz->descriptor, clazz->classLoader,
(found == (void*) clazz), clazz);
*/
static void removeClassFromHash(ClassObject* clazz)
{
- LOGV("+++ removeClassFromHash '%s'", clazz->descriptor);
+ ALOGV("+++ removeClassFromHash '%s'", clazz->descriptor);
u4 hash = dvmComputeUtf8Hash(clazz->descriptor);
clazz = NULL;
if (gDvm.optimizing) {
/* happens with "external" libs */
- LOGV("Link of class '%s' failed", descriptor);
+ ALOGV("Link of class '%s' failed", descriptor);
} else {
LOGW("Link of class '%s' failed", descriptor);
}
pDexFile = pDvmDex->pDexFile;
if (gDvm.verboseClass) {
- LOGV("CLASS: loading '%s'...",
+ ALOGV("CLASS: loading '%s'...",
dexGetClassDescriptor(pDexFile, pClassDef));
}
void dvmMakeCodeReadOnly(Method* meth)
{
DexCode* methodDexCode = (DexCode*) dvmGetMethodCode(meth);
- LOGV("+++ marking %p read-only", methodDexCode);
+ ALOGV("+++ marking %p read-only", methodDexCode);
dvmLinearReadOnly(meth->clazz->classLoader, methodDexCode);
}
#endif
assert(clazz->descriptor != NULL);
assert(clazz->status == CLASS_IDX || clazz->status == CLASS_LOADED);
if (gDvm.verboseClass)
- LOGV("CLASS: linking '%s'...", clazz->descriptor);
+ ALOGV("CLASS: linking '%s'...", clazz->descriptor);
assert(gDvm.classJavaLangClass != NULL);
assert(clazz->clazz == gDvm.classJavaLangClass);
assert(dvmCheckException(dvmThreadSelf()));
if (gDvm.optimizing) {
/* happens with "external" libs */
- LOGV("Unable to resolve superclass of %s (%d)",
+ ALOGV("Unable to resolve superclass of %s (%d)",
clazz->descriptor, superclassIdx);
} else {
LOGW("Unable to resolve superclass of %s (%d)",
dexStringByTypeIdx(pDexFile, interfaceIdxArray[i]);
if (gDvm.optimizing) {
/* happens with "external" libs */
- LOGV("Failed resolving %s interface %d '%s'",
+ ALOGV("Failed resolving %s interface %d '%s'",
clazz->descriptor, interfaceIdxArray[i],
classDescriptor);
} else {
clazz->status = CLASS_RESOLVED;
okay = true;
if (gDvm.verboseClass)
- LOGV("CLASS: linked '%s'", clazz->descriptor);
+ ALOGV("CLASS: linked '%s'", clazz->descriptor);
/*
* We send CLASS_PREPARE events to the debugger from here. The
}
clazz->vtable[si] = localMeth;
localMeth->methodIndex = (u2) si;
- //LOGV("+++ override %s.%s (slot %d)",
+ //ALOGV("+++ override %s.%s (slot %d)",
// clazz->descriptor, localMeth->name, si);
break;
}
localMeth->methodIndex = (u2) actualCount;
actualCount++;
- //LOGV("+++ add method %s.%s",
+ //ALOGV("+++ add method %s.%s",
// clazz->descriptor, localMeth->name);
}
}
}
}
if (j < 0) {
- IF_LOGV() {
+ IF_ALOGV() {
char* desc =
dexProtoCopyMethodDescriptor(&imeth->prototype);
- LOGV("No match for '%s' '%s' in '%s' (creating miranda)",
+ ALOGV("No match for '%s' '%s' in '%s' (creating miranda)",
imeth->name, desc, clazz->descriptor);
free(desc);
}
/* if non-duplicate among Mirandas, add to Miranda list */
if (mir == mirandaCount) {
- //LOGV("MIRANDA: holding '%s' in slot %d",
+ //ALOGV("MIRANDA: holding '%s' in slot %d",
// imeth->name, mir);
mirandaList[mirandaCount++] = imeth;
}
}
}
if (!found) {
- LOGV(" +++ inserting pad field in '%s'", clazz->descriptor);
+ ALOGV(" +++ inserting pad field in '%s'", clazz->descriptor);
fieldOffset += sizeof(u4);
}
}
}
if (clazz->pDvmDex == NULL) {
/* generated class; any static fields should already be set up */
- LOGV("Not initializing static fields in %s", clazz->descriptor);
+ ALOGV("Not initializing static fields in %s", clazz->descriptor);
return;
}
pDexFile = clazz->pDvmDex->pDexFile;
clazz->classLoader == NULL))
{
/* advance to "verified" state */
- LOGV("+++ not verifying class %s (cl=%p)",
+ ALOGV("+++ not verifying class %s (cl=%p)",
clazz->descriptor, clazz->classLoader);
clazz->status = CLASS_VERIFIED;
goto noverify;
}
if (!gDvm.optimizing)
- LOGV("+++ late verify on %s", clazz->descriptor);
+ ALOGV("+++ late verify on %s", clazz->descriptor);
/*
* We're not supposed to optimize an unverified class, but during
* system classes, and dexopt runs single-threaded.
*/
if (!IS_CLASS_FLAG_SET(clazz, CLASS_ISOPTIMIZED) && !gDvm.optimizing) {
- LOGV("+++ late optimize on %s (pv=%d)",
+ ALOGV("+++ late optimize on %s (pv=%d)",
clazz->descriptor, IS_CLASS_FLAG_SET(clazz, CLASS_ISPREVERIFIED));
bool essentialOnly = (gDvm.dexOptMode != OPTIMIZE_MODE_FULL);
dvmOptimizeClass(clazz, essentialOnly);
while (clazz->status == CLASS_INITIALIZING) {
/* we caught somebody else in the act; was it us? */
if (clazz->initThreadId == self->threadId) {
- //LOGV("HEY: found a recursive <clinit>");
+ //ALOGV("HEY: found a recursive <clinit>");
goto bail_unlock;
}
if (method->registerMap != NULL) {
/* unexpected during class loading, okay on first use (uncompress) */
- LOGV("NOTE: registerMap already set for %s.%s",
+ ALOGV("NOTE: registerMap already set for %s.%s",
method->clazz->descriptor, method->name);
/* keep going */
}
*/
void dvmDumpLoaderStats(const char* msg)
{
- LOGV("VM stats (%s): cls=%d/%d meth=%d ifld=%d sfld=%d linear=%d",
+ ALOGV("VM stats (%s): cls=%d/%d meth=%d ifld=%d sfld=%d linear=%d",
msg, gDvm.numLoadedClasses, dvmHashTableNumEntries(gDvm.loadedClasses),
gDvm.numDeclaredMethods, gDvm.numDeclaredInstFields,
gDvm.numDeclaredStaticFields, gDvm.pBootLoaderAlloc->curOffset);
LOGI("setPriority(%d) '%s' to prio=%d(n=%d) failed: %s",
pid, threadName.c_str(), newPriority, newNice, strerror(errno));
} else {
- LOGV("setPriority(%d) to prio=%d(n=%d)", pid, newPriority, newNice);
+ ALOGV("setPriority(%d) to prio=%d(n=%d)", pid, newPriority, newNice);
}
}
* The priority has been elevated. Return the old value
* so the caller can restore it later.
*/
- LOGV("Elevating priority from %d to %d",
+ ALOGV("Elevating priority from %d to %d",
oldThreadPriority, ANDROID_PRIORITY_NORMAL);
return oldThreadPriority;
}
LOGW("Unable to reset priority to %d: %s",
oldThreadPriority, strerror(errno));
} else {
- LOGV("Reset priority to %d", oldThreadPriority);
+ ALOGV("Reset priority to %d", oldThreadPriority);
}
if (oldThreadPriority >= ANDROID_PRIORITY_BACKGROUND) {
set_sched_policy(dvmGetSysThreadId(), SP_BACKGROUND);
valueArg = valueType >> kDexAnnotationValueArgShift;
width = valueArg + 1; /* assume, correct later */
- LOGV("----- type is 0x%02x %d, ptr=%p [0x%06x]",
+ ALOGV("----- type is 0x%02x %d, ptr=%p [0x%06x]",
valueType & kDexAnnotationValueTypeMask, valueArg, ptr-1,
(ptr-1) - (u1*)clazz->pDvmDex->pDexFile->baseAddr);
} else {
dstElemClass = dvmFindPrimitiveClass(firstChar);
}
- LOGV("HEY: converting valueObj from [%s to [%s",
+ ALOGV("HEY: converting valueObj from [%s to [%s",
srcElemClass->descriptor, dstElemClass->descriptor);
ArrayObject* srcArray = (ArrayObject*) valueObj;
}
}
- LOGV("----- processEnc ptr=%p [0x%06x] typeIdx=%d size=%d class=%s",
+ ALOGV("----- processEnc ptr=%p [0x%06x] typeIdx=%d size=%d class=%s",
*pPtr, *pPtr - (u1*) clazz->pDvmDex->pDexFile->baseAddr,
typeIdx, size, annoClass->descriptor);
valueArg = valueType >> kDexAnnotationValueArgShift;
width = valueArg + 1; /* assume */
- LOGV("----- type is 0x%02x %d, ptr=%p [0x%06x]",
+ ALOGV("----- type is 0x%02x %d, ptr=%p [0x%06x]",
valueType & kDexAnnotationValueTypeMask, valueArg, ptr-1,
(ptr-1) - (u1*)clazz->pDvmDex->pDexFile->baseAddr);
return NULL;
}
- LOGV("+++ Generate proxy class '%s' %p from %d interface classes",
+ ALOGV("+++ Generate proxy class '%s' %p from %d interface classes",
nameStr, loader, interfaces->length);
* type or void, the types must match exactly, or we throw
* an exception now.
*/
- LOGV("MATCH on %s.%s and %s.%s",
+ ALOGV("MATCH on %s.%s and %s.%s",
allMethods[i]->clazz->descriptor, allMethods[i]->name,
allMethods[j]->clazz->descriptor, allMethods[j]->name);
dupe = true;
*/
if (dupe) {
if (best) {
- LOGV("BEST %d %s.%s -> %d", i,
+ ALOGV("BEST %d %s.%s -> %d", i,
allMethods[i]->clazz->descriptor, allMethods[i]->name,
outCount);
if (dvmCompareMethodNamesAndParameterProtos(allMethods[i],
allMethods[j]) == 0)
{
- LOGV("DEL %d %s.%s", j,
+ ALOGV("DEL %d %s.%s", j,
allMethods[j]->clazz->descriptor,
allMethods[j]->name);
dvmPointerSetFree(commonThrows);
} else {
- LOGV("BEST not %d", i);
+ ALOGV("BEST not %d", i);
}
} else {
/*
* Singleton. Copy the entry and NULL it out.
*/
- LOGV("COPY singleton %d %s.%s -> %d", i,
+ ALOGV("COPY singleton %d %s.%s -> %d", i,
allMethods[i]->clazz->descriptor, allMethods[i]->name,
outCount);
*/
for (i = 0; i < allCount; i++) {
if (allMethods[i] != NULL) {
- LOGV("BAD DUPE: %d %s.%s", i,
+ ALOGV("BAD DUPE: %d %s.%s", i,
allMethods[i]->clazz->descriptor, allMethods[i]->name);
dvmThrowIllegalArgumentException(
"incompatible return types in proxied interfaces");
dvmAbort();
}
- LOGV("invoke: %s.%s, this=%p, handler=%s",
+ ALOGV("invoke: %s.%s, this=%p, handler=%s",
method->clazz->descriptor, method->name,
thisObj, handler->clazz->descriptor);
assert(dvmCheckException(self));
goto bail;
}
- LOGV(" return type will be %s", returnType->descriptor);
+ ALOGV(" return type will be %s", returnType->descriptor);
/*
* Convert "args" array into Object[] array, using the method
case ItoF: *(float*) dstPtr = (float) (*(int*) srcPtr); return 1;
case JtoF: *(float*) dstPtr = (float) (*(long long*) srcPtr); return 1;
case bad: {
- LOGV("illegal primitive conversion: '%s' to '%s'",
+ ALOGV("illegal primitive conversion: '%s' to '%s'",
dexGetPrimitiveTypeDescriptor(srcType),
dexGetPrimitiveTypeDescriptor(dstType));
return -1;
if (dvmConvertPrimitiveValue(valueIndex, typeIndex,
(s4*) ((DataObject*)value)->instanceData, (s4*)pResult) < 0)
{
- LOGV("Prim conversion failed");
+ ALOGV("Prim conversion failed");
return false;
}
u4 hash;
int i;
- LOGV("TestHash BEGIN");
+ ALOGV("TestHash BEGIN");
pTab = dvmHashTableCreate(dvmHashSize(12), free);
if (pTab == NULL)
}
dvmHashTableFree(pTab);
- LOGV("TestHash END");
+ ALOGV("TestHash END");
return true;
}