Lines Matching refs:reportSum
196 void SubCommandStat::PrintPerValue(const std::unique_ptr<PerfEvents::ReportSum> &reportSum, const float &ratio,
199 if (reportSum == nullptr) {
203 std::string strEventCount = std::to_string(reportSum->eventCountSum);
212 MakeComments(reportSum, commentStr);
216 reportSum->threadName.c_str(), reportSum->pid, reportSum->tid, reportSum->cpu, commentStr.c_str(),
217 reportSum->scaleSum * ratio);
220 reportSum->cpu, commentStr.c_str(), reportSum->scaleSum * ratio);
223 reportSum->threadName.c_str(), reportSum->pid, reportSum->tid, commentStr.c_str(),
224 reportSum->scaleSum * ratio);
364 void SubCommandStat::MakeComments(const std::unique_ptr<PerfEvents::ReportSum> &reportSum, std::string &commentStr)
366 CHECK_TRUE(reportSum == nullptr || reportSum->commentSum == 0, NO_RETVAL, 0, "");
367 if (reportSum->configName == "sw-task-clock") {
368 commentStr = StringPrintf("%lf cpus used", reportSum->commentSum);
371 if (reportSum->configName == "hw-cpu-cycles") {
372 commentStr = StringPrintf("%lf GHz", reportSum->commentSum);
375 if (reportSum->configName == "hw-instructions") {
376 commentStr = StringPrintf("%lf cycles per instruction", reportSum->commentSum);
379 if (reportSum->configName == "hw-branch-misses") {
380 commentStr = StringPrintf("%lf miss rate", reportSum->commentSum);
384 if (reportSum->commentSum > 1e9) {
385 commentStr = StringPrintf("%.3lf G/sec", reportSum->commentSum / 1e9);
388 if (reportSum->commentSum > 1e6) {
389 commentStr = StringPrintf("%.3lf M/sec", reportSum->commentSum / 1e6);
392 if (reportSum->commentSum > 1e3) {
393 commentStr = StringPrintf("%.3lf K/sec", reportSum->commentSum / 1e3);
396 commentStr = StringPrintf("%.3lf /sec", reportSum->commentSum);