diff options
author | Yabin Cui <yabinc@google.com> | 2024-02-27 10:08:14 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2024-02-27 10:28:35 -0800 |
commit | 436786af3a357db5fd72cdac97903d6d587944a1 (patch) | |
tree | d2ddd7484691bf926bf82e4b040481037bfa4b87 /simpleperf | |
parent | df6bc1eb89f0f3482cb0a43bc60d23ec6599746f (diff) | |
download | extras-436786af3a357db5fd72cdac97903d6d587944a1.tar.gz |
simpleperf: ProtoFileReportLib: remove trace-offcpu mode check
On old Android versions (<= S), a profile may be generated
by simpleperf before aosp/1897156. It can't pass the check,
but actually is still reportable.
Bug: 325484390
Test: run test.py -p TestProtoFileReportLib*
Test: run report_html.py manually
Change-Id: Ide0e844fb835c98b06e773fc362be39e3b6cb142
Diffstat (limited to 'simpleperf')
-rw-r--r-- | simpleperf/scripts/simpleperf_report_lib.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/simpleperf/scripts/simpleperf_report_lib.py b/simpleperf/scripts/simpleperf_report_lib.py index 68881b96..60c0c430 100644 --- a/simpleperf/scripts/simpleperf_report_lib.py +++ b/simpleperf/scripts/simpleperf_report_lib.py @@ -666,12 +666,11 @@ class ProtoFileReportLib: return [] def SetTraceOffCpuMode(self, mode: str): - """ Set trace-offcpu mode. It should be called after SetRecordFile(). The mode should be - one of the modes returned by GetSupportedTraceOffCpuModes(). + """ Set trace-offcpu mode. It should be called after SetRecordFile(). """ - supported_modes = self.GetSupportedTraceOffCpuModes() - _check(mode in supported_modes, f'unsupported trace-offcpu mode: {mode}. ' + - f'Supported modes are {supported_modes} in {self.record_file}') + _check(mode in ['on-cpu', 'off-cpu', 'on-off-cpu', 'mixed-on-off-cpu'], 'invalide mode') + # Don't check if mode is in self.GetSupportedTraceOffCpuModes(). Because the profile may + # be generated by an old simpleperf. self.trace_offcpu_mode = mode def AggregateThreads(self, thread_name_regex_list: List[str]): |