diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json index 411c38c80..feda3b49c 100644 --- a/libprocessgroup/profiles/task_profiles.json +++ b/libprocessgroup/profiles/task_profiles.json @@ -571,33 +571,6 @@ ] }, - { - "Name": "PerfBoost", - "Actions": [ - { - "Name": "SetClamps", - "Params": - { - "Boost": "50%", - "Clamp": "0" - } - } - ] - }, - { - "Name": "PerfClamp", - "Actions": [ - { - "Name": "SetClamps", - "Params": - { - "Boost": "0", - "Clamp": "30%" - } - } - ] - }, - { "Name": "LowMemoryUsage", "Actions": [ diff --git a/libprocessgroup/task_profiles.cpp b/libprocessgroup/task_profiles.cpp index 110ef5267..cc675b3fe 100644 --- a/libprocessgroup/task_profiles.cpp +++ b/libprocessgroup/task_profiles.cpp @@ -188,18 +188,6 @@ bool ProfileAttribute::GetPathForUID(uid_t uid, std::string* path) const { return true; } -bool SetClampsAction::ExecuteForProcess(uid_t, pid_t) const { - // TODO: add support when kernel supports util_clamp - LOG(WARNING) << "SetClampsAction::ExecuteForProcess is not supported"; - return false; -} - -bool SetClampsAction::ExecuteForTask(int) const { - // TODO: add support when kernel supports util_clamp - LOG(WARNING) << "SetClampsAction::ExecuteForTask is not supported"; - return false; -} - // To avoid issues in sdk_mac build #if defined(__ANDROID__) @@ -958,23 +946,6 @@ bool TaskProfiles::Load(const CgroupMap& cg_map, const std::string& file_name) { } else { LOG(WARNING) << "SetAttribute: unknown attribute: " << attr_name; } - } else if (action_name == "SetClamps") { - std::string boost_value = params_val["Boost"].asString(); - std::string clamp_value = params_val["Clamp"].asString(); - char* end; - unsigned long boost; - - boost = strtoul(boost_value.c_str(), &end, 10); - if (end > boost_value.c_str()) { - unsigned long clamp = strtoul(clamp_value.c_str(), &end, 10); - if (end > clamp_value.c_str()) { - profile->Add(std::make_unique(boost, clamp)); - } else { - LOG(WARNING) << "SetClamps: invalid parameter " << clamp_value; - } - } else { - LOG(WARNING) << "SetClamps: invalid parameter: " << boost_value; - } } else if (action_name == "WriteFile") { std::string attr_filepath = params_val["FilePath"].asString(); std::string attr_procfilepath = params_val["ProcFilePath"].asString(); diff --git a/libprocessgroup/task_profiles.h b/libprocessgroup/task_profiles.h index ea948b58e..d0b50436c 100644 --- a/libprocessgroup/task_profiles.h +++ b/libprocessgroup/task_profiles.h @@ -91,19 +91,6 @@ class ProfileAction { }; // Profile actions -class SetClampsAction : public ProfileAction { - public: - SetClampsAction(int boost, int clamp) noexcept : boost_(boost), clamp_(clamp) {} - - const char* Name() const override { return "SetClamps"; } - bool ExecuteForProcess(uid_t uid, pid_t pid) const override; - bool ExecuteForTask(pid_t tid) const override; - - protected: - int boost_; - int clamp_; -}; - class SetTimerSlackAction : public ProfileAction { public: SetTimerSlackAction(unsigned long slack) noexcept : slack_(slack) {}