Make sure to mark classes/methods as startup.
The GetMinFirstSaveMs() which depends on the system property
`dalvik.vm.ps-min-first-save-ms` should only impact the waiting
time to dump the profile to disk, but it shouldn't impact marking
classes/methods as startup.
With this change, even if `dalvik.vm.ps-min-first-save-ms` is
more than the startup time, we will still mark classes/methods
as startup when startup is completed (either calling
reportFullyDrawn or reaching the 5 seconds). Before this change
the classes/methods were marked as startup only after
`dalvik.vm.ps-min-first-save-ms`.
With this change if `dalvik.vm.ps-min-first-save-ms` was set, then
dumping the profile could take more time than
`dalvik.vm.ps-min-first-save-ms`, since we could wait for JIT
notifications for sometime. This is expected since
`dalvik.vm.ps-min-first-save-ms` is the min time to dump the
first profile not the exact time. Before this change the profile
was dumped right after `dalvik.vm.ps-min-first-save-ms`.
Bug: 319911625
Test: Running the BaselineProfileRuleTest `adb shell am instrument -w -e androidx.benchmark.targetPackageName androidx.benchmark.integration.macrobenchmark.target -e class androidx.benchmark.integration.macrobenchmark.BaselineProfileRuleTest androidx.benchmark.integration.macrobenchmark/androidx.test.runner.AndroidJUnitRunner`
Change-Id: Ic9e727f449fe7feb858de6d2f55460804b774cff
5 files changed