summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEADHEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0-0004replicant-6.0-0003replicant-6.0-0002replicant-6.0-0001stable/cm-13.0-ZNH5Ycm-13.0Jessica Wagantall2016-07-071-5/+5
|\ | | | | | | | | | | Ticket: CYNGNOS-3020 Change-Id: Ice0ab5602479905db8326ee67c41a79f38b5afd2
| * Fix potential buffer overrun.Aart Bik2016-05-271-5/+5
| | | | | | | | | | | | BUG=27840771 Change-Id: I240f188b2e8f4b45d90138cfb3b14869cf506452
* | dexdeps: Ignore static initializers on analysis.Adnan Begovic2016-03-041-4/+8
| | | | | | | | | | | | | | | | | | | | CTS's DexDepsXmlHandler's xml parser will error out when it finds a name attribute with a value of "<clinit>". Modify Output class to ignore static initializer elements to work around this. Change-Id: I0ecbd8d0f29336cb6acba08f457bebc014c0ad5c TICKET: CYNGNOS-2189
* | dexdeps: Add option for --include-cm-classes.Adnan Begovic2016-03-022-4/+15
|/ | | | | | | | | | | | dexdeps will filter out classes that are marked as internal when dumping class references from the classes.dex. Include a hack to allow public cm classes to be accessible via the dump. This is then utilized to generate an html page for api coverage. Change-Id: I1f2a8c28b33711235f46adf2f4a98102e72b3d74
* Fixes unnecessary multi-merge steps.Esteban de la Canal2015-10-138-157/+163
| | | | | | | | 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
* am 1396cdeb: am 72353f83: resolved conflicts for merge of ab01c96b to ↵Yohann Roussel2015-08-211-1/+2
|\ | | | | | | | | | | | | lmp-mr1-dev * commit '1396cdeb03bf25c33d461a734f6ce739c8c5bc32': Ensure deterministic multidex partitioning
| * am 72353f83: resolved conflicts for merge of ab01c96b to lmp-mr1-devYohann Roussel2015-08-211-1/+2
| |\ | | | | | | | | | | | | * commit '72353f83ff4057a64ff1e5ae3bc4b90de93e6171': Ensure deterministic multidex partitioning
| | * resolved conflicts for merge of ab01c96b to lmp-mr1-devYohann Roussel2015-08-211-1/+2
| | |\ | | | | | | | | | | | | Change-Id: Ie70b72005a6d3df47adb0e5b1b21b9d7b99b8ab0
| | | * Ensure deterministic multidex partitioningYohann Roussel2015-08-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by sorting inputs before processing them. Bug: 23305646 Change-Id: Ia55c481f4eb342bc925bc100299324ea470bf9a0
* | | | Add a libbase dependency for dexdump/dexlist.Narayan Kamath2015-06-032-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | Remove libdexdump_static.Narayan Kamath2015-05-011-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Was only used by the fingerprinter, which has now been deleted. Change-Id: I52c251a60ab6a85167fe734626573bc83f86cfcf
* | | | am b8a003c7: am 010ac971: Merge "Bump dx version to 1.11" into lmp-mr1-devBenoit Lamarche2015-04-080-0/+0
|\| | | | | | | | | | | | | | | | | | | * commit 'b8a003c7b1a7a733049e6013d73b821786e198d7': Bump dx version to 1.11
| * | | am 010ac971: Merge "Bump dx version to 1.11" into lmp-mr1-devBenoit Lamarche2015-04-080-0/+0
| |\| | | | | | | | | | | | | | | | | | * commit '010ac9716931a47686e3f818910102a1231d32c0': Bump dx version to 1.11
| | * | Merge "Bump dx version to 1.11" into lmp-mr1-devBenoit Lamarche2015-04-081-1/+1
| | |\ \
| | | * | Bump dx version to 1.11Benoit Lamarche2015-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version includes "Support --num-threads with --multi-dex" (cherry picked from commit 7d97556f4b60fd9cf88db6d477500a69a6e853ea) Change-Id: I712145094205d56358ef0b9ff51f137907d972e9
* | | | | am 1d40d9ea: am 7b153a1d: Merge "Fix potential dex index overflow in dx" ↵Benoit Lamarche2015-04-081-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit '1d40d9ea62b8c37cf904108ae886bfba5dac0d84': Fix potential dex index overflow in dx
| * | | | am 7b153a1d: Merge "Fix potential dex index overflow in dx" into lmp-mr1-devBenoit Lamarche2015-04-081-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit '7b153a1d75a3f51d38e5742df142f58a82f14fe3': Fix potential dex index overflow in dx
| | * | | Merge "Fix potential dex index overflow in dx" into lmp-mr1-devBenoit Lamarche2015-04-082-6/+7
| | |\ \ \
| | | * | | Fix potential dex index overflow in dxPeter Jensen2015-04-072-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | am 00d77c91: resolved conflicts for merge of 6be6ed44 to lmp-mr1-dev-plus-aospBenoit Lamarche2015-04-081-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '00d77c918847afb570a38adefc03e6272b63b0ab': Support --num-threads with --multi-dex (take 2)
| * | | | | resolved conflicts for merge of 6be6ed44 to lmp-mr1-dev-plus-aospBenoit Lamarche2015-04-081-1/+0
| |\| | | | | | | | | | | | | | | | | | | | | | Change-Id: Id603b84943b1cb244b69272b4c8607a520c517b2
| | * | | | Merge "Support --num-threads with --multi-dex (take 2)" into lmp-mr1-devBenoit Lamarche2015-04-0816-135/+662
| | |\| | |
| | | * | | Support --num-threads with --multi-dex (take 2)Peter Jensen2015-04-0716-135/+662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | am a6bf3001: resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aospBenoit Lamarche2015-04-070-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a6bf300101846c135ed26c10c8a65d625b8fe820': Do not keep the DexFile field in Main between runs
| * | | | | resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aospBenoit Lamarche2015-04-070-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | Change-Id: I906a5fa2ecbdc43656dd64098f38cdf60438e1e3
| | * | | | Merge "Do not keep the DexFile field in Main between runs" into lmp-mr1-devBenoit Lamarche2015-04-071-6/+11
| | |\| | |
| | | * | | Do not keep the DexFile field in Main between runsBenoit Lamarche2015-04-071-6/+11
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18486731 (cherry picked from commit bb404aa9c531c2e1d27b4f7c6d2b03c2b50fb871) Change-Id: I048f6064cc49c78df21a1c42316761502a0a5366
* | | | | am 5ff9033e: am f052d52e: Merge "Command line option for disabling warnings" ↵Benoit Lamarche2015-04-070-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit '5ff9033e90312d50947453dfcc4b4a9c9f46f35b': Command line option for disabling warnings
| * | | | am f052d52e: Merge "Command line option for disabling warnings" into lmp-mr1-devBenoit Lamarche2015-04-070-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f052d52e8b28d1b0053cdd6a80b9ce9de5c729d8': Command line option for disabling warnings
| | * | | Merge "Command line option for disabling warnings" into lmp-mr1-devBenoit Lamarche2015-04-073-2/+25
| | |\ \ \
| | | * | | Command line option for disabling warningsCsaba Kozák2015-04-073-2/+25
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am ae1d7c49: am 90fcf359: Don\'t discard directory entries in jar files.Narayan Kamath2015-04-070-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'ae1d7c49ebce238309f16acc69c697eb1e6978c5': Don't discard directory entries in jar files.
| * | | | am 90fcf359: Don\'t discard directory entries in jar files.Narayan Kamath2015-04-070-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit '90fcf3599d8450e64e6788504972419cc7184d5a': Don't discard directory entries in jar files.
| | * | | Don't discard directory entries in jar files.Narayan Kamath2015-04-071-17/+17
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 65c602a4: am 008da7d4: Descriptor references are direct referencesYohann Roussel2015-04-070-0/+0
|\| | | | | | | | | | | | | | | | | | | * commit '65c602a4939b7d062c8f644a776be5271336b61d': Descriptor references are direct references
| * | | am 008da7d4: Descriptor references are direct referencesYohann Roussel2015-04-070-0/+0
| |\| | | | | | | | | | | | | | | | | | * commit '008da7d42d529761ab85b8e92d3dd366f1fad195': Descriptor references are direct references
| | * | Descriptor references are direct referencesYohann Roussel2015-04-071-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 2d13966c: am cc367043: Merge "Descriptor references are direct references"Yohann Roussel2015-04-071-14/+30
|\| | | | | | | | | | | | | | | | | | | * commit '2d13966cfe568cb428f257a6992d013cfb5353e6': Descriptor references are direct references
| * | | am cc367043: Merge "Descriptor references are direct references"Yohann Roussel2015-04-071-14/+30
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit 'cc367043000190bff471c5a7a0a9e61b0212a1c9': Descriptor references are direct references
| | * \ \ Merge "Descriptor references are direct references"Yohann Roussel2015-04-071-14/+30
| | |\ \ \
| | | * | | Descriptor references are direct referencesYohann Roussel2015-03-171-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Change-Id: Ibdc8c3c129148994b3b28882db1c2ec38e9bbea8
* | | | | | am 14d81e14: am 45e4d877: Allow to disable forced keep of annotatedYohann Roussel2015-04-030-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '14d81e140687fb6302ece09649ed07adb14d9b09': Allow to disable forced keep of annotated
| * | | | | am 45e4d877: Allow to disable forced keep of annotatedYohann Roussel2015-04-030-0/+0
| |\ \ \ \ \ | | |/ / / / | |/| | / / | | | |/ / | | |/| | * commit '45e4d877614b194e24afbb90024130fd4e3156f5': Allow to disable forced keep of annotated
| | * | | Allow to disable forced keep of annotatedYohann Roussel2015-03-223-8/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am 931b89b5: Merge "Fix potential dex index overflow in dx"Benoit Lamarche2015-03-272-6/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '931b89b5d6e2c0243bc03547df1c9a0e18f1f6f8': Fix potential dex index overflow in dx
| * | | | Merge "Fix potential dex index overflow in dx"Benoit Lamarche2015-03-272-6/+7
| |\ \ \ \
| | * | | | Fix potential dex index overflow in dxPeter Jensen2015-03-272-6/+7
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am 72a4be69: (-s ours) reset to lmp-mr1-dev-plus-aosp with history. DO NOT ↵Qiwen Zhao2015-03-220-0/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MERGE ANYWHERE. * commit '72a4be698077f0ae2fb2fbb7793d6b22c1f985c2':
| * \ \ \ \ reset to lmp-mr1-dev-plus-aosp with history. DO NOT MERGE ANYWHERE.Qiwen Zhao2015-03-200-0/+0
| |\ \ \ \ \ | | |/ / / / | |/| | | |
| | * | | | reset to 8205cac with history.Qiwen Zhao2015-03-200-0/+0
| |/| | | |