The header of /proc/uid_time_in_state should match the logic used for
the rest of the file by skipping invalid frequency table entries.
Test: Read /proc/uid_time_in_state and check for invalid frequencies
in header.
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I96888e7b71f4928383ff7080c98c988d5fe1a95c
if (!freqs || freqs == last_freqs)
continue;
last_freqs = freqs;
- for (i = 0; i < freqs->max_state; i++)
+ for (i = 0; i < freqs->max_state; i++) {
+ if (freqs->freq_table[i] ==
+ CPUFREQ_ENTRY_INVALID)
+ continue;
seq_printf(m, " %d", freqs->freq_table[i]);
+ }
}
seq_putc(m, '\n');
}