diff options
Diffstat (limited to 'vm/compiler')
-rw-r--r-- | vm/compiler/Compiler.cpp | 14 | ||||
-rw-r--r-- | vm/compiler/Frontend.cpp | 4 | ||||
-rw-r--r-- | vm/compiler/Utility.cpp | 8 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/ArchUtility.cpp | 54 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/Assemble.cpp | 8 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.cpp | 10 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp | 2 |
7 files changed, 50 insertions, 50 deletions
diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp index 99533b7c2..e463ca8d5 100644 --- a/vm/compiler/Compiler.cpp +++ b/vm/compiler/Compiler.cpp @@ -178,7 +178,7 @@ bool dvmCompilerSetupCodeCache(void) MAP_PRIVATE , fd, 0); close(fd); if (gDvmJit.codeCache == MAP_FAILED) { - LOGE("Failed to mmap the JIT code cache: %s\n", strerror(errno)); + LOGE("Failed to mmap the JIT code cache: %s", strerror(errno)); return false; } @@ -418,7 +418,7 @@ static bool compilerThreadStartup(void) pJitTable = (JitEntry*) calloc(gDvmJit.jitTableSize, sizeof(*pJitTable)); if (!pJitTable) { - LOGE("jit table allocation failed\n"); + LOGE("jit table allocation failed"); dvmUnlockMutex(&gDvmJit.tableLock); goto fail; } @@ -432,7 +432,7 @@ static bool compilerThreadStartup(void) */ pJitProfTable = (unsigned char *)malloc(JIT_PROF_SIZE); if (!pJitProfTable) { - LOGE("jit prof table allocation failed\n"); + LOGE("jit prof table allocation failed"); dvmUnlockMutex(&gDvmJit.tableLock); goto fail; } @@ -447,7 +447,7 @@ static bool compilerThreadStartup(void) pJitTraceProfCounters = (JitTraceProfCounters*) calloc(1, sizeof(*pJitTraceProfCounters)); if (!pJitTraceProfCounters) { - LOGE("jit trace prof counters allocation failed\n"); + LOGE("jit trace prof counters allocation failed"); dvmUnlockMutex(&gDvmJit.tableLock); goto fail; } @@ -720,7 +720,7 @@ static void *compilerThreadStart(void *arg) dvmChangeStatus(NULL, THREAD_RUNNING); if (gDvm.verboseShutdown) - LOGD("Compiler thread shutting down\n"); + LOGD("Compiler thread shutting down"); return NULL; } @@ -773,9 +773,9 @@ void dvmCompilerShutdown(void) dvmUnlockMutex(&gDvmJit.compilerLock); if (pthread_join(gDvmJit.compilerHandle, &threadReturn) != 0) - LOGW("Compiler thread join failed\n"); + LOGW("Compiler thread join failed"); else if (gDvm.verboseShutdown) - LOGD("Compiler thread has shut down\n"); + LOGD("Compiler thread has shut down"); } /* Break loops within the translation cache */ diff --git a/vm/compiler/Frontend.cpp b/vm/compiler/Frontend.cpp index 75be70314..6b1e139b6 100644 --- a/vm/compiler/Frontend.cpp +++ b/vm/compiler/Frontend.cpp @@ -49,7 +49,7 @@ static inline int parseInsn(const u2 *codePtr, DecodedInstruction *decInsn, dexDecodeInstruction(codePtr, decInsn); if (printMe) { char *decodedString = dvmCompilerGetDalvikDisassembly(decInsn, NULL); - LOGD("%p: %#06x %s\n", codePtr, opcode, decodedString); + LOGD("%p: %#06x %s", codePtr, opcode, decodedString); } return dexGetWidthFromOpcode(opcode); } @@ -1745,7 +1745,7 @@ bool dvmCompileTrace(JitTraceDescription *desc, int numMaxInsts, curBB = entryCodeBB; if (cUnit.printMe) { - LOGD("--------\nCompiler: Building trace for %s, offset 0x%x\n", + LOGD("--------\nCompiler: Building trace for %s, offset 0x%x", desc->method->name, curOffset); } diff --git a/vm/compiler/Utility.cpp b/vm/compiler/Utility.cpp index c75e5fe23..b69faba89 100644 --- a/vm/compiler/Utility.cpp +++ b/vm/compiler/Utility.cpp @@ -27,7 +27,7 @@ bool dvmCompilerHeapInit(void) arenaHead = (ArenaMemBlock *) malloc(sizeof(ArenaMemBlock) + ARENA_DEFAULT_SIZE); if (arenaHead == NULL) { - LOGE("No memory left to create compiler heap memory\n"); + LOGE("No memory left to create compiler heap memory"); return false; } arenaHead->blockSize = ARENA_DEFAULT_SIZE; @@ -183,18 +183,18 @@ void dvmCompilerDumpCompilationUnit(CompilationUnit *cUnit) while (true) { bb = (BasicBlock *) dvmGrowableListIteratorNext(&iterator); if (bb == NULL) break; - LOGD("Block %d (%s) (insn %04x - %04x%s)\n", + LOGD("Block %d (%s) (insn %04x - %04x%s)", bb->id, blockTypeNames[bb->blockType], bb->startOffset, bb->lastMIRInsn ? bb->lastMIRInsn->offset : bb->startOffset, bb->lastMIRInsn ? "" : " empty"); if (bb->taken) { - LOGD(" Taken branch: block %d (%04x)\n", + LOGD(" Taken branch: block %d (%04x)", bb->taken->id, bb->taken->startOffset); } if (bb->fallThrough) { - LOGD(" Fallthrough : block %d (%04x)\n", + LOGD(" Fallthrough : block %d (%04x)", bb->fallThrough->id, bb->fallThrough->startOffset); } } diff --git a/vm/compiler/codegen/arm/ArchUtility.cpp b/vm/compiler/codegen/arm/ArchUtility.cpp index f3a2a4b37..ecc67db08 100644 --- a/vm/compiler/codegen/arm/ArchUtility.cpp +++ b/vm/compiler/codegen/arm/ArchUtility.cpp @@ -304,69 +304,69 @@ void dvmDumpLIRInsn(LIR *arg, unsigned char *baseAddr) /* Handle pseudo-ops individually, and all regular insns as a group */ switch(lir->opcode) { case kArmChainingCellBottom: - LOGD("-------- end of chaining cells (0x%04x)\n", offset); + LOGD("-------- end of chaining cells (0x%04x)", offset); break; case kArmPseudoBarrier: LOGD("-------- BARRIER"); break; case kArmPseudoExtended: - LOGD("-------- %s\n", (char *) dest); + LOGD("-------- %s", (char *) dest); break; case kArmPseudoSSARep: - DUMP_SSA_REP(LOGD("-------- %s\n", (char *) dest)); + DUMP_SSA_REP(LOGD("-------- %s", (char *) dest)); break; case kArmPseudoChainingCellBackwardBranch: - LOGD("L%p:\n", lir); - LOGD("-------- chaining cell (backward branch): 0x%04x\n", dest); + LOGD("L%p:", lir); + LOGD("-------- chaining cell (backward branch): 0x%04x", dest); break; case kArmPseudoChainingCellNormal: - LOGD("L%p:\n", lir); - LOGD("-------- chaining cell (normal): 0x%04x\n", dest); + LOGD("L%p:", lir); + LOGD("-------- chaining cell (normal): 0x%04x", dest); break; case kArmPseudoChainingCellHot: - LOGD("L%p:\n", lir); - LOGD("-------- chaining cell (hot): 0x%04x\n", dest); + LOGD("L%p:", lir); + LOGD("-------- chaining cell (hot): 0x%04x", dest); break; case kArmPseudoChainingCellInvokePredicted: - LOGD("L%p:\n", lir); - LOGD("-------- chaining cell (predicted): %s%s\n", + LOGD("L%p:", lir); + LOGD("-------- chaining cell (predicted): %s%s", dest ? ((Method *) dest)->clazz->descriptor : "", dest ? ((Method *) dest)->name : "N/A"); break; case kArmPseudoChainingCellInvokeSingleton: - LOGD("L%p:\n", lir); - LOGD("-------- chaining cell (invoke singleton): %s%s/%p\n", + LOGD("L%p:", lir); + LOGD("-------- chaining cell (invoke singleton): %s%s/%p", ((Method *)dest)->clazz->descriptor, ((Method *)dest)->name, ((Method *)dest)->insns); break; case kArmPseudoEntryBlock: - LOGD("-------- entry offset: 0x%04x\n", dest); + LOGD("-------- entry offset: 0x%04x", dest); break; case kArmPseudoDalvikByteCodeBoundary: - LOGD("-------- dalvik offset: 0x%04x @ %s\n", dest, + LOGD("-------- dalvik offset: 0x%04x @ %s", dest, (char *) lir->operands[1]); break; case kArmPseudoExitBlock: - LOGD("-------- exit offset: 0x%04x\n", dest); + LOGD("-------- exit offset: 0x%04x", dest); break; case kArmPseudoPseudoAlign4: - LOGD("%p (%04x): .align4\n", baseAddr + offset, offset); + LOGD("%p (%04x): .align4", baseAddr + offset, offset); break; case kArmPseudoPCReconstructionCell: - LOGD("L%p:\n", lir); - LOGD("-------- reconstruct dalvik PC : 0x%04x @ +0x%04x\n", dest, + LOGD("L%p:", lir); + LOGD("-------- reconstruct dalvik PC : 0x%04x @ +0x%04x", dest, lir->operands[1]); break; case kArmPseudoPCReconstructionBlockLabel: /* Do nothing */ break; case kArmPseudoEHBlockLabel: - LOGD("Exception_Handling:\n"); + LOGD("Exception_Handling:"); break; case kArmPseudoTargetLabel: case kArmPseudoNormalBlockLabel: - LOGD("L%p:\n", lir); + LOGD("L%p:", lir); break; default: if (lir->flags.isNop && !dumpNop) { @@ -376,7 +376,7 @@ void dvmDumpLIRInsn(LIR *arg, unsigned char *baseAddr) baseAddr, 256); buildInsnString(EncodingMap[lir->opcode].fmt, lir, buf, baseAddr, 256); - LOGD("%p (%04x): %-8s%s%s\n", + LOGD("%p (%04x): %-8s%s%s", baseAddr + offset, offset, opName, buf, lir->flags.isNop ? "(nop)" : ""); break; @@ -395,25 +395,25 @@ void dvmDumpLIRInsn(LIR *arg, unsigned char *baseAddr) /* Dump instructions and constant pool contents */ void dvmCompilerCodegenDump(CompilationUnit *cUnit) { - LOGD("Dumping LIR insns\n"); + LOGD("Dumping LIR insns"); LIR *lirInsn; ArmLIR *armLIR; - LOGD("installed code is at %p\n", cUnit->baseAddr); - LOGD("total size is %d bytes\n", cUnit->totalSize); + LOGD("installed code is at %p", cUnit->baseAddr); + LOGD("total size is %d bytes", cUnit->totalSize); for (lirInsn = cUnit->firstLIRInsn; lirInsn; lirInsn = lirInsn->next) { dvmDumpLIRInsn(lirInsn, (unsigned char *) cUnit->baseAddr); } for (lirInsn = cUnit->classPointerList; lirInsn; lirInsn = lirInsn->next) { armLIR = (ArmLIR *) lirInsn; - LOGD("%p (%04x): .class (%s)\n", + LOGD("%p (%04x): .class (%s)", (char*)cUnit->baseAddr + armLIR->generic.offset, armLIR->generic.offset, ((CallsiteInfo *) armLIR->operands[0])->classDescriptor); } for (lirInsn = cUnit->literalList; lirInsn; lirInsn = lirInsn->next) { armLIR = (ArmLIR *) lirInsn; - LOGD("%p (%04x): .word (0x%x)\n", + LOGD("%p (%04x): .word (0x%x)", (char*)cUnit->baseAddr + armLIR->generic.offset, armLIR->generic.offset, armLIR->operands[0]); diff --git a/vm/compiler/codegen/arm/Assemble.cpp b/vm/compiler/codegen/arm/Assemble.cpp index a433c31d4..47d2a0828 100644 --- a/vm/compiler/codegen/arm/Assemble.cpp +++ b/vm/compiler/codegen/arm/Assemble.cpp @@ -958,7 +958,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit, intptr_t target = lirTarget->generic.offset; int delta = target - pc; if (delta & 0x3) { - LOGE("PC-rel distance is not multiples of 4: %d\n", delta); + LOGE("PC-rel distance is not multiples of 4: %d", delta); dvmCompilerAbort(cUnit); } if ((lir->opcode == kThumb2LdrPcRel12) && (delta > 4091)) { @@ -1035,7 +1035,7 @@ static AssemblerStatus assembleInstructions(CompilationUnit *cUnit, intptr_t target = targetLIR->generic.offset; int delta = target - pc; if (delta > 2046 || delta < -2048) { - LOGE("Unconditional branch distance out of range: %d\n", delta); + LOGE("Unconditional branch distance out of range: %d", delta); dvmCompilerAbort(cUnit); } lir->operands[0] = delta >> 1; @@ -1437,7 +1437,7 @@ void dvmCompilerAssembleLIR(CompilationUnit *cUnit, JitTranslationInfo *info) /* Allocate enough space for the code block */ cUnit->codeBuffer = (unsigned char *)dvmCompilerNew(chainCellOffset, true); if (cUnit->codeBuffer == NULL) { - LOGE("Code buffer allocation failure\n"); + LOGE("Code buffer allocation failure"); info->discardResult = true; return; } @@ -1604,7 +1604,7 @@ void* dvmJitChain(void* tgtAddr, u4* branchAddr) gDvmJit.translationChains++; COMPILER_TRACE_CHAINING( - LOGD("Jit Runtime: chaining 0x%x to 0x%x\n", + LOGD("Jit Runtime: chaining 0x%x to 0x%x", (int) branchAddr, (int) tgtAddr & -2)); /* diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp index b9429a99e..af2897f06 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.cpp +++ b/vm/compiler/codegen/arm/CodegenDriver.cpp @@ -1477,7 +1477,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) { Opcode dalvikOpcode = mir->dalvikInsn.opcode; if ((dalvikOpcode >= OP_UNUSED_3E) && (dalvikOpcode <= OP_UNUSED_43)) { - LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpcode); + LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); return true; } switch (dalvikOpcode) { @@ -1491,7 +1491,7 @@ static bool handleFmt10x(CompilationUnit *cUnit, MIR *mir) case OP_UNUSED_79: case OP_UNUSED_7A: case OP_DISPATCH_FF: - LOGE("Codegen: got unused opcode 0x%x\n",dalvikOpcode); + LOGE("Codegen: got unused opcode 0x%x",dalvikOpcode); return true; case OP_NOP: break; @@ -2155,7 +2155,7 @@ static bool handleFmt21t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb, break; default: cond = (ArmConditionCode)0; - LOGE("Unexpected opcode (%d) for Fmt21t\n", dalvikOpcode); + LOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode); dvmCompilerAbort(cUnit); } genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]); @@ -2700,7 +2700,7 @@ static bool handleFmt22t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb, break; default: cond = (ArmConditionCode)0; - LOGE("Unexpected opcode (%d) for Fmt22t\n", dalvikOpcode); + LOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode); dvmCompilerAbort(cUnit); } genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]); @@ -4547,7 +4547,7 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) } } if (notHandled) { - LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled\n", + LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled", mir->offset, dalvikOpcode, dexGetOpcodeName(dalvikOpcode), dalvikFormat); diff --git a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp index 32065aebd..7112d10dc 100644 --- a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp +++ b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp @@ -400,7 +400,7 @@ static bool methodBlockCodeGen(CompilationUnit *cUnit, BasicBlock *bb) } if (notHandled) { - LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled\n", + LOGE("%#06x: Opcode 0x%x (%s) / Fmt %d not handled", mir->offset, dalvikOpcode, dexGetOpcodeName(dalvikOpcode), dalvikFormat); |