Home
last modified time | relevance | path

Searched refs:hint_type (Results 1 – 9 of 9) sorted by relevance

/hardware/google/pixel/power-libperfmgr/libperfmgr/
DHintManager.cc51 bool HintManager::ValidateHint(const std::string& hint_type) const { in ValidateHint()
56 return IsHintSupported(hint_type); in ValidateHint()
59 bool HintManager::IsHintSupported(const std::string& hint_type) const { in IsHintSupported()
60 if (actions_.find(hint_type) == actions_.end()) { in IsHintSupported()
61 LOG(DEBUG) << "Hint type not present in actions: " << hint_type; in IsHintSupported()
67 bool HintManager::IsHintEnabled(const std::string &hint_type) const { in IsHintEnabled()
68 std::lock_guard<std::mutex> lock(actions_.at(hint_type).hint_lock); in IsHintEnabled()
69 return actions_.at(hint_type).mask_requesters.empty(); in IsHintEnabled()
94 void HintManager::DoHintStatus(const std::string &hint_type, std::chrono::milliseconds timeout_ms) { in DoHintStatus() argument
95 std::lock_guard<std::mutex> lock(actions_.at(hint_type).hint_lock); in DoHintStatus()
[all …]
DRequestGroup.cc29 bool RequestGroup::AddRequest(const std::string& hint_type, ReqTime end_time) { in AddRequest() argument
30 if (request_map_.find(hint_type) == request_map_.end()) { in AddRequest()
31 request_map_.emplace(hint_type, end_time); in AddRequest()
34 if (request_map_[hint_type] < end_time) { in AddRequest()
35 request_map_[hint_type] = end_time; in AddRequest()
41 bool RequestGroup::RemoveRequest(const std::string& hint_type) { in RemoveRequest() argument
42 return request_map_.erase(hint_type); in RemoveRequest()
DNodeLooperThread.cc31 const std::string& hint_type) { in Request() argument
37 LOG(WARNING) << "NodeLooperThread is not running, request " << hint_type; in Request()
65 ret = nodes_[a.node_index]->AddRequest(a.value_index, hint_type, in Request()
75 const std::string& hint_type) { in Cancel() argument
81 LOG(WARNING) << "NodeLooperThread is not running, cancel " << hint_type; in Cancel()
92 nodes_[a.node_index]->RemoveRequest(hint_type); in Cancel()
DNode.cc39 bool Node::AddRequest(std::size_t value_index, const std::string& hint_type, in AddRequest() argument
47 req_sorted_[value_index].AddRequest(hint_type, end_time); in AddRequest()
51 bool Node::RemoveRequest(const std::string& hint_type) { in RemoveRequest() argument
55 ret = value.RemoveRequest(hint_type) || ret; in RemoveRequest()
/hardware/google/pixel/power-libperfmgr/aidl/tests/mocks/
DMockHintManager.h31 MOCK_METHOD(bool, DoHint, (const std::string &hint_type), ());
33 (const std::string &hint_type, std::chrono::milliseconds timeout_ms_override), ());
34 MOCK_METHOD(bool, EndHint, (const std::string &hint_type), ());
35 MOCK_METHOD(bool, IsHintSupported, (const std::string &hint_type), (const));
36 MOCK_METHOD(bool, IsHintEnabled, (const std::string &hint_type), (const));
41 MOCK_METHOD(::android::perfmgr::HintStats, GetHintStats, (const std::string &hint_type),
/hardware/google/pixel/power-libperfmgr/libperfmgr/include/perfmgr/
DHintManager.h109 bool DoHint(const std::string &hint_type);
114 bool DoHint(const std::string &hint_type, std::chrono::milliseconds timeout_ms_override);
118 bool EndHint(const std::string &hint_type);
121 bool IsHintSupported(const std::string &hint_type) const;
124 bool IsHintEnabled(const std::string &hint_type) const;
144 HintStats GetHintStats(const std::string &hint_type) const;
167 bool ValidateHint(const std::string& hint_type) const;
169 void DoHintStatus(const std::string &hint_type, std::chrono::milliseconds timeout_ms);
171 void EndHintStatus(const std::string &hint_type);
173 void DoHintAction(const std::string &hint_type);
[all …]
DRequestGroup.h51 bool AddRequest(const std::string& hint_type, ReqTime end_time);
55 bool RemoveRequest(const std::string& hint_type);
DNode.h52 bool AddRequest(std::size_t value_index, const std::string& hint_type,
56 bool RemoveRequest(const std::string& hint_type);
DNodeLooperThread.h71 const std::string& hint_type);
76 const std::string& hint_type);