[Soot-list] How to use soot as an effective command line bytecode optimizer

mbatch at cs.mcgill.ca mbatch at cs.mcgill.ca
Thu May 24 14:20:06 EDT 2007


> The first is whether whole-program mode and whole-program
> optimization is 'safe', i.e. will whole-program optimizations produce
> incorrect code if it turns out that the program loads unknown files
> through reflection or other means.

As far as I know there should be no issues with reflection when using the
optimizations. Obfuscation is another beast altogether, though.

> The second issue is some guidance on
> which analysis and optimization phases should be used for the most
> effective performance optimizations?

While some optimizations are generally good, it is hard to clearly state
which ones are "worth it" to you and which ones aren't. There are more
trade-offs than just space-time.. an optimization may, for example, make
80% of your code run 2% faster but the other 20% of the code run 1%
slower...

This is something you just have to investigate yourself if you're that
worried about it.

> Finally, it's not clear to me which, if any,
> phases are executed by default and which ones must be turned on
> explicitly.

Turn on verbose output and, bingo: It'll tell you what phases it is running.

Cheers,

Michael Batchelder



More information about the Soot-list mailing list