61b28a17d9b6e8e998103646e98e4a9772e11927 |
|
25-Feb-2016 |
David Srbecky <dsrbecky@google.com> |
Use bit-level packing for InlineInfo in stackmaps as well. Use the same approach as we do for stackmaps to reduce the size. It saves 4.0 MB from non-debuggable boot.oat (AOSP). It does not affect debuggable boot.oat. It saves 3.6 MB (of 96.6 MB) from /system/framework/arm/ (GOOG). It saves 0.6 MB (of 26.7 MB) from /system/framework/oat/arm/ (GOOG). Field loads from inline-info get around 5% slower. (based on the time it takes to load all inline-infos from boot.oat) Change-Id: I67b0fa5eef74c1fdb013680d0231fd44ea696176
|
09ed09866da6d8c7448ef297c148bfa577a247c2 |
|
12-Feb-2016 |
David Srbecky <dsrbecky@google.com> |
Pack stack map entries on bit level to save space. Use only the minimum number of bits required to store stack map data. For example, if native_pc needs 5 bits and dex_pc needs 3 bits, they will share the first byte of the stack map entry. The header is changed to store bit offsets of the fields rather than byte sizes. Offsets also make it easier to access later fields without calculating sum of all previous sizes. All of the header fields are byte sized or encoded as ULEB128 instead of the previous fixed size encoding. This shrinks it by about half. It saves 3.6 MB from non-debuggable boot.oat (AOSP). It saves 3.1 MB from debuggable boot.oat (AOSP). It saves 2.8 MB (of 99.4 MB) from /system/framework/arm/ (GOOG). It saves 1.0 MB (of 27.8 MB) from /system/framework/oat/arm/ (GOOG). Field loads from stackmaps seem to get around 10% faster. (based on the time it takes to load all stackmap entries from boot.oat) Bug: 27640410 Change-Id: I8bf0996b4eb24300c1b0dfc6e9d99fe85d04a1b7
|
f6a35de9eeefb20f6446f1b4815b4dcb0161d09c |
|
21-Mar-2016 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Fix register allocator validation memory usage. Also attribute ArenaBitVector allocations to appropriate passes. This was used to track down the source of the excessive memory alloactions. Bug: 27690481 Change-Id: Ib895984cb7c04e24cbc7abbd8322079bab8ab100
|
1bbdfd73a98b149c31f8a80888c7ee9ab2587630 |
|
24-Feb-2016 |
David Srbecky <dsrbecky@google.com> |
Verify encoded stack maps in debug builds. Read all stack map data back after we write it and DCHECK the content. Change-Id: Ia679594ac9e5805f6d4c56686030af153b45ea8b
|
7dc11782ff0a5dffcd8108f256f8975f0b3e8076 |
|
25-Feb-2016 |
David Srbecky <dsrbecky@google.com> |
Implement << operator for DexRegisterLocation::Kind. This makes it comparable in DCHECK_EQ and similar methods. Change-Id: I6b5b237be89325850ae6860d011fd6741189ab01
|
012fc4e9d9b66b3ffb7838b0e29dadbb4863ee69 |
|
08-Jan-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Don't encode a DexRegisterMap if there is no live register. Change-Id: I76a291e6a0ac37f0590d16c7f5b866115588bc55
|
ec7802a102d49ab5c17495118d4fe0bcc7287beb |
|
01-Oct-2015 |
Vladimir Marko <vmarko@google.com> |
Add DCHECKs to ArenaVector and ScopedArenaVector. Implement dchecked_vector<> template that DCHECK()s element access and insert()/emplace()/erase() positions. Change the ArenaVector<> and ScopedArenaVector<> aliases to use the new template instead of std::vector<>. Remove DCHECK()s that have now become unnecessary from the Optimizing compiler. Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
|
b5c469357f8faf8fbaa05bc41d56903b300d0cd1 |
|
06-Oct-2015 |
Calin Juravle <calin@google.com> |
Assert we don't store an invalid dex_pc in the stack maps. Change-Id: Ie106486bd4a6d975c9a3d03d02dc48d97d83c3d8
|
225b6464a58ebe11c156144653f11a1c6607f4eb |
|
28-Sep-2015 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Tag arena allocations in code generators. And completely remove the deprecated GrowableArray. Replace GrowableArray with ArenaVector in code generators and related classes and tag arena allocations. Label arrays use direct allocations from ArenaAllocator because Label is non-copyable and non-movable and as such cannot be really held in a container. The GrowableArray never actually constructed them, instead relying on the zero-initialized storage from the arena allocator to be correct. We now actually construct the labels. Also avoid StackMapStream::ComputeDexRegisterMapSize() being passed null references, even though unused. Change-Id: I26a46fdd406b23a3969300a67739d55528df8bf4
|
77a48ae01bbc5b05ca009cf09e2fcb53e4c8ff23 |
|
15-Sep-2015 |
David Brazdil <dbrazdil@google.com> |
Revert "Revert "ART: Register allocation and runtime support for try/catch"" The original CL triggered b/24084144 which has been fixed by Ib72e12a018437c404e82f7ad414554c66a4c6f8c. This reverts commit 659562aaf133c41b8d90ec9216c07646f0f14362. Change-Id: Id8980436172457d0fcb276349c4405f7c4110a55
|
659562aaf133c41b8d90ec9216c07646f0f14362 |
|
14-Sep-2015 |
David Brazdil <dbrazdil@google.com> |
Revert "ART: Register allocation and runtime support for try/catch" Breaks libcore test org.apache.harmony.security.tests.java.security.KeyStorePrivateKeyEntryTest#testGetCertificateChain. Need to investigate. This reverts commit b022fa1300e6d78639b3b910af0cf85c43df44bb. Change-Id: Ib24d3a80064d963d273e557a93469c95f37b1f6f
|
b022fa1300e6d78639b3b910af0cf85c43df44bb |
|
20-Aug-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Register allocation and runtime support for try/catch This patch completes a series of CLs that add support for try/catch in the Optimizing compiler. With it, Optimizing can compile all methods containing try/catch, provided they don't contain catch loops. Future work will focus on improving performance of the generated code. SsaLivenessAnalysis was updated to propagate liveness information of instructions live at catch blocks, and to keep location information on instructions which may be caught by catch phis. RegisterAllocator was extended to spill values used after catch, and to allocate spill slots for catch phis. Catch phis generated for the same vreg share a spill slot as the raw value must be the same. Location builders and slow paths were updated to reflect the fact that throwing an exception may not lead to escaping the method. Instruction code generators are forbidden from using of implicit null checks in try blocks as live registers need to be saved before handing over to the runtime. CodeGenerator emits a stack map for each catch block, storing locations of catch phis. CodeInfo and StackMapStream recognize this new type of stack map and store them separate from other stack maps to avoid dex_pc conflicts. After having found the target catch block to deliver an exception to, QuickExceptionHandler looks up the dex register maps at the throwing instruction and the catch block and copies the values over to their respective locations. The runtime-support approach was selected because it allows for the best performance in the normal control-flow path, since no propagation of catch phi values is necessary until the exception is thrown. In addition, it also greatly simplifies the register allocation phase. ConstantHoisting was removed from LICMTest because it instantiated (now abstract) HConstant and was bogus anyway (constants are always in the entry block). Change-Id: Ie31038ad8e3ee0c13a5bbbbaf5f0b3e532310e4e
|
1c1da4398cca9a828dea885ca1be12adf961d3a3 |
|
16-Jul-2015 |
Roland Levillain <rpl@google.com> |
Improve documentation of memory layouts in stack_map.h. Also shorten NumberOfDexRegisterLocationCatalogEntries to NumberOfLocationCatalogEntries. Change-Id: I55f8ec2960ea67e2eb6871a417bd442d0e2810fb
|
bd8c725e465cc7f44062745a6f2b73248f5159ed |
|
12-Jun-2015 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Remove PcInfo, use the StackMapStream instead. Change-Id: I474f3a89f6c7ee5c7accd21791b1c1e311104158
|
f677ebfd832c9c614fea5e6735725fec2f7a3f2a |
|
29-May-2015 |
David Brazdil <dbrazdil@google.com> |
Cache stack map encoding Operations on CodeInfo and StackMap objects repeatedly read encoding information from the MemoryRegion. Since these are 3-bit-loads of values that never change, caching them can measurably reduce compile times. According to benchmarks, this patch saves 1-3% on armv7, 2-4% on x86, and 0-1% on x64. Change-Id: I46b197513601325d8bab562cc80100c00ec28a3b
|
6530baf76ef7a62f2d76a6735ad461d7d59cf0e4 |
|
26-May-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Move the catalog after the stack maps. Fetching a stack map should be cheap, and therefore we should not compute the size of the catalog. Change-Id: Iff6accb7832bdfa6d209a0928d6088b8b57c1aa4
|
b176d7c6c8c01a50317f837a78de5da57ee84fb2 |
|
20-May-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Also encode the InvokeType in an InlineInfo. This will be needed to recover the call stack. Change-Id: I2fe10785eb1167939c8cce1862b2d7f4066e16ec
|
b1d0f3f7e92fdcc92fe2d4c48cbb1262c005583f |
|
14-May-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Support InlineInfo in StackMap. Change-Id: I9956091775cedc609fdae7dec1433fcb8858a477
|
4f46ac5179967dda5966f2dcecf2cf08977951ef |
|
23-Apr-2015 |
Calin Juravle <calin@google.com> |
Cleanup and improve stack map stream - transform AddStackMapEntry into BeginStackMapEntry/EndStackMapEntry. This allows for nicer code and less assumptions when searching for equal dex register maps. - store the components sizes and their start positions as fields to avoid re-computation. - store the current stack map entry as a field to avoid the copy semantic when updating its value in the stack maps array. - remove redundant methods and fix visibility for the remaining ones. Change-Id: Ica2d2969d7e15993bdbf8bc41d9df083cddafd24
|
c416d3359179b0ec6152104db8240f4d11c54bc7 |
|
23-Apr-2015 |
Calin Juravle <calin@google.com> |
Move stack map stream implementation to its own cc file. It's big enough now to separate the implementation from the header. It also enables faster compilation time for experiments. Change-Id: Ica0c72994d5e461c62c32628010f46f9e5c46b57
|