Is there a way to measure the impact on performance of the jit compilation process ? Eg. How much cpu time ends up being spent on this while the application warms up.
Asked
Active
Viewed 475 times
2
-
I guess you could make an approximation... You could run a piece of code that is very sensitive to warming up and measure how long it takes to execute on the first iteration, and how long it takes to execute on say the fourth iteration at which point the warm up must have happened. Then see the difference. Results will vary depending on the nature of the code though. Simpler ("dumber") code will optimize more readily. – Gimby Feb 28 '14 at 12:49
1 Answers
2
You can find out what libraries contain the code of the JIT and than you can profile your VM startup at system level. By isolating the time spent within the JIT library you know how much time was spent on "jitting". On Linux you can use OProfile for this.
However, keep in mind that there are many parameters for the VM that control when the JITing takes place and there is a special JIT (the hotspot client VM) optimized for fast start up. See: