Java – hotspot JIT inline strategy: top-down or bottom-up

Suppose we have 3 ways: Method 2 is invoked from method 1, and method 3 is called by method 2.

If method 2 is inlined first, method 3 will be called directly from the body of method 1 and can be inlined in turn If method 3 is first inserted into method 2, the size of the latter will change to about 60 bytecodes, and since the default maxinlinesize threshold is 35 bytecodes, it cannot be inlined

In which order are hotspot JIT embedded methods: top-down or bottom-up?

Solution

Maxinlinesize affects the compilation of methods that execute at least once but less than mininningthreshold times There is a different setting for methods that exceed mininningthreshold - XX: freqinlinesize =... With a larger (platform dependent) default value Regardless of maxinlinesize, hotspots are still inline You can test the application by running it with - XX: unlockdiagnosticvmoptions - XX: printinlining - XX: maxinlinesize = 0 It will still report the content of hot spots (these and comments "(hot)") Only the previously reported method and "executing" mininningthreshold times "may make the comment" too large ". If you set freqinlinesize, you may receive comments such as" hot method too large " I've never seen their default settings

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>