============================= C2-compiled nmethod ============================== # char ( java/lang/String:NotNull:exact *, int ) ----------------------------------- MetaData ----------------------------------- {method} - this oop: 0x00007fc3ce9f7f00 - method holder: 'java/lang/String' - constants: 0x00007fc3ce9f3440 constant pool [996]/operands[21] {0x00007fc3ce9f3440} for 'java/lang/String' cache=0x00007fc3ceb093e0 - access: 0x81000001 public - name: 'charAt' - signature: '(I)C' - max stack: 3 - max locals: 2 - size of params: 2 - method size: 12 - highest level: 3 - vtable index: -2 - i2i entry: 0x00007fc3e1015f20 - adapters: AHE@0x00007fc3f05e0490: 0xba000000 i2c: 0x00007fc3e110c1e0 c2i: 0x00007fc3e110c31d c2iUV: 0x00007fc3e110c2f0 - compiled entry 0x00007fc3e11c6060 - code size: 25 - code start: 0x00007fc3ce9f7ec0 - code end (excl): 0x00007fc3ce9f7ed9 - method data: 0x00007fc3cec52430 - checked ex length: 0 - linenumber start: 0x00007fc3ce9f7ed9 - localvar length: 2 - localvar start: 0x00007fc3ce9f7ee6 - compiled code: [CodeBlob] --------------------------------- OptoAssembly --------------------------------- # # #r018 rsi:rsi : parm 0: java/lang/String:NotNull:exact * #r016 rdx : parm 1: int # -- Old rsp -- Framesize: 48 -- #r583 rsp+44: in_preserve #r582 rsp+40: return address #r581 rsp+36: in_preserve #r580 rsp+32: saved fp register #r579 rsp+28: pad2, stack alignment #r578 rsp+24: pad2, stack alignment #r577 rsp+20: Fixed slot 1 #r576 rsp+16: Fixed slot 0 #r587 rsp+12: spill #r586 rsp+ 8: spill #r585 rsp+ 4: spill #r584 rsp+ 0: spill # 000 N65: # out( B1 ) <- BLOCK HEAD IS JUNK Freq: 1 000 movl rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()] # compressed klass decode_klass_not_null rscratch1, rscratch1 cmpq rax, rscratch1 # Inline cache check jne SharedRuntime::_ic_miss_stub nop # nops to align entry point nop # 12 bytes pad for loops and calls 020 B1: # out( B5 B2 ) <- BLOCK HEAD IS JUNK Freq: 1 020 # stack bang (240 bytes) pushq rbp # Save rbp subq rsp, #32 # Create frame 02c movsbl R11, [RSI + #20 (8-bit)] # byte ! Field: java/lang/String.coder (constant) 031 testl R11, R11 034 jne,s B5 P=0.000000 C=6031.000000 036 B2: # out( B7 B3 ) <- in( B1 ) Freq: 1 036 movl RBP, [RSI + #12 (8-bit)] # compressed ptr ! Field: java/lang/String.value (constant) 039 movl R11, [RBP + #12 (8-bit)] # range 03d NullCheck RBP 03d B3: # out( B6 B4 ) <- in( B2 ) Freq: 0.999999 03d cmpl RDX, R11 # unsigned 040 jnb,us B6 P=0.000000 C=5375.000000 042 B4: # out( N65 ) <- in( B3 ) Freq: 0.999998 042 movzbl RAX, [RBP + #16 + RDX] # ubyte 047 addq rsp, 32 # Destroy frame popq rbp movq rscratch1, poll_offset[r15_thread] #polling_page_address testl rax, [rscratch1] # Safepoint: poll for GC 056 ret 057 B5: # out( N65 ) <- in( B1 ) Freq: 5e-07 057 movq RBP, RSI # spill 05a movl [rsp + #0], RDX # spill 05d movl [rsp + #4], R11 # spill 062 movl RSI, #-179 # int 067 call,static wrapper for: uncommon_trap(reason='unstable_if' action='reinterpret' debug_id='0') # java.lang.String::isLatin1 @ bci:10 L[0]=_ STK[0]=rsp + #4 # java.lang.String::charAt @ bci:1 L[0]=RBP L[1]=rsp + #0 # OopMap {rbp=Oop off=108/0x6c} 06c ud2 # ShouldNotReachHere 06e B6: # out( N65 ) <- in( B3 ) Freq: 4.76836e-07 06e movl RSI, #-27 # int 073 movl [rsp + #4], RDX # spill 077 call,static wrapper for: uncommon_trap(reason='range_check' action='reinterpret' debug_id='0') # java.lang.StringLatin1::charAt @ bci:1 L[0]=RBP L[1]=rsp + #4 STK[0]=rsp + #4 # java.lang.String::charAt @ bci:12 L[0]=_ L[1]=_ # OopMap {rbp=NarrowOop off=124/0x7c} 07c ud2 # ShouldNotReachHere 07e B7: # out( N65 ) <- in( B2 ) Freq: 1.01328e-06 07e movl RSI, #-10 # int 083 movl [rsp + #4], RDX # spill 087 call,static wrapper for: uncommon_trap(reason='null_check' action='maybe_recompile' debug_id='0') # java.lang.StringLatin1::charAt @ bci:1 L[0]=RBP L[1]=rsp + #4 STK[0]=rsp + #4 # java.lang.String::charAt @ bci:12 L[0]=_ L[1]=_ # OopMap {rbp=NarrowOop off=140/0x8c} 08c ud2 # ShouldNotReachHere -------------------------------------------------------------------------------- 1617 2 3 java.lang.String::charAt (25 bytes) made not entrant ----------------------------------- Assembly ----------------------------------- Compiled method (t4)(c2) 1617 24 4 java.lang.String::charAt (25 bytes) total in heap [0x00007fc3e11d7890,0x00007fc3e11d7c38] = 936 relocation [0x00007fc3e11d7a10,0x00007fc3e11d7a20] = 16 main code [0x00007fc3e11d7a20,0x00007fc3e11d7ac0] = 160 stub code [0x00007fc3e11d7ac0,0x00007fc3e11d7ad8] = 24 metadata [0x00007fc3e11d7ad8,0x00007fc3e11d7af0] = 24 scopes data [0x00007fc3e11d7af0,0x00007fc3e11d7b50] = 96 scopes pcs [0x00007fc3e11d7b50,0x00007fc3e11d7c20] = 208 dependencies [0x00007fc3e11d7c20,0x00007fc3e11d7c28] = 8 nul chk table [0x00007fc3e11d7c28,0x00007fc3e11d7c38] = 16 -------------------------------------------------------------------------------- [Constant Pool (empty)] -------------------------------------------------------------------------------- [Entry Point] # {method} {0x00007fc3ce9f7f00} 'charAt' '(I)C' in 'java/lang/String' # this: rsi:rsi = 'java/lang/String' # parm0: rdx = int # [sp+0x30] (sp of caller) ;; N65: # out( B1 ) <- BLOCK HEAD IS JUNK Freq: 1 0x00007fc3e11d7a20 (+0x00): mov 0x8(%rsi),%r10d 0x00007fc3e11d7a24 (+0x04): shl $0x3,%r10 0x00007fc3e11d7a28 (+0x08): cmp %r10,%rax 0x00007fc3e11d7a2b (+0x0b): jne 0x00007fc3e104e4a0 ; {runtime_call ic_miss_stub} 0x00007fc3e11d7a31 (+0x11): nop 0x00007fc3e11d7a32 (+0x12): nop 0x00007fc3e11d7a33 (+0x13): nop 0x00007fc3e11d7a34 (+0x14): nop 0x00007fc3e11d7a35 (+0x15): nop 0x00007fc3e11d7a36 (+0x16): nop 0x00007fc3e11d7a37 (+0x17): nop 0x00007fc3e11d7a38 (+0x18): nop 0x00007fc3e11d7a39 (+0x19): nop 0x00007fc3e11d7a3a (+0x1a): nop 0x00007fc3e11d7a3b (+0x1b): nop 0x00007fc3e11d7a3c (+0x1c): nop 0x00007fc3e11d7a3d (+0x1d): nop 0x00007fc3e11d7a3e (+0x1e): nop 0x00007fc3e11d7a3f (+0x1f): nop [Verified Entry Point] ;; B1: # out( B5 B2 ) <- BLOCK HEAD IS JUNK Freq: 1 0x00007fc3e11d7a40 (+0x20): mov %eax,-0x16000(%rsp) 0x00007fc3e11d7a47 (+0x27): push %rbp 0x00007fc3e11d7a48 (+0x28): sub $0x20,%rsp ;*synchronization entry ; - java.lang.String::charAt@-1 (line 701) 0x00007fc3e11d7a4c (+0x2c): movsbl 0x14(%rsi),%r11d ;*getfield coder {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.String::isLatin1@7 (line 3363) ; - java.lang.String::charAt@1 (line 701) 0x00007fc3e11d7a51 (+0x31): test %r11d,%r11d 0x00007fc3e11d7a54 (+0x34): jne 0x00007fc3e11d7a77 ;*ifne {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.String::isLatin1@10 (line 3363) ; - java.lang.String::charAt@1 (line 701) ;; B2: # out( B7 B3 ) <- in( B1 ) Freq: 1 0x00007fc3e11d7a56 (+0x36): mov 0xc(%rsi),%ebp ;*getfield value {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.String::charAt@8 (line 702) 0x00007fc3e11d7a59 (+0x39): mov 0xc(%rbp),%r11d ; implicit exception: dispatches to 0x00007fc3e11d7a9e ;; B3: # out( B6 B4 ) <- in( B2 ) Freq: 0.999999 0x00007fc3e11d7a5d (+0x3d): cmp %r11d,%edx 0x00007fc3e11d7a60 (+0x40): jae 0x00007fc3e11d7a8e ;; B4: # out( N65 ) <- in( B3 ) Freq: 0.999998 0x00007fc3e11d7a62 (+0x42): movzbl 0x10(%rbp,%rdx,1),%eax ;*iand {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.StringLatin1::charAt@25 (line 49) ; - java.lang.String::charAt@12 (line 702) 0x00007fc3e11d7a67 (+0x47): add $0x20,%rsp 0x00007fc3e11d7a6b (+0x4b): pop %rbp 0x00007fc3e11d7a6c (+0x4c): mov 0x128(%r15),%r10 0x00007fc3e11d7a73 (+0x53): test %eax,(%r10) ; {poll_return} 0x00007fc3e11d7a76 (+0x56): retq ;; B5: # out( N65 ) <- in( B1 ) Freq: 5e-07 0x00007fc3e11d7a77 (+0x57): mov %rsi,%rbp 0x00007fc3e11d7a7a (+0x5a): mov %edx,(%rsp) 0x00007fc3e11d7a7d (+0x5d): mov %r11d,0x4(%rsp) 0x00007fc3e11d7a82 (+0x62): mov $0xffffff4d,%esi 0x00007fc3e11d7a87 (+0x67): callq 0x00007fc3e104fea0 ; ImmutableOopMap {rbp=Oop } ;*ifne {reexecute=1 rethrow=0 return_oop=0} ; - (reexecute) java.lang.String::isLatin1@10 (line 3363) ; - java.lang.String::charAt@1 (line 701) ; {runtime_call UncommonTrapBlob} 0x00007fc3e11d7a8c (+0x6c): ud2 ;*ifne {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.String::isLatin1@10 (line 3363) ; - java.lang.String::charAt@1 (line 701) ;; B6: # out( N65 ) <- in( B3 ) Freq: 4.76836e-07 0x00007fc3e11d7a8e (+0x6e): mov $0xffffffe5,%esi 0x00007fc3e11d7a93 (+0x73): mov %edx,0x4(%rsp) 0x00007fc3e11d7a97 (+0x77): callq 0x00007fc3e104fea0 ; ImmutableOopMap {rbp=NarrowOop } ;*iflt {reexecute=1 rethrow=0 return_oop=0} ; - (reexecute) java.lang.StringLatin1::charAt@1 (line 46) ; - java.lang.String::charAt@12 (line 702) ; {runtime_call UncommonTrapBlob} 0x00007fc3e11d7a9c (+0x7c): ud2 ;*iflt {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.StringLatin1::charAt@1 (line 46) ; - java.lang.String::charAt@12 (line 702) ;; B7: # out( N65 ) <- in( B2 ) Freq: 1.01328e-06 0x00007fc3e11d7a9e (+0x7e): mov $0xfffffff6,%esi 0x00007fc3e11d7aa3 (+0x83): mov %edx,0x4(%rsp) 0x00007fc3e11d7aa7 (+0x87): callq 0x00007fc3e104fea0 ; ImmutableOopMap {rbp=NarrowOop } ;*iflt {reexecute=1 rethrow=0 return_oop=0} ; - (reexecute) java.lang.StringLatin1::charAt@1 (line 46) ; - java.lang.String::charAt@12 (line 702) ; {runtime_call UncommonTrapBlob} 0x00007fc3e11d7aac (+0x8c): ud2 ;*iflt {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.StringLatin1::charAt@1 (line 46) ; - java.lang.String::charAt@12 (line 702) 0x00007fc3e11d7aae (+0x8e): hlt 0x00007fc3e11d7aaf (+0x8f): hlt 0x00007fc3e11d7ab0 (+0x90): hlt 0x00007fc3e11d7ab1 (+0x91): hlt 0x00007fc3e11d7ab2 (+0x92): hlt 0x00007fc3e11d7ab3 (+0x93): hlt 0x00007fc3e11d7ab4 (+0x94): hlt 0x00007fc3e11d7ab5 (+0x95): hlt 0x00007fc3e11d7ab6 (+0x96): hlt 0x00007fc3e11d7ab7 (+0x97): hlt 0x00007fc3e11d7ab8 (+0x98): hlt 0x00007fc3e11d7ab9 (+0x99): hlt 0x00007fc3e11d7aba (+0x9a): hlt 0x00007fc3e11d7abb (+0x9b): hlt 0x00007fc3e11d7abc (+0x9c): hlt 0x00007fc3e11d7abd (+0x9d): hlt 0x00007fc3e11d7abe (+0x9e): hlt 0x00007fc3e11d7abf (+0x9f): hlt [Exception Handler] 0x00007fc3e11d7ac0 (+0xa0): jmpq 0x00007fc3e11b56a0 ; {no_reloc} [Deopt Handler Code] 0x00007fc3e11d7ac5 (+0xa5): callq 0x00007fc3e11d7aca 0x00007fc3e11d7aca (+0xaa): subq $0x5,(%rsp) 0x00007fc3e11d7acf (+0xaf): jmpq 0x00007fc3e104f8e0 ; {runtime_call DeoptimizationBlob} 0x00007fc3e11d7ad4 (+0xb4): hlt 0x00007fc3e11d7ad5 (+0xb5): hlt 0x00007fc3e11d7ad6 (+0xb6): hlt 0x00007fc3e11d7ad7 (+0xb7): hlt --------------------------------------------------------------------------------