Lines Matching refs:reportSum
195 void SubCommandStat::PrintPerValue(const std::unique_ptr<PerfEvents::ReportSum> &reportSum, const f… in PrintPerValue() argument
199 std::string strEventCount = std::to_string(reportSum->eventCountSum); in PrintPerValue()
207 FormatComments(reportSum, commentStr); in PrintPerValue()
210 … reportSum->threadName.c_str(), reportSum->pid, reportSum->tid, reportSum->cpu, commentStr.c_str(), in PrintPerValue()
211 reportSum->scaleSum * ratio); in PrintPerValue()
214 reportSum->cpu, commentStr.c_str(), reportSum->scaleSum * ratio); in PrintPerValue()
217 reportSum->threadName.c_str(), reportSum->pid, reportSum->tid, commentStr.c_str(), in PrintPerValue()
218 reportSum->scaleSum * ratio); in PrintPerValue()
357 void SubCommandStat::FormatComments(const std::unique_ptr<PerfEvents::ReportSum> &reportSum, std::s… in FormatComments() argument
359 if (reportSum->commentSum == 0) { in FormatComments()
362 if (reportSum->configName == "sw-task-clock") { in FormatComments()
363 commentStr = StringPrintf("%lf cpus used", reportSum->commentSum); in FormatComments()
366 if (reportSum->configName == "hw-cpu-cycles") { in FormatComments()
367 commentStr = StringPrintf("%lf GHz", reportSum->commentSum); in FormatComments()
370 if (reportSum->configName == "hw-instructions") { in FormatComments()
371 commentStr = StringPrintf("%lf cycles per instruction", reportSum->commentSum); in FormatComments()
374 if (reportSum->configName == "hw-branch-misses") { in FormatComments()
375 commentStr = StringPrintf("%lf miss rate", reportSum->commentSum); in FormatComments()
379 if (reportSum->commentSum > 1e9) { in FormatComments()
380 commentStr = StringPrintf("%.3lf G/sec", reportSum->commentSum / 1e9); in FormatComments()
383 if (reportSum->commentSum > 1e6) { in FormatComments()
384 commentStr = StringPrintf("%.3lf M/sec", reportSum->commentSum / 1e6); in FormatComments()
387 if (reportSum->commentSum > 1e3) { in FormatComments()
388 commentStr = StringPrintf("%.3lf K/sec", reportSum->commentSum / 1e3); in FormatComments()
391 commentStr = StringPrintf("%.3lf /sec", reportSum->commentSum); in FormatComments()