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
|
012fc4e9d9b66b3ffb7838b0e29dadbb4863ee69 |
|
08-Jan-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Don't encode a DexRegisterMap if there is no live register. Change-Id: I76a291e6a0ac37f0590d16c7f5b866115588bc55
|
e5d80f83ae53792bc1eebd4e33e4e99f7c031b0c |
|
16-Oct-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move ArenaBitVector into the runtime Motivation is using arenas in the verifier. Bug: 10921004 Change-Id: I3c7ed369194b2309a47b12a621e897e0f2f65fcf
|
d9cb68e3212d31d61445fb7e8446f68991720009 |
|
25-Aug-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Add (Fpu)RegHigh stack map location kinds When running Optimized code on 64-bit, high value of vreg pair may be stored in the high 32 bits of a CPU register. This is not reflected in stack maps which would encode both the low and high vreg as kInRegister with the same register number, making it indistinguishable from two non-wide vregs with the same value in the lower 32 bits. Deoptimization deals with this by running the verifier and thus obtaining vreg pair information, but this would be too slow for try/ catch. This patch therefore adds two new stack map location kinds: kInRegisterHigh and kInFpuRegisterHigh to differentiate between the two cases. Note that this also applies to floating-point registers on x86. Change-Id: I15092323e56a661673e77bee1f0fca4261374732
|
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
|
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
|
f10a25f961eb8029c01c84fe8eabd405055cca37 |
|
02-Jun-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Fast copy stack mask StackMap::SetStackMask will currently copy a BitVector into a Memory- Region bit by bit. This patch adds a new function for copying the data with memcpy. This is resubmission of CL I28d45a590b35a4a854cca2f57db864cf8a081487 but with a fix for a broken test which it revealed. Change-Id: Ib65aa614d3ab7b5c99c6719fdc8e436466a4213d
|
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
|
896f8f7fe562f6e59119cb32531da9f0a5f13d18 |
|
30-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Use variable encoding for StackMap. dex_pc, native_pc_offset, dex_register_map_offset, inline_info_offset, and register_mask can now be encoded in 1, 2, 3, or 4 bytes. Change-Id: I15f93e8226ce374204d44c5a80a9fd89bda2687c
|
a552e1c0584b8ab63150510286478c68cdbce13f |
|
26-Mar-2015 |
Roland Levillain <rpl@google.com> |
Use unique location catalogs to encode Dex register maps. - For each CodeInfo object (i.e. for each method), compute a variable index size location catalog of unique Dex register locations. In Dex register maps, instead of storing the actual location of a (live) Dex register, store the index of the location catalog entry containing that Dex register location. - Adjust art::StackMapStream, art::CheckReferenceMapVisitor::CheckOptimizedMethod, art::StackVisitor::GetVRegFromOptimizedCode, and art::StackVisitor::SetVRegFromOptimizedCode. - Add LoadBits and StoreBits methods to art::MemoryRegion to load and store a block of adjacent bits in a memory region. - Update compiler/optimizing/stack_map_test.cc. - Remove the default value for parameter EmptyFn of art::HashMap. This default value did not seem to make sense, as it would create an "empty function" for type Key by default, whereas art::HashMap expects an "empty function" for type std::pair<Key, Value>. Change-Id: Id9e49d7756c253ce41c36630cd832208d06c2e28
|
6ae70962089e4af9718cc9b7c2b79a0c501c1844 |
|
18-Mar-2015 |
Calin Juravle <calin@google.com> |
Share dex register maps between stack maps when possible. If two stack maps have the same dex register map then one of them will reference the register map from the other instead of owning an independent copy. This saves around 1.5% of space. Change-Id: Ic2c2c81210c6c45a5c5f650f7ba82a46ff6f45e4
|
004c230b4cfc856690c61faabc41864061813c88 |
|
20-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Compress the StackMaps. First step towards the compression of the StackMap (not the DexRegisterMap). Next step will be to just use what is needed (instead of byte -> word). Change-Id: I4f81b2d05bf5cc508585e16fbbed1bafbc850e2e
|
eeefa1276e83776f08704a3db4237423b0627e20 |
|
13-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Update locations of registers after slow paths spilling. Change-Id: Id9aafcc13c1a085c17ce65d704c67b73f9de695d
|
fead4e4f397455aa31905b2982d4d861126ab89d |
|
13-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
[optimizing] Don't record None locations in the stack maps. - moved environment recording from code generator to stack map stream - added creation/loading factory methods for the DexRegisterMap (hides internal details) - added new tests Change-Id: Ic8b6d044f0d8255c6759c19a41df332ef37876fe
|
a2d8ec6876325e89e5d82f5dbeca59f96ced3ec1 |
|
12-Mar-2015 |
Roland Levillain <rpl@google.com> |
Compress the Dex register maps built by the optimizing compiler. - Replace the current list-based (fixed-size) Dex register encoding in stack maps emitted by the optimizing compiler with another list-based variable-size Dex register encoding compressing short locations on 1 byte (3 bits for the location kind, 5 bits for the value); other (large) values remain encoded on 5 bytes. - In addition, use slot offsets instead of byte offsets to encode the location of Dex registers placed in stack slots at small offsets, as it enables more values to use the short (1-byte wide) encoding instead of the large (5-byte wide) one. - Rename art::DexRegisterMap::LocationKind as art::DexRegisterLocation::Kind, turn it into a strongly-typed enum based on a uint8_t, and extend it to support new kinds (kInStackLargeOffset and kConstantLargeValue). - Move art::DexRegisterEntry from compiler/optimizing/stack_map_stream.h to runtime/stack_map.h and rename it as art::DexRegisterLocation. - Adjust art::StackMapStream, art::CodeGenerator::RecordPcInfo, art::CheckReferenceMapVisitor::CheckOptimizedMethod, art::StackVisitor::GetVRegFromOptimizedCode, and art::StackVisitor::SetVRegFromOptimizedCode. - Implement unaligned memory accesses in art::MemoryRegion. - Use them to manipulate data in Dex register maps. - Adjust oatdump to support the new Dex register encoding. - Update compiler/optimizing/stack_map_test.cc. Change-Id: Icefaa2e2b36b3c80bb1b882fe7ea2f77ba85c505
|
12baf476389359d54ae04d7898190ef6f81ab0b2 |
|
05-Mar-2015 |
Roland Levillain <rpl@google.com> |
Extend compiler/optimizing/stack_map_test.cc. Change-Id: I6f8c3186683210a5162cbf4f15361a4c494495c9
|
442b46a087c389a91a0b51547ac9205058432364 |
|
18-Feb-2015 |
Roland Levillain <rpl@google.com> |
Display optimizing compiler's CodeInfo objects in oatdump. A few elements are not displayed yet (stack mask, inline info) though. Change-Id: I5e51a801c580169abc5d1ef43ad581aadc110754
|
3946844c34ad965515f677084b07d663d70ad1b8 |
|
02-Sep-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Runtime support for the new stack maps for the opt compiler. Now most of the methods supported by the compiler can be optimized, instead of using the baseline. Change-Id: I80ab36a34913fa4e7dd576c7bf55af63594dc1fa
|
99ea58cc68b51837c065f4a2a54efbf208dd76fa |
|
02-Jul-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Add a new stack map scheme that encodes compilation info per pc. Encodes stack mask, register mask, dex register values, and inlining info. The encoding is currently very straightforward: there is no clever encoding, nor compression. Change-Id: I5fd9ae28189a5513cd9e3c8d52c648463207643d
|