summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-21am 1396cdeb: am 72353f83: resolved conflicts for merge of ab01c96b to ↵android-cts-6.0_r9android-cts-6.0_r8android-cts-6.0_r7android-cts-6.0_r6android-cts-6.0_r5android-cts-6.0_r4android-cts-6.0_r32android-cts-6.0_r31android-cts-6.0_r30android-cts-6.0_r3android-cts-6.0_r29android-cts-6.0_r28android-cts-6.0_r27android-cts-6.0_r26android-cts-6.0_r25android-cts-6.0_r24android-cts-6.0_r23android-cts-6.0_r22android-cts-6.0_r21android-cts-6.0_r20android-cts-6.0_r2android-cts-6.0_r19android-cts-6.0_r18android-cts-6.0_r17android-cts-6.0_r16android-cts-6.0_r15android-cts-6.0_r14android-cts-6.0_r13android-cts-6.0_r12android-cts-6.0_r1android-6.0.0_r7android-6.0.0_r6android-6.0.0_r5android-6.0.0_r4android-6.0.0_r3android-6.0.0_r26android-6.0.0_r25android-6.0.0_r24android-6.0.0_r23android-6.0.0_r2android-6.0.0_r13android-6.0.0_r12android-6.0.0_r11android-6.0.0_r1marshmallow-releasemarshmallow-dr-releasemarshmallow-dr-devmarshmallow-devmarshmallow-cts-releaseYohann Roussel
lmp-mr1-dev * commit '1396cdeb03bf25c33d461a734f6ce739c8c5bc32': Ensure deterministic multidex partitioning
2015-08-21am 72353f83: resolved conflicts for merge of ab01c96b to lmp-mr1-devYohann Roussel
* commit '72353f83ff4057a64ff1e5ae3bc4b90de93e6171': Ensure deterministic multidex partitioning
2015-08-21resolved conflicts for merge of ab01c96b to lmp-mr1-devYohann Roussel
Change-Id: Ie70b72005a6d3df47adb0e5b1b21b9d7b99b8ab0
2015-08-19Ensure deterministic multidex partitioningYohann Roussel
This is done by sorting inputs before processing them. Bug: 23305646 Change-Id: Ia55c481f4eb342bc925bc100299324ea470bf9a0
2015-06-03Add a libbase dependency for dexdump/dexlist.Narayan Kamath
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 a06ce75c10dce097c0a040562393e5889fa264f1)
2015-05-01Remove libdexdump_static.Narayan Kamath
Was only used by the fingerprinter, which has now been deleted. Change-Id: I52c251a60ab6a85167fe734626573bc83f86cfcf
2015-04-08am b8a003c7: am 010ac971: Merge "Bump dx version to 1.11" into lmp-mr1-devBenoit Lamarche
* commit 'b8a003c7b1a7a733049e6013d73b821786e198d7': Bump dx version to 1.11
2015-04-08am 1d40d9ea: am 7b153a1d: Merge "Fix potential dex index overflow in dx" ↵Benoit Lamarche
into lmp-mr1-dev * commit '1d40d9ea62b8c37cf904108ae886bfba5dac0d84': Fix potential dex index overflow in dx
2015-04-08am 00d77c91: resolved conflicts for merge of 6be6ed44 to lmp-mr1-dev-plus-aospBenoit Lamarche
* commit '00d77c918847afb570a38adefc03e6272b63b0ab': Support --num-threads with --multi-dex (take 2)
2015-04-08am 010ac971: Merge "Bump dx version to 1.11" into lmp-mr1-devBenoit Lamarche
* commit '010ac9716931a47686e3f818910102a1231d32c0': Bump dx version to 1.11
2015-04-08am 7b153a1d: Merge "Fix potential dex index overflow in dx" into lmp-mr1-devBenoit Lamarche
* commit '7b153a1d75a3f51d38e5742df142f58a82f14fe3': Fix potential dex index overflow in dx
2015-04-08resolved conflicts for merge of 6be6ed44 to lmp-mr1-dev-plus-aospBenoit Lamarche
Change-Id: Id603b84943b1cb244b69272b4c8607a520c517b2
2015-04-08Merge "Bump dx version to 1.11" into lmp-mr1-devandroid-5.1.1_r5android-5.1.1_r17android-5.1.1_r12Benoit Lamarche
2015-04-08Merge "Fix potential dex index overflow in dx" into lmp-mr1-devBenoit Lamarche
2015-04-08Merge "Support --num-threads with --multi-dex (take 2)" into lmp-mr1-devBenoit Lamarche
2015-04-07am a6bf3001: resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aospBenoit Lamarche
* commit 'a6bf300101846c135ed26c10c8a65d625b8fe820': Do not keep the DexFile field in Main between runs
2015-04-07resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aospBenoit Lamarche
Change-Id: I906a5fa2ecbdc43656dd64098f38cdf60438e1e3
2015-04-07am 5ff9033e: am f052d52e: Merge "Command line option for disabling warnings" ↵Benoit Lamarche
into lmp-mr1-dev * commit '5ff9033e90312d50947453dfcc4b4a9c9f46f35b': Command line option for disabling warnings
2015-04-07am ae1d7c49: am 90fcf359: Don\'t discard directory entries in jar files.Narayan Kamath
* commit 'ae1d7c49ebce238309f16acc69c697eb1e6978c5': Don't discard directory entries in jar files.
2015-04-07am f052d52e: Merge "Command line option for disabling warnings" into lmp-mr1-devBenoit Lamarche
* commit 'f052d52e8b28d1b0053cdd6a80b9ce9de5c729d8': Command line option for disabling warnings
2015-04-07am 90fcf359: Don\'t discard directory entries in jar files.Narayan Kamath
* commit '90fcf3599d8450e64e6788504972419cc7184d5a': Don't discard directory entries in jar files.
2015-04-07Merge "Do not keep the DexFile field in Main between runs" into lmp-mr1-devBenoit Lamarche
2015-04-07Merge "Command line option for disabling warnings" into lmp-mr1-devBenoit Lamarche
2015-04-07am 65c602a4: am 008da7d4: Descriptor references are direct referencesYohann Roussel
* commit '65c602a4939b7d062c8f644a776be5271336b61d': Descriptor references are direct references
2015-04-07Bump dx version to 1.11Benoit Lamarche
This version includes "Support --num-threads with --multi-dex" (cherry picked from commit 7d97556f4b60fd9cf88db6d477500a69a6e853ea) Change-Id: I712145094205d56358ef0b9ff51f137907d972e9
2015-04-07Fix potential dex index overflow in dxPeter Jensen
Revert change to dex rotation algorithm made as part of commit: 845d9d0eed0f6556e11ee7f7204fda9c8dd41154 Bug: https://code.google.com/p/android/issues/detail?id=161887 Signed-off-by: Peter Jensen <jensenp@google.com> (cherry picked from commit d024c06726c7e119ee76395611aa7cfe3b0a8b7e) Change-Id: Iede742620854cef3542bf98b77e66aa8a305195e
2015-04-07Support --num-threads with --multi-dex (take 2)Peter Jensen
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 845d9d0eed0f6556e11ee7f7204fda9c8dd41154) (cherry picked from commit dd140a22d90495045024334a91770acaad8e065e) Change-Id: I33a8ea0451efc0af7eb1d72e80cb926d6583d569
2015-04-07Don't discard directory entries in jar files.Narayan Kamath
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 7736e8ff04c2974edd9de9ca150f12dc601b005d) Change-Id: Ifcbc60cc7808334cdfdd4f27bf137a8f6455117d
2015-04-07Do not keep the DexFile field in Main between runsBenoit Lamarche
Bug: 18486731 (cherry picked from commit bb404aa9c531c2e1d27b4f7c6d2b03c2b50fb871) Change-Id: I048f6064cc49c78df21a1c42316761502a0a5366
2015-04-07Command line option for disabling warningsCsaba Kozák
This commit adds a new command line option to dx: --no-warning. If the caller appends this to the arguments, dx won't print warnings to System.err. This can be useful if the user dexes external jars with old class format, so dx would print lot of warning about those. Bug: https://code.google.com/p/android/issues/detail?id=78285 Signed-off-by: Csaba Kozák <kozakcsabi@gmail.com> (cherry picked from commit ef1de423e70704c478ee77956f44b0a040d8bede) Change-Id: I6d09c684b5eb97aa28e0b12e3ef44b46293c7dec
2015-04-07am 008da7d4: Descriptor references are direct referencesYohann Roussel
* commit '008da7d42d529761ab85b8e92d3dd366f1fad195': Descriptor references are direct references
2015-04-07Descriptor references are direct referencesYohann Roussel
We have to parse descriptors and treat the types they reference as direct reference as we do for other direct type references. This is required because Dalvik verifier is checking those descriptor the same way as it does for other type references. See: https://android.googlesource.com/platform/dalvik/+/kitkat-mr2.2-release/vm/analysis/CodeVerify.cpp#637 Bug: 19626444 (cherry picked from commit 8f9fb34f2d53beb22ad9055eb071a93157b922ba) Change-Id: Ib9f43dd0c5f0b983fcc80e13caa13fd8b2dc2244
2015-04-07am 2d13966c: am cc367043: Merge "Descriptor references are direct references"Yohann Roussel
* commit '2d13966cfe568cb428f257a6992d013cfb5353e6': Descriptor references are direct references
2015-04-07am cc367043: Merge "Descriptor references are direct references"Yohann Roussel
* commit 'cc367043000190bff471c5a7a0a9e61b0212a1c9': Descriptor references are direct references
2015-04-07Merge "Descriptor references are direct references"android-wear-5.1.1_r1android-wear-5.1.0_r1Yohann Roussel
2015-04-03am 14d81e14: am 45e4d877: Allow to disable forced keep of annotatedYohann Roussel
* commit '14d81e140687fb6302ece09649ed07adb14d9b09': Allow to disable forced keep of annotated
2015-04-03am 45e4d877: Allow to disable forced keep of annotatedYohann Roussel
* commit '45e4d877614b194e24afbb90024130fd4e3156f5': Allow to disable forced keep of annotated
2015-03-27am 931b89b5: Merge "Fix potential dex index overflow in dx"Benoit Lamarche
* commit '931b89b5d6e2c0243bc03547df1c9a0e18f1f6f8': Fix potential dex index overflow in dx
2015-03-27Merge "Fix potential dex index overflow in dx"Benoit Lamarche
2015-03-27Fix potential dex index overflow in dxPeter Jensen
Revert change to dex rotation algorithm made as part of commit: 845d9d0eed0f6556e11ee7f7204fda9c8dd41154 Bug: https://code.google.com/p/android/issues/detail?id=161887 Change-Id: I255aa52b74c921a78e77671ae6187157fef011e1 Signed-off-by: Peter Jensen <jensenp@google.com>
2015-03-22Allow to disable forced keep of annotatedYohann Roussel
We force all classes annotated with runtime annotation to be kept in the main dex list. This allow to workaround a Dalvik bug when accessing the annotations. But this increase the pressure in the main dex indexes. The new option is to allow to disable this workaround for application facing the index limit in their main dex and that don't access annotation at runtime or that have only annotations not subject to the resolution bug. Bug: 18928046 Change-Id: Ibcd7e579a7fef3451ec8aeb266ea67514d82cd50
2015-03-22am 72a4be69: (-s ours) reset to lmp-mr1-dev-plus-aosp with history. DO NOT ↵Qiwen Zhao
MERGE ANYWHERE. * commit '72a4be698077f0ae2fb2fbb7793d6b22c1f985c2':
2015-03-20reset to lmp-mr1-dev-plus-aosp with history. DO NOT MERGE ANYWHERE.Qiwen Zhao
2015-03-20reset to 8205cac with history.Qiwen Zhao
2015-03-20am 0661627c: am 51deeeae: Merge "Remove references to the simulator."Elliott Hughes
* commit '0661627cf641ea71d8f5a78deb758e49b12c2d3a': Remove references to the simulator.
2015-03-20am a1e7a2bb: am c4168d85: Merge "Update ziparchive usage to the new API."Piotr Jastrzebski
* commit 'a1e7a2bb6f0e4e3deeb5faf4acd403b5d6385069': Update ziparchive usage to the new API.
2015-03-20am 714f5c53: am 870b4f2d: Dalvik is dead, long live Dalvik!Brian Carlstrom
* commit '714f5c5388b2da9aaec40a2237b68c4d2695bd75':
2015-03-20am b19ed0d9: am fb5b0d5b: Merge "Do not align 64-bit registers during ↵mikaelpeltier
instruction expansion" * commit 'b19ed0d9c0f50c39d5f7ca2ddf1a3aba9f1a0263': Do not align 64-bit registers during instruction expansion
2015-03-20am 2cd296ba: am 76e15e36: Do not align 64-bit registers during instruction ↵mikaelpeltier
expansion * commit '2cd296ba8f47c7dcc5940bcbf9ff80db76638eb2':
2015-03-20am c497f502: am 878445a7: Merge "Do not generate empty dex in multidex." ↵Yohann Roussel
into lmp-dev * commit 'c497f502d4525a9ecc3355be03775145fbff02e6':