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
|
c9d185d2b4ac045840586d3a890eab61c922379f |
|
16-Apr-2015 |
Dan Albert <danalbert@google.com> |
Fix undefined behavior in hash calculation. dex_register might be >= the width of the map hash. Shifting by that value would be undefined behavior. Constrain the value to within the valid range. Change-Id: I9037c5c7ec554850ba3385585aca96fde1d50387
|
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
|
aec8f930571ce10d6ce9a4249c45866a7f213397 |
|
18-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
StackMap: Always load and store unalign. Now that we can have a mix of Quick and Optimized code in an .oat file, a CodeInfo object is not necessarily word aligned. Change-Id: Ic6c5d1a2c6e20363436726a0708b0764b5a76caf
|
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
|
ede7bf8a5cef965974e7c1edcf46a41fbe50a49d |
|
13-Mar-2015 |
Roland Levillain <rpl@google.com> |
Align CodeInfo regions instead of their inner subregions. Instead of word-aligning every stack map region, as well as the Dex register maps region of a CodeInfo object, just align the whole CodeInfo region itself. Change-Id: Ia35d213d2bd184729aa0d048874c76f7bc6da0f6
|
29ba1b068fc9f5a8011782c147b1f7732928aac7 |
|
13-Mar-2015 |
Roland Levillain <rpl@google.com> |
Fix the computation of the size of the stack maps region. In art::StackMapStream::ComputeStackMapSize, compute the size of a CodeInfo's stack maps region using the stack mask size, not the maximum element of the stack mask. Also, rename this method as art::StackMapStream::ComputeStackMapsSize to make it clear it that it covers all the stack maps of the CodeInfo item, not just one stack map. Change-Id: Icad21946dbca6e1ade2b82c9c2c535fdfed110a9
|
9ac0e4d4ed1b45cf8767ef1d339afcdd205bf55a |
|
12-Mar-2015 |
Roland Levillain <rpl@google.com> |
Force word alignment of Dex register maps. Plus some cosmetic changes. Change-Id: I45e805aa87c2ef8fe8907eaae726cd2188b54897
|
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
|
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
|
376b2bbf7c39108223a7a01568a7b4b04d84eeac |
|
09-Dec-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Ensure stack maps are 4 byte aligned. With the recent move to gcc 4.9, we are hitting alignment SIGBUS on ARM. The reason is that gcc will optimize two consecutive 32bits loads into one 64bits load, and the instruction (ldrd) will fail if the data is not aligned. Also removed the emission of mapping table when a method is optimized. The information can be found in the StackMap itself. Change-Id: Icf79406c18a3f4db3c05d52fc2c0dd2e35bf0f8f
|
277ccbd200ea43590dfc06a93ae184a765327ad0 |
|
04-Nov-2014 |
Andreas Gampe <agampe@google.com> |
ART: More warnings Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
|
0279ebb3efd653e6bb255470c99d26949c7bcd95 |
|
09-Oct-2014 |
Ian Rogers <irogers@google.com> |
Tidy ELF builder. Don't do "if (ptr)". Use const. Use DISALLOW_COPY_AND_ASSIGN. Avoid public member variables. Move ValueObject to base and use in ELF builder. Tidy VectorOutputStream to not use non-const reference arguments. Change-Id: I2c727c3fc61769c3726de7cfb68b2d6eb4477e53
|
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
|
8eddd2a379e1d3c76b22f40d3d4387d12ed1a8d1 |
|
28-Jul-2014 |
Andreas Gampe <agampe@google.com> |
ART: Fix missing initialization in stack_map_stream.h Fixes stack_map_test. Change-Id: Ibd6659b589ec595a7af21ad3d727c0ab2dceb45c
|
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
|