Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b83af347 authored by Connor O'Brien's avatar Connor O'Brien
Browse files

libtimeinstate: improve error handling in single-UID functions



getUidCpuFreqTimes and getUidConcurrentTimes return all zeros if the
requested UID is not present in the BPF maps on the assumption that
that UID has zero runtime, but this could also indicate that tracking
never started (in which case the map will be empty). Add a check to
distinguish these cases and return an error when tracking is not
working.

Test: load maps (but not progs) from time_in_state.o, enable
track_cpu_times_by_proc_state, run BstatsCpuTimesValidationTest
Bug: 163593704
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>

Change-Id: I1d889cd02e67263c0b031be74f0b963ed80961b0
parent ea830510
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment