*/
#if 0
if (vmStarted) {
- LOGI("DexOpt shutting down, result=%d", result);
+ ALOGI("DexOpt shutting down, result=%d", result);
dvmShutdown();
}
#endif
pDexFile->pRegisterMapPool = pOptData;
break;
default:
- LOGI("Unknown chunk 0x%08x (%c%c%c%c), size=%d in opt data area",
+ ALOGI("Unknown chunk 0x%08x (%c%c%c%c), size=%d in opt data area",
*pOpt,
(char) ((*pOpt) >> 24), (char) ((*pOpt) >> 16),
(char) ((*pOpt) >> 8), (char) (*pOpt),
u1* alignAddr = (u1*) ((int) addr & ~(SYSTEM_PAGE_SIZE-1));
size_t alignLength = length + ((u1*) addr - alignAddr);
- //LOGI("%p/%zd --> %p/%zd", addr, length, alignAddr, alignLength);
+ //ALOGI("%p/%zd --> %p/%zd", addr, length, alignAddr, alignLength);
int prot = wantReadWrite ? (PROT_READ|PROT_WRITE) : (PROT_READ);
if (mprotect(alignAddr, alignLength, prot) != 0) {
int err = errno;
dvmLockMutex(&gDvm.allocTrackerLock);
if (gDvm.allocRecords == NULL) {
- LOGI("Enabling alloc tracker (%d entries, %d frames --> %d bytes)",
+ ALOGI("Enabling alloc tracker (%d entries, %d frames --> %d bytes)",
kNumAllocRecords, kMaxAllocRecordStackDepth,
sizeof(AllocRecord) * kNumAllocRecords);
gDvm.allocRecordHead = gDvm.allocRecordCount = 0;
idx = (idx + 1) & (kNumAllocRecords-1);
}
- LOGI("class %d/%d, method %d/%d, file %d/%d",
+ ALOGI("class %d/%d, method %d/%d, file %d/%d",
dvmPointerSetGetCount(classNames), classCount,
dvmPointerSetGetCount(methodNames), methodCount,
dvmPointerSetGetCount(fileNames), fileCount);
totalSize += computeStringTableSize(classNames);
totalSize += computeStringTableSize(methodNames);
totalSize += computeStringTableSize(fileNames);
- LOGI("Generated AT, size is %zd/%zd", baseSize, totalSize);
+ ALOGI("Generated AT, size is %zd/%zd", baseSize, totalSize);
/*
* Part 3: allocate a buffer and generate the output.
int idx = headIndex();
int count = gDvm.allocRecordCount;
- LOGI("Tracked allocations, (head=%d count=%d)",
+ ALOGI("Tracked allocations, (head=%d count=%d)",
gDvm.allocRecordHead, count);
while (count--) {
AllocRecord* pRec = &gDvm.allocRecords[idx];
- LOGI(" T=%-2d %6d %s",
+ ALOGI(" T=%-2d %6d %s",
pRec->threadId, pRec->size, pRec->clazz->descriptor);
if (true) {
const Method* method = pRec->stackElem[i].method;
if (dvmIsNativeMethod(method)) {
- LOGI(" %s.%s (Native)",
+ ALOGI(" %s.%s (Native)",
method->clazz->descriptor, method->name);
} else {
- LOGI(" %s.%s +%d",
+ ALOGI(" %s.%s +%d",
method->clazz->descriptor, method->name,
pRec->stackElem[i].pc);
}
if (entry) {
if (mHasMethod) {
std::string methodName(dvmHumanReadableMethod(method, false));
- LOGI("JNI: %s -> %s(%s)", methodName.c_str(), mFunctionName, msg.c_str());
+ ALOGI("JNI: %s -> %s(%s)", methodName.c_str(), mFunctionName, msg.c_str());
mIndent = methodName.size() + 1;
} else {
- LOGI("JNI: -> %s(%s)", mFunctionName, msg.c_str());
+ ALOGI("JNI: -> %s(%s)", mFunctionName, msg.c_str());
mIndent = 0;
}
} else {
- LOGI("JNI: %*s<- %s returned %s", mIndent, "", mFunctionName, msg.c_str());
+ ALOGI("JNI: %*s<- %s returned %s", mIndent, "", mFunctionName, msg.c_str());
}
}
dvmCallMethod(self, gDvm.methDalvikDdmcServer_dispatch, NULL, &callRes,
type, dataArray, offset, length);
if (dvmCheckException(self)) {
- LOGI("Exception thrown by dispatcher for 0x%08x", type);
+ ALOGI("Exception thrown by dispatcher for 0x%08x", type);
dvmLogExceptionStackTrace();
dvmClearException(self);
goto bail;
dvmCallMethod(self, gDvm.methDalvikDdmcServer_broadcast, NULL, &unused,
event);
if (dvmCheckException(self)) {
- LOGI("Exception thrown by broadcast(%d)", event);
+ ALOGI("Exception thrown by broadcast(%d)", event);
dvmLogExceptionStackTrace();
dvmClearException(self);
return;
break;
}
if (thread == NULL) {
- LOGI("dvmDdmGetStackTraceById: threadid=%d not found", threadId);
+ ALOGI("dvmDdmGetStackTraceById: threadid=%d not found", threadId);
dvmUnlockThreadList();
return NULL;
}
dvmHashTableLock(gDvm.dbgRegistry);
if (!gDvm.debuggerConnected) {
/* debugger has detached while we were doing stuff? */
- LOGI("ignoring registerObject request in thread=%d",
+ ALOGI("ignoring registerObject request in thread=%d",
dvmThreadSelf()->threadId);
//dvmAbort();
goto bail;
if (gDvm.debuggerActive)
return;
- LOGI("Debugger is active");
+ ALOGI("Debugger is active");
dvmInitBreakpoints();
gDvm.debuggerActive = true;
dvmEnableAllSubMode(kSubModeDebuggerActive);
{
// TODO? invoke System.exit() to perform exit processing; ends up
// in System.exitInternal(), which can call JNI exit hook
- LOGI("GC lifetime allocation: %d bytes", gDvm.allocProf.allocCount);
+ ALOGI("GC lifetime allocation: %d bytes", gDvm.allocProf.allocCount);
if (CALC_CACHE_STATS) {
dvmDumpAtomicCacheStats(gDvm.instanceofCache);
dvmDumpBootClassPath();
std::string dotName(dvmHumanReadableDescriptor(meth->clazz->descriptor));
if (dvmIsNativeMethod(meth)) {
- LOGI("\tat %s.%s(Native Method)", dotName.c_str(), meth->name);
+ ALOGI("\tat %s.%s(Native Method)", dotName.c_str(), meth->name);
} else {
- LOGI("\tat %s.%s(%s:%d)",
+ ALOGI("\tat %s.%s(%s:%d)",
dotName.c_str(), meth->name, dvmGetMethodSourceFile(meth),
dvmLineNumFromPC(meth, pc));
}
dvmReleaseTrackedAlloc((Object*) messageStr, dvmThreadSelf());
messageStr = NULL;
- LOGI("%s: %s", className.c_str(), cp);
+ ALOGI("%s: %s", className.c_str(), cp);
free(cp);
} else {
- LOGI("%s:", className.c_str());
+ ALOGI("%s:", className.c_str());
}
/*
const ArrayObject* stackData = (const ArrayObject*) dvmGetFieldObject(exception,
gDvm.offJavaLangThrowable_stackState);
if (stackData == NULL) {
- LOGI(" (raw stack trace not found)");
+ ALOGI(" (raw stack trace not found)");
return;
}
if (cause == NULL) {
break;
}
- LOGI("Caused by:");
+ ALOGI("Caused by:");
exception = cause;
}
}
int i;
assert(countTombStones(pHashTable) == pHashTable->numDeadEntries);
- //LOGI("before: dead=%d", pHashTable->numDeadEntries);
+ //ALOGI("before: dead=%d", pHashTable->numDeadEntries);
pNewEntries = (HashEntry*) calloc(newSize, sizeof(HashEntry));
if (pNewEntries == NULL)
pEntry = pHashTable->pEntries;
}
- //LOGI("+++ look probing %d...", pEntry - pHashTable->pEntries);
+ //ALOGI("+++ look probing %d...", pEntry - pHashTable->pEntries);
}
if (pEntry->data == NULL) {
pEnd = &pHashTable->pEntries[pHashTable->tableSize];
while (pEntry->data != NULL) {
if (pEntry->data == item) {
- //LOGI("+++ stepping on entry %d", pEntry - pHashTable->pEntries);
+ //ALOGI("+++ stepping on entry %d", pEntry - pHashTable->pEntries);
pEntry->data = HASH_TOMBSTONE;
pHashTable->numEntries--;
pHashTable->numDeadEntries++;
pEntry = pHashTable->pEntries;
}
- //LOGI("+++ del probing %d...", pEntry - pHashTable->pEntries);
+ //ALOGI("+++ del probing %d...", pEntry - pHashTable->pEntries);
}
return false;
totalProbe += count;
}
- LOGI("Probe: min=%d max=%d, total=%d in %d (%d), avg=%.3f",
+ ALOGI("Probe: min=%d max=%d, total=%d in %d (%d), avg=%.3f",
minProbe, maxProbe, totalProbe, numEntries, pHashTable->tableSize,
(float) totalProbe / (float) numEntries);
}
Object* obj = table_[index].obj;
if (obj == NULL) {
- LOGI("JNI ERROR (app bug): accessed deleted %s reference %p",
+ ALOGI("JNI ERROR (app bug): accessed deleted %s reference %p",
indirectRefKindToString(kind_), iref);
abortMaybe();
return kInvalidIndirectRefObject;
strcmp(name, "timeout") == 0)
{
/* valid but unsupported */
- LOGI("Ignoring JDWP option '%s'='%s'", name, value);
+ ALOGI("Ignoring JDWP option '%s'='%s'", name, value);
} else {
- LOGI("Ignoring unrecognized JDWP option '%s'='%s'", name, value);
+ ALOGI("Ignoring unrecognized JDWP option '%s'='%s'", name, value);
}
return true;
#if WITH_EXTRA_GC_CHECKS > 1
/* only "portable" interp has the extra goodies */
if (gDvm.executionMode != kExecutionModeInterpPortable) {
- LOGI("Switching to 'portable' interpreter for GC checks");
+ ALOGI("Switching to 'portable' interpreter for GC checks");
gDvm.executionMode = kExecutionModeInterpPortable;
}
#endif
return false;
}
- //LOGI("String.charAt this=0x%08x index=%d", arg0, arg1);
+ //ALOGI("String.charAt this=0x%08x index=%d", arg0, arg1);
count = dvmGetFieldInt((Object*) arg0, STRING_FIELDOFF_COUNT);
if ((s4) arg1 < 0 || (s4) arg1 >= count) {
dvmThrowStringIndexOutOfBoundsExceptionWithIndex(count, arg1);
bool javaLangString_length(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
JValue* pResult)
{
- //LOGI("String.length this=0x%08x pResult=%p", arg0, pResult);
+ //ALOGI("String.length this=0x%08x pResult=%p", arg0, pResult);
/* null reference check on "this" */
if ((Object*) arg0 == NULL) {
bool javaLangString_isEmpty(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
JValue* pResult)
{
- //LOGI("String.isEmpty this=0x%08x pResult=%p", arg0, pResult);
+ //ALOGI("String.isEmpty this=0x%08x pResult=%p", arg0, pResult);
/* null reference check on "this" */
if ((Object*) arg0 == NULL) {
const u2* chars = (const u2*)(void*)charArray->contents;
int offset = dvmGetFieldInt(strObj, STRING_FIELDOFF_OFFSET);
int count = dvmGetFieldInt(strObj, STRING_FIELDOFF_COUNT);
- //LOGI("String.indexOf(0x%08x, 0x%04x, %d) off=%d count=%d",
+ //ALOGI("String.indexOf(0x%08x, 0x%04x, %d) off=%d count=%d",
// (u4) strObj, ch, start, offset, count);
/* factor out the offset */
*/
fd = openAlternateSuffix(fileName, "odex", O_RDONLY, &cachedName);
if (fd < 0) {
- LOGI("Zip is good, but no %s inside, and no .odex "
+ ALOGI("Zip is good, but no %s inside, and no .odex "
"file in the same directory", kDexInJarName);
result = DEX_CACHE_BAD_ARCHIVE;
goto bail;
dexGetZipEntryCrc32(&archive, entry),
isBootstrap, &newFile, /*createIfMissing=*/true);
if (fd < 0) {
- LOGI("Unable to open or create cache for %s (%s)",
+ ALOGI("Unable to open or create cache for %s (%s)",
fileName, cachedName);
goto bail;
}
(int) (endWhen - extractWhen) / 1000);
}
} else {
- LOGI("Zip is good, but no %s inside, and no valid .odex "
+ ALOGI("Zip is good, but no %s inside, and no valid .odex "
"file in the same directory", kDexInJarName);
goto bail;
}
* doesn't have to be seeked anywhere in particular.
*/
if (dvmDexFileOpenFromFd(fd, &pDvmDex) != 0) {
- LOGI("Unable to map %s in %s", kDexInJarName, fileName);
+ ALOGI("Unable to map %s in %s", kDexInJarName, fileName);
goto bail;
}
return NULL;
}
- //LOGI("adding obj=%p", obj);
+ //ALOGI("adding obj=%p", obj);
//dvmDumpThread(dvmThreadSelf(), false);
if (false && dvmIsClassObject((Object*)obj)) {
ClassObject* clazz = (ClassObject*) obj;
- LOGI("-------");
- LOGI("Adding global ref on class %s", clazz->descriptor);
+ ALOGI("-------");
+ ALOGI("Adding global ref on class %s", clazz->descriptor);
dvmDumpThread(dvmThreadSelf(), false);
}
if (false && ((Object*)obj)->clazz == gDvm.classJavaLangString) {
StringObject* strObj = (StringObject*) obj;
char* str = dvmCreateCstrFromString(strObj);
if (strcmp(str, "sync-response") == 0) {
- LOGI("-------");
- LOGI("Adding global ref on string '%s'", str);
+ ALOGI("-------");
+ ALOGI("Adding global ref on string '%s'", str);
dvmDumpThread(dvmThreadSelf(), false);
//dvmAbort();
}
if (arrayObj->length == 8192 /*&&
dvmReferenceTableEntries(&gDvm.jniGlobalRefTable) > 400*/)
{
- LOGI("Adding global ref on byte array %p (len=%d)",
+ ALOGI("Adding global ref on byte array %p (len=%d)",
arrayObj, arrayObj->length);
dvmDumpThread(dvmThreadSelf(), false);
}
std::string className(dvmHumanReadableDescriptor(method->clazz->descriptor));
char* signature = dexProtoCopyMethodDescriptor(&method->prototype);
- LOGI("-> %s %s%s %s(%s)", className.c_str(), method->name, signature, thisString, argsString);
+ ALOGI("-> %s %s%s %s(%s)", className.c_str(), method->name, signature, thisString, argsString);
free(signature);
}
if (dvmCheckException(self)) {
Object* exception = dvmGetException(self);
std::string exceptionClassName(dvmHumanReadableDescriptor(exception->clazz->descriptor));
- LOGI("<- %s %s%s threw %s", className.c_str(),
+ ALOGI("<- %s %s%s threw %s", className.c_str(),
method->name, signature, exceptionClassName.c_str());
} else {
char returnValueString[128] = { 0 };
char returnType = method->shorty[0];
appendValue(returnType, returnValue, returnValueString, sizeof(returnValueString), false);
- LOGI("<- %s %s%s returned %s", className.c_str(),
+ ALOGI("<- %s %s%s returned %s", className.c_str(),
method->name, signature, returnValueString);
}
free(signature);
u4 accessFlags = method->accessFlags;
bool isSynchronized = (accessFlags & ACC_SYNCHRONIZED) != 0;
- //LOGI("JNI calling %p (%s.%s:%s):", method->insns,
+ //ALOGI("JNI calling %p (%s.%s:%s):", method->insns,
// method->clazz->descriptor, method->name, method->shorty);
/*
while (*shorty != '\0') {
switch (*shorty++) {
case 'L':
- //LOGI(" local %d: 0x%08x", idx, modArgs[idx]);
+ //ALOGI(" local %d: 0x%08x", idx, modArgs[idx]);
if (modArgs[idx] != 0) {
modArgs[idx] = (u4) addLocalReference(self, (Object*) modArgs[idx]);
}
if (exception != NULL) {
dvmPrintExceptionStackTrace();
} else {
- LOGI("Odd: ExceptionDescribe called, but no exception pending");
+ ALOGI("Odd: ExceptionDescribe called, but no exception pending");
}
}
ClassObject* clazz = (ClassObject*) dvmDecodeIndirectRef(ts.self(), jclazz);
if (gDvm.verboseJni) {
- LOGI("[Registering JNI native methods for class %s]",
+ ALOGI("[Registering JNI native methods for class %s]",
clazz->descriptor);
}
ClassObject* clazz = (ClassObject*) dvmDecodeIndirectRef(ts.self(), jclazz);
if (gDvm.verboseJni) {
- LOGI("[Unregistering JNI native methods for class %s]",
+ ALOGI("[Unregistering JNI native methods for class %s]",
clazz->descriptor);
}
dvmUnregisterJNINativeMethods(clazz);
JavaVMExt* vm = (JavaVMExt*) gDvmJni.jniVm;
//if (self != NULL)
- // LOGI("Ent CreateJNIEnv: threadid=%d %p", self->threadId, self);
+ // ALOGI("Ent CreateJNIEnv: threadid=%d %p", self->threadId, self);
assert(vm != NULL);
vm->envList = newEnv;
//if (self != NULL)
- // LOGI("Xit CreateJNIEnv: threadid=%d %p", self->threadId, self);
+ // ALOGI("Xit CreateJNIEnv: threadid=%d %p", self->threadId, self);
return (JNIEnv*) newEnv;
}
return;
}
- //LOGI("Ent DestroyJNIEnv: threadid=%d %p", self->threadId, self);
+ //ALOGI("Ent DestroyJNIEnv: threadid=%d %p", self->threadId, self);
JNIEnvExt* extEnv = (JNIEnvExt*) env;
JavaVMExt* vm = (JavaVMExt*) gDvmJni.jniVm;
}
free(env);
- //LOGI("Xit DestroyJNIEnv: threadid=%d %p", self->threadId, self);
+ //ALOGI("Xit DestroyJNIEnv: threadid=%d %p", self->threadId, self);
}
/*
dvmLockMutex(&pHdr->lock);
- LOGI("LinearAlloc classLoader=%p", classLoader);
- LOGI(" mapAddr=%p mapLength=%d firstOffset=%d",
+ ALOGI("LinearAlloc classLoader=%p", classLoader);
+ ALOGI(" mapAddr=%p mapLength=%d firstOffset=%d",
pHdr->mapAddr, pHdr->mapLength, pHdr->firstOffset);
- LOGI(" curOffset=%d", pHdr->curOffset);
+ ALOGI(" curOffset=%d", pHdr->curOffset);
int off = pHdr->firstOffset;
u4 rawLen, fullLen;
fullLen = ((HEADER_EXTRA*2 + (rawLen & LENGTHFLAG_MASK))
& ~(BLOCK_ALIGN-1));
- LOGI(" %p (%3d): %clen=%d%s", pHdr->mapAddr + off + HEADER_EXTRA,
+ ALOGI(" %p (%3d): %clen=%d%s", pHdr->mapAddr + off + HEADER_EXTRA,
(int) ((off + HEADER_EXTRA) / SYSTEM_PAGE_SIZE),
(rawLen & LENGTHFLAG_FREE) != 0 ? '*' : ' ',
rawLen & LENGTHFLAG_MASK,
}
if (ENFORCE_READ_ONLY) {
- LOGI("writeRefCount map:");
+ ALOGI("writeRefCount map:");
int numPages = (pHdr->mapLength+SYSTEM_PAGE_SIZE-1) / SYSTEM_PAGE_SIZE;
int zstart = 0;
int cc = read(fd, lineBuf, sizeof(lineBuf)-1);
if (cc <= 0) {
const char* msg = (cc == 0) ? "unexpected EOF" : strerror(errno);
- LOGI("Unable to read '%s': %s", nameBuf, msg);
+ ALOGI("Unable to read '%s': %s", nameBuf, msg);
close(fd);
return false;
}
char* endp;
pData->utime = strtoul(cp+1, &endp, 10);
if (endp == cp+1)
- LOGI("Warning: strtoul failed on utime ('%.30s...')", cp);
+ ALOGI("Warning: strtoul failed on utime ('%.30s...')", cp);
cp = strchr(cp+1, ' ');
if (cp == NULL)
pData->stime = strtoul(cp+1, &endp, 10);
if (endp == cp+1)
- LOGI("Warning: strtoul failed on stime ('%.30s...')", cp);
+ ALOGI("Warning: strtoul failed on stime ('%.30s...')", cp);
/*
* Skip more stuff we don't care about.
*/
pData->processor = strtol(cp+1, &endp, 10);
if (endp == cp+1)
- LOGI("Warning: strtoul failed on processor ('%.30s...')", cp);
+ ALOGI("Warning: strtoul failed on processor ('%.30s...')", cp);
return true;
parse_fail:
- LOGI("stat parse failed (%s)", lineBuf);
+ ALOGI("stat parse failed (%s)", lineBuf);
return false;
}
* Check this so we don't end up waiting for ourselves. We need
* to return "true" so the caller can continue.
*/
- LOGI("threadid=%d: recursive native library load attempt (%s)",
+ ALOGI("threadid=%d: recursive native library load attempt (%s)",
self->threadId, pEntry->pathName);
return true;
}
SharedLib* pActualEntry = addSharedLibEntry(pNewEntry);
if (pNewEntry != pActualEntry) {
- LOGI("WOW: we lost a race to add a shared lib (%s CL=%p)",
+ ALOGI("WOW: we lost a race to add a shared lib (%s CL=%p)",
pathName, classLoader);
freeSharedLibEntry(pNewEntry);
return checkOnLoadResult(pActualEntry);
self->classLoaderOverride = classLoader;
oldStatus = dvmChangeStatus(self, THREAD_NATIVE);
if (gDvm.verboseJni) {
- LOGI("[Calling JNI_OnLoad for \"%s\"]", pathName);
+ ALOGI("[Calling JNI_OnLoad for \"%s\"]", pathName);
}
version = (*func)(gDvmJni.jniVm, NULL);
dvmChangeStatus(self, oldStatus);
result = false;
} else {
if (gDvm.verboseJni) {
- LOGI("[Returned from JNI_OnLoad for \"%s\"]", pathName);
+ ALOGI("[Returned from JNI_OnLoad for \"%s\"]", pathName);
}
}
}
*/
static char* mangleString(const char* str, int len)
{
- //LOGI("mangling '%s' %d", str, len);
+ //ALOGI("mangling '%s' %d", str, len);
assert(str[len] == '\0');
*/
void dvmPointerSetDump(const PointerSet* pSet)
{
- LOGI("PointerSet %p", pSet);
+ ALOGI("PointerSet %p", pSet);
int i;
for (i = 0; i < pSet->count; i++)
- LOGI(" %2d: %p", i, pSet->list[i]);
+ ALOGI(" %2d: %p", i, pSet->list[i]);
}
dvmLockMutex(&state->startStopLock);
while (state->traceEnabled != 0) {
- LOGI("TRACE start requested, but already in progress; stopping");
+ ALOGI("TRACE start requested, but already in progress; stopping");
dvmUnlockMutex(&state->startStopLock);
dvmMethodTraceStop();
dvmLockMutex(&state->startStopLock);
}
- LOGI("TRACE STARTED: '%s' %dKB", traceFileName, bufferSize / 1024);
+ ALOGI("TRACE STARTED: '%s' %dKB", traceFileName, bufferSize / 1024);
/*
* Allocate storage and open files.
}
}
- LOGI("TRACE STOPPED%s: writing %d records",
+ ALOGI("TRACE STOPPED%s: writing %d records",
state->overflow ? " (NOTE: overflowed buffer)" : "",
(finalCurOffset - TRACE_HEADER_LEN) / recordSize);
if (gDvm.debuggerActive) {
if (!self->cpuClockBaseSet) {
self->cpuClockBase = getThreadCpuTimeInUsec();
self->cpuClockBaseSet = true;
- //LOGI("thread base id=%d 0x%llx",
+ //ALOGI("thread base id=%d 0x%llx",
// self->threadId, self->cpuClockBase);
}
#endif
adler32, isBootstrap, &newFile, /*createIfMissing=*/true);
if (optFd < 0) {
- LOGI("Unable to open or create cache for %s (%s)",
+ ALOGI("Unable to open or create cache for %s (%s)",
fileName, cachedName);
goto bail;
}
* doesn't have to be seeked anywhere in particular.
*/
if (dvmDexFileOpenFromFd(optFd, &pDvmDex) != 0) {
- LOGI("Unable to map cached %s", fileName);
+ ALOGI("Unable to map cached %s", fileName);
goto bail;
}
gDvm.stackTraceFile, (int) actual, traceLen,
strerror(errno));
} else {
- LOGI("Wrote stack traces to '%s'", gDvm.stackTraceFile);
+ ALOGI("Wrote stack traces to '%s'", gDvm.stackTraceFile);
}
close(fd);
}
*/
static void handleSigUsr1()
{
- LOGI("SIGUSR1 forcing GC (no HPROF)");
+ ALOGI("SIGUSR1 forcing GC (no HPROF)");
dvmCollectGarbage();
}
}
if (!gDvm.haltSignalCatcher) {
- LOGI("threadid=%d: reacting to signal %d",
+ ALOGI("threadid=%d: reacting to signal %d",
dvmThreadSelf()->threadId, rcvd);
}
tag, fd, want, (int)actual, strerror(errno));
return false;
} else {
- //LOGI("read %s: %d at %d", tag, actual, data->count);
+ //ALOGI("read %s: %d at %d", tag, actual, data->count);
}
data->count += actual;
* Could be two app threads both want to patch predicted
* chaining cells around the same time.
*/
- LOGI("threadid=%d ODD: want thread-suspend lock (%s:%s),"
+ ALOGI("threadid=%d ODD: want thread-suspend lock (%s:%s),"
" it's held, no suspend pending",
self->threadId, who, getSuspendCauseStr(why));
} else {
thread->handle = pthread_self();
thread->systemTid = dvmGetSysThreadId();
- //LOGI("SYSTEM TID IS %d (pid is %d)", (int) thread->systemTid,
+ //ALOGI("SYSTEM TID IS %d (pid is %d)", (int) thread->systemTid,
// (int) getpid());
/*
* If we were called by dvmAttachCurrentThread, the self value is
"uncaughtException", "(Ljava/lang/Thread;Ljava/lang/Throwable;)V");
if (uncaughtHandler != NULL) {
- //LOGI("+++ calling %s.uncaughtException",
+ //ALOGI("+++ calling %s.uncaughtException",
// handlerObj->clazz->descriptor);
JValue unused;
dvmCallMethod(self, uncaughtHandler, handlerObj, &unused,
dvmLockMutex(&traceState->startStopLock);
if (traceState->traceEnabled) {
- LOGI("threadid=%d: waiting for method trace to finish",
+ ALOGI("threadid=%d: waiting for method trace to finish",
self->threadId);
while (traceState->traceEnabled) {
dvmWaitCond(&traceState->threadExitCond,
* If we got here via waitForDebugger(), don't do this part.
*/
if (jdwpActivity) {
- //LOGI("threadid=%d: clearing wait-for-event (my handle=%08x)",
+ //ALOGI("threadid=%d: clearing wait-for-event (my handle=%08x)",
// self->threadId, (int) self->handle);
dvmJdwpClearWaitForEventThread(gDvm.jdwpState);
}
*/
threadObj = thread->threadObj;
if (threadObj == NULL) {
- LOGI("Can't dump thread %d: threadObj not set", thread->threadId);
+ ALOGI("Can't dump thread %d: threadObj not set", thread->threadId);
return;
}
dvmAddTrackedAlloc(threadObj, NULL);
#define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0]))
#if 0
-#define LOG_ALLOC LOGI
-#define LOG_PIN LOGI
-#define LOG_PROM LOGI
-#define LOG_REF LOGI
-#define LOG_SCAV LOGI
-#define LOG_TRAN LOGI
-#define LOG_VER LOGI
+#define LOG_ALLOC ALOGI
+#define LOG_PIN ALOGI
+#define LOG_PROM ALOGI
+#define LOG_REF ALOGI
+#define LOG_SCAV ALOGI
+#define LOG_TRAN ALOGI
+#define LOG_VER ALOGI
#else
#define LOG_ALLOC(...) ((void)0)
#define LOG_PIN(...) ((void)0)
const RegisterMap* pMap = dvmGetExpandedRegisterMap(method);
const u1* regVector = NULL;
- LOGI("conservative : %s.%s", method->clazz->descriptor, method->name);
+ ALOGI("conservative : %s.%s", method->clazz->descriptor, method->name);
if (pMap != NULL) {
int addr = saveArea->xtra.currentPc - method->insns;
gDvm.gcHeap->ddmHpifWhen = when;
dvmUnlockHeap();
} else {
- LOGI("%s(): can't lock heap to set when", __func__);
+ ALOGI("%s(): can't lock heap to set when", __func__);
return false;
}
break;
default:
- LOGI("%s(): bad when value 0x%08x", __func__, when);
+ ALOGI("%s(): bad when value 0x%08x", __func__, when);
return false;
}
bool dvmDdmHandleHpsgNhsgChunk(int when, int what, bool native)
{
- LOGI("dvmDdmHandleHpsgChunk(when %d, what %d, heap %d)", when, what,
+ ALOGI("dvmDdmHandleHpsgChunk(when %d, what %d, heap %d)", when, what,
native);
switch (when) {
case HPSG_WHEN_NEVER:
case HPSG_WHEN_EVERY_GC:
break;
default:
- LOGI("%s(): bad when value 0x%08x", __func__, when);
+ ALOGI("%s(): bad when value 0x%08x", __func__, when);
return false;
}
case HPSG_WHAT_DISTINCT_OBJECTS:
break;
default:
- LOGI("%s(): bad what value 0x%08x", __func__, what);
+ ALOGI("%s(): bad what value 0x%08x", __func__, what);
return false;
}
//TODO: if what says we should dump immediately, signal (or do) it from here
dvmUnlockHeap();
} else {
- LOGI("%s(): can't lock heap to set when/what", __func__);
+ ALOGI("%s(): can't lock heap to set when/what", __func__);
return false;
}
* allows the verifier to process the class successfully.
*/
- //LOGI("Looking up '%s'", typeStr);
+ //ALOGI("Looking up '%s'", typeStr);
ClassObject* clazz;
clazz = dvmFindClassNoInit(pDescriptor, meth->clazz->classLoader);
if (clazz == NULL) {
std::string dotMethClass =
dvmHumanReadableDescriptor(meth->clazz->descriptor);
- LOGI("Could not find method %s.%s, referenced from method %s.%s",
+ ALOGI("Could not find method %s.%s, referenced from method %s.%s",
dotMissingClass.c_str(), methodName,
dotMethClass.c_str(), meth->name);
}
}
if (gDebugVerbose) {
- //LOGI(" RESULT (changed=%d)", changed);
+ //ALOGI(" RESULT (changed=%d)", changed);
//dumpRegTypes(vdata, targetRegs, 0, "rslt", NULL, 0);
}
#ifdef VERIFIER_STATS
} else {
expectedType = primitiveTypeToRegType(elemType);
}
- //LOGI("filled-new-array: %s -> %d", resClass->descriptor, expectedType);
+ //ALOGI("filled-new-array: %s -> %d", resClass->descriptor, expectedType);
/*
* Verify each register. If "argCount" is bad, verifyRegisterType()
dvmInsnSetChanged(insnFlags, 0, true);
if (dvmWantVerboseVerification(meth)) {
- IF_LOGI() {
+ IF_ALOGI() {
char* desc = dexProtoCopyMethodDescriptor(&meth->prototype);
- LOGI("Now verifying: %s.%s %s (ins=%d regs=%d)",
+ ALOGI("Now verifying: %s.%s %s (ins=%d regs=%d)",
meth->clazz->descriptor, meth->name, desc,
meth->insSize, meth->registersSize);
- LOGI(" ------ [0 4 8 12 16 20 24 28 32 36");
+ ALOGI(" ------ [0 4 8 12 16 20 24 28 32 36");
free(desc);
}
debugVerbose = true;
NULL, uninitMap, SHOW_REG_DETAILS);
}
- //LOGI("process %s.%s %s %d",
+ //ALOGI("process %s.%s %s %d",
// meth->clazz->descriptor, meth->name, meth->descriptor, insnIdx);
if (!verifyInstruction(meth, insnFlags, regTable, insnIdx,
uninitMap, &startGuess))
if (addr >= (int) startAddress && addr < (int) endAddress)
{
- LOGI(" %2d: '%s' %s", reg, name, descriptor);
+ ALOGI(" %2d: '%s' %s", reg, name, descriptor);
}
}
}
if (addr == 0 && addrName != NULL) {
- LOGI("%c%s %s mst=%d", branchTarget ? '>' : ' ',
+ ALOGI("%c%s %s mst=%d", branchTarget ? '>' : ' ',
addrName, regChars, registerLine->monitorStackTop);
} else {
- LOGI("%c0x%04x %s mst=%d", branchTarget ? '>' : ' ',
+ ALOGI("%c0x%04x %s mst=%d", branchTarget ? '>' : ' ',
addr, regChars, registerLine->monitorStackTop);
}
if (displayFlags & DRT_SHOW_LIVENESS) {
bool isLive = dvmIsBitSet(liveRegs, i);
liveChars[i + 1 + (i / 4)] = isLive ? '+' : '-';
}
- LOGI(" %s", liveChars);
+ ALOGI(" %s", liveChars);
} else {
- LOGI(" %c", '#');
+ ALOGI(" %c", '#');
}
}
ClassObject* clazz = regTypeReferenceToClass(addrRegs[i], uninitMap);
assert(dvmIsHeapAddress((Object*)clazz));
if (i < regCount) {
- LOGI(" %2d: 0x%08x %s%s",
+ ALOGI(" %2d: 0x%08x %s%s",
i, addrRegs[i],
regTypeIsUninitReference(addrRegs[i]) ? "[U]" : "",
clazz->descriptor);
} else {
- LOGI(" RS: 0x%08x %s%s",
+ ALOGI(" RS: 0x%08x %s%s",
addrRegs[i],
regTypeIsUninitReference(addrRegs[i]) ? "[U]" : "",
clazz->descriptor);
}
#ifdef VERIFIER_STATS
- LOGI("Verifier stats:");
- LOGI(" methods examined : %u", gDvm.verifierStats.methodsExamined);
- LOGI(" monitor-enter methods : %u", gDvm.verifierStats.monEnterMethods);
- LOGI(" instructions examined : %u", gDvm.verifierStats.instrsExamined);
- LOGI(" instructions re-examined: %u", gDvm.verifierStats.instrsReexamined);
- LOGI(" copying of register sets: %u", gDvm.verifierStats.copyRegCount);
- LOGI(" merging of register sets: %u", gDvm.verifierStats.mergeRegCount);
- LOGI(" ...that caused changes : %u", gDvm.verifierStats.mergeRegChanged);
- LOGI(" uninit searches : %u", gDvm.verifierStats.uninitSearches);
- LOGI(" max memory required : %u", gDvm.verifierStats.biggestAlloc);
+ ALOGI("Verifier stats:");
+ ALOGI(" methods examined : %u", gDvm.verifierStats.methodsExamined);
+ ALOGI(" monitor-enter methods : %u", gDvm.verifierStats.monEnterMethods);
+ ALOGI(" instructions examined : %u", gDvm.verifierStats.instrsExamined);
+ ALOGI(" instructions re-examined: %u", gDvm.verifierStats.instrsReexamined);
+ ALOGI(" copying of register sets: %u", gDvm.verifierStats.copyRegCount);
+ ALOGI(" merging of register sets: %u", gDvm.verifierStats.mergeRegCount);
+ ALOGI(" ...that caused changes : %u", gDvm.verifierStats.mergeRegChanged);
+ ALOGI(" uninit searches : %u", gDvm.verifierStats.uninitSearches);
+ ALOGI(" max memory required : %u", gDvm.verifierStats.biggestAlloc);
#endif
}
expectedFlags |= DEX_OPT_FLAG_BIG;
#endif
if ((expectedFlags & matchMask) != (optHdr.flags & matchMask)) {
- LOGI("DexOpt: header flag mismatch (0x%02x vs 0x%02x, mask=0x%02x)",
+ ALOGI("DexOpt: header flag mismatch (0x%02x vs 0x%02x, mask=0x%02x)",
expectedFlags, optHdr.flags, matchMask);
goto bail;
}
ptr = depData;
val = read4LE(&ptr);
if (sourceAvail && val != modWhen) {
- LOGI("DexOpt: source file mod time mismatch (%08x vs %08x)",
+ ALOGI("DexOpt: source file mod time mismatch (%08x vs %08x)",
val, modWhen);
goto bail;
}
val = read4LE(&ptr);
if (sourceAvail && val != crc) {
- LOGI("DexOpt: source file CRC mismatch (%08x vs %08x)", val, crc);
+ ALOGI("DexOpt: source file CRC mismatch (%08x vs %08x)", val, crc);
goto bail;
}
val = read4LE(&ptr);
if (numDeps == 0) {
/* more entries in bootclasspath than in deps list */
- LOGI("DexOpt: not all deps represented");
+ ALOGI("DexOpt: not all deps represented");
goto bail;
}
if (len != storedStrLen ||
strcmp(cacheFileName, (const char*) ptr) != 0)
{
- LOGI("DexOpt: mismatch dep name: '%s' vs. '%s'",
+ ALOGI("DexOpt: mismatch dep name: '%s' vs. '%s'",
cacheFileName, ptr);
goto bail;
}
ptr += storedStrLen;
if (memcmp(signature, ptr, kSHA1DigestLen) != 0) {
- LOGI("DexOpt: mismatch dep signature for '%s'", cacheFileName);
+ ALOGI("DexOpt: mismatch dep signature for '%s'", cacheFileName);
goto bail;
}
ptr += kSHA1DigestLen;
if (numDeps != 0) {
/* more entries in deps list than in classpath */
- LOGI("DexOpt: Some deps went away");
+ ALOGI("DexOpt: Some deps went away");
goto bail;
}
bool verbose = false; //= dvmWantVerboseVerification(vdata->method);
if (verbose) {
const Method* meth = vdata->method;
- LOGI("Computing liveness for %s.%s:%s",
+ ALOGI("Computing liveness for %s.%s:%s",
meth->clazz->descriptor, meth->name, meth->shorty);
}
assert(workBlock->liveRegs != NULL);
dvmCopyBitVector(workBits, workBlock->liveRegs);
if (verbose) {
- LOGI("Loaded work bits from last=0x%04x", workBlock->lastAddr);
+ ALOGI("Loaded work bits from last=0x%04x", workBlock->lastAddr);
dumpLiveState(vdata, 0xfffd, workBlock->liveRegs);
dumpLiveState(vdata, 0xffff, workBits);
}
pred->changed = dvmCheckMergeBitVectors(pred->liveRegs, workBits);
if (verbose) {
- LOGI("merging cur=%04x into pred last=%04x (ch=%d)",
+ ALOGI("merging cur=%04x into pred last=%04x (ch=%d)",
curIdx, pred->lastAddr, pred->changed);
dumpLiveState(vdata, 0xfffa, pred->liveRegs);
dumpLiveState(vdata, 0xfffb, workBits);
bool verbose = dvmWantVerboseVerification(vdata->method);
if (verbose) {
- LOGI("%04x-%04x %2d (%s %s)",
+ ALOGI("%04x-%04x %2d (%s %s)",
startAddress, endAddress, reg, name, descriptor);
}
regChars[1 + idx + (idx/4)] = ch;
}
- LOGI("0x%04x %s", curIdx, regChars);
+ ALOGI("0x%04x %s", curIdx, regChars);
}
/* multiple definitions? */
if (IS_CLASS_FLAG_SET(resClass, CLASS_MULTIPLE_DEFS)) {
- LOGI("DexOpt: not resolving ambiguous class '%s'",
+ ALOGI("DexOpt: not resolving ambiguous class '%s'",
resClass->descriptor);
if (pFailure != NULL)
*pFailure = VERIFY_ERROR_NO_CLASS;
bool allowed = dvmCheckFieldAccess(referrer, (Field*)resField);
untweakLoader(referrer, resField->clazz);
if (!allowed) {
- LOGI("DexOpt: access denied from %s to field %s.%s",
+ ALOGI("DexOpt: access denied from %s to field %s.%s",
referrer->descriptor, resField->clazz->descriptor,
resField->name);
if (pFailure != NULL)
bool allowed = dvmCheckFieldAccess(referrer, (Field*)resField);
untweakLoader(referrer, resField->clazz);
if (!allowed) {
- LOGI("DexOpt: access denied from %s to field %s.%s",
+ ALOGI("DexOpt: access denied from %s to field %s.%s",
referrer->descriptor, resField->clazz->descriptor,
resField->name);
if (pFailure != NULL)
instField = dvmOptResolveInstField(clazz, fieldIdx, NULL);
if (instField == NULL) {
- LOGI("DexOpt: unable to optimize instance field ref "
+ ALOGI("DexOpt: unable to optimize instance field ref "
"0x%04x at 0x%02x in %s.%s",
fieldIdx, (int) (insns - method->insns), clazz->descriptor,
method->name);
staticField = dvmOptResolveStaticField(clazz, fieldIdx, NULL);
if (staticField == NULL) {
- LOGI("DexOpt: unable to optimize static field ref "
+ ALOGI("DexOpt: unable to optimize static field ref "
"0x%04x at 0x%02x in %s.%s",
fieldIdx, (int) (insns - method->insns), clazz->descriptor,
method->name);
bool allowed = dvmCheckMethodAccess(referrer, resMethod);
untweakLoader(referrer, resMethod->clazz);
if (!allowed) {
- IF_LOGI() {
+ IF_ALOGI() {
char* desc = dexProtoCopyMethodDescriptor(&resMethod->prototype);
- LOGI("DexOpt: illegal method access (call %s.%s %s from %s)",
+ ALOGI("DexOpt: illegal method access (call %s.%s %s from %s)",
resMethod->clazz->descriptor, resMethod->name, desc,
referrer->descriptor);
free(desc);
updateOpcode(method, insns, newOpc);
dvmUpdateCodeUnit(method, insns+1, baseMethod->methodIndex);
- //LOGI("DexOpt: rewrote call to %s.%s --> %s.%s",
+ //ALOGI("DexOpt: rewrote call to %s.%s --> %s.%s",
// method->clazz->descriptor, method->name,
// baseMethod->clazz->descriptor, baseMethod->name);
}
if (!dvmIsInterfaceClass(resClass)) {
/* whoops */
- LOGI("Interface method not part of interface class");
+ ALOGI("Interface method not part of interface class");
return NULL;
}
while (inlineSubs->method != NULL) {
/*
if (extra) {
- LOGI("comparing %p vs %p %s.%s %s",
+ ALOGI("comparing %p vs %p %s.%s %s",
inlineSubs->method, calledMethod,
inlineSubs->method->clazz->descriptor,
inlineSubs->method->name,
updateOpcode(method, insns, OP_EXECUTE_INLINE);
dvmUpdateCodeUnit(method, insns+1, (u2) inlineSubs->inlineIdx);
- //LOGI("DexOpt: execute-inline %s.%s --> %s.%s",
+ //ALOGI("DexOpt: execute-inline %s.%s --> %s.%s",
// method->clazz->descriptor, method->name,
// calledMethod->clazz->descriptor, calledMethod->name);
return true;
updateOpcode(method, insns, OP_EXECUTE_INLINE_RANGE);
dvmUpdateCodeUnit(method, insns+1, (u2) inlineSubs->inlineIdx);
- //LOGI("DexOpt: execute-inline/range %s.%s --> %s.%s",
+ //ALOGI("DexOpt: execute-inline/range %s.%s --> %s.%s",
// method->clazz->descriptor, method->name,
// calledMethod->clazz->descriptor, calledMethod->name);
return true;
break;
}
- LOGI("Register Map gcPointGap stats (diff count=%d, total=%d):",
+ ALOGI("Register Map gcPointGap stats (diff count=%d, total=%d):",
pStats->gcGapCount, pStats->totalGcPointCount);
assert(pStats->gcPointGap[0] == 0);
for (i = 1; i <= end; i++) {
- LOGI(" %2d %d", i, pStats->gcPointGap[i]);
+ ALOGI(" %2d %d", i, pStats->gcPointGap[i]);
}
break;
}
- LOGI("Register Map bit difference stats:");
+ ALOGI("Register Map bit difference stats:");
for (i = 0; i <= end; i++) {
- LOGI(" %2d %d", i, pStats->numDiffBits[i]);
+ ALOGI(" %2d %d", i, pStats->numDiffBits[i]);
}
- LOGI("Register Map update position stats (lt16=%d ge16=%d):",
+ ALOGI("Register Map update position stats (lt16=%d ge16=%d):",
pStats->updateLT16, pStats->updateGE16);
for (i = 0; i < kNumUpdatePosns; i++) {
- LOGI(" %2d %d", i, pStats->updatePosn[i]);
+ ALOGI(" %2d %d", i, pStats->updatePosn[i]);
}
#endif
}
{
char* desc;
desc = dexProtoCopyMethodDescriptor(&vdata->method->prototype);
- LOGI("Map for %s.%s %s", vdata->method->clazz->descriptor,
+ ALOGI("Map for %s.%s %s", vdata->method->clazz->descriptor,
vdata->method->name, desc);
free(desc);
size1 = computeRegisterMapSize(pMap1);
size2 = computeRegisterMapSize(pMap2);
if (size1 != size2) {
- LOGI("compareMaps: size mismatch (%zd vs %zd)", size1, size2);
+ ALOGI("compareMaps: size mismatch (%zd vs %zd)", size1, size2);
return -1;
}
if (memcmp(pMap1, pMap2, size1) != 0) {
- LOGI("compareMaps: content mismatch");
+ ALOGI("compareMaps: content mismatch");
return -1;
}
prevAddr, addr, method->clazz->descriptor, method->name);
} else if (addrDiff > kMaxGcPointGap) {
if (REGISTER_MAP_VERBOSE) {
- LOGI("HEY: addrDiff is %d, max %d (0x%04x->0x%04x %s.%s)",
+ ALOGI("HEY: addrDiff is %d, max %d (0x%04x->0x%04x %s.%s)",
addrDiff, kMaxGcPointGap, prevAddr, addr,
method->clazz->descriptor, method->name);
}
if (numDiff > kMaxDiffBits) {
if (REGISTER_MAP_VERBOSE) {
- LOGI("WOW: numDiff is %d, max %d", numDiff, kMaxDiffBits);
+ ALOGI("WOW: numDiff is %d, max %d", numDiff, kMaxDiffBits);
}
} else {
pStats->numDiffBits[numDiff]++;
numEntries = dvmRegisterMapGetNumEntries(pMap);
if (debug) {
- LOGI("COMPRESS: %s.%s aw=%d rw=%d ne=%d",
+ ALOGI("COMPRESS: %s.%s aw=%d rw=%d ne=%d",
meth->clazz->descriptor, meth->name,
addrWidth, regWidth, numEntries);
dumpRegisterMap(pMap, -1);
addr |= (*mapData++) << 8;
if (debug)
- LOGI(" addr=0x%04x ent=%d (aw=%d)", addr, entry, addrWidth);
+ ALOGI(" addr=0x%04x ent=%d (aw=%d)", addr, entry, addrWidth);
addrDiff = addr - prevAddr;
assert(addrDiff > 0);
/* small difference, encode in 3 bits */
key = addrDiff -1; /* set 00000AAA */
if (debug)
- LOGI(" : small %d, key=0x%02x", addrDiff, key);
+ ALOGI(" : small %d, key=0x%02x", addrDiff, key);
} else {
/* large difference, output escape code */
key = 0x07; /* escape code for AAA */
if (debug)
- LOGI(" : large %d, key=0x%02x", addrDiff, key);
+ ALOGI(" : large %d, key=0x%02x", addrDiff, key);
}
int numBitsChanged, firstBitChanged, lebSize;
&firstBitChanged, &numBitsChanged, NULL);
if (debug) {
- LOGI(" : diff fbc=%d nbc=%d ls=%d (rw=%d)",
+ ALOGI(" : diff fbc=%d nbc=%d ls=%d (rw=%d)",
firstBitChanged, numBitsChanged, lebSize, regWidth);
}
if (numBitsChanged == 0) {
/* set B to 1 and CCCC to zero to indicate no bits were changed */
key |= 0x08;
- if (debug) LOGI(" : no bits changed");
+ if (debug) ALOGI(" : no bits changed");
} else if (numBitsChanged == 1 && firstBitChanged < 16) {
/* set B to 0 and CCCC to the index of the changed bit */
key |= firstBitChanged << 4;
- if (debug) LOGI(" : 1 low bit changed");
+ if (debug) ALOGI(" : 1 low bit changed");
} else if (numBitsChanged < 15 && lebSize < regWidth) {
/* set B to 1 and CCCC to the number of bits */
key |= 0x08 | (numBitsChanged << 4);
- if (debug) LOGI(" : some bits changed");
+ if (debug) ALOGI(" : some bits changed");
} else {
/* set B to 1 and CCCC to 0x0f so we store the entire vector */
key |= 0x08 | 0xf0;
- if (debug) LOGI(" : encode original");
+ if (debug) ALOGI(" : encode original");
}
/*
/* now we know enough to allocate the new map */
if (REGISTER_MAP_VERBOSE) {
- LOGI("Expanding to map aw=%d rw=%d ne=%d",
+ ALOGI("Expanding to map aw=%d rw=%d ne=%d",
newAddrWidth, regWidth, numEntries);
}
newMapSize = kHeaderSize + (newAddrWidth + regWidth) * numEntries;
if (false) {
if (dvmPointerSetGetCount(curBlock->predecessors) > 256) {
- LOGI("Lots of preds at 0x%04x in %s.%s:%s", curIdx,
+ ALOGI("Lots of preds at 0x%04x in %s.%s:%s", curIdx,
meth->clazz->descriptor, meth->name, meth->shorty);
}
}
unsigned int idx;
int count;
- LOGI("Basic blocks for %s.%s:%s", vdata->method->clazz->descriptor,
+ ALOGI("Basic blocks for %s.%s:%s", vdata->method->clazz->descriptor,
vdata->method->name, vdata->method->shorty);
for (idx = 0; idx < vdata->insnsSize; idx++) {
VfyBasicBlock* block = vdata->basicBlocks[idx];
printBuf[sizeof(printBuf)-2] = '!';
printBuf[sizeof(printBuf)-1] = '\0';
- LOGI("%s", printBuf);
+ ALOGI("%s", printBuf);
}
usleep(100 * 1000); /* ugh...let logcat catch up */
bool verbose = false; //dvmWantVerboseVerification(meth);
if (verbose) {
- LOGI("Basic blocks for %s.%s:%s",
+ ALOGI("Basic blocks for %s.%s:%s",
meth->clazz->descriptor, meth->name, meth->shorty);
}
else
startEnd = "-";
- LOGI("%04x: %c%c%s #%d", idx, tryc, btc, startEnd, debugBBIndex);
+ ALOGI("%04x: %c%c%s #%d", idx, tryc, btc, startEnd, debugBBIndex);
if (pTries != NULL && idx == tryStart) {
assert(numHandlers > 0);
- LOGI(" EXC block: [%04x, %04x) %d:(%04x...)",
+ ALOGI(" EXC block: [%04x, %04x) %d:(%04x...)",
tryStart, tryEnd, numHandlers, handlerList[0]);
}
}
currentArena = newArena;
numArenaBlocks++;
if (numArenaBlocks > 10)
- LOGI("Total arena pages for JIT: %d", numArenaBlocks);
+ ALOGI("Total arena pages for JIT: %d", numArenaBlocks);
goto retry;
}
/* Should not reach here */
hprofContextInit(headCtx, strdup(tailCtx->fileName), tailCtx->fd, true,
tailCtx->directToDdms);
- LOGI("hprof: dumping heap strings to \"%s\".", tailCtx->fileName);
+ ALOGI("hprof: dumping heap strings to \"%s\".", tailCtx->fileName);
hprofDumpStrings(headCtx);
hprofDumpClasses(headCtx);
}
/* throw out a log message for the benefit of "runhat" */
- LOGI("hprof: heap dump completed (%dKB)",
+ ALOGI("hprof: heap dump completed (%dKB)",
(headCtx->fileDataSize + tailCtx->fileDataSize + 1023) / 1024);
hprofFreeContext(headCtx);
dvmAbort();
}
- //LOGI("TRACK OK");
+ //ALOGI("TRACK OK");
}
#endif
assert(gDvmJit.pJitEntryTable != NULL);
assert(size && !(size & (size - 1))); /* Is power of 2? */
- LOGI("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size);
+ ALOGI("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size);
if (size <= gDvmJit.jitTableSize) {
return true;
}
/* open it up to the full range */
- LOGI("threadid=%d: stack overflow on call to %s.%s:%s",
+ ALOGI("threadid=%d: stack overflow on call to %s.%s:%s",
self->threadId,
method->clazz->descriptor, method->name, method->shorty);
StackSaveArea* saveArea = SAVEAREA_FROM_FP(self->interpSave.curFrame);
- LOGI(" method requires %d+%d+%d=%d bytes, fp is %p (%d left)",
+ ALOGI(" method requires %d+%d+%d=%d bytes, fp is %p (%d left)",
method->registersSize * 4, sizeof(StackSaveArea), method->outsSize * 4,
(method->registersSize + method->outsSize) * 4 + sizeof(StackSaveArea),
saveArea, (u1*) saveArea - self->interpStackEnd);
- LOGI(" expanding stack end (%p to %p)", self->interpStackEnd,
+ ALOGI(" expanding stack end (%p to %p)", self->interpStackEnd,
self->interpStackStart - self->interpStackSize);
//dvmDumpThread(self, false);
self->interpStackEnd = self->interpStackStart - self->interpStackSize;
self->interpStackEnd = newStackEnd;
self->stackOverflowed = false;
- LOGI("Shrank stack (to %p, curFrame is %p)", self->interpStackEnd,
+ ALOGI("Shrank stack (to %p, curFrame is %p)", self->interpStackEnd,
self->interpSave.curFrame);
}
/*
* Run through the stack and rewrite the "prev" pointers.
*/
- //LOGI("DR: fpOff=%d (from %p %p)",fpOffset, origStack,
+ //ALOGI("DR: fpOff=%d (from %p %p)",fpOffset, origStack,
// thread->interpSave.curFrame);
fp = stackCopy + fpOffset;
while (true) {
if (maxfd < fd)
maxfd = fd;
} else {
- LOGI("NOTE: entering select w/o wakepipe");
+ ALOGI("NOTE: entering select w/o wakepipe");
}
if (maxfd < 0) {
{
int sock = receiveClientFd(netState);
if (sock >= 0) {
- LOGI("Ignoring second debugger -- accepting and dropping");
+ ALOGI("Ignoring second debugger -- accepting and dropping");
close(sock);
} else {
assert(netState->controlSock < 0);
*/
static void dumpEvent(const JdwpEvent* pEvent)
{
- LOGI("Event id=0x%4x %p (prev=%p next=%p):",
+ ALOGI("Event id=0x%4x %p (prev=%p next=%p):",
pEvent->requestId, pEvent, pEvent->prev, pEvent->next);
- LOGI(" kind=%s susp=%s modCount=%d",
+ ALOGI(" kind=%s susp=%s modCount=%d",
dvmJdwpEventKindStr(pEvent->eventKind),
dvmJdwpSuspendPolicyStr(pEvent->suspendPolicy),
pEvent->modCount);
for (int i = 0; i < pEvent->modCount; i++) {
const JdwpEventMod* pMod = &pEvent->mods[i];
JdwpModKind kind = static_cast<JdwpModKind>(pMod->modKind);
- LOGI(" %s", dvmJdwpModKindStr(kind));
+ ALOGI(" %s", dvmJdwpModKindStr(kind));
/* TODO - show details */
}
}
/* this is rare but possible -- see CLASS_PREPARE handling */
if (dvmDbgGetThreadSelfId() == state->debugThreadId) {
- LOGI("NOTE: suspendByPolicy not suspending JDWP thread");
+ ALOGI("NOTE: suspendByPolicy not suspending JDWP thread");
return;
}
ObjectId threadId = dvmReadObjectId(&buf);
if (threadId == dvmDbgGetThreadSelfId()) {
- LOGI(" Warning: ignoring request to suspend self");
+ ALOGI(" Warning: ignoring request to suspend self");
return ERR_THREAD_NOT_SUSPENDED;
}
ALOGV(" Req to suspend thread 0x%llx", threadId);
ObjectId threadId = dvmReadObjectId(&buf);
if (threadId == dvmDbgGetThreadSelfId()) {
- LOGI(" Warning: ignoring request to resume self");
+ ALOGI(" Warning: ignoring request to resume self");
return ERR_NONE;
}
ALOGV(" Req to resume thread 0x%llx", threadId);
goto fail;
}
- LOGI("JDWP connected");
+ ALOGI("JDWP connected");
/*
* Ordinarily we would pause briefly to allow the debugger to set
}
if (pParams->suspend)
- LOGI("JDWP will wait for debugger on port %d", port);
+ ALOGI("JDWP will wait for debugger on port %d", port);
else
ALOGD("JDWP will %s on port %d",
pParams->server ? "listen" : "connect", port);
addr.addrInet.sin_port = htons(state->params.port);
- LOGI("Connecting out to '%s' %d",
+ ALOGI("Connecting out to '%s' %d",
inet_ntoa(addr.addrInet.sin_addr), ntohs(addr.addrInet.sin_port));
/*
return false;
}
- LOGI("Connection established to %s (%s:%d)",
+ ALOGI("Connection established to %s (%s:%d)",
state->params.host, inet_ntoa(addr.addrInet.sin_addr),
ntohs(addr.addrInet.sin_port));
netState->awaitingHandshake = true;
if (fd >= 0) {
FD_SET(fd, &readfds);
} else {
- LOGI("NOTE: entering select w/o wakepipe");
+ ALOGI("NOTE: entering select w/o wakepipe");
}
/*
if (netState->listenSock >= 0 &&
FD_ISSET(netState->listenSock, &readfds))
{
- LOGI("Ignoring second debugger -- accepting and dropping");
+ ALOGI("Ignoring second debugger -- accepting and dropping");
union {
struct sockaddr_in addrInet;
struct sockaddr addrPlain;
tmpSock = accept(netState->listenSock, &addr.addrPlain,
&addrlen);
if (tmpSock < 0)
- LOGI("Weird -- accept failed");
+ ALOGI("Weird -- accept failed");
else
close(tmpSock);
}
desc);
free(desc);
}
- //LOGI("self is %p, pc=%p, fp=%p", self, self->interpSave.pc,
+ //ALOGI("self is %p, pc=%p, fp=%p", self, self->interpSave.pc,
// self->interpSave.curFrame);
- //LOGI("first instruction is 0x%04x", self->interpSave.pc[0]);
+ //ALOGI("first instruction is 0x%04x", self->interpSave.pc[0]);
/*
* Handle any ongoing profiling and prep for debugging
UNUSED_PARAMETER(args);
UNUSED_PARAMETER(pResult);
- LOGI("--- reference table dump ---");
+ ALOGI("--- reference table dump ---");
dvmDumpJniReferenceTables();
// could dump thread's internalLocalRefTable, probably not useful
// ditto for thread's jniMonitorRefTable
- LOGI("---");
+ ALOGI("---");
RETURN_VOID();
}
int targetSdkVersion = args[1];
if (targetSdkVersion > 0 && targetSdkVersion <= 13 /* honeycomb-mr2 */) {
// TODO: running with CheckJNI should override this and force you to obey the strictest rules.
- LOGI("Turning on JNI app bug workarounds for target SDK version %i...", targetSdkVersion);
+ ALOGI("Turning on JNI app bug workarounds for target SDK version %i...", targetSdkVersion);
gDvmJni.workAroundAppJniBugs = true;
}
RETURN_VOID();
break;
}
if (thread == NULL) {
- LOGI("VMStack.getTraceBuf: threadObj %p not active",
+ ALOGI("VMStack.getTraceBuf: threadObj %p not active",
targetThreadObj);
dvmUnlockThreadList();
return NULL;
if (pid > 0) {
int status;
- LOGI("System server process %d has been created", pid);
+ ALOGI("System server process %d has been created", pid);
gDvm.systemServerPid = pid;
/* There is a slight window that the system server process has crashed
* but it went unnoticed because we haven't published its pid yet. So
const char *argp[] = {_PATH_BSHELL, "-c", NULL, NULL};
argp[2] = dvmCreateCstrFromString(command);
- LOGI("Exec: %s %s %s", argp[0], argp[1], argp[2]);
+ ALOGI("Exec: %s %s %s", argp[0], argp[1], argp[2]);
execv(_PATH_BSHELL, (char**)argp);
exit(127);
dvmDdmSendThreadNameChange(threadId, nameStr);
//char* str = dvmCreateCstrFromString(nameStr);
- //LOGI("UPDATE: threadid=%d now '%s'", threadId, str);
+ //ALOGI("UPDATE: threadid=%d now '%s'", threadId, str);
//free(str);
RETURN_VOID();
{
bool enable = (args[0] != 0);
- //LOGI("ddmThreadNotification: %d", enable);
+ //ALOGI("ddmThreadNotification: %d", enable);
dvmDdmSetThreadNotification(enable);
RETURN_VOID();
}
*/
bool dvmCheckFieldAccess(const ClassObject* accessFrom, const Field* field)
{
- //LOGI("CHECK ACCESS from '%s' to field '%s' (in %s) flags=%#x",
+ //ALOGI("CHECK ACCESS from '%s' to field '%s' (in %s) flags=%#x",
// accessFrom->descriptor, field->name,
// field->clazz->descriptor, field->accessFlags);
return checkAccess(accessFrom, field->clazz, field->accessFlags);
dvmLinearReadOnly(NULL, (char*)fiddle);
char* str = (char*)dvmLinearStrdup(NULL, "This is a test!");
- LOGI("GOT: '%s'", str);
+ ALOGI("GOT: '%s'", str);
/* try to check the bounds; allocator may round allocation size up */
fiddle = (char*)dvmLinearAlloc(NULL, 12);
- LOGI("Should be 1: %d", dvmLinearAllocContains(fiddle, 12));
- LOGI("Should be 0: %d", dvmLinearAllocContains(fiddle, 13));
- LOGI("Should be 0: %d", dvmLinearAllocContains(fiddle - 128*1024, 1));
+ ALOGI("Should be 1: %d", dvmLinearAllocContains(fiddle, 12));
+ ALOGI("Should be 0: %d", dvmLinearAllocContains(fiddle, 13));
+ ALOGI("Should be 0: %d", dvmLinearAllocContains(fiddle - 128*1024, 1));
dvmLinearAllocDump(NULL);
dvmLinearFree(NULL, (char*)str);
default: kindStr = "???"; break;
}
- LOGI(" %2d: type=%s %s %p", idx, kindStr, cpe->fileName, cpe->ptr);
+ ALOGI(" %2d: type=%s %s %p", idx, kindStr, cpe->fileName, cpe->ptr);
if (CALC_CACHE_STATS && cpe->kind == kCpeJar) {
JarFile* pJarFile = (JarFile*) cpe->ptr;
DvmDex* pDvmDex = dvmGetJarFileDex(pJarFile);
int i;
for (i = loaderList->initiatingLoaderCount-1; i >= 0; --i) {
if (loaderList->initiatingLoaders[i] == loader) {
- //LOGI("+++ found initiating match %p in %s",
+ //ALOGI("+++ found initiating match %p in %s",
// loader, clazz->descriptor);
return true;
}
}
loaderList->initiatingLoaders = newList;
- //LOGI("Expanded init list to %d (%s)",
+ //ALOGI("Expanded init list to %d (%s)",
// loaderList->initiatingLoaderCount+kInitLoaderInc,
// clazz->descriptor);
}
(pCrit->loader != NULL &&
dvmLoaderInInitiatingList(clazz, pCrit->loader)) ));
//if (match)
- // LOGI("+++ %s %p matches existing %s %p",
+ // ALOGI("+++ %s %p matches existing %s %p",
// pCrit->descriptor, pCrit->loader,
// clazz->descriptor, clazz->classLoader);
return !match;
static ClassObject* findClassFromLoaderNoInit(const char* descriptor,
Object* loader)
{
- //LOGI("##### findClassFromLoaderNoInit (%s,%p)",
+ //ALOGI("##### findClassFromLoaderNoInit (%s,%p)",
// descriptor, loader);
Thread* self = dvmThreadSelf();
clazz = NULL;
goto bail;
}
- //LOGI("WAITING for '%s' (owner=%d)",
+ //ALOGI("WAITING for '%s' (owner=%d)",
// clazz->descriptor, clazz->initThreadId);
while (!dvmIsClassLinked(clazz) && clazz->status != CLASS_ERROR) {
dvmObjectWait(self, (Object*) clazz, 0, 0, false);
assert(dvmIsClassObject(clazz));
assert(clazz == gDvm.classJavaLangObject || clazz->super != NULL);
if (!dvmIsInterfaceClass(clazz)) {
- //LOGI("class=%s vtableCount=%d, virtualMeth=%d",
+ //ALOGI("class=%s vtableCount=%d, virtualMeth=%d",
// clazz->descriptor, clazz->vtableCount,
// clazz->virtualMethodCount);
assert(clazz->vtableCount >= clazz->virtualMethodCount);
classLoader);
if (gDvm.verboseClass && (result != NULL)) {
- LOGI("[Loaded %s from DEX %p (cl=%p)]",
+ ALOGI("[Loaded %s from DEX %p (cl=%p)]",
result->descriptor, pDvmDex, classLoader);
}
clazz->descriptor, interfaceIdxArray[i],
classDescriptor);
} else {
- LOGI("Failed resolving %s interface %d '%s'",
+ ALOGI("Failed resolving %s interface %d '%s'",
clazz->descriptor, interfaceIdxArray[i],
classDescriptor);
}
int i;
if (clazz->super != NULL) {
- //LOGI("SUPER METHODS %d %s->%s", clazz->super->vtableCount,
+ //ALOGI("SUPER METHODS %d %s->%s", clazz->super->vtableCount,
// clazz->descriptor, clazz->super->descriptor);
}
LOGVV("--- computeFieldOffsets '%s'", clazz->descriptor);
- //LOGI("OFFSETS fieldCount=%d", clazz->ifieldCount);
- //LOGI("dataobj, instance: %d", offsetof(DataObject, instanceData));
- //LOGI("classobj, access: %d", offsetof(ClassObject, accessFlags));
- //LOGI("super=%p, fieldOffset=%d", clazz->super, fieldOffset);
+ //ALOGI("OFFSETS fieldCount=%d", clazz->ifieldCount);
+ //ALOGI("dataobj, instance: %d", offsetof(DataObject, instanceData));
+ //ALOGI("classobj, access: %d", offsetof(ClassObject, accessFlags));
+ //ALOGI("super=%p, fieldOffset=%d", clazz->super, fieldOffset);
/*
* Start by moving all reference fields to the front.
*/
static void throwEarlierClassFailure(ClassObject* clazz)
{
- LOGI("Rejecting re-init on previously-failed class %s v=%p",
+ ALOGI("Rejecting re-init on previously-failed class %s v=%p",
clazz->descriptor, clazz->verifyErrorClass);
if (clazz->verifyErrorClass == NULL) {
* was set), bail out.
*/
if (dvmCheckException(self)) {
- LOGI("Class init of '%s' failing with wait() exception",
+ ALOGI("Class init of '%s' failing with wait() exception",
clazz->descriptor);
/*
* TODO: this is bogus, because it means the two threads have a
goto bail_unlock;
}
if (clazz->status == CLASS_INITIALIZING) {
- LOGI("Waiting again for class init");
+ ALOGI("Waiting again for class init");
continue;
}
assert(clazz->status == CLASS_INITIALIZED ||
int i;
if (clazz == NULL) {
- LOGI("dumpClass: ignoring request to dump null class");
+ ALOGI("dumpClass: ignoring request to dump null class");
return 0;
}
initStr = dvmIsClassInitialized(clazz) ? "true" : "false";
if (showInit && showLoader)
- LOGI("%s %p %s", clazz->descriptor, clazz->classLoader, initStr);
+ ALOGI("%s %p %s", clazz->descriptor, clazz->classLoader, initStr);
else if (showInit)
- LOGI("%s %s", clazz->descriptor, initStr);
+ ALOGI("%s %s", clazz->descriptor, initStr);
else if (showLoader)
- LOGI("%s %p", clazz->descriptor, clazz->classLoader);
+ ALOGI("%s %p", clazz->descriptor, clazz->classLoader);
else
- LOGI("%s", clazz->descriptor);
+ ALOGI("%s", clazz->descriptor);
return 0;
}
else
super = NULL;
- LOGI("----- %s '%s' cl=%p ser=0x%08x -----",
+ ALOGI("----- %s '%s' cl=%p ser=0x%08x -----",
dvmIsInterfaceClass(clazz) ? "interface" : "class",
clazz->descriptor, clazz->classLoader, clazz->serialNumber);
- LOGI(" objectSize=%d (%d from super)", (int) clazz->objectSize,
+ ALOGI(" objectSize=%d (%d from super)", (int) clazz->objectSize,
super != NULL ? (int) super->objectSize : -1);
- LOGI(" access=0x%04x.%04x", clazz->accessFlags >> 16,
+ ALOGI(" access=0x%04x.%04x", clazz->accessFlags >> 16,
clazz->accessFlags & JAVA_FLAGS_MASK);
if (super != NULL)
- LOGI(" super='%s' (cl=%p)", super->descriptor, super->classLoader);
+ ALOGI(" super='%s' (cl=%p)", super->descriptor, super->classLoader);
if (dvmIsArrayClass(clazz)) {
- LOGI(" dimensions=%d elementClass=%s",
+ ALOGI(" dimensions=%d elementClass=%s",
clazz->arrayDim, clazz->elementClass->descriptor);
}
if (clazz->iftableCount > 0) {
- LOGI(" interfaces (%d):", clazz->iftableCount);
+ ALOGI(" interfaces (%d):", clazz->iftableCount);
for (i = 0; i < clazz->iftableCount; i++) {
InterfaceEntry* ent = &clazz->iftable[i];
int j;
- LOGI(" %2d: %s (cl=%p)",
+ ALOGI(" %2d: %s (cl=%p)",
i, ent->clazz->descriptor, ent->clazz->classLoader);
/* enable when needed */
if (false && ent->methodIndexArray != NULL) {
for (j = 0; j < ent->clazz->virtualMethodCount; j++)
- LOGI(" %2d: %d %s %s",
+ ALOGI(" %2d: %d %s %s",
j, ent->methodIndexArray[j],
ent->clazz->virtualMethods[j].name,
clazz->vtable[ent->methodIndexArray[j]]->name);
}
}
if (!dvmIsInterfaceClass(clazz)) {
- LOGI(" vtable (%d entries, %d in super):", clazz->vtableCount,
+ ALOGI(" vtable (%d entries, %d in super):", clazz->vtableCount,
super != NULL ? super->vtableCount : 0);
for (i = 0; i < clazz->vtableCount; i++) {
desc = dexProtoCopyMethodDescriptor(&clazz->vtable[i]->prototype);
- LOGI(" %s%2d: %p %20s %s",
+ ALOGI(" %s%2d: %p %20s %s",
(i != clazz->vtable[i]->methodIndex) ? "*** " : "",
(u4) clazz->vtable[i]->methodIndex, clazz->vtable[i],
clazz->vtable[i]->name, desc);
free(desc);
}
- LOGI(" direct methods (%d entries):", clazz->directMethodCount);
+ ALOGI(" direct methods (%d entries):", clazz->directMethodCount);
for (i = 0; i < clazz->directMethodCount; i++) {
desc = dexProtoCopyMethodDescriptor(
&clazz->directMethods[i].prototype);
- LOGI(" %2d: %20s %s", i, clazz->directMethods[i].name,
+ ALOGI(" %2d: %20s %s", i, clazz->directMethods[i].name,
desc);
free(desc);
}
} else {
- LOGI(" interface methods (%d):", clazz->virtualMethodCount);
+ ALOGI(" interface methods (%d):", clazz->virtualMethodCount);
for (i = 0; i < clazz->virtualMethodCount; i++) {
desc = dexProtoCopyMethodDescriptor(
&clazz->virtualMethods[i].prototype);
- LOGI(" %2d: %2d %20s %s", i,
+ ALOGI(" %2d: %2d %20s %s", i,
(u4) clazz->virtualMethods[i].methodIndex,
clazz->virtualMethods[i].name,
desc);
}
}
if (clazz->sfieldCount > 0) {
- LOGI(" static fields (%d entries):", clazz->sfieldCount);
+ ALOGI(" static fields (%d entries):", clazz->sfieldCount);
for (i = 0; i < clazz->sfieldCount; i++) {
- LOGI(" %2d: %20s %s", i, clazz->sfields[i].name,
+ ALOGI(" %2d: %20s %s", i, clazz->sfields[i].name,
clazz->sfields[i].signature);
}
}
if (clazz->ifieldCount > 0) {
- LOGI(" instance fields (%d entries):", clazz->ifieldCount);
+ ALOGI(" instance fields (%d entries):", clazz->ifieldCount);
for (i = 0; i < clazz->ifieldCount; i++) {
- LOGI(" %2d: %20s %s", i, clazz->ifields[i].name,
+ ALOGI(" %2d: %20s %s", i, clazz->ifields[i].name,
clazz->ifields[i].signature);
}
}
gDvm.numDeclaredMethods, gDvm.numDeclaredInstFields,
gDvm.numDeclaredStaticFields, gDvm.pBootLoaderAlloc->curOffset);
#ifdef COUNT_PRECISE_METHODS
- LOGI("GC precise methods: %d",
+ ALOGI("GC precise methods: %d",
dvmPointerSetGetCount(gDvm.preciseMethods));
#endif
}
if (setpriority(PRIO_PROCESS, pid, newNice) != 0) {
std::string threadName(dvmGetThreadName(thread));
- LOGI("setPriority(%d) '%s' to prio=%d(n=%d) failed: %s",
+ ALOGI("setPriority(%d) '%s' to prio=%d(n=%d) failed: %s",
pid, threadName.c_str(), newPriority, newNice, strerror(errno));
} else {
ALOGV("setPriority(%d) to prio=%d(n=%d)", pid, newPriority, newNice);
errno = 0;
int oldThreadPriority = getpriority(PRIO_PROCESS, 0);
if (errno != 0) {
- LOGI("getpriority(self) failed: %s", strerror(errno));
+ ALOGI("getpriority(self) failed: %s", strerror(errno));
} else if (oldThreadPriority > ANDROID_PRIORITY_NORMAL) {
/* Current value is numerically greater than "normal", which
* in backward UNIX terms means lower priority.
set_sched_policy(dvmGetSysThreadId(), SP_FOREGROUND);
}
if (setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_NORMAL) != 0) {
- LOGI("Unable to elevate priority from %d to %d",
+ ALOGI("Unable to elevate priority from %d to %d",
oldThreadPriority, ANDROID_PRIORITY_NORMAL);
} else {
/*
if (actualCount < 0)
goto bail;
- //LOGI("gathered methods:");
+ //ALOGI("gathered methods:");
//for (i = 0; i < actualCount; i++) {
- // LOGI(" %d: %s.%s",
+ // ALOGI(" %d: %s.%s",
// i, methods[i]->clazz->descriptor, methods[i]->name);
//}
#ifndef NDEBUG
-#define DBUG_MSG LOGI
+#define DBUG_MSG ALOGI
class Stopwatch {
public: