Block::is_uncommon() gives wrong answer sometimes.
As result uncommon blocks could be placed in a middle of a hot code:
0c7 B9: # B16 <- B8 Freq: 1.37622e+06
0c7 JMP B16
0c7
0cc B10: # B44 B11 <- B42 Freq: 1.37622
0cc TEST EBX,#384
0d2 Jne B44 P=0.000001 C=-1.000000
0d2
0d8 B11: # B12 <- B10 Freq: 1.37622
0d8 AND EAX,#511
0de MOV EBX, EBP # CastP2X
0e0 OR EBX,EAX
0e2
0e2 B12: # B8 B13 <- B11 B44 Freq: 1.37622
0e2 CMPXCHG [ECX],EBX # If EAX==[ECX] Then store EBX into [ECX]
0e6 Jeq,s B8 P=0.999999 C=-1.000000
0e6
0e8 B13: # B45 <- B12 Freq: 1.37622e-06
0e8 MOV EBX,[ESP + #8]
0ec MOV EDX,[ESP + #12]
0f0 JMP B45
0f0
0f5 B14: # B45 B15 <- B6 B43 Freq: 1.37622
0f5 LEA EDI,[ESP + #64]
0f9 FASTLOCK ECX, EDI KILLS EAX,EBP
140 Jne B45 P=0.000001 C=-1.000000
140
146 B15: # B8 <- B14 Freq: 1.37622
146 MOV [ESP + #8],EBX
14a MOV [ESP + #16],ESI
14e MOV [ESP + #12],EDX
152 MOV EBP,[ESP + #20]
156 JMP B8
156
15b B16: # B57 B17 <- B9 Freq: 1.37622e+06
15b CMPu ESI,EAX
15d Jge,u B57 P=0.000001 C=-1.000000
15d
As result uncommon blocks could be placed in a middle of a hot code:
0c7 B9: # B16 <- B8 Freq: 1.37622e+06
0c7 JMP B16
0c7
0cc B10: # B44 B11 <- B42 Freq: 1.37622
0cc TEST EBX,#384
0d2 Jne B44 P=0.000001 C=-1.000000
0d2
0d8 B11: # B12 <- B10 Freq: 1.37622
0d8 AND EAX,#511
0de MOV EBX, EBP # CastP2X
0e0 OR EBX,EAX
0e2
0e2 B12: # B8 B13 <- B11 B44 Freq: 1.37622
0e2 CMPXCHG [ECX],EBX # If EAX==[ECX] Then store EBX into [ECX]
0e6 Jeq,s B8 P=0.999999 C=-1.000000
0e6
0e8 B13: # B45 <- B12 Freq: 1.37622e-06
0e8 MOV EBX,[ESP + #8]
0ec MOV EDX,[ESP + #12]
0f0 JMP B45
0f0
0f5 B14: # B45 B15 <- B6 B43 Freq: 1.37622
0f5 LEA EDI,[ESP + #64]
0f9 FASTLOCK ECX, EDI KILLS EAX,EBP
140 Jne B45 P=0.000001 C=-1.000000
140
146 B15: # B8 <- B14 Freq: 1.37622
146 MOV [ESP + #8],EBX
14a MOV [ESP + #16],ESI
14e MOV [ESP + #12],EDX
152 MOV EBP,[ESP + #20]
156 JMP B8
156
15b B16: # B57 B17 <- B9 Freq: 1.37622e+06
15b CMPu ESI,EAX
15d Jge,u B57 P=0.000001 C=-1.000000
15d
- relates to
-
JDK-6743900 frequency based block layout
- Resolved