This commit is contained in:
Moritz 'Morty' Strübe 2017-11-17 13:59:12 +00:00 committed by GitHub
commit d96632cb58
2 changed files with 7 additions and 7 deletions

View File

@ -853,7 +853,7 @@ public class MSP430Core extends Chip implements MSP430Constants {
if (function == null) { if (function == null) {
function = getFunction(map, dst); function = getFunction(map, dst);
} }
profiler.profileCall(function, cpuCycles, pc); profiler.profileCall(function, cycles, pc);
} }
void printWarning(EmulationLogger.WarningType type, int address) throws EmulationException { void printWarning(EmulationLogger.WarningType type, int address) throws EmulationException {
@ -1096,7 +1096,7 @@ public class MSP430Core extends Chip implements MSP430Constants {
break; break;
case MOVA_IND_AUTOINC: case MOVA_IND_AUTOINC:
if (profiler != null && instruction == 0x0110) { if (profiler != null && instruction == 0x0110) {
profiler.profileReturn(cpuCycles); profiler.profileReturn(cycles);
} }
writeRegister(PC, pc); writeRegister(PC, pc);
/* read from address in register */ /* read from address in register */
@ -2017,7 +2017,7 @@ public class MSP430Core extends Chip implements MSP430Constants {
updateStatus = false; updateStatus = false;
if (instruction == RETURN && profiler != null) { if (instruction == RETURN && profiler != null) {
profiler.profileReturn(cpuCycles); profiler.profileReturn(cycles);
} }
break; break;

View File

@ -134,7 +134,7 @@ public class SimpleProfiler implements Profiler, EventListener {
if (servicedInterrupt >= 0) logger.printf("[%2d] ", servicedInterrupt); if (servicedInterrupt >= 0) logger.printf("[%2d] ", servicedInterrupt);
printSpace(logger, (cSP - interruptLevel) * 2); printSpace(logger, (cSP - interruptLevel) * 2);
logger.println("Call to $" + Utils.hex(entry.getAddress(), 4) + logger.println("Call to $" + Utils.hex(entry.getAddress(), 4) +
": " + entry.getInfo()); ": " + entry.getInfo() + " at " + cycles);
if (ignoreFunctions.get(entry.getName()) != null) { if (ignoreFunctions.get(entry.getName()) != null) {
hide = 1; hide = 1;
} }
@ -231,7 +231,7 @@ public class SimpleProfiler implements Profiler, EventListener {
if ((cspEntry.hide <= 1) && (!hideIRQ || servicedInterrupt == -1)) { if ((cspEntry.hide <= 1) && (!hideIRQ || servicedInterrupt == -1)) {
if (servicedInterrupt >= 0) logger.printf("[%2d] ",servicedInterrupt); if (servicedInterrupt >= 0) logger.printf("[%2d] ",servicedInterrupt);
printSpace(logger, (cSP - interruptLevel) * 2); printSpace(logger, (cSP - interruptLevel) * 2);
logger.println("return from " + ce.function.getInfo() + " elapsed: " + elapsed + " maxStackUsage: " + maxUsage); logger.println("return from " + ce.function.getInfo() + " at " + cycles + " elapsed: " + elapsed + " maxStackUsage: " + maxUsage);
} }
} }
@ -254,7 +254,7 @@ public class SimpleProfiler implements Profiler, EventListener {
PrintStream logger = this.logger; PrintStream logger = this.logger;
if (logger != null && !hideIRQ) { if (logger != null && !hideIRQ) {
logger.println("----- Interrupt vector " + vector + " start execution -----"); logger.println("----- Interrupt vector " + vector + " start execution at " + cycles + " -----");
} }
} }
@ -267,7 +267,7 @@ public class SimpleProfiler implements Profiler, EventListener {
PrintStream logger = this.logger; PrintStream logger = this.logger;
if (logger != null && !hideIRQ) { if (logger != null && !hideIRQ) {
logger.println("----- Interrupt vector " + servicedInterrupt + " returned - elapsed: " + logger.println("----- Interrupt vector " + servicedInterrupt + " returned at " + cycles + " - elapsed: " +
(cycles - lastInterruptTime[servicedInterrupt])); (cycles - lastInterruptTime[servicedInterrupt]));
} }
interruptLevel = 0; interruptLevel = 0;