============================= C2-compiled nmethod ============================== # char ( java/lang/String:NotNull:exact *, int ) ----------------------------------- MetaData ----------------------------------- {method} - this oop: 0x00007f63b4bd8f00 - method holder: 'java/lang/String' - constants: 0x00007f63b4bd4440 constant pool [996]/operands[21] {0x00007f63b4bd4440} for 'java/lang/String' cache=0x00007f63b4cea3e0 - 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: 0x00007f63c1015f20 - adapters: AHE@0x00007f63d05e0400: 0xba000000 i2c: 0x00007f63c110c1e0 c2i: 0x00007f63c110c31d c2iUV: 0x00007f63c110c2f0 - compiled entry 0x00007f63c11c5f60 - code size: 25 - code start: 0x00007f63b4bd8ec0 - code end (excl): 0x00007f63b4bd8ed9 - method data: 0x00007f63b4e33430 - checked ex length: 0 - linenumber start: 0x00007f63b4bd8ed9 - localvar length: 2 - localvar start: 0x00007f63b4bd8ee6 - 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 -------------------------------------------------------------------------------- 1450 2 3 java.lang.String::charAt (25 bytes) made not entrant ----------------------------------- Assembly ----------------------------------- Compiled method (t4)(c2) 1450 24 4 java.lang.String::charAt (25 bytes) total in heap [0x00007f63c11d7790,0x00007f63c11d7b38] = 936 relocation [0x00007f63c11d7910,0x00007f63c11d7920] = 16 main code [0x00007f63c11d7920,0x00007f63c11d79c0] = 160 stub code [0x00007f63c11d79c0,0x00007f63c11d79d8] = 24 metadata [0x00007f63c11d79d8,0x00007f63c11d79f0] = 24 scopes data [0x00007f63c11d79f0,0x00007f63c11d7a50] = 96 scopes pcs [0x00007f63c11d7a50,0x00007f63c11d7b20] = 208 dependencies [0x00007f63c11d7b20,0x00007f63c11d7b28] = 8 nul chk table [0x00007f63c11d7b28,0x00007f63c11d7b38] = 16 -------------------------------------------------------------------------------- [Constant Pool (empty)] -------------------------------------------------------------------------------- 0x00007f63c11d7920 (+0x00): mov 0x8(%rsi),%r10d 0x00007f63c11d7924 (+0x04): shl $0x3,%r10 0x00007f63c11d7928 (+0x08): cmp %r10,%rax 0x00007f63c11d792b (+0x0b): jne 0x00007f63c104e4a0 0x00007f63c11d7931 (+0x11): nop 0x00007f63c11d7932 (+0x12): nop 0x00007f63c11d7933 (+0x13): nop 0x00007f63c11d7934 (+0x14): nop 0x00007f63c11d7935 (+0x15): nop 0x00007f63c11d7936 (+0x16): nop 0x00007f63c11d7937 (+0x17): nop 0x00007f63c11d7938 (+0x18): nop 0x00007f63c11d7939 (+0x19): nop 0x00007f63c11d793a (+0x1a): nop 0x00007f63c11d793b (+0x1b): nop 0x00007f63c11d793c (+0x1c): nop 0x00007f63c11d793d (+0x1d): nop 0x00007f63c11d793e (+0x1e): nop 0x00007f63c11d793f (+0x1f): nop 0x00007f63c11d7940 (+0x20): mov %eax,-0x16000(%rsp) 0x00007f63c11d7947 (+0x27): push %rbp 0x00007f63c11d7948 (+0x28): sub $0x20,%rsp 0x00007f63c11d794c (+0x2c): movsbl 0x14(%rsi),%r11d 0x00007f63c11d7951 (+0x31): test %r11d,%r11d 0x00007f63c11d7954 (+0x34): jne 0x00007f63c11d7977 0x00007f63c11d7956 (+0x36): mov 0xc(%rsi),%ebp 0x00007f63c11d7959 (+0x39): mov 0xc(%rbp),%r11d 0x00007f63c11d795d (+0x3d): cmp %r11d,%edx 0x00007f63c11d7960 (+0x40): jae 0x00007f63c11d798e 0x00007f63c11d7962 (+0x42): movzbl 0x10(%rbp,%rdx,1),%eax 0x00007f63c11d7967 (+0x47): add $0x20,%rsp 0x00007f63c11d796b (+0x4b): pop %rbp 0x00007f63c11d796c (+0x4c): mov 0x128(%r15),%r10 0x00007f63c11d7973 (+0x53): test %eax,(%r10) 0x00007f63c11d7976 (+0x56): retq 0x00007f63c11d7977 (+0x57): mov %rsi,%rbp 0x00007f63c11d797a (+0x5a): mov %edx,(%rsp) 0x00007f63c11d797d (+0x5d): mov %r11d,0x4(%rsp) 0x00007f63c11d7982 (+0x62): mov $0xffffff4d,%esi 0x00007f63c11d7987 (+0x67): callq 0x00007f63c104fea0 0x00007f63c11d798c (+0x6c): ud2 0x00007f63c11d798e (+0x6e): mov $0xffffffe5,%esi 0x00007f63c11d7993 (+0x73): mov %edx,0x4(%rsp) 0x00007f63c11d7997 (+0x77): callq 0x00007f63c104fea0 0x00007f63c11d799c (+0x7c): ud2 0x00007f63c11d799e (+0x7e): mov $0xfffffff6,%esi 0x00007f63c11d79a3 (+0x83): mov %edx,0x4(%rsp) 0x00007f63c11d79a7 (+0x87): callq 0x00007f63c104fea0 0x00007f63c11d79ac (+0x8c): ud2 0x00007f63c11d79ae (+0x8e): hlt 0x00007f63c11d79af (+0x8f): hlt 0x00007f63c11d79b0 (+0x90): hlt 0x00007f63c11d79b1 (+0x91): hlt 0x00007f63c11d79b2 (+0x92): hlt 0x00007f63c11d79b3 (+0x93): hlt 0x00007f63c11d79b4 (+0x94): hlt 0x00007f63c11d79b5 (+0x95): hlt 0x00007f63c11d79b6 (+0x96): hlt 0x00007f63c11d79b7 (+0x97): hlt 0x00007f63c11d79b8 (+0x98): hlt 0x00007f63c11d79b9 (+0x99): hlt 0x00007f63c11d79ba (+0x9a): hlt 0x00007f63c11d79bb (+0x9b): hlt 0x00007f63c11d79bc (+0x9c): hlt 0x00007f63c11d79bd (+0x9d): hlt 0x00007f63c11d79be (+0x9e): hlt 0x00007f63c11d79bf (+0x9f): hlt 0x00007f63c11d79c0 (+0xa0): jmpq 0x00007f63c1128920 0x00007f63c11d79c5 (+0xa5): callq 0x00007f63c11d79ca 0x00007f63c11d79ca (+0xaa): subq $0x5,(%rsp) 0x00007f63c11d79cf (+0xaf): jmpq 0x00007f63c104f8e0 0x00007f63c11d79d4 (+0xb4): hlt 0x00007f63c11d79d5 (+0xb5): hlt 0x00007f63c11d79d6 (+0xb6): hlt 0x00007f63c11d79d7 (+0xb7): hlt --------------------------------------------------------------------------------