summaryrefslogtreecommitdiffstats
path: root/dx
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Run DeadCodeRemover only one time" into ub-jackmikaelpeltier2015-04-281-10/+1
|\
| * Run DeadCodeRemover only one timemikaelpeltier2015-04-281-10/+1
| | | | | | | | | | | | - It is only mandatory to run it before Phi type resolver. Change-Id: Id0eb78d58e4ac7eadb35079322e8cdf210dac79a
* | Optimize DexFile.prepareWojciech Staszkiewicz2015-04-282-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | In current implementation DexFile.prepare takes a list of CstIndexMap Those maps hold nondistinct constants, which are interned into Sections. Because they are nondistinct, many intern attempts fail. When compiling Music app incrementally it is 362980 failed intern attempts vs only 142850 succesful. We can very easily save that time, by passing to DexFile.prepare sets of distinct constants that we compute in ConstantManager. This saves ~100ms of time. Change-Id: Iaf8ba352f0619600642b103b3537b74608ba2f1e
* | Reduce number of DexBuffer.Section instances createdWojciech Staszkiewicz2015-04-281-11/+29
|/ | | | | | | | | | When compiling Music app incrementally Jack creates 417354 instances of DexBuffer.Section. Most of them are created internally just to call a method on them. This patch introduces an internal section which is reused for those internal purposes. This reduces number of created objects by 315577, which is around 8 MB. Change-Id: Ic28dab607095d82879461e60efff2db3dfc62f13
* Remove unused parameters from dxmikaelpeltier2015-04-167-51/+21
| | | | Change-Id: I22068beaf08258e6e5c7a80e101e4aed682bd564
* Speed-up Jack mergermikaelpeltier2015-04-071-63/+68
| | | | | | | | - Try to reuse same objects (CstString, CstType and so on) each time that it is possible. - Replace maps by arrays when it is possible. Change-Id: I227326bd9eb707b94a4edd8761ac06766078362f
* Merge "Simplify set and get method of IntList to enable Jit inlining" into ↵mikaelpeltier2015-03-271-23/+2
|\ | | | | | | ub-jack
| * Simplify set and get method of IntList to enable Jit inliningmikaelpeltier2015-03-261-23/+2
| | | | | | | | Change-Id: Ia28ac670894233f7434053b66fb8d6664f92d2fa
* | Simplify set0 and get0 method to enable Jit inliningmikaelpeltier2015-03-261-32/+2
|/ | | | Change-Id: I3cec0e9d56f55e5d784343573f99cd668b3727f2
* Stop creating CstString bytes eagerly.Piotr Jastrzebski2015-03-161-17/+36
| | | | | | | | | | | | | | | | | Profiler showed that during a Music app compilation we create 1,364,332 instances of CstStrings. They require allocation of 395MB which is 6.4% of all memory allocated. It requires 5,457,328 allocations. Most of them is done in stringToUtf8Bytes. Fortunately only 157,495 instances actually uses the |bytes| field. This means that if we create |bytes| lazily then we can save a lot of memory and cpu (stringToUtf8Bytes is also a cpu hotspot). This change makes |bytes| in CtsString lazily computed. For Music app the memory allocation is reduced by 353MB which is 5.6% of all memory allocated. It also saves us 3,788,436 allocations. Change-Id: I8f2980be07da29d31fc639543dfb9b3966c8cd4e
* Read some sections of dex in DexBuffer constructorPiotr Jastrzebski2015-03-061-61/+69
| | | | | | | | | | | | | | | | | | | I profiled the incremental compilation of Music app and it showed that we are reading and creating 1,330,524 strings from dex files in DexBuffers. I checked and the total of strings in all dex files represented by DexBuffers is 284979. That's around 20% of what we were reading. The conclusion was that we read the same strings over and over again. Then I looked at ConstantManager.addDexFile and it striked me that we need all strings, typeIds, typeNames, fieldIds and methodIds anyway because we iterate over them in addDexFile. This means that we can as well read all of them when DexBuffer is created. This way we save a lot of cpu and memory allocations. Strings alone were taking 70MB of heap. Now we're allocating only 20% of it. This change speeds up incremental compilation by over 12.5%. Change-Id: Iee18e9d17419886e552e3fd0b1143d2bb7220c9c
* Avoid unnecessary creation of StringIdItem objectsPiotr Jastrzebski2015-03-021-1/+15
| | | | | | | | | | | | | Profiler showed for Music app that StringIdsSection.intern(CstString) was called 430594 times and only 52903 times strings.get(value) in StringIdsSection.intern(StringIdItem) returned null. This means that 377691 instances of StringIdItem were created unnecessarily. StringIdsSection.intern(CstString) created them to be able to use StringIdsSection.intern(StringIdItem) but inside this method CstString is obtained from StringIdItem and StringIdItem is useless unless strings.get(value) returns null. Change-Id: I08978b0a28fe7bd13805e44f9d52a4bbf137fd0b
* Revert "Avoid register overlapping of register category 2"mikaelpeltier2015-02-031-10/+0
| | | | | | | | | This reverts commit 725531e58b3823e21f8350d718a2e600edd1b088 - Until 64 bit registers alignment is enabled, Jack can not generate overlapping. Change-Id: I3f110207a49148a019f11bf01d0c3d592e54047b
* Use DexBuffer instead of dexdump in multidex testsYohann Roussel2015-01-131-1/+8
| | | | | Bug: 18198750 Change-Id: Ic091f405584cf1857eb595fdbf9a97ed9cc8113c
* Merge "Do not align 64-bit registers during instruction expansion" into ub-jackmikaelpeltier2014-07-232-51/+6
|\
| * Do not align 64-bit registers during instruction expansionmikaelpeltier2014-07-282-51/+6
| | | | | | | | | | | | | | | | - The reordering performs during instruction expansion is not correct for all instructions, in particular for xxx/range instructions that require sequential registers. Change-Id: Ia06ddc74b95f656060ac6929b30eb2967ec2e48a
* | Remove dex file preparer schedulablemikaelpeltier2014-07-281-0/+9
|/ | | | | | | | | - add prepare() method that can be used when mapping is not required during prepare stage. (cherry picked from commit a5f57a9971c02f7d2b7de9e9cc485a516303c7ec) Change-Id: I19113a3ed682fa104d96df5f175a936578beb6ce
* Fix bad debug info due to 64-bit registers alignmentmikaelpeltier2014-07-175-1/+50
| | | | | | - Registers of LocalStart and LocalSnapshot must also be shift when it is required. Change-Id: Ib6d605a80dea1f16f77fa188995cc9d4e6a6fa38
* Add comment explaining why some instructions are skippedmikaelpeltier2014-07-171-0/+4
| | | | | | | - Some instructions must be skipped when shifting registers during 64-bits alignment due to reference between instructions. Change-Id: I168f2b30f718e48aa4cbf5833acb61374be9a18b
* Merge "Remove LocalEnd since it is not used" into jack-wip-devmikaelpeltier2014-07-172-93/+0
|\
| * Remove LocalEnd since it is not usedmikaelpeltier2014-07-172-93/+0
| | | | | | | | Change-Id: Ib8603253db5b1fc6c62d3a742ca718854cf8394e
* | Remove old dex mergermikaelpeltier2014-07-177-1695/+1
|/ | | | Change-Id: I7d2bc7fc298c83a9869787dc1fdbaac9cffdb947
* Add missing Javadocs in Dx and SchedulerBenoit Lamarche2014-06-261-1/+3
| | | | Change-Id: I2de20c24cc5615adc16126a1cc485073781dda79
* Merge "Add dex merger tool" into jack-wip-devmikaelpeltier2014-06-243-6/+6
|\
| * Add dex merger toolmikaelpeltier2014-06-253-6/+6
| | | | | | | | Change-Id: I8a822b7e3f0fb57ddc6259e5375a59dad64b31f5
* | Add javadoc check to CheckstyleBenoit Lamarche2014-06-251-0/+19
|/ | | | Change-Id: I73353699430eff4d5d7a3abb42e62fe91f481a03
* Change sorting of AnnotationsDirectoryItemmikaelpeltier2014-06-241-4/+4
| | | | | | | - Do the sort of AnnotationDirectoryItem content earlier allows to be deterministic with this item. Change-Id: I43c0e957e6f44f9104dc0112414bf74ba65fcbe7
* Align Dx project config with Jack project configmikaelpeltier2014-06-191-1/+1
| | | | Change-Id: I1c1dc471260d6c22d061151eb45c095d7b4892b8
* Modify how debug information will be importedmikaelpeltier2014-06-162-10/+24
| | | | | | | - Size of debug information is not longer provided but it will be compute automatically Change-Id: Ie46021bcc307eca0c5104f869926ee96bcf3b492
* Add helpers to read encoded value as int and longmikaelpeltier2014-06-161-0/+100
| | | | Change-Id: Iee03ff5bdf7e62cd477ef471affeb6c236d3f68c
* Add getAnnotationVisibility method into Dxmikaelpeltier2014-06-161-0/+20
| | | | Change-Id: I608305ede4cd372c49f8576d9d7741941f154d2c
* Change eclipse setting to point to libs and tools generated by ant.Jean-Marie Henaff2014-06-031-1/+1
| | | | Change-Id: I8733b091f88ff333d7de1db9eb5485f796e6051a
* Allow to disable dex merger message by APImikaelpeltier2014-05-231-16/+20
| | | | Change-Id: Ifebfb0cef973a6c2f8b27231afc228d95f265672
* Update dex index overflow detectionBenoit Lamarche2014-05-147-14/+65
| | | | | | This was done in accordance with master. Change-Id: I6f3c0b67a7241d933f90fb9fcaa924ce6b028369
* Remove useless classes from Dx projectmikaelpeltier2014-04-253-197/+0
| | | | Change-Id: I6af38cd11d7852cbb46a0a75164f1161a635a19e
* Remove escape analysis since it is always disabledmikaelpeltier2014-04-252-828/+1
| | | | Change-Id: Ic4ee669aea4c361f72f991ed199fef4c6afb0df1
* Remove move param combiner optimizationmikaelpeltier2014-04-242-162/+1
| | | | | | | - Jack generates only one move-param instruction by parameters, thus this optimization is useless. Change-Id: Ib2869ea9ed0a4cf99d0f2408d4962989835c2d9d
* Merge "Update Dx project config to be the same than Jack" into jack-wip-devmikaelpeltier2014-04-2327-120/+231
|\
| * Update Dx project config to be the same than Jackmikaelpeltier2014-04-2327-120/+231
| | | | | | | | | | | | - Fix all warnings or errors related to the new config. Change-Id: I18e70bfec36c49f02add069edbf442a70e9050cf
* | Merge "Clean dx module of jack." into jack-wip-devJean-Marie Henaff2014-04-222-9/+0
|\ \ | |/ |/|
| * Clean dx module of jack.Jean-Marie Henaff2014-04-172-9/+0
| | | | | | | | | | | | Remove manifest since we only need it as a library. Change-Id: I600eef8d93d41d87f3ec41dffbdcd48ed2ab3921
* | Remove unused parametersmikaelpeltier2014-04-221-12/+0
| | | | | | | | Change-Id: I24df3575733efb5cc052c565e1478549d39a3b6d
* | Merge "Remove all remaining warnings from Dx project" into jack-wip-devmikaelpeltier2014-04-1832-108/+117
|\ \
| * | Remove all remaining warnings from Dx projectmikaelpeltier2014-04-1732-108/+117
| |/ | | | | | | Change-Id: I85ce2bc13ffcdfc00e023bdcb0cbd1d7df5b0975
* | Merge "Suppress warnings in package com/android/jack/dx/dex/" into jack-wip-devmikaelpeltier2014-04-1812-49/+18
|\ \
| * | Suppress warnings in package com/android/jack/dx/dex/mikaelpeltier2014-04-1712-49/+18
| |/ | | | | | | Change-Id: I19d044336c35889b7d0b4fb6607fb2dbe49744d7
* | Align 64-bits registers on even dalvik registersmikaelpeltier2014-04-1711-53/+375
|/ | | | | | | | | | | | | | | | | The following alignments are done during register allocation - Align 64-bit registers that are not parameters by modifying the method giving the next free register to take into account alignment constraints. - Align the first register of a range to maximize the number of 64-bit registers that will be aligned into the range The following alignments are done during instruction massaging - Mov instructions inserted to transfer registers which are not compatible with the selected instruction will use even registers for 64-bit registers - Insert the right number of registers during instruction massaging in order not to break alignment done by the register allocator - Align parameters to maximize the number of 64-bit register aligned Change-Id: Iafd85eb8455701595845803e503896247a1927bd
* Merge "Split dex file writing into prepare and writing stage" into jack-wip-devmikaelpeltier2014-04-112-30/+49
|\
| * Split dex file writing into prepare and writing stagemikaelpeltier2014-04-112-30/+49
| | | | | | | | Change-Id: I22669d68720aeb5978c3c22f6b8d50cf21b8008c
* | Add JSR305 library to dx projectmikaelpeltier2014-04-112-0/+2
|/ | | | Change-Id: I5f770c4a5037ef61be54bfd14815a8c31a26e2ee