diff --git a/src/power_policy/imx8_per_process.hpp b/src/power_policy/imx8_per_process.hpp index 33917420..d3fe8faf 100644 --- a/src/power_policy/imx8_per_process.hpp +++ b/src/power_policy/imx8_per_process.hpp @@ -58,10 +58,12 @@ class PowerPolicy_Imx8_PerProcess : public PmPowerPolicy locking_processes[0]->requested_frequencies[i] != requested_freq) { throw std::runtime_error( fmt::format("Scheduled processes require different frequencies on the CPU " - "cluster '#{}': '{}', '{}'", + "cluster '#{}': '{}', '{}' (process 1: '{}', process 2: '{}')", i, locking_processes[0]->requested_frequencies[i].value(), - requested_freq.value())); + requested_freq.value(), + locking_processes[0]->argv, + proc.argv)); } locking_processes.push_back(&proc); policy.write_frequency(requested_freq.value()); @@ -69,7 +71,8 @@ class PowerPolicy_Imx8_PerProcess : public PmPowerPolicy } } - void on_process_end(Process &process) override { + void on_process_end(Process &process) override + { // remove the process from the list of locking processes for (auto &lp : locking_process_for_policy) { for (auto it = lp.begin(); it != lp.end(); it++) { diff --git a/src/process.cpp b/src/process.cpp index 06fe51b7..a4cba5ca 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -28,6 +28,7 @@ Process::Process(ev::loop_ref loop, bool has_initialization) : part(partition) , requested_frequencies{ a53_freq, a72_freq } + , argv(std::move(argv)) // budget +- (jitter / 2) , jitter_distribution_ms(-budget_jitter.count() / 2, budget_jitter.count() - budget_jitter.count() / 2) @@ -38,7 +39,6 @@ Process::Process(ev::loop_ref loop, name, std::bind(&Process::populated_cb, this, _1)) // NOLINT(modernize-avoid-bind) , cgf(partition.cgf, name) - , argv(std::move(argv)) , working_dir(std::move(working_dir)) , budget(budget) , actual_budget(budget) diff --git a/src/process.hpp b/src/process.hpp index 05c8eeff..18e643b3 100644 --- a/src/process.hpp +++ b/src/process.hpp @@ -4,14 +4,14 @@ #include #include #include +#include #include #include -#include #include "cgroup.hpp" +#include "cpufreq_policy.hpp" #include "evfd.hpp" #include "timerfd.hpp" -#include "cpufreq_policy.hpp" class Partition; @@ -81,6 +81,7 @@ class Process Partition ∂ const std::array, 2> requested_frequencies; + const std::string argv; private: std::uniform_int_distribution jitter_distribution_ms; @@ -93,7 +94,6 @@ class Process CgroupEvents cge; CgroupFreezer cgf; - const std::string argv; const std::optional working_dir; const std::chrono::milliseconds budget; std::chrono::milliseconds actual_budget;