Remove oat_data_begin checks from OatFile.
Make it a CHECK() directly in the ImageSpace instead. This
check was a rather weird way to prevent the use of dlopen()
for boot image on host because it would load the oat file
at the wrong address. This is now done by refusing to use
dlopen() on host when we have a memory `reservation`.
Also clean up affected files for bugprone-argument-comment.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 77856493
Change-Id: I6f0f9d5a0542574017d98acc2f4f30a585b483f4
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index b945b2a..d153459 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -137,14 +137,13 @@
ASSERT_TRUE(success) << error_msg << std::endl << output_;
// Verify the odex file was generated as expected.
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
@@ -157,14 +156,13 @@
if (!test_accepts_odex_file_on_failure) {
// Verify there's no loadable odex file.
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file.get() == nullptr);
}
@@ -325,26 +323,26 @@
};
TEST_F(Dex2oatSwapTest, DoNotUseSwapDefaultSingleSmall) {
- RunTest(false /* use_fd */, false /* expect_use */);
- RunTest(true /* use_fd */, false /* expect_use */);
+ RunTest(/*use_fd=*/ false, /*expect_use=*/ false);
+ RunTest(/*use_fd=*/ true, /*expect_use=*/ false);
}
TEST_F(Dex2oatSwapTest, DoNotUseSwapSingle) {
- RunTest(false /* use_fd */, false /* expect_use */, { "--swap-dex-size-threshold=0" });
- RunTest(true /* use_fd */, false /* expect_use */, { "--swap-dex-size-threshold=0" });
+ RunTest(/*use_fd=*/ false, /*expect_use=*/ false, { "--swap-dex-size-threshold=0" });
+ RunTest(/*use_fd=*/ true, /*expect_use=*/ false, { "--swap-dex-size-threshold=0" });
}
TEST_F(Dex2oatSwapTest, DoNotUseSwapSmall) {
- RunTest(false /* use_fd */, false /* expect_use */, { "--swap-dex-count-threshold=0" });
- RunTest(true /* use_fd */, false /* expect_use */, { "--swap-dex-count-threshold=0" });
+ RunTest(/*use_fd=*/ false, /*expect_use=*/ false, { "--swap-dex-count-threshold=0" });
+ RunTest(/*use_fd=*/ true, /*expect_use=*/ false, { "--swap-dex-count-threshold=0" });
}
TEST_F(Dex2oatSwapTest, DoUseSwapSingleSmall) {
- RunTest(false /* use_fd */,
- true /* expect_use */,
+ RunTest(/*use_fd=*/ false,
+ /*expect_use=*/ true,
{ "--swap-dex-size-threshold=0", "--swap-dex-count-threshold=0" });
- RunTest(true /* use_fd */,
- true /* expect_use */,
+ RunTest(/*use_fd=*/ true,
+ /*expect_use=*/ true,
{ "--swap-dex-size-threshold=0", "--swap-dex-count-threshold=0" });
}
@@ -370,7 +368,7 @@
void GrabResult1() {
if (!kIsTargetBuild) {
native_alloc_1_ = ParseNativeAlloc();
- swap_1_ = ParseSwap(false /* expected */);
+ swap_1_ = ParseSwap(/*expected=*/ false);
} else {
native_alloc_1_ = std::numeric_limits<size_t>::max();
swap_1_ = 0;
@@ -380,7 +378,7 @@
void GrabResult2() {
if (!kIsTargetBuild) {
native_alloc_2_ = ParseNativeAlloc();
- swap_2_ = ParseSwap(true /* expected */);
+ swap_2_ = ParseSwap(/*expected=*/ true);
} else {
native_alloc_2_ = 0;
swap_2_ = std::numeric_limits<size_t>::max();
@@ -450,15 +448,15 @@
// investigate (b/29259363).
TEST_DISABLED_FOR_X86();
- RunTest(false /* use_fd */,
- false /* expect_use */);
+ RunTest(/*use_fd=*/ false,
+ /*expect_use=*/ false);
GrabResult1();
std::string output_1 = output_;
output_ = "";
- RunTest(false /* use_fd */,
- true /* expect_use */,
+ RunTest(/*use_fd=*/ false,
+ /*expect_use=*/ true,
{ "--swap-dex-size-threshold=0", "--swap-dex-count-threshold=0" });
GrabResult2();
std::string output_2 = output_;
@@ -514,14 +512,13 @@
}
// Host/target independent checks.
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
EXPECT_GT(app_image_file.length(), 0u);
@@ -663,7 +660,7 @@
std::vector<std::unique_ptr<const DexFile>> dex_files;
const ArtDexFileLoader dex_file_loader;
ASSERT_TRUE(dex_file_loader.Open(
- location, location, /* verify */ true, /* verify_checksum */ true, &error_msg, &dex_files));
+ location, location, /*verify=*/ true, /*verify_checksum=*/ true, &error_msg, &dex_files));
EXPECT_EQ(dex_files.size(), 1U);
std::unique_ptr<const DexFile>& dex_file = dex_files[0];
GenerateProfile(profile_location,
@@ -715,8 +712,8 @@
CompileProfileOdex(dex_location,
odex_location,
app_image_file,
- /* use_fd */ false,
- /* num_profile_classes */ 0);
+ /*use_fd=*/ false,
+ /*num_profile_classes=*/ 0);
CheckValidity();
ASSERT_TRUE(success_);
// Don't check the result since CheckResult relies on the class being in the profile.
@@ -728,8 +725,8 @@
CompileProfileOdex(dex_location,
odex_location,
app_image_file,
- /* use_fd */ false,
- /* num_profile_classes */ 1);
+ /*use_fd=*/ false,
+ /*num_profile_classes=*/ 1);
CheckValidity();
ASSERT_TRUE(success_);
CheckResult(dex_location, odex_location, app_image_file);
@@ -757,8 +754,8 @@
CompileProfileOdex(dex_location,
odex_location,
app_image_file_name,
- /* use_fd */ true,
- /* num_profile_classes */ 1,
+ /*use_fd=*/ true,
+ /*num_profile_classes=*/ 1,
{ input_vdex, output_vdex });
EXPECT_GT(vdex_file1->GetLength(), 0u);
}
@@ -769,10 +766,10 @@
CompileProfileOdex(dex_location,
odex_location,
app_image_file_name,
- /* use_fd */ true,
- /* num_profile_classes */ 1,
+ /*use_fd=*/ true,
+ /*num_profile_classes=*/ 1,
{ input_vdex, output_vdex },
- /* expect_success */ true);
+ /*expect_success=*/ true);
EXPECT_GT(vdex_file2.GetFile()->GetLength(), 0u);
}
ASSERT_EQ(vdex_file1->FlushCloseOrErase(), 0) << "Could not flush and close vdex file";
@@ -785,14 +782,13 @@
const std::string& app_image_file_name) {
// Host/target independent checks.
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
@@ -800,7 +796,7 @@
std::vector<std::unique_ptr<const DexFile>> dex_files;
const ArtDexFileLoader dex_file_loader;
ASSERT_TRUE(dex_file_loader.Open(
- location, location, /* verify */ true, /* verify_checksum */ true, &error_msg, &dex_files));
+ location, location, /*verify=*/ true, /*verify_checksum=*/ true, &error_msg, &dex_files));
EXPECT_EQ(dex_files.size(), 1U);
std::unique_ptr<const DexFile>& old_dex_file = dex_files[0];
@@ -853,11 +849,11 @@
};
TEST_F(Dex2oatLayoutTest, TestLayout) {
- RunTest(/* app-image */ false);
+ RunTest(/*app_image=*/ false);
}
TEST_F(Dex2oatLayoutTest, TestLayoutAppImage) {
- RunTest(/* app-image */ true);
+ RunTest(/*app_image=*/ true);
}
TEST_F(Dex2oatLayoutTest, TestVdexLayout) {
@@ -882,8 +878,8 @@
odex_location,
CompilerFilter::kQuicken,
{ input_vdex, output_vdex },
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
EXPECT_GT(vdex_file1->GetLength(), 0u);
}
// Unquicken by running the verify compiler filter on the vdex file.
@@ -894,8 +890,8 @@
odex_location,
CompilerFilter::kVerify,
{ input_vdex, output_vdex, kDisableCompactDex },
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
}
ASSERT_EQ(vdex_file1->FlushCloseOrErase(), 0) << "Could not flush and close vdex file";
CheckResult(dex_location, odex_location);
@@ -923,8 +919,8 @@
odex_location,
CompilerFilter::kQuicken,
{ input_vdex, output_vdex, "--compact-dex-level=fast"},
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
EXPECT_GT(vdex_file1->GetLength(), 0u);
}
@@ -936,8 +932,8 @@
odex_location2,
CompilerFilter::kVerify,
{ input_vdex, output_vdex, "--compact-dex-level=none"},
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
}
ASSERT_EQ(vdex_file1->FlushCloseOrErase(), 0) << "Could not flush and close vdex file";
ASSERT_EQ(vdex_file2->FlushCloseOrErase(), 0) << "Could not flush and close vdex file";
@@ -947,14 +943,13 @@
void CheckResult(const std::string& dex_location, const std::string& odex_location) {
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file.get() != nullptr) << error_msg;
ASSERT_GE(odex_file->GetOatDexFiles().size(), 1u);
@@ -1327,14 +1322,13 @@
EXPECT_EQ(res, 0);
// Open our generated oat file.
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
oat_filename.c_str(),
oat_filename.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex->GetLocation().c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1437,14 +1431,13 @@
{"--compact-dex-level=fast"});
EXPECT_EQ(res, 0);
// Open our generated oat file.
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
oat_filename.c_str(),
oat_filename.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1682,14 +1675,13 @@
});
// Open our generated oat file.
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
oat_filename.c_str(),
oat_filename.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
temp_dex.GetFilename().c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1760,14 +1752,13 @@
{ "--compilation-reason=install" },
true);
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
ASSERT_STREQ("install", odex_file->GetCompilationReason());
@@ -1786,14 +1777,13 @@
{},
true);
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
ASSERT_EQ(nullptr, odex_file->GetCompilationReason());
@@ -1817,21 +1807,20 @@
{
// Check the vdex doesn't have dex.
std::unique_ptr<VdexFile> vdex(VdexFile::Open(vdex_location.c_str(),
- /*writable*/ false,
- /*low_4gb*/ false,
- /*unquicken*/ false,
+ /*writable=*/ false,
+ /*low_4gb=*/ false,
+ /*unquicken=*/ false,
&error_msg));
ASSERT_TRUE(vdex != nullptr);
EXPECT_FALSE(vdex->HasDexSection()) << output_;
}
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
dex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr) << dex_location;
std::vector<const OatDexFile*> oat_dex_files = odex_file->GetOatDexFiles();
@@ -1930,8 +1919,8 @@
// Disable cdex since we want to compare against the original dex file
// after unquickening.
{ input_vdex, output_vdex, kDisableCompactDex },
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
}
// Unquicken by running the verify compiler filter on the vdex file and verify it matches.
std::string odex_location2 = GetOdexDir() + "/unquickened.odex";
@@ -1945,8 +1934,8 @@
CompilerFilter::kVerify,
// Disable cdex to avoid needing to write out the shared section.
{ input_vdex, output_vdex, kDisableCompactDex },
- /* expect_success */ true,
- /* use_fd */ true);
+ /*expect_success=*/ true,
+ /*use_fd=*/ true);
}
ASSERT_EQ(vdex_unquickened->Flush(), 0) << "Could not flush and close vdex file";
ASSERT_TRUE(success_);
@@ -2063,14 +2052,13 @@
[](const OatFile&) {});
// Open our generated oat file.
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
odex_location.c_str(),
- /* reservation */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
ImageHeader header = {};
@@ -2114,19 +2102,18 @@
{ "--app-image-file=" + app_image_location,
"--resolve-startup-const-strings=true",
"--profile-file=" + profile_file.GetFilename()},
- /* expect_success= */ true,
- /* use_fd= */ false,
+ /*expect_success=*/ true,
+ /*use_fd=*/ false,
[](const OatFile&) {});
// Open our generated oat file.
std::string error_msg;
- std::unique_ptr<OatFile> odex_file(OatFile::Open(/* zip_fd= */ -1,
+ std::unique_ptr<OatFile> odex_file(OatFile::Open(/*zip_fd=*/ -1,
odex_location.c_str(),
odex_location.c_str(),
- /* requested_base= */ nullptr,
- /* executable= */ false,
- /* low_4gb= */ false,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
odex_location.c_str(),
- /* reservation= */ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(odex_file != nullptr);
// Check the strings in the app image intern table only contain the "startup" strigs.
diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc
index f764b42..7382208 100644
--- a/dex2oat/linker/oat_writer_test.cc
+++ b/dex2oat/linker/oat_writer_test.cc
@@ -87,7 +87,7 @@
void SetupCompiler(const std::vector<std::string>& compiler_options) {
std::string error_msg;
if (!compiler_options_->ParseCompilerOptions(compiler_options,
- false /* ignore_unrecognized */,
+ /*ignore_unrecognized=*/ false,
&error_msg)) {
LOG(FATAL) << error_msg;
UNREACHABLE();
@@ -176,7 +176,7 @@
oat_rodata,
&key_value_store,
verify,
- /* update_input_vdex */ false,
+ /*update_input_vdex=*/ false,
CopyOption::kOnlyIfCompressed,
&opened_dex_files_maps,
&opened_dex_files)) {
@@ -236,7 +236,7 @@
}
if (!oat_writer.WriteHeader(elf_writer->GetStream(),
- /* image_file_location_oat_checksum */ 42U)) {
+ /*image_file_location_oat_checksum=*/ 42U)) {
return false;
}
@@ -404,14 +404,13 @@
if (kCompile) { // OatWriter strips the code, regenerate to compare
compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), &timings);
}
- std::unique_ptr<OatFile> oat_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> oat_file(OatFile::Open(/*zip_fd=*/ -1,
tmp_oat.GetFilename(),
tmp_oat.GetFilename(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ true,
- /* abs_dex_location */ nullptr,
- /* reservation */ nullptr,
+ /*executable=*/ false,
+ /*low_4gb=*/ true,
+ /*abs_dex_location=*/ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(oat_file.get() != nullptr) << error_msg;
const OatHeader& oat_header = oat_file->GetOatHeader();
@@ -522,18 +521,17 @@
tmp_oat.GetFile(),
dex_files,
key_value_store,
- /* verify */ false);
+ /*verify=*/ false);
ASSERT_TRUE(success);
std::string error_msg;
- std::unique_ptr<OatFile> oat_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> oat_file(OatFile::Open(/*zip_fd=*/ -1,
tmp_oat.GetFilename(),
tmp_oat.GetFilename(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
- /* abs_dex_location */ nullptr,
- /* reservation */ nullptr,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
+ /*abs_dex_location=*/ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(oat_file != nullptr);
EXPECT_LT(static_cast<size_t>(oat_file->Size()),
@@ -604,14 +602,13 @@
ASSERT_TRUE(success);
std::string error_msg;
- std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/*zip_fd=*/ -1,
tmp_oat.GetFilename(),
tmp_oat.GetFilename(),
- /* requested_base */ nullptr,
- /* executable */ false,
+ /*executable=*/ false,
low_4gb,
- /* abs_dex_location */ nullptr,
- /* reservation */ nullptr,
+ /*abs_dex_location=*/ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(opened_oat_file != nullptr) << error_msg;
if (low_4gb) {
@@ -727,7 +724,7 @@
input_filenames,
key_value_store,
verify,
- /* profile_compilation_info */ nullptr);
+ /*profile_compilation_info=*/ nullptr);
if (verify) {
ASSERT_FALSE(success);
@@ -735,14 +732,13 @@
ASSERT_TRUE(success);
std::string error_msg;
- std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/*zip_fd=*/ -1,
tmp_oat.GetFilename(),
tmp_oat.GetFilename(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
- /* abs_dex_location */ nullptr,
- /* reservation */ nullptr,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
+ /*abs_dex_location=*/ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(opened_oat_file != nullptr) << error_msg;
ASSERT_EQ(2u, opened_oat_file->GetOatDexFiles().size());
@@ -769,7 +765,7 @@
{
// Test using the AddZipDexFileSource() interface with the zip file handle.
- File zip_fd(dup(zip_file.GetFd()), /* check_usage */ false);
+ File zip_fd(dup(zip_file.GetFd()), /*check_usage=*/ false);
ASSERT_NE(-1, zip_fd.Fd());
ScratchFile tmp_base, tmp_oat(tmp_base, ".oat"), tmp_vdex(tmp_base, ".vdex");
@@ -785,14 +781,13 @@
ASSERT_TRUE(success);
std::string error_msg;
- std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/* zip_fd */ -1,
+ std::unique_ptr<OatFile> opened_oat_file(OatFile::Open(/*zip_fd=*/ -1,
tmp_oat.GetFilename(),
tmp_oat.GetFilename(),
- /* requested_base */ nullptr,
- /* executable */ false,
- /* low_4gb */ false,
- /* abs_dex_location */ nullptr,
- /* reservation */ nullptr,
+ /*executable=*/ false,
+ /*low_4gb=*/ false,
+ /*abs_dex_location=*/ nullptr,
+ /*reservation=*/ nullptr,
&error_msg));
ASSERT_TRUE(opened_oat_file != nullptr) << error_msg;
ASSERT_EQ(2u, opened_oat_file->GetOatDexFiles().size());
@@ -843,7 +838,7 @@
oat_file.GetFile(),
input_filenames,
key_value_store,
- /* verify */ false,
+ /*verify=*/ false,
profile_compilation_info.get());
ASSERT_FALSE(success);
}