dex2oat: Expect boot image profiles for boot image.
The profile loading is currently permissive, so this
does not really matter but we intend to make it more
strict soon.
Also clean up ScratchFile to avoid dex2oat_image_test
error logs related to ScratchFile destruction.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 148067697
Change-Id: I34526ddb0389444d54b9754afbedeb671c7b05a8
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 4509573..0d21de1 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -571,8 +571,9 @@
void CommonRuntimeTestImpl::GenerateProfile(ArrayRef<const std::string> dexes,
File* out_file,
size_t method_frequency,
- size_t type_frequency) {
- ProfileCompilationInfo profile;
+ size_t type_frequency,
+ bool for_boot_image) {
+ ProfileCompilationInfo profile(for_boot_image);
VisitDexes(
dexes,
[&profile](MethodReference ref) {