diff options
author | 2022-03-15 08:51:33 +0000 | |
---|---|---|
committer | 2022-03-15 12:47:42 +0000 | |
commit | e4ccbb5d014bc154d5368a43fb95ebd9c79f26fa (patch) | |
tree | a22266d04b66ecaaf90f6cb38e07585b12761d42 /runtime/stack_map.h | |
parent | e25f13a3ba7e135a143a0d290140b21b52ecb2b3 (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 'runtime/stack_map.h')
-rw-r--r-- | runtime/stack_map.h | 25 |
1 files changed, 6 insertions, 19 deletions
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<uint8_t>* 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<std::vector<uint8_t>> writer_; - - // Deduplicate at BitTable level. The value is bit offset within the output. - std::map<BitMemoryRegion, uint32_t, BitMemoryRegion::Less> 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<DexRegisterMapInfo> dex_register_maps_; BitTable<DexRegisterInfo> dex_register_catalog_; + friend class linker::CodeInfoTableDeduper; friend class StackMapStream; }; |