Class CodeStatistics

java.lang.Object
com.android.dx.dex.cf.CodeStatistics

public final class CodeStatistics extends Object
Static methods and variables for collecting statistics on generated code.
  • Field Details

    • runningDeltaRegisters

      public int runningDeltaRegisters
      running sum of the number of registers added/removed in SSA form by the optimizer
    • runningDeltaInsns

      public int runningDeltaInsns
      running sum of the number of insns added/removed in SSA form by the optimizer
    • runningTotalInsns

      public int runningTotalInsns
      running sum of the total number of Rop insns processed
    • dexRunningDeltaRegisters

      public int dexRunningDeltaRegisters
      running sum of the number of dex-form registers added/removed in SSA form by the optimizer. Only valid if args.statistics is true.
    • dexRunningDeltaInsns

      public int dexRunningDeltaInsns
      running sum of the number of dex-form insns (actually code units) added/removed in SSA form by the optimizer. Only valid if args.statistics is true.
    • dexRunningTotalInsns

      public int dexRunningTotalInsns
      running sum of the total number of dex insns (actually code units) processed
    • runningOriginalBytes

      public int runningOriginalBytes
      running sum of original class bytecode bytes
  • Constructor Details

    • CodeStatistics

      public CodeStatistics()
  • Method Details

    • updateOriginalByteCount

      public void updateOriginalByteCount(int count)
      Updates the number of original bytecode bytes processed.
      Parameters:
      count - >= 0; the number of bytes to add
    • updateDexStatistics

      public void updateDexStatistics(DalvCode nonOptCode, DalvCode code)
      Updates the dex statistics.
      Parameters:
      nonOptCode - non-optimized code block
      code - optimized code block
    • updateRopStatistics

      public void updateRopStatistics(RopMethod nonOptRmeth, RopMethod rmeth)
      Updates the ROP statistics.
      Parameters:
      nonOptRmeth - non-optimized method
      rmeth - optimized method
    • dumpStatistics

      public void dumpStatistics(PrintStream out)
      Prints out the collected statistics.
      Parameters:
      out - non-null; where to output to