How to find out what optimizations the JVM applied to my code?

后端 未结 4 908
谎友^
谎友^ 2021-02-08 14:26

The JVM (especially the HotSpot VM) is famous for having a huge number of optimizations it can apply at runtime.

Is there a way to look at a certain piece of code and se

4条回答
  •  爱一瞬间的悲伤
    2021-02-08 15:06

    This is highly JVM specific, and you will most likely need to do some serious investigation in the particular JVM you are looking at.

    You can see the available HotSpot VM options here http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

提交回复
热议问题