From e4ccbb5d014bc154d5368a43fb95ebd9c79f26fa Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 15 Mar 2022 08:51:33 +0000 Subject: 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 --- runtime/stack_map.h | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'runtime/stack_map.h') diff --git a/runtime/stack_map.h b/runtime/stack_map.h index a86d6386ec..7a13dbd3ac 100644 --- a/runtime/stack_map.h +++ b/runtime/stack_map.h @@ -23,8 +23,6 @@ #include "base/bit_memory_region.h" #include "base/bit_table.h" #include "base/bit_utils.h" -#include "base/bit_vector.h" -#include "base/leb128.h" #include "base/memory_region.h" #include "dex/dex_file_types.h" #include "dex_register_location.h" @@ -32,6 +30,10 @@ namespace art { +namespace linker { +class CodeInfoTableDeduper; +} // namespace linker + class OatQuickMethodHeader; class VariableIndentationOutputStream; @@ -281,23 +283,6 @@ class MethodInfo : public BitTableAccessor<3> { */ class CodeInfo { public: - class Deduper { - public: - explicit Deduper(std::vector* output) : writer_(output) { - DCHECK_EQ(output->size(), 0u); - } - - // Copy CodeInfo into output while de-duplicating the internal bit tables. - // It returns the byte offset of the copied CodeInfo within the output. - size_t Dedupe(const uint8_t* code_info); - - private: - BitMemoryWriter> writer_; - - // Deduplicate at BitTable level. The value is bit offset within the output. - std::map dedupe_map_; - }; - ALWAYS_INLINE CodeInfo() {} ALWAYS_INLINE explicit CodeInfo(const uint8_t* data, size_t* num_read_bits = nullptr); ALWAYS_INLINE explicit CodeInfo(const OatQuickMethodHeader* header); @@ -505,6 +490,7 @@ class CodeInfo { bool HasBitTable(size_t i) { return ((bit_table_flags_ >> i) & 1) != 0; } bool IsBitTableDeduped(size_t i) { return ((bit_table_flags_ >> (kNumBitTables + i)) & 1) != 0; } void SetBitTableDeduped(size_t i) { bit_table_flags_ |= 1 << (kNumBitTables + i); } + bool HasDedupedBitTables() { return (bit_table_flags_ >> kNumBitTables) != 0u; } enum Flags { kHasInlineInfo = 1 << 0, @@ -533,6 +519,7 @@ class CodeInfo { BitTable dex_register_maps_; BitTable dex_register_catalog_; + friend class linker::CodeInfoTableDeduper; friend class StackMapStream; }; -- cgit v1.2.3-59-g8ed1b