simpleperf: support hotplug events in stat cmd.
1. When a cpu is down, read counters from event files on that cpu,
then close those events files.
2. When a cpu is up, open event files on that cpu.
3. Remove check of time_running != 0 in cmd_stat.cpp, because
1) We no longer need the check as we no longer open event file
for each cpu for non system wide profiling.
2) The kernel has a bug that can make time_running == 0 if
a cpu is down while profiling. But the counter value is
still valid, and shouldn't be ignored.
Bug: http://b/29245608
Test: run simpleperf and make cpu offline and online.
Change-Id: I3e7bec139c5f50bea1311c95bb154a5b290a72ea
3 files changed