diff options
| author | 2023-05-15 12:52:35 +0100 | |
|---|---|---|
| committer | 2023-05-22 00:35:55 +0100 | |
| commit | 33ec06277348ecdc0036b5234e05e9dd2a385196 (patch) | |
| tree | c0dfa33fb2392adc4d9657393cd790253adc3aff /compiler/optimizing/execution_subgraph_test.cc | |
| parent | d5ee3df7b05b991413bea349c3d3f41263684649 (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
(cherry picked from https://android-review.googlesource.com/q/commit:a476f1aed79b4d714bb4d71a777bcb639c8a23eb)
Merged-In: I01ef27791c2625f0cbd242fcaa8056df4b7d24d0
Change-Id: I01ef27791c2625f0cbd242fcaa8056df4b7d24d0
Diffstat (limited to 'compiler/optimizing/execution_subgraph_test.cc')
0 files changed, 0 insertions, 0 deletions