ART: Change vtable check implementation

Trade space for performance and use a (pseudo-)linear implementation
for CheckVTableHasNoDuplicates.

The new algorithm has a first pass that attempts to check under the
assumption that all entries are from the same dex file, and a second
pass dedicated for the cross-dex-file case.

Both passes use maps to store discovered information and detect
duplicates via existing entries. The code is complicated by an effort
to reduce repeated hashing overhead.

Decreases dex2oatd preopting of a big app from 150s to 35s.

Bug: 123888325
Test: m test-art-host
Change-Id: I3e5e3c8ccfeaf94b89b045eb691ec88556399ae6
1 file changed