Improve the logging of BCP checksum mismatch.
Log the filename of the BCP JAR when a checksum mismatch happens.
Bug: 201278968
Test: Presubmits
Change-Id: I328448158189475404f9adcbfadf2c5f4863f897
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 3930ad5..fefba27 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -3594,9 +3594,11 @@
for (uint32_t checksum : checksums) {
std::string dex_file_checksum = StringPrintf("/%08x", checksum);
if (!StartsWith(oat_checksums, dex_file_checksum)) {
- *error_msg = StringPrintf("Dex checksum mismatch, expected %s to start with %s",
- std::string(oat_checksums).c_str(),
- dex_file_checksum.c_str());
+ *error_msg = StringPrintf(
+ "Dex checksum mismatch for bootclasspath file %s, expected %s to start with %s",
+ bcp_filename.c_str(),
+ std::string(oat_checksums).c_str(),
+ dex_file_checksum.c_str());
return false;
}
oat_checksums.remove_prefix(dex_file_checksum.size());