From f584c8863466660e139add7874e9bc75f213958b Mon Sep 17 00:00:00 2001 From: "Dementiev, Roman" Date: Tue, 3 Dec 2024 19:56:12 +0100 Subject: [PATCH] pcm: add csv output for system power Change-Id: I7a8ad160746f1b84562a153f2fb76b30a9aa8277 --- src/pcm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pcm.cpp b/src/pcm.cpp index c57d9a3a..fb1d8458 100644 --- a/src/pcm.cpp +++ b/src/pcm.cpp @@ -766,6 +766,8 @@ void print_csv_header(PCM * m, print_csv_header_helper(header, 2); if (m->dramEnergyMetricsAvailable()) print_csv_header_helper(header); + if (m->systemEnergyMetricAvailable()) + print_csv_header_helper(header); if (m->LLCReadMissLatencyMetricsAvailable()) print_csv_header_helper(header); if (m->uncoreFrequencyMetricAvailable()) @@ -946,6 +948,8 @@ void print_csv_header(PCM * m, } if (m->dramEnergyMetricsAvailable()) cout << "DRAM Energy (Joules),"; + if (m->systemEnergyMetricAvailable()) + cout << "SYSTEM Energy (Joules),"; if (m->LLCReadMissLatencyMetricsAvailable()) cout << "LLCRDMISSLAT (ns),"; if (m->uncoreFrequencyMetricAvailable()) @@ -1200,6 +1204,8 @@ void print_csv(PCM * m, cout << getConsumedJoules(0, sstate1, sstate2) << "," << getConsumedJoules(1, sstate1, sstate2) << ","; if (m->dramEnergyMetricsAvailable()) cout << getDRAMConsumedJoules(sstate1, sstate2) << ","; + if (m->systemEnergyMetricAvailable()) + cout << getSystemConsumedJoules(sstate1, sstate2) << ","; if (m->LLCReadMissLatencyMetricsAvailable()) cout << getLLCReadMissLatency(sstate1, sstate2) << ","; if (m->uncoreFrequencyMetricAvailable())