class PowerDomainSet
Defined at line 401 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Maintains an array of ref pointers to the power domains in the system. This is used for both the
power domain registry storage and processor-local caches of the power domain set. Processor-local
caches avoid cross-processor and central lock contention when consulting a snapshot of the system
power domains during sensitive scheduling operations.
Public Members
static const size_t kMaxPowerDomains
Public Methods
void PowerDomainSet ()
Empty by default.
Defined at line 408 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void ~PowerDomainSet ()
Defined at line 409 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
PowerDomainSet CreateForTest (const fbl::RefPtr<PowerDomain> & domain)
Creates a PowerDomainSet with the given PowerDomain as its only entry for testing.
Defined at line 412 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
PowerDomain * FindByDomainId (uint32_t domain_id)
Returns a borrowed pointer to the power domain with the given id, or nullptr if there isn't
one. Returns a raw pointer to avoid unnecessary ref count changes in contexts where the set is
guaranteed not to change and maintain the lifetime of its power domain elements.
Defined at line 419 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
PowerDomain * FindByCpuNum (uint32_t cpu_num)
Returns a borrowed pointer to the power domain for the given CPU id, or nullptr is there isn't
one. Returns a raw pointer to avoid unnecessary ref count changes in contexts where the set is
guaranteed not to change and maintain the lifetime of its power domain elements.
Defined at line 431 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t LookupActivePowerCoefficient (uint32_t cpu_num, ProcessingRate processing_rate)
Looks up the active power coefficient for the given CPU operating at the given processing rate.
Returns 0 if there is no power domain for the given CPU or if there is no active power level
that lower bounds the given processing rate.
Defined at line 446 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t LookupPowerCost (uint32_t cpu_num, ProcessingRate processing_rate)
Defined at line 456 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::optional<uint8_t> LookupPowerLevel (uint32_t cpu_num, ProcessingRate processing_rate)
Defined at line 466 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Utilization LookupTotalNormalizedUtilization (uint32_t cpu_num)
Defined at line 476 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
template <typename Visitor>
void Visit (Visitor && visitor)
Visits each non-empty power domain element with the given callable.
Defined at line 485 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
const ArrayType & domains ()
Returns a const reference to the underlying power domain array.
Defined at line 499 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
size_t count ()
Returns the count of non-empty array elements.
Defined at line 502 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
bool is_empty ()
Returns true if all of the array elements are empty.
Defined at line 508 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Friends
class PowerDomainRegistry
void PowerDomainSet (PowerDomainSet & aPowerDomainSet & b)