mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #2961 from lioncash/printf
General: Toss out PRI macro usage
This commit is contained in:
@ -62,7 +62,7 @@ static void Trace(UGeckoInstruction& instCode)
|
||||
std::string fregs = "";
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
fregs += StringFromFormat("f%02d: %08" PRIx64 " %08" PRIx64 " ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]);
|
||||
fregs += StringFromFormat("f%02d: %08llx %08llx ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]);
|
||||
}
|
||||
|
||||
std::string ppc_inst = GekkoDisassembler::Disassemble(instCode.hex, PC);
|
||||
|
@ -364,10 +364,10 @@ void FPURegCache::StoreRegister(size_t preg, const OpArg& newLoc)
|
||||
|
||||
void RegCache::Flush(FlushMode mode, BitSet32 regsToFlush)
|
||||
{
|
||||
for (unsigned int i = 0; i < xregs.size(); i++)
|
||||
for (size_t i = 0; i < xregs.size(); i++)
|
||||
{
|
||||
if (xregs[i].locked)
|
||||
PanicAlert("Someone forgot to unlock X64 reg %u", i);
|
||||
PanicAlert("Someone forgot to unlock X64 reg %zu", i);
|
||||
}
|
||||
|
||||
for (unsigned int i : regsToFlush)
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
if (IsBound(preg))
|
||||
return regs[preg].location.GetSimpleReg();
|
||||
|
||||
PanicAlert("Not so simple - %u", (unsigned int)preg);
|
||||
PanicAlert("Unbounded register - %zu", preg);
|
||||
return Gen::INVALID_REG;
|
||||
}
|
||||
virtual Gen::OpArg GetDefaultLocation(size_t reg) const = 0;
|
||||
|
@ -216,14 +216,14 @@ namespace JitILProfiler
|
||||
std::string filename = StringFromFormat("JitIL_profiling_%d.csv", (int)time(nullptr));
|
||||
File::IOFile file(filename, "w");
|
||||
setvbuf(file.GetHandle(), nullptr, _IOFBF, 1024 * 1024);
|
||||
fprintf(file.GetHandle(), "code hash,total elapsed,number of calls,elapsed per call\n");
|
||||
fprintf(file.GetHandle(), "code hash, total elapsed, number of calls, elapsed per call\n");
|
||||
for (auto& block : blocks)
|
||||
{
|
||||
const u64 codeHash = block.codeHash;
|
||||
const u64 totalElapsed = block.totalElapsed;
|
||||
const u64 numberOfCalls = block.numberOfCalls;
|
||||
const double elapsedPerCall = totalElapsed / (double)numberOfCalls;
|
||||
fprintf(file.GetHandle(), "%016" PRIx64 ",%" PRId64 ",%" PRId64 ",%f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall);
|
||||
fprintf(file.GetHandle(), "%016llx, %lld, %lld, %f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -19,7 +19,7 @@ static void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress)
|
||||
disasm.disasm64(0, code_addr, codePtr, disbuf);
|
||||
PanicAlert("%s\n\n"
|
||||
"Error encountered accessing emulated address %08x.\n"
|
||||
"Culprit instruction: \n%s\nat %#" PRIx64,
|
||||
"Culprit instruction: \n%s\nat %#llx",
|
||||
text.c_str(), emAddress, disbuf, code_addr);
|
||||
return;
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ void IRBuilder::WriteToFile(u64 codeHash)
|
||||
}
|
||||
|
||||
FILE* const file = writer->file.GetHandle();
|
||||
fprintf(file, "\ncode hash:%016" PRIx64 "\n", codeHash);
|
||||
fprintf(file, "\ncode hash:%016llx\n", codeHash);
|
||||
|
||||
const InstLoc lastCurReadPtr = curReadPtr;
|
||||
StartForwardPass();
|
||||
|
@ -124,7 +124,7 @@ namespace JitInterface
|
||||
std::string name = g_symbolDB.GetDescription(stat.addr);
|
||||
double percent = 100.0 * (double)stat.cost / (double)prof_stats.cost_sum;
|
||||
double timePercent = 100.0 * (double)stat.tick_counter / (double)prof_stats.timecost_sum;
|
||||
fprintf(f.GetHandle(), "%08x\t%s\t%" PRIu64 "\t%" PRIu64 "\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
fprintf(f.GetHandle(), "%08x\t%s\t%llu\t%llu\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
stat.addr, name.c_str(), stat.cost,
|
||||
stat.tick_counter, percent, timePercent,
|
||||
(double)stat.tick_counter*1000.0/(double)prof_stats.countsPerSec, stat.block_size);
|
||||
|
@ -161,8 +161,7 @@ void PrintInstructionRunCounts()
|
||||
if (inst.second == 0)
|
||||
break;
|
||||
|
||||
DEBUG_LOG(POWERPC, "%s : %" PRIu64, inst.first, inst.second);
|
||||
//PanicAlert("%s : %llu", inst.first, inst.second);
|
||||
DEBUG_LOG(POWERPC, "%s : %llu", inst.first, inst.second);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +175,7 @@ void LogCompiledInstructions()
|
||||
GekkoOPInfo *pInst = m_allInstructions[i];
|
||||
if (pInst->compileCount > 0)
|
||||
{
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\t%08x\n", pInst->opname,
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%lld\t%08x\n", pInst->opname,
|
||||
pInst->compileCount, pInst->runCount, pInst->lastUse);
|
||||
}
|
||||
}
|
||||
@ -187,7 +186,7 @@ void LogCompiledInstructions()
|
||||
GekkoOPInfo *pInst = m_allInstructions[i];
|
||||
if (pInst->compileCount == 0)
|
||||
{
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\n", pInst->opname,
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%lld\n", pInst->opname,
|
||||
pInst->compileCount, pInst->runCount);
|
||||
}
|
||||
}
|
||||
|
@ -96,8 +96,7 @@ void SignatureDB::List()
|
||||
{
|
||||
INFO_LOG(OSHLE, "%s : %i bytes, hash = %08x", entry.second.name.c_str(), entry.second.size, entry.first);
|
||||
}
|
||||
INFO_LOG(OSHLE, "%lu functions known in current database.",
|
||||
(unsigned long)database.size());
|
||||
INFO_LOG(OSHLE, "%zu functions known in current database.", database.size());
|
||||
}
|
||||
|
||||
void SignatureDB::Clear()
|
||||
|
Reference in New Issue
Block a user