Skip to content
Commit a3d1f0fa authored by Chris Redpath's avatar Chris Redpath 👓
Browse files

utils/energy_model: Fix loading EM from recent android-4.14 targets



Since commit 9001b8f1a,
"ANDROID: sched: Add support for frequency/power energy model"
android-4.14 has been able to load a frequency-based energy model.

Adding this extended the capacity_state structure in
sched_group_energy with a new frequency member. This is automatically
reflected in the energy model tuples printed in procfs and so Lisa can
no longer load sensible Energy models from any target running
android-4.14 later than the above commit, although the error is not
detected so you do get an EnergyModel object which contains junk
capacity and power values.

We can figure out which kind of kernel we have by reading the number
of capacity states for a cpu and check how many items are in the
cap_state tuples so that we can handle 2 or 3 values per state
transparently.

Signed-off-by: Chris Redpath's avatarChris Redpath <chris.redpath@arm.com>
parent 96e66c34
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment