Comment 0 for bug 1336058

Revision history for this message
Colin Ian King (colin-king) wrote : idlestat assetrts if CPUs are offline at startup

Running idlestat on an ARM device where the CPUs are offlined when very idle idlestat asserts becaise pstate is NULL:

root@ubuntu-phablet:~/idlestat# ./idlestat --trace -f trace.log -t 20
...
...
warning: P-states not supported for CPU1
warning: P-states not supported for CPU2
warning: P-states not supported for CPU3
idlestat: idlestat.c:820: idlestat_load: Assertion `datas->pstates[cpu].pstate != ((void *)0)' failed.
Aborted (core dumped)

This only occurs because on startup the CPUS 1-3 are offline and hence we can't read the pstate info and so this is NULL for these cpus. During the run one or more of these CPUs pop back online, we get a trace event and the code asserts.