| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
Ticket: CYNGNOS-3020
Change-Id: Ice0ab5602479905db8326ee67c41a79f38b5afd2
|
| |
| |
| |
| |
| |
| | |
BUG=27840771
Change-Id: I240f188b2e8f4b45d90138cfb3b14869cf506452
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 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
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
lmp-mr1-dev
* commit '1396cdeb03bf25c33d461a734f6ce739c8c5bc32':
Ensure deterministic multidex partitioning
|
| |\
| | |
| | |
| | |
| | | |
* commit '72353f83ff4057a64ff1e5ae3bc4b90de93e6171':
Ensure deterministic multidex partitioning
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: Ie70b72005a6d3df47adb0e5b1b21b9d7b99b8ab0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is done by sorting inputs before processing them.
Bug: 23305646
Change-Id: Ia55c481f4eb342bc925bc100299324ea470bf9a0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Was only used by the fingerprinter, which has now been
deleted.
Change-Id: I52c251a60ab6a85167fe734626573bc83f86cfcf
|
|\| | |
| | | |
| | | |
| | | |
| | | | |
* commit 'b8a003c7b1a7a733049e6013d73b821786e198d7':
Bump dx version to 1.11
|
| |\| |
| | | |
| | | |
| | | |
| | | | |
* commit '010ac9716931a47686e3f818910102a1231d32c0':
Bump dx version to 1.11
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This version includes "Support --num-threads with --multi-dex"
(cherry picked from commit 7d97556f4b60fd9cf88db6d477500a69a6e853ea)
Change-Id: I712145094205d56358ef0b9ff51f137907d972e9
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
into lmp-mr1-dev
* commit '1d40d9ea62b8c37cf904108ae886bfba5dac0d84':
Fix potential dex index overflow in dx
|
| |\| | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit '7b153a1d75a3f51d38e5742df142f58a82f14fe3':
Fix potential dex index overflow in dx
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit '00d77c918847afb570a38adefc03e6272b63b0ab':
Support --num-threads with --multi-dex (take 2)
|
| |\| | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: Id603b84943b1cb244b69272b4c8607a520c517b2
|
| | |\| | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit 'a6bf300101846c135ed26c10c8a65d625b8fe820':
Do not keep the DexFile field in Main between runs
|
| |\| | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: I906a5fa2ecbdc43656dd64098f38cdf60438e1e3
|
| | |\| | | |
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 18486731
(cherry picked from commit bb404aa9c531c2e1d27b4f7c6d2b03c2b50fb871)
Change-Id: I048f6064cc49c78df21a1c42316761502a0a5366
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
into lmp-mr1-dev
* commit '5ff9033e90312d50947453dfcc4b4a9c9f46f35b':
Command line option for disabling warnings
|
| |\| | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'f052d52e8b28d1b0053cdd6a80b9ce9de5c729d8':
Command line option for disabling warnings
|
| | |\ \ \ |
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'ae1d7c49ebce238309f16acc69c697eb1e6978c5':
Don't discard directory entries in jar files.
|
| |\| | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit '90fcf3599d8450e64e6788504972419cc7184d5a':
Don't discard directory entries in jar files.
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\| | |
| | | |
| | | |
| | | |
| | | | |
* commit '65c602a4939b7d062c8f644a776be5271336b61d':
Descriptor references are direct references
|
| |\| |
| | | |
| | | |
| | | |
| | | | |
* commit '008da7d42d529761ab85b8e92d3dd366f1fad195':
Descriptor references are direct references
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\| | |
| | | |
| | | |
| | | |
| | | | |
* commit '2d13966cfe568cb428f257a6992d013cfb5353e6':
Descriptor references are direct references
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'cc367043000190bff471c5a7a0a9e61b0212a1c9':
Descriptor references are direct references
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit '14d81e140687fb6302ece09649ed07adb14d9b09':
Allow to disable forced keep of annotated
|
| |\ \ \ \ \
| | |/ / / /
| |/| | / /
| | | |/ /
| | |/| | |
* commit '45e4d877614b194e24afbb90024130fd4e3156f5':
Allow to disable forced keep of annotated
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* commit '931b89b5d6e2c0243bc03547df1c9a0e18f1f6f8':
Fix potential dex index overflow in dx
|
| |\ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
MERGE ANYWHERE.
* commit '72a4be698077f0ae2fb2fbb7793d6b22c1f985c2':
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
|
| |/| | | | |
|