| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add trivial helpers to get opcodes arguments (A/B/C).
Ensure the generic getters in Instruction can take
advantage of knowing the format at compile-time.
As the first step, I have simplified the code only where
the argument is used as index for SetVReg/GetVReg calls.
Test: ART_USE_CXX_INTERPRETER=true ./art/test.py -b --host
Test: ART_USE_CXX_INTERPRETER=true ./art/tools/run-jdwp-tests.sh \
--mode=host --variant=X32 --debug --no-jit
Change-Id: I765c0eb16438806c3624fabe3aade040c7bb3387
|
| |
|
|
|
|
|
|
|
| |
Separating out the structs from DexFile allows them to be forward-
declared, which reduces the need to include the dex_file header.
Bug: 119869270
Test: m
Change-Id: I32dde5a632884bca7435cd584b4a81883de2e7b4
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move hiddenapi access flags to own data section so as to:
(a) increase amount of information stored per method/field
(b) use encoding which can be supported long-term.
The dex item is implemented as:
- array of offsets indexed by class def index
- streams of uleb-128 encoded flags.
Offsets in array point to the beginning of the flags stream
for the given class def. Flags are encoded in the same order
as fields and methods are encoded in class data. Zero offset
means that the class either does not have class data, or all
of its flags are zero.
The patch updates:
(a) libdexfile with data structure declarations and accessor
methods,
(b) hiddenapi tool to create the new item from hiddenapi lists
and insert it into the given dex file,
(c) dexlayout to copy the flags into compact dex,
(d) dex file verifier to verify the item.
It also removes skipping of verification for boot class path
dex files as those now pass DexFileVerifier, and removes the
need for removing the flags for JVMTI.
The size increase is 450 KB.
This reverts commit d33d318685ec4a1c9e7995c914c104ab6487513b.
Change-Id: Id00e0efb38ee1eab8d7ed5c645a7778b6b94b849
Test: phone boots
Test: m test-art
|
| |/
|
|
|
|
|
| |
Generated by clang-tidy.
Test: m checkbuild
Change-Id: Idb24960d9326c0d94ab5d04b18deb0894d23da9f
|
| |
|
|
|
|
|
|
| |
This reverts commit fe3a979f6214e2ea94a9aed4c573c6a6f64c7096.
Reason for revert: Caught by droidcop https://b.corp.google.com/issues/118481351
Change-Id: I17cc3586c9ae3b49839633d9543edce2937c388d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move hiddenapi access flags to own data section so as to:
(a) increase amount of information stored per method/field
(b) use encoding which can be supported long-term.
The dex item is implemented as:
- array of offsets indexed by class def index
- streams of uleb-128 encoded flags.
Offsets in array point to the beginning of the flags stream
for the given class def. Flags are encoded in the same order
as fields and methods are encoded in class data. Zero offset
means that the class either does not have class data, or all
of its flags are zero.
The patch updates:
(a) libdexfile with data structure declarations and accessor
methods,
(b) hiddenapi tool to create the new item from hiddenapi lists
and insert it into the given dex file,
(c) dexlayout to copy the flags into compact dex,
(d) dex file verifier to verify the item.
It also removes skipping of verification for boot class path
dex files as those now pass DexFileVerifier, and removes the
need for removing the flags for JVMTI.
The size increase is 450 KB.
This reverts commit d9a0437b0d6cb1438bf21284a2502cbfe293db06.
Test: phone boots
Test: m test-art
Change-Id: I224bf1b587529f36ea00a666680c4e4c8ca16a42
|
| |
|
|
|
|
|
|
| |
This reverts commit 0dbc363f32d075017e1c4fb5e17715e3f12d0157.
Reason for revert: marlin running out of space
Change-Id: I80218af6408812b639b7c807bf8cb2a1d5239d94
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move hiddenapi access flags to own data section so as to:
(a) increase amount of information stored per method/field
(b) use encoding which can be supported long-term.
The dex item is implemented as:
- array of offsets indexed by class def index
- streams of uleb-128 encoded flags.
Offsets in array point to the beginning of the flags stream
for the given class def. Flags are encoded in the same order
as fields and methods are encoded in class data. Zero offset
means that the class either does not have class data, or all
of its flags are zero.
The patch updates:
(a) libdexfile with data structure declarations and accessor
methods,
(b) hiddenapi tool to create the new item from hiddenapi lists
and insert it into the given dex file,
(c) dexlayout to copy the flags into compact dex,
(d) dex file verifier to verify the item.
It also removes skipping of verification for boot class path
dex files as those now pass DexFileVerifier, and removes the
need for removing the flags for JVMTI.
The size increase is 450 KB.
Test: phone boots
Test: m test-art
Change-Id: Idec301db540cf164fccc97136d1df4abb8f758bd
|
| |
|
|
|
|
|
|
|
| |
Add a Size() override. Make base function pure to avoid future errors.
Fixes clang-tidy's bugprone-virtual-near-miss.
Bug: 32619234
Test: mmma art
Change-Id: I4112ea4d652a39a6b18712fb649823f086dd5b38
|
| |
|
|
|
|
|
|
| |
Remove 'virtual' specifier on methods already bearing the 'override'
specifier.
Test: mmma art
Change-Id: I114930969a5ca048d88de9ecd18e2c6403593e31
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with
'final' and 'override' specifiers. Remove all definitions of these
macros as well, which were located in these files:
- libartbase/base/macros.h
- test/913-heaps/heaps.cc
- test/ti-agent/ti_macros.h
ART is now using C++14; the 'final' and 'override' specifiers have
been introduced in C++11.
Test: mmma art
Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
|
| |
|
|
|
|
|
| |
Bug: 79758018
Test: test-art-host
Change-Id: I01d53eaf45d28fd762800c2716d6bf2dd3c9ad9e
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove some unnecessary generality, consolidating and simplifying the
interface to Header and moving all the construction code out of dex_ir.
This makes item ownership exclusively controlled by the collections
themselves, preparing for in-place construction.
Bug: 33017139
Test: make -j 40 test-art-host-gtest
Change-Id: Ice461ae89ef9f8bed3350780e8dd6283bc6eca1b
|
| |
|
|
|
|
|
|
|
| |
In preparation for memory improvements, make dex_ir API more friendly to
pre-allocated or in-place type allocation.
Bug: 33017139
Test: make -j 50 test-art-host
Change-Id: I09b67e279a04535b175433287ce98ecbdc37f7a3
|
| |
|
|
|
|
|
|
|
|
|
| |
For fixed_up_dexfile, the returned dex only needs to contain a single
class. This CL adds filtering during IR creation to only contain that
class. This speeds up wifi tests from 25s to 15s on marlin.
Bug: 63756964
Bug: 72064989
Test: mm test-art-host-gtest-dexlayout_test -j64
Change-Id: I3648ac886b377d95e33e5b40a63a34c2a9dbde58
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a shared dex data buffer for compact dex files, this buffer
is referenced by all compact dex files in a vdex file. Repurposed
the existing data_off / data_size fields in the header.
After the shared buffer is filled up, it is placed after the dex
files in the oat writer and the dex file headers are fixed up to have
the correct offsets / sizes to the shared buffer.
Motivation:
Make it easy to deduplicate data across dexes.
Bug: 63756964
Test: test-art-host
Change-Id: I17855a0c78b20be3d323d12dedb9c695962be3ed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a feature flag and mark if the compact dex file was
generated from a dex file that supported default methods or not. This
is done to maintain the existing verifier behavior differences for
dex files that do and don't support default methods.
Fixed callers to use a virtual function instead of always checking
the dex file version.
Re-enabled run-test 975.
Bug: 70930171
Bug: 63756964
Test: test-art-host
Change-Id: I46ac5d3cde0d0c9f41cbc68cccaf954b531e0edf
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of not writing out the link data and leaving an invalid
link_offset, write it out. Fixes dex verifier failures for a few
APKs.
Added test.
Test: test-art-host
Bug: 69561363
Change-Id: Iec1c331f74f9fd58658d4c13465a3bcb6295ce24
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete all the offset related layout logic, move the logic to
writing. Layout is now controlled by changing the order of the data
vectors.
Calculate all offsets during writing instead of reading. This allows
more flexible layout optimizations without needing to be as careful
about offsets in other sections changing.
Maintained logic for using existing offsets in the case where
changing the layout is not required.
Areas to improve:
How to size the memmap, do we want 2 passes? Currently the algorithm
reserves 10% extra space in case required. This is sufficient for top
1000 apps in the play store. Will consider a two pass approach later.
Bug: 63756964
Bug: 68948395
Bug: 68867570
Bug: 68864106
Bug: 68864168
Test: test/testrunner/testrunner.py --host -j40
Test: test-art-host-gtest
Test: Dexlayout speed profile top 1000 apps
Change-Id: I7dee869da3a010559547f8cfdf93e9aa4c3f47ff
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disabled class def ordering since it violates the spec regarding
superclasses occurring before subclasses. This fixes a dex verifier
failure.
Adjust the data section size based on string data and code item
diff. This fixes dex2oat_image_test failing dex file verification.
Fixed handling of unreference annotations. Previously, these would
not get written back out. This resulted the dex file verifier
prematurely ending for annotations during CheckIntraSectionIterate
and then complaining about non zero padding (that was actually an
annotation).
Test: test-art-host
Bug: 63756964
Bug: 68208404
Change-Id: Id2b9b360640c360ac562826e9193971f7bb30eea
|
| |
|
|
|
|
|
|
|
|
|
| |
Tested that it works with Orion's test dex files. Can generate output
files that match the test input files.
Unit tests to follow.
Bug: 37732062
Test: mm test-art-host
Change-Id: Icb76cf858d29e52022f98ac625bd35c3bd763e9f
|
| |
|
|
|
|
|
|
|
| |
Created option to output to a mem map in preparation of hooking
dexlayout into dex2oat.
Test: mm test-art-host-gtest-dexlayout_test
Bug: 29921113
Change-Id: Id42ef15cb8f83cc8d05b025b7647a4338e9b96b0
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit fd1a6c2a08ca3e2476b7424b9b0fa58e73b29e87.
Fixed output being clobbered during DexLayoutTest.DexFileOutput.
Option added to put dex output file in scratch directory.
Bug: 29921113
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: I9e6b139cf06aaa39c83ad1e74329db266464a8e4
|
| |
|
|
|
|
|
|
|
|
| |
Display the portions of the dex file that are accessed by the classes in
the dex file. Optionally limit the display to only those classes that
are present in a runtime profile.
Bug: 29921113
Change-Id: I2a998fba448fec6c23941d3b4358531b1336e1b3
Test: dexlayout test
|
| |
|
|
|
|
|
|
| |
Bug: 29921113
This reverts commit 69b58cf399c3507ca3debf9ec9b2db3c5a0fe7f2.
Change-Id: I8bf9b1222d99489059e45f47d220396a853170a4
|
| |
|
|
|
|
|
|
|
|
| |
All sections are being written out properly.
There is one small difference:
- unindexed string data is not written out
Bug: 29921113
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: I3872327526a350f33f0f851516a389622c1a54ae
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Created offset & size fields for items, initially populated with
values from original dex file.
- Created index field for indexed items in header.
- Created Item objects for StringData and TypeList.
- Created Collections container to hold unique_ptrs for all objects
- Reorganized EncodedArrayItems to make it easier to collect them
- Added relevant annotations-related items to Collections
- Some size calculations and section offsets left as TODO
Bug: 29921113
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: Id812f104c1930a3ee381e885f353a9a49f29ac9b
|
| |
|
|
|
|
| |
Bug: 29921113
Change-Id: If70d475a3317751d206658c5794a32d78bc33e47
Test: valgrind-test-art-host-gtest (with --trace-children=yes)
|
|
|
Move all the construction from DexFile out of the constructors of the
basic IR.
Bug: 29921113
Change-Id: I3f79c104ce7183ddde73f143c047061416009a54
Test: test-art-host-gtest
|