Fix unquickening logic for quickened input dexes
In the case where an input dex is already quickened (i.e.
obfuscation), do not attempt to unquicken it. This is done by
switching the quicken info table to the compact offset table (used by
cdex debug infos).
Added test.
Posssible to get a bit of extra savings by deleting the quicken info
num entries field.
Quicken filter size regression average on golem: -0.14%.
Bug: 72608794
Bug: 63756964
Test: test-art-host-gtest-dex2oat_test -j64
Change-Id: I5534a7509b4c718a9b959fa43b82bde857e0b59e
diff --git a/runtime/vdex_file.h b/runtime/vdex_file.h
index 0f34795..0c7200f 100644
--- a/runtime/vdex_file.h
+++ b/runtime/vdex_file.h
@@ -22,6 +22,7 @@
#include "base/array_ref.h"
#include "base/macros.h"
+#include "dex/compact_offset_table.h"
#include "mem_map.h"
#include "os.h"
#include "quicken_info.h"
@@ -238,13 +239,12 @@
const uint8_t* source_dex_begin,
bool decompile_return_instruction) const;
- QuickenInfoOffsetTableAccessor GetQuickenInfoOffsetTable(
+ CompactOffsetTable::Accessor GetQuickenInfoOffsetTable(
const DexFile& dex_file,
const ArrayRef<const uint8_t>& quickening_info) const;
- QuickenInfoOffsetTableAccessor GetQuickenInfoOffsetTable(
+ CompactOffsetTable::Accessor GetQuickenInfoOffsetTable(
const uint8_t* source_dex_begin,
- uint32_t num_method_ids,
const ArrayRef<const uint8_t>& quickening_info) const;
bool ContainsDexFile(const DexFile& dex_file) const;