class PowerDomainSet
Defined at line 426 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 ()
Defined at line 432 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerDomainSet (const PowerDomainSet & )
Defined at line 433 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
PowerDomainSet & operator= (const PowerDomainSet & )
Defined at line 434 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void PowerDomainSet (PowerDomainSet && )
Defined at line 435 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
PowerDomainSet & operator= (PowerDomainSet && )
Defined at line 436 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void ~PowerDomainSet ()
Defined at line 437 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 440 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 447 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 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 459 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 473 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 483 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 493 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Utilization LookupTotalNormalizedUtilization (uint32_t cpu_num)
Defined at line 503 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 512 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 526 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 529 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 535 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
zx::result<> Add (fbl::RefPtr<PowerDomain> power_domain)
Defined at line 537 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
Friends
void PowerDomainSet (PowerDomainSet & aPowerDomainSet & b)