Reputation: 4263
With shrinking you can see what's being kept/removed by checking usage.txt file. I wonder if there is something similar for code removed in optimization step? In other words, how do tell whether a code block is removed by optimization step or not.
Upvotes: 1
Views: 202
Reputation: 45668
The -verbose
option provides some statistics. There is no option for more details, because the optimization step can do a lot more than just remove dead code: merge classes, inline methods, replace instructions, propagate values, remove unused parameters and return values, etc. Subsequent optimizations can change the appearance of the code quite drastically. The most accurate and complete report is a comparison between the original code and the processed code, for instance with javap -private -c
and a tool like diff -y
.
Upvotes: 2