1. 02 May, 2016 10 commits
  2. 22 Apr, 2016 1 commit
  3. 14 Oct, 2015 1 commit
    • Esteban de la Canal's avatar
      Fixes unnecessary multi-merge steps. · f8ed7d3f
      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
      f8ed7d3f
  4. 21 Aug, 2015 3 commits
  5. 19 Aug, 2015 1 commit
  6. 04 Jun, 2015 1 commit
  7. 01 May, 2015 1 commit
    • Narayan Kamath's avatar
      Remove libdexdump_static. · 98dcefd3
      Narayan Kamath authored
      Was only used by the fingerprinter, which has now been
      deleted.
      
      Change-Id: I52c251a60ab6a85167fe734626573bc83f86cfcf
      98dcefd3
  8. 08 Apr, 2015 9 commits
  9. 07 Apr, 2015 13 commits
    • Benoit Lamarche's avatar
      am a6bf3001: resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aosp · d6fc93cd
      Benoit Lamarche authored
      * commit 'a6bf3001':
        Do not keep the DexFile field in Main between runs
      d6fc93cd
    • Benoit Lamarche's avatar
      resolved conflicts for merge of ab1774c0 to lmp-mr1-dev-plus-aosp · a6bf3001
      Benoit Lamarche authored
      Change-Id: I906a5fa2ecbdc43656dd64098f38cdf60438e1e3
      a6bf3001
    • Benoit Lamarche's avatar
      am 5ff9033e: am f052d52e: Merge "Command line option for disabling warnings" into lmp-mr1-dev · 0a20461e
      Benoit Lamarche authored
      * commit '5ff9033e':
        Command line option for disabling warnings
      0a20461e
    • Narayan Kamath's avatar
      am ae1d7c49: am 90fcf359: Don\'t discard directory entries in jar files. · 2e1bc2b6
      Narayan Kamath authored
      * commit 'ae1d7c49':
        Don't discard directory entries in jar files.
      2e1bc2b6
    • Benoit Lamarche's avatar
      am f052d52e: Merge "Command line option for disabling warnings" into lmp-mr1-dev · 5ff9033e
      Benoit Lamarche authored
      * commit 'f052d52e':
        Command line option for disabling warnings
      5ff9033e
    • Narayan Kamath's avatar
      am 90fcf359: Don\'t discard directory entries in jar files. · ae1d7c49
      Narayan Kamath authored
      * commit '90fcf359':
        Don't discard directory entries in jar files.
      ae1d7c49
    • Benoit Lamarche's avatar
    • Benoit Lamarche's avatar
    • Yohann Roussel's avatar
      am 65c602a4: am 008da7d4: Descriptor references are direct references · bc3856bc
      Yohann Roussel authored
      * commit '65c602a4':
        Descriptor references are direct references
      bc3856bc
    • Benoit Lamarche's avatar
      Bump dx version to 1.11 · b3ee08c0
      Benoit Lamarche authored
      This version includes "Support --num-threads with --multi-dex"
      
      (cherry picked from commit 7d97556f)
      
      Change-Id: I712145094205d56358ef0b9ff51f137907d972e9
      b3ee08c0
    • Peter Jensen's avatar
      Fix potential dex index overflow in dx · 635aecf3
      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: default avatarPeter Jensen <jensenp@google.com>
      
      (cherry picked from commit d024c067)
      
      Change-Id: Iede742620854cef3542bf98b77e66aa8a305195e
      635aecf3
    • Peter Jensen's avatar
      Support --num-threads with --multi-dex (take 2) · bd3b381a
      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: default avatarPeter Jensen <jensenp@google.com>
      
      (cherry picked from commit 845d9d0e)
      
      (cherry picked from commit dd140a22)
      
      Change-Id: I33a8ea0451efc0af7eb1d72e80cb926d6583d569
      bd3b381a
    • Narayan Kamath's avatar
      Don't discard directory entries in jar files. · 90fcf359
      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
      90fcf359