mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Add run count to the JIT profile information
This commit is contained in:
@ -118,14 +118,14 @@ namespace JitInterface
|
||||
PanicAlert("Failed to open %s", filename.c_str());
|
||||
return;
|
||||
}
|
||||
fprintf(f.GetHandle(), "origAddr\tblkName\tcost\ttimeCost\tpercent\ttimePercent\tOvAllinBlkTime(ms)\tblkCodeSize\n");
|
||||
fprintf(f.GetHandle(), "origAddr\tblkName\trunCount\tcost\ttimeCost\tpercent\ttimePercent\tOvAllinBlkTime(ms)\tblkCodeSize\n");
|
||||
for (auto& stat : prof_stats.block_stats)
|
||||
{
|
||||
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%llu\t%llu\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
stat.addr, name.c_str(), stat.cost,
|
||||
fprintf(f.GetHandle(), "%08x\t%s\t%llu\t%llu\t%llu\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
stat.addr, name.c_str(), stat.run_count, stat.cost,
|
||||
stat.tick_counter, percent, timePercent,
|
||||
(double)stat.tick_counter*1000.0/(double)prof_stats.countsPerSec, stat.block_size);
|
||||
}
|
||||
@ -156,7 +156,8 @@ namespace JitInterface
|
||||
// Todo: tweak.
|
||||
if (block->runCount >= 1)
|
||||
prof_stats->block_stats.emplace_back(i, block->originalAddress,
|
||||
cost, timecost, block->codeSize);
|
||||
cost, timecost,
|
||||
block->runCount, block->codeSize);
|
||||
prof_stats->cost_sum += cost;
|
||||
prof_stats->timecost_sum += timecost;
|
||||
}
|
||||
|
Reference in New Issue
Block a user