summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-15 12:52:35 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-05-17 17:32:48 +0000
commita476f1aed79b4d714bb4d71a777bcb639c8a23eb (patch)
tree78d1d6dd54ea23051de0b0e336d789174488b2a4 /compiler/optimizing/optimizing_compiler.cc
parent27ceaaa97324c34ad83f7092bbcc9d268ea6763b (diff)
Add O_CREAT to ProfileCompilationInfo::SaveFallback.
Before this change, ProfileCompilationInfo::SaveFallback relies on ProfileSaver::ProcessProfilingInfo to create an empty file beforehand if the file didn't exist. This doesn't work if SaveFallback is called by other callers (e.g., CopyAndUpdateProfileKey), and there can be a race. After this change, ProcessProfilingInfo no longer creates an empty file, and SaveFallback creates the file itself. This change also avoids unnecessary file creation when saving is not needed. Bug: 275378665 Bug: 282191456 Test: art/test.py -b --host -r -t 595-profile-saving Test: art/test.py --target -r -t 595-profile-saving (chroot on U device) Test: art/test.py --target -r -t 595-profile-saving (chroot on T device) Test: profman --copy-and-update-profile-key --profile-file=YouTube.dm --output-profile-type=app --apk=YouTube.apk --dex-location=base.apk --reference-profile-file=/tmp/1.prof Change-Id: I01ef27791c2625f0cbd242fcaa8056df4b7d24d0
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
0 files changed, 0 insertions, 0 deletions