- 02 May, 2016 10 commits
-
- 22 Apr, 2016 1 commit
-
-
Aart Bik authored
BUG=27840771 Change-Id: I240f188b2e8f4b45d90138cfb3b14869cf506452
-
- 14 Oct, 2015 1 commit
-
-
Esteban de la Canal authored
Changes merging from quadratic in the number of classes to linear. This has a tremendous speed up while merging many dexes at the same time. A sample test (iosched app) with 29 dexes goes from 6 seconds to 1. Change-Id: Iff02a0dc44d098b0878e88d18f5f4083804a6495
-
- 21 Aug, 2015 3 commits
-
-
Yohann Roussel authored
* commit '1396cdeb': Ensure deterministic multidex partitioning
-
Yohann Roussel authored
* commit '72353f83': Ensure deterministic multidex partitioning
-
Yohann Roussel authored
Change-Id: Ie70b72005a6d3df47adb0e5b1b21b9d7b99b8ab0
-
- 19 Aug, 2015 1 commit
-
-
Yohann Roussel authored
This is done by sorting inputs before processing them. Bug: 23305646 Change-Id: Ia55c481f4eb342bc925bc100299324ea470bf9a0
-
- 04 Jun, 2015 1 commit
-
-
Narayan Kamath authored
Required by the libziparchive static dependency. Also fix a few tabs in the makefile. Bug: http://b/21558406 Change-Id: Iaa7aad6e7f3dfc6014651385d7182c009e182914 (cherry picked from commit a06ce75c)
-
- 01 May, 2015 1 commit
-
-
Narayan Kamath authored
Was only used by the fingerprinter, which has now been deleted. Change-Id: I52c251a60ab6a85167fe734626573bc83f86cfcf
-
- 08 Apr, 2015 9 commits
-
-
Benoit Lamarche authored
* commit 'b8a003c7': Bump dx version to 1.11
-
Benoit Lamarche authored
* commit '1d40d9ea': Fix potential dex index overflow in dx
-
Benoit Lamarche authored
* commit '00d77c91': Support --num-threads with --multi-dex (take 2)
-
Benoit Lamarche authored
* commit '010ac971': Bump dx version to 1.11
-
Benoit Lamarche authored
* commit '7b153a1d': Fix potential dex index overflow in dx
-
Benoit Lamarche authored
Change-Id: Id603b84943b1cb244b69272b4c8607a520c517b2
-
Benoit Lamarche authored
-
Benoit Lamarche authored
-
Benoit Lamarche authored
-
- 07 Apr, 2015 13 commits
-
-
Benoit Lamarche authored
* commit 'a6bf3001': Do not keep the DexFile field in Main between runs
-
Benoit Lamarche authored
Change-Id: I906a5fa2ecbdc43656dd64098f38cdf60438e1e3
-
Benoit Lamarche authored
* commit '5ff9033e': Command line option for disabling warnings
-
Narayan Kamath authored
* commit 'ae1d7c49': Don't discard directory entries in jar files.
-
Benoit Lamarche authored
* commit 'f052d52e': Command line option for disabling warnings
-
Narayan Kamath authored
* commit '90fcf359': Don't discard directory entries in jar files.
-
Benoit Lamarche authored
-
Benoit Lamarche authored
-
Yohann Roussel authored
* commit '65c602a4': Descriptor references are direct references
-
Benoit Lamarche authored
This version includes "Support --num-threads with --multi-dex" (cherry picked from commit 7d97556f) Change-Id: I712145094205d56358ef0b9ff51f137907d972e9
-
Peter Jensen authored
Revert change to dex rotation algorithm made as part of commit: 845d9d0e Bug: https://code.google.com/p/android/issues/detail?id=161887 Signed-off-by:
Peter Jensen <jensenp@google.com> (cherry picked from commit d024c067) Change-Id: Iede742620854cef3542bf98b77e66aa8a305195e
-
Peter Jensen authored
With fix for regression introduced in original commit. The current dx implementation supports options --multi-dex, for applications not fitting within the dex format limitations; and --num-threads=N, triggers concurrent processing of multiple input files. However, the implementation has the following limitations: The --num-threads option is disabled when used together with --multi-dex. The --num-threads option implements concurrency at the level of classpath entries, and does nothing when the classes to be translated are specified with a single classpath element (e.g. single jar output from Proguard). The existing --num-threads implementation may produce indeterministic output. The heuristic used by the --multi-dex option to determine when to rotate the dex output file is overly conservative. The primary objective of this change is: Concurrent translation of classes, independently of input specification format. Support --num-threads=N in both mono- and multi-dex mode. Deterministic class output order. Near optimal use of dex file format capacity. This is accomplished by reorganizing the dx workflow in a pipeline of concurrent phases. read-class | parse-class | translate-class | add-to-dex | convert-dex-to-byte[]; output-dex-files-or-jar To manage dex file rotation (i.e. --multi-dex support), the parse-class and add-to-dex phases are synchronized to prevent forwarding classes to the translate-class phase if it could potentially result in breaking the dex format limitations. The heuristic currently used to estimate the number of indices needed for a class is improved, to minimize the amount of serialization imposed by this feedback mechanism, and to improve the use of dex file capacity. The translate-class and convert-dex-to-byte[] phases are further parallelized with configurable (--num-threads=N option) thread pools. This allow translating classes concurrently, while also performing output conversion in parallel. Separate collector threads are used to collect results from the thread pools in deterministic order. Testing was performed on an Ubuntu system, with 6 cores and 12 hardware threads. The taskset command was used to experimentally establish that running with more than 8 hardware threads does not provide any additional benefit. Experiments shows that the argument to --num-threads should not exceed the lesser of the number of available hardware threads, and 5. Setting it to a higher value results in no additional benefit. The gain is generally larger for larger applications, and not significant for small applications with less than a few thousands classes. Experiments with generated classes shows that for large applications gains as high as 50% may be possible. For an existing real-life application with more than 11k classes, and requiring 2 dex files, a speed-up of 37% was achieved (--num-threads=5, 8 hardware threads, 4g Java heap). A speedup of 31% was observed for another application with ~7 classes. For small applications, use of --num-threads=N>1 doesn’t provide significant benefit. Running with --num-threads=1, the modified dx is slightly faster, but no significant gain is observed unless the application requires multiple dex files. The one case where a significant regression may be observed is when using --num-threads=N>1, with a single hardware thread. This is an inappropriate configuration, even with the current implementation. However, because of the limitations of the current implementation, such configurations may exist. For instance, a configuration using both --multi-dex and --num-threads=5 will currently generate a warning about using the two options together. With the new implementation, the options can legitimately be used together, and could result in an ~20% regression running on a single hardware thread. Note: the current dx implementation, without --num-threads option, is already approximately 50% slower with 1 hardware thread, compared to running with 2 or more. With 2 hardware threads the implementations are practically at par (a little better, or a little worse, depending on the application). Testing: Tested with 6 existing applications ranging in size from 1K - 12K classes. Updated and tested with relevant existing unit tests (one test changed to account for better dex rotation heuristic). Added unit test to test deterministic output. Added unit performance test. By default run script merely validates that --multi-dex and --num-threads can be used together (fast). However, the test is configurable to perform performance test, over sets of generated classes. Signed-off-by:
Peter Jensen <jensenp@google.com> (cherry picked from commit 845d9d0e) (cherry picked from commit dd140a22) Change-Id: I33a8ea0451efc0af7eb1d72e80cb926d6583d569
-
Narayan Kamath authored
This is a structural change, and breaks code that looks up directory resource names (icu4j for example). This change also includes a minor cosmetic change to use a while() loop instead of for(;;). bug: 19108324 (cherry picked from commit 7736e8ff) Change-Id: Ifcbc60cc7808334cdfdd4f27bf137a8f6455117d
-