public void compareOptimizerStep(
      RopMethod nonOptRmeth,
      int paramSize,
      boolean isStatic,
      CfOptions args,
      TranslationAdvice advice,
      RopMethod rmeth) {
    EnumSet<Optimizer.OptionalStep> steps;

    steps = EnumSet.allOf(Optimizer.OptionalStep.class);

    // This is the step to skip.
    steps.remove(Optimizer.OptionalStep.CONST_COLLECTOR);

    RopMethod skipRopMethod =
        Optimizer.optimize(nonOptRmeth, paramSize, isStatic, args.localInfo, advice, steps);

    int normalInsns = rmeth.getBlocks().getEffectiveInstructionCount();
    int skipInsns = skipRopMethod.getBlocks().getEffectiveInstructionCount();

    System.err.printf(
        "optimize step regs:(%d/%d/%.2f%%)" + " insns:(%d/%d/%.2f%%)\n",
        rmeth.getBlocks().getRegCount(),
        skipRopMethod.getBlocks().getRegCount(),
        100.0
            * ((skipRopMethod.getBlocks().getRegCount() - rmeth.getBlocks().getRegCount())
                / (float) skipRopMethod.getBlocks().getRegCount()),
        normalInsns,
        skipInsns,
        100.0 * ((skipInsns - normalInsns) / (float) skipInsns));
  }
Compares the output of the optimizer run normally with a run skipping some optional steps.
Results are printed to stderr.

@param nonOptRmeth {@code non-null;} origional rop method
@param paramSize {@code >= 0;} parameter size of method
@param isStatic true if this method has no 'this' pointer argument.
@param args {@code non-null;} translator arguments
@param advice {@code non-null;} translation advice
@param rmeth {@code non-null;} method with all optimization steps run.
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/cf/OptimizerOptions.java