summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization.h
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-02-01 15:50:58 +0800
committer Treehugger Robot <treehugger-gerrit@google.com> 2023-02-06 14:18:01 +0000
commitea2c68d27e583cad5166fced930429f1752fc5aa (patch)
treeb993c54b3ac0b0f83f26e18c5c8f3df0a71ef5c0 /compiler/optimizing/loop_optimization.h
parent6f915c7388797cdaabaf4df2bef3b66413942948 (diff)
Avoid using flock on profiles.
After this change, instead of using a flock to ensure atomicity, the profile is saved as a temporary file and moved to the final location. Unfortunately, we have to keep the old implementation as a fallback because the new implementation requires an SELinux policy rule that allows apps to create profile files, which doesn't exist on old platforms. Bug: 249522285 Test: atest art_standalone_libprofile_tests Test: atest art_standalone_runtime_tests:ProfileCompilationInfoTest Test: - 1. adb shell am start -S -W -c android.intent.category.LAUNCHER -a android.intent.action.MAIN com.google.android.youtube 2. adb shell killall -USR1 com.google.android.youtube 3. adb shell ls /data/misc/profiles/cur/0/com.google.android.youtube/primary.prof -l 4. See the profile saved and the inode changed. Test: - 1. Do the same as above on a T device. 2. See the profile saved and the inode not changed. Change-Id: I02706651c6fbadc013ee595fdb1bc80ad8d27622 Merged-In: I02706651c6fbadc013ee595fdb1bc80ad8d27622 (cherry picked from commit 441b9c57434351c34d418d43c1c5aea78b40a57e)
Diffstat (limited to 'compiler/optimizing/loop_optimization.h')
0 files changed, 0 insertions, 0 deletions