InvocationCounter のカウンタ値が閾値を超えると, CompilationPolicy オブジェクトの CompilationPolicy::event() が呼び出される (See: here for details).
実際には CompilationPolicy オブジェクトには以下の4つのクラスがあり, それぞれのクラスで CompilationPolicy::event() をオーバーライドした関数が実行される (See: here, here, here and here for details).
| Subclass | Function |
|---|---|
| SimpleCompPolicy | NonTieredCompPolicy::event() |
| StackWalkCompPolicy | NonTieredCompPolicy::event() |
| SimpleThresholdPolicy | SimpleThresholdPolicy::event() |
| AdvancedThresholdPolicy | SimpleThresholdPolicy::event() |
この関数で JIT コンパイルを行うべきと判断された場合, CompileBroker::compile_method() が呼び出されて JIT コンパイルが開始される. (See: here for details)
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.