Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6586272

uncommon basic blocks not moved to end

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs11
    • 7
    • hotspot
    • None
    • b03
    • b04
    • generic
    • generic
    • Verified

        Low frequency blocks previously moved to the end of the block chain are now being left inline.

        Run specjbb2005 on Sparc:

        java -server -XX:+AggressiveOpts -XX:+UseParallelOldGC -XX:+UseLargePages -XX:ParallelGCThreads=6 -Xmx3g -Xms3g -Xmn2g -Xss96k -Xbootclasspath/p:/export/home/kvn/:jbb.jar:check.jar spec.jbb.JBBmain

        In compilation for java/lang/String.<init>, for example, notice low frequency blocks B5 and B6 in-line with their high frequency neighbors.

        000 N134: # B1 &lt;- BLOCK HEAD IS JUNK Freq: 10006
        000
        UEP:
        LDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5 ! Inline cache check
        CMP R_G5,R_G3
        Tne icc,R_G0+ST_RESERVED_FOR_USER_0+2
        000
        00c B1: # B11 B2 &lt;- BLOCK HEAD IS JUNK Freq: 10006
        00c ! stack bang
        SAVE R_SP,-104,R_SP
        018 LDUW [R_I1 + #8],R_L3 ! range
        01c NullCheck R_I1
        01c
        01c B2: # B5 B3 &lt;- B1 Freq: 10006
        01c + SLL R_L3,#1,R_L0
        020 + ADD R_L0,#19,R_L2
        024 SET #524288,R_L1
        028 + AND R_L2,#-8,R_L0
        02c STW R_L3,[R_I0 + #16] ! Field java/lang/String.count
        030 + CMP R_L3,R_L1 ! unsigned
        034 BPugt icc_U,B5 P=0.000001 C=-1.000000
        034 STW #0,[R_I0 + #12] ! Field java/lang/String.offset
        034
        03c B3: # B5 B4 &lt;- B2 Freq: 10006
        03c + # TLS is in G2
        03c + LDUW [R_G2 + #72],R_L6 ! ptr
        040 + LDUW [R_G2 + #80],R_L2 ! ptr
        044 + ADD R_L6,R_L0,R_L1
        048 + CMP R_L1,R_L2 ! ptr
        04c BPpge icc_P,B5 P=0.000100 C=-1.000000
        04c
        054 B4: # B7 &lt;- B3 Freq: 10005
        054 + SET 0x00000001,R_L2 !ptr
        058 + SET precise klass [C: 0x000d7b08:Constant:exact *,R_L4 !ptr
        060 + STW R_L1,[R_G2 + #72] ! ptr
        064 + STW R_L2,[R_L6] ! ptr
        068 + PREFETCH [R_L1 + #512],2 ! Prefetch write-many (and read)
        06c + STW R_L4,[R_L6 + #4] ! ptr
        070 + PREFETCH [R_L1 + #576],2 ! Prefetch write-many (and read)
        074 + STW R_L3,[R_L6 + #8]
        078 + BA B7
        078 PREFETCH [R_L1 + #640],2 ! Prefetch write-many (and read)
        078
        080 B5: # B10 B6 &lt;- B2 B3 Freq: 1.0109
        080 + SET precise klass [C: 0x000d7b08:Constant:exact *,R_O0 !ptr
        088 + MOV R_L3,R_O1 ! spill
        08c CALL,static ; NOP ==&gt; wrapper for: _new_array_Java
                # java.util.Arrays::copyOf @ bci:1 L[0]=R_I1 L[1]=R_L3 L[2]=_
                # java.lang.String::&lt;init&gt; @ bci:20 L[0]=_ L[1]=_ L[2]=_ STK[0]=R_I0
                # I0=Oop I1=Oop
        094
        094 B6: # B7 &lt;- B5 Freq: 1.01088
                # Block is sole successor of call
        094 + MOV R_O0,R_L6 ! spill
        094
        098 B7: # B9 B8 &lt;- B6 B4 Freq: 10006
        098
        098 + CMP R_L3,#0
        09c BPle ccr,B9 P=0.000001 C=-1.000000
        09c
        0a4 B8: # B9 &lt;- B7 Freq: 10006
        0a4 + LDUW [R_I1 + #12],R_L1
        0a8 ADD R_L0,#-16,R_L2
        0ac + STW R_L1,[R_L6 + #12]
        0b0 SRL R_L2,#3,R_O2
        0b4 ADD R_L6,#16,R_O1
        0b8 + ADD R_I1,#16,R_O0
        0bc CALL,runtime leaf nofp jlong_disjoint_arraycopy
                No JVM State Info
                #
        0c8
        0c8 B9: # N134 &lt;- B8 B7 Freq: 10006
        0c8 + SET 0x35a4e000,R_L0 !ptr
        0cc
        0cc + # checkcastPP of R_L6
        0cc
        0cc + SRL R_I0,#9,R_L2 ! Cast ptr R_I0 to int and shift
        0d0 STW R_L6,[R_I0 + #8] ! ptr ! Field java/lang/String.value
        0d4 + STB #0,[R_L0 + R_L2] ! byte
        0d8 + MEMBAR-release
        0d8 + SETHI #PollAddr,L0 ! Load Polling address
        LDUW [L0],G0 !Poll for Safepointing
        RET
        RESTORE
        0e8 + ! return
        0e8
        0e8 B10: # N134 &lt;- B5 Freq: 1.0109e-05
        0e8 ! exception oop is in R_O0; no code emitted
        0e8 + MOV R_O0,R_I0 ! spill
        0ec + RESTORE
        0f0 + Jmp rethrow_stub
        0f0
        114 B11: # N134 &lt;- B1 Freq: 1e-06
        114 + MOV #-10,R_O0
        118 CALL,static ; NOP ==&gt; wrapper for: uncommon_trap(reason=&apos;null_check&apos; action=&apos;maybe_recompile&apos;)
                # java.lang.String::&lt;init&gt; @ bci:5 L[0]=_ L[1]=_ L[2]=_ STK[0]=R_I1
                # I1=Oop
        120 ILLTRAP ; ShouldNotReachHere
        120

              rasbold Chuck Rasbold
              rasbold Chuck Rasbold
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: