Revert^2 "Faster deduplication of `CodeInfo` tables."
This reverts commit 8c7f649fff75ba98392931157292f06f7930f2b6.
Reason for revert: Add hwasan exclusion annotation.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: Ifc4dec165a2977a08654d7ae094fe1aa8a5bbbe5
diff --git a/libartbase/base/bit_table.h b/libartbase/base/bit_table.h
index 07e6b27..227f5eb 100644
--- a/libartbase/base/bit_table.h
+++ b/libartbase/base/bit_table.h
@@ -92,7 +92,7 @@
bool Equals(const BitTableBase& other) const {
return num_rows_ == other.num_rows_ &&
std::equal(column_offset_, column_offset_ + kNumColumns, other.column_offset_) &&
- BitMemoryRegion::Compare(table_data_, other.table_data_) == 0;
+ BitMemoryRegion::Equals(table_data_, other.table_data_);
}
protected:
@@ -449,9 +449,10 @@
// Write table data.
for (MemoryRegion row : rows_) {
- BitMemoryRegion src(row);
+ size_t bits_to_copy = std::min(max_num_bits_, row.size_in_bits());
+ BitMemoryRegion src(row, /*bit_offset=*/ 0u, bits_to_copy);
BitMemoryRegion dst = out.Allocate(max_num_bits_);
- dst.StoreBits(/* bit_offset */ 0, src, std::min(max_num_bits_, src.size_in_bits()));
+ dst.Subregion(/*bit_offset=*/ 0, bits_to_copy).CopyBits(src);
}
// Verify the written data.