hotspot/src/share/vm/runtime/compilationPolicy.cpp
// Determine compilation policy based on command line argument
void compilationPolicy_init() {
{- -------------------------------------------
(1) (フィールドの初期化)
---------------------------------------- -}
CompilationPolicy::set_in_vm_startup(DelayCompilationDuringStartup);
{- -------------------------------------------
(1) CompilationPolicyChoice の値に応じた CompilationPolicy オブジェクトを生成し,
フィールドに格納.
---------------------------------------- -}
switch(CompilationPolicyChoice) {
case 0:
CompilationPolicy::set_policy(new SimpleCompPolicy());
break;
case 1:
#ifdef COMPILER2
CompilationPolicy::set_policy(new StackWalkCompPolicy());
#else
Unimplemented();
#endif
break;
case 2:
#ifdef TIERED
CompilationPolicy::set_policy(new SimpleThresholdPolicy());
#else
Unimplemented();
#endif
break;
case 3:
#ifdef TIERED
CompilationPolicy::set_policy(new AdvancedThresholdPolicy());
#else
Unimplemented();
#endif
break;
default:
fatal("CompilationPolicyChoice must be in the range: [0-3]");
}
{- -------------------------------------------
(1) CompilationPolicy::initialize() (を各サブクラスがオーバーライドしたもの) を呼んで,
生成した CompilationPolicy オブジェクトを初期化
---------------------------------------- -}
CompilationPolicy::policy()->initialize();
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.