simpleperf: support trace offcpu modes in report lib.
Currently, if a recording file is generated with --trace-offcpu,
we report both on-cpu and off-cpu samples. But with context switch
records, we can calculate accurate off-cpu period. So this CL adds
TraceOffcpuMode, which supports three modes:
1. on-cpu mode: report on-cpu samples with events happened on cpu
2. off-cpu mode: report off-cpu samples with time spent off cpu
3. on-off-cpu mode: report both on-cpu and off-cpu samples as before
Bug: 38383695
Test: test manually, tests will be added with script change later.
Change-Id: I179bb3a1264f5a8b96db56b214739fb150cdeee6
1 file changed