diff options
-rw-r--r-- | vm/Exception.cpp | 6 | ||||
-rw-r--r-- | vm/Jni.cpp | 2 | ||||
-rw-r--r-- | vm/alloc/Heap.cpp | 11 | ||||
-rw-r--r-- | vm/analysis/CodeVerify.cpp | 2 | ||||
-rw-r--r-- | vm/hprof/HprofHeap.cpp | 3 | ||||
-rw-r--r-- | vm/interp/Jit.cpp | 3 | ||||
-rw-r--r-- | vm/native/java_lang_System.cpp | 2 |
7 files changed, 3 insertions, 26 deletions
diff --git a/vm/Exception.cpp b/vm/Exception.cpp index 94ca03c9e..5af48bae4 100644 --- a/vm/Exception.cpp +++ b/vm/Exception.cpp @@ -1049,12 +1049,6 @@ void dvmLogRawStackTrace(const int* intVals, int stackDepth) { Method* meth = (Method*) *intVals++; int pc = *intVals++; - int lineNumber; - if (pc == -1) // broken top frame? - lineNumber = 0; - else - lineNumber = dvmLineNumFromPC(meth, pc); - std::string dotName(dvmHumanReadableDescriptor(meth->clazz->descriptor)); if (dvmIsNativeMethod(meth)) { LOGI("\tat %s.%s(Native Method)", dotName.c_str(), meth->name); diff --git a/vm/Jni.cpp b/vm/Jni.cpp index ae2333041..f1f4ae7a2 100644 --- a/vm/Jni.cpp +++ b/vm/Jni.cpp @@ -3487,7 +3487,6 @@ jint JNI_CreateJavaVM(JavaVM** p_vm, JNIEnv** p_env, void* vm_args) { * look for the -Xcheck:jni stuff here. */ int argc = 0; - bool sawJniOpts = false; for (int i = 0; i < args->nOptions; i++) { const char* optStr = args->options[i].optionString; if (optStr == NULL) { @@ -3504,7 +3503,6 @@ jint JNI_CreateJavaVM(JavaVM** p_vm, JNIEnv** p_env, void* vm_args) { } else if (strcmp(optStr, "-Xcheck:jni") == 0) { gDvmJni.useCheckJni = true; } else if (strncmp(optStr, "-Xjniopts:", 10) == 0) { - sawJniOpts = true; char* jniOpts = strdup(optStr + 10); size_t jniOptCount = 1; for (char* p = jniOpts; *p != 0; ++p) { diff --git a/vm/alloc/Heap.cpp b/vm/alloc/Heap.cpp index bd333221d..781a23969 100644 --- a/vm/alloc/Heap.cpp +++ b/vm/alloc/Heap.cpp @@ -456,9 +456,8 @@ static void verifyRootsAndHeap() void dvmCollectGarbageInternal(const GcSpec* spec) { GcHeap *gcHeap = gDvm.gcHeap; - u4 rootSuspend, rootSuspendTime, rootStart = 0 , rootEnd = 0; - u4 dirtySuspend, dirtyStart = 0, dirtyEnd = 0; - u4 totalTime; + u4 rootStart = 0 , rootEnd = 0; + u4 dirtyStart = 0, dirtyEnd = 0; size_t numObjectsFreed, numBytesFreed; size_t currAllocated, currFootprint; size_t percentFree; @@ -474,10 +473,8 @@ void dvmCollectGarbageInternal(const GcSpec* spec) gcHeap->gcRunning = true; - rootSuspend = dvmGetRelativeTimeMsec(); dvmSuspendAllThreads(SUSPEND_FOR_GC); rootStart = dvmGetRelativeTimeMsec(); - rootSuspendTime = rootStart - rootSuspend; /* * If we are not marking concurrently raise the priority of the @@ -538,7 +535,6 @@ void dvmCollectGarbageInternal(const GcSpec* spec) * suspension. */ dvmLockHeap(); - dirtySuspend = dvmGetRelativeTimeMsec(); dvmSuspendAllThreads(SUSPEND_FOR_GC); dirtyStart = dvmGetRelativeTimeMsec(); /* @@ -660,7 +656,6 @@ void dvmCollectGarbageInternal(const GcSpec* spec) if (!spec->isConcurrent) { u4 markSweepTime = dirtyEnd - rootStart; bool isSmall = numBytesFreed > 0 && numBytesFreed < 1024; - totalTime = rootSuspendTime + markSweepTime; LOGD("%s freed %s%zdK, %d%% free %zdK/%zdK, paused %ums", spec->reason, isSmall ? "<" : "", @@ -670,10 +665,8 @@ void dvmCollectGarbageInternal(const GcSpec* spec) markSweepTime); } else { u4 rootTime = rootEnd - rootStart; - u4 dirtySuspendTime = dirtyStart - dirtySuspend; u4 dirtyTime = dirtyEnd - dirtyStart; bool isSmall = numBytesFreed > 0 && numBytesFreed < 1024; - totalTime = rootSuspendTime + rootTime + dirtySuspendTime + dirtyTime; LOGD("%s freed %s%zdK, %d%% free %zdK/%zdK, paused %ums+%ums", spec->reason, isSmall ? "<" : "", diff --git a/vm/analysis/CodeVerify.cpp b/vm/analysis/CodeVerify.cpp index fea06107c..6d4b93c4e 100644 --- a/vm/analysis/CodeVerify.cpp +++ b/vm/analysis/CodeVerify.cpp @@ -2840,7 +2840,6 @@ static ClassObject* getCaughtExceptionType(const Method* meth, int insnIdx, const DexCode* pCode; DexFile* pDexFile; ClassObject* commonSuper = NULL; - bool foundPossibleHandler = false; u4 handlersSize; u4 offset; u4 i; @@ -2869,7 +2868,6 @@ static ClassObject* getCaughtExceptionType(const Method* meth, int insnIdx, if (handler->address == (u4) insnIdx) { ClassObject* clazz; - foundPossibleHandler = true; if (handler->typeIdx == kDexNoIndex) clazz = gDvm.exThrowable; diff --git a/vm/hprof/HprofHeap.cpp b/vm/hprof/HprofHeap.cpp index a2360aaf4..40e773bb8 100644 --- a/vm/hprof/HprofHeap.cpp +++ b/vm/hprof/HprofHeap.cpp @@ -432,10 +432,9 @@ int hprofDumpHeapObject(hprof_context_t *ctx, const Object *obj) int ifieldCount = sclass->ifieldCount; for (int i = 0; i < ifieldCount; i++) { const InstField *f = &sclass->ifields[i]; - hprof_basic_type t; size_t size; - t = signatureToBasicTypeAndSize(f->signature, &size); + (void) signatureToBasicTypeAndSize(f->signature, &size); if (size == 1) { hprofAddU1ToRecord(rec, (u1)dvmGetFieldByte(obj, f->byteOffset)); diff --git a/vm/interp/Jit.cpp b/vm/interp/Jit.cpp index 758956d21..d4c5a796e 100644 --- a/vm/interp/Jit.cpp +++ b/vm/interp/Jit.cpp @@ -1300,7 +1300,6 @@ bool dvmJitResizeJitTable( unsigned int size ) JitEntry *pNewTable; JitEntry *pOldTable; JitEntry tempEntry; - u4 newMask; unsigned int oldSize; unsigned int i; @@ -1309,8 +1308,6 @@ bool dvmJitResizeJitTable( unsigned int size ) LOGI("Jit: resizing JitTable from %d to %d", gDvmJit.jitTableSize, size); - newMask = size - 1; - if (size <= gDvmJit.jitTableSize) { return true; } diff --git a/vm/native/java_lang_System.cpp b/vm/native/java_lang_System.cpp index c5db95afc..99b917bca 100644 --- a/vm/native/java_lang_System.cpp +++ b/vm/native/java_lang_System.cpp @@ -243,12 +243,10 @@ static void Dalvik_java_lang_System_arraycopy(const u4* args, JValue* pResult) * start from the front we could do a smear rather than a move. */ Object** srcObj; - Object** dstObj; int copyCount; ClassObject* clazz = NULL; srcObj = ((Object**)(void*)srcArray->contents) + srcPos; - dstObj = ((Object**)(void*)dstArray->contents) + dstPos; if (length > 0 && srcObj[0] != NULL) { |