hotspot inlining decision seems to be random
Ulf Zibis
Ulf.Zibis at gmx.de
Sat Dec 12 09:01:57 PST 2009
Please refer to:
[1]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/log/C_d_b_reverse1-2_highSurrogate_PA.xml?rev=866&view=markup
[2]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/log/C_d_b_reverse1-2_highSurrogate_PA_2.xml?rev=866&view=markup
[3]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/log/C_d_b_reverse1-2_highSurrogate_PA_3.xml?rev=868&view=markup
I have run [4] the same code [5] 3 times.
On 1st run, method highSurrogate(int) [6] was inlined in Decoder$decode(...) [7] as hot ([1] line
276-293), but not on 2nd run ([2] line 332-358).
Can someone explain this, because method highSurrogate() was executed 26,314,402 times ([3] line 1932) ?
In [2] (line 125, 215) hotspot log says:
@ 479 sun.nio.cs.ext.EUC_TW_C_d_b_reverse1$Decoder::decode never executed
@ 95 java.lang.Character::highSurrogate executed < MinInliningThreshold
On 3rd run, method highSurrogate(char,char) [6] was inlined in Decoder$decode(...) [8] as hot ([3]
line 832-846), but not in 1st ([1] line 1012-1034) or 2nd run ([2] line 992-1014).
So I can see that hotspot inlining decision was different in each 3 runs:
[1] [2] [3]
highSurrogate(int) 276-293 332-358 473-490
[7] line 277 inline call inline
highSurrogate(char,char) 1012-1034 992-1014 832-846
[8] line 277 call call inline
In [1] (line 853) hotspot log says:
@ 93 java.lang.Character::highSurrogate never executed
@ 102 java.lang.Character::lowSurrogate call site not reached
Here I don't understand the difference between 'never executed' and 'call site not reached'
-Ulf
[4]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/nbproject/configs/C_d_b_reverse1_2_PA.properties?rev=866&view=markup
[5]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/src/sun/nio/cs/ext/EUC_TWBenchmark.java?rev=866&view=markup
[6]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/src/java/lang/Character.java?rev=866&view=markup
[7]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/src/sun/nio/cs/ext/EUC_TW_C_d_b_reverse1.java?rev=866&view=markup
[8]
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/j7_EUC_TW/src/sun/nio/cs/ext/EUC_TW_C_d_b_reverse2.java?rev=866&view=markup
More information about the hotspot-compiler-dev
mailing list