diff options
| author | 2022-09-20 20:51:40 +0100 | |
|---|---|---|
| committer | 2022-09-22 14:04:39 +0000 | |
| commit | 1be593c9fcaf8bc821c50aac5ff45bebe8f44d32 (patch) | |
| tree | e39ed411667e8ab52c775a0cfc2fe02d98fafd8c /compiler/compiler_reflection_test.cc | |
| parent | 78ed10851008831fe43c87f4334ca98be4f97c98 (diff) | |
Improve odrefresh metrics collection.
- Add an explicit switch to OdrMetrics to make the logic more
straightforward, and only enable it when compilation was done or an
error occurred.
- Initialize status to kUnknown instead of kOK so that the status
doesn't show "OK" when an unexpected error occurs.
- Explicitly set status to kOK if compilation succeeds.
- Add a new status: kDalvikCachePermissionDenied, to indicate that
odrefresh Failed to access the dalvik-cache directory due to lack of
permission.
- Set the status in many places where the status is missing.
- Before this change, odrefresh fails on the "kCheck" stage when trying
to clean up the dalvik-cache directory if it doesn't have the
permission to create the directory. This is weird. After this change,
odrefresh will fail on the "kPreparation" stage instead.
Bug: 246534524
Test: atest ArtGtestsTargetChroot:OdrMetricsTest
Test: -
1. Run `odrefresh --compile`.
2. See `<stage_reached>60</stage_reached><status>1</status>`.
Test: -
1. Make the SELinux context of the dalvik-cache directory wrong.
2. Run `odrefresh --compile`.
3. See `<stage_reached>20</stage_reached><status>8</status>`.
Test: -
1. Run `odrefresh --compile`.
2. Kill dex2oat.
3. See `<stage_reached>40</stage_reached><status>4</status>`.
Change-Id: I1a239f7d59668fa763934c074e4bfc5ebcc3ee42
Diffstat (limited to 'compiler/compiler_reflection_test.cc')
0 files changed, 0 insertions, 0 deletions