summaryrefslogtreecommitdiff
path: root/libartbase/base/bit_table.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-03-15 08:51:33 +0000
committer Vladimir Marko <vmarko@google.com> 2022-03-15 12:47:42 +0000
commite4ccbb5d014bc154d5368a43fb95ebd9c79f26fa (patch)
treea22266d04b66ecaaf90f6cb38e07585b12761d42 /libartbase/base/bit_table.h
parente25f13a3ba7e135a143a0d290140b21b52ecb2b3 (diff)
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
Diffstat (limited to 'libartbase/base/bit_table.h')
-rw-r--r--libartbase/base/bit_table.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libartbase/base/bit_table.h b/libartbase/base/bit_table.h
index 07e6b27135..227f5eb082 100644
--- a/libartbase/base/bit_table.h
+++ b/libartbase/base/bit_table.h
@@ -92,7 +92,7 @@ class BitTableBase {
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 @@ class BitmapTableBuilder {
// 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.