time_in_state: support cpufreq fast switching

On devices that support fast cpufreq switching, cpu_freq trace events
are triggered once per cluster rather than once per cpu. By storing
cpu to cluster and cluster to freq mappings, we can obtain the correct
freq for a cpu regardless of whether fast switching is in use.

Test: libtimeinstate_test passes
Change-Id: Ia985ff61193985042223f8ee037ab4294edc2bbf
Signed-off-by: Connor O'Brien <connoro@google.com>
1 file changed
tree: 54342532218f13c22df442f26171ce5d07009d42
  1. test/
  2. Android.bp
  3. time_in_state.c