Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The relevant code in SimpleThresholdPolicy was apparently introduced by JDK-8056071. It now consults MDO to see if method is trivial. However, there are cases when that guess is wrong, notably when we are dealing with intrinsics or simple calls inside the method. bool SimpleThresholdPolicy::is_trivial(Method* method) { ... MethodData* mdo = method->method_data(); if (mdo != NULL && !mdo->would_profile() && (method->code_size() < 5 || (mdo->num_blocks() < 4))) { return true; } return false; } See e.g. the benchmark against Unsafe.putOrdered: http://cr.openjdk.java.net/~shade/8145579/BadMDOPolicy.java http://cr.openjdk.java.net/~shade/8145579/benchmarks.jar It works significantly worse with TieredCompilation enabled, because it gets to compile with C1 only. Update: Perhaps, even more alarming is that Object::<init> is accepted as trivial, which makes tiered mode slower than non-tiered mode, if Object::<init> had not inlined into a hotpath: http://cr.openjdk.java.net/~shade/8145579/ObjectInit.java
|