How to find out the byte code size of a Java method

I would like to take a look at the size of the byte code of the method to see how maximum it is (64 KB). How can i do this?

+4
source share
1 answer

One option is to use javap -c YourClassName -, which will show you the byte offsets of each command for each method.

As an alternative, to do this programmatically, I strongly suspect BCEL or ASM will help you.

+5
source

Source: https://habr.com/ru/post/1501555/


All Articles