============================= C2-compiled nmethod ============================== # char ( java/lang/String:NotNull:exact *, int ) ----------------------------------- MetaData ----------------------------------- {method} - this oop: 0x00007f480ecfaf00 - method holder: 'java/lang/String' - constants: 0x00007f480ecf6440 constant pool [996]/operands[21] {0x00007f480ecf6440} for 'java/lang/String' cache=0x00007f480ee0c3e0 - 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: 0x00007f4821015f20 - adapters: AHE@0x00007f48305e0420: 0xba000000 i2c: 0x00007f482110c1e0 c2i: 0x00007f482110c31d c2iUV: 0x00007f482110c2f0 - compiled entry 0x00007f48211c5ce0 - code size: 25 - code start: 0x00007f480ecfaec0 - code end (excl): 0x00007f480ecfaed9 - method data: 0x00007f480ef55430 - checked ex length: 0 - linenumber start: 0x00007f480ecfaed9 - localvar length: 2 - localvar start: 0x00007f480ecfaee6 - 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 -------------------------------------------------------------------------------- 1700 2 3 java.lang.String::charAt (25 bytes) made not entrant ----------------------------------- Assembly ----------------------------------- Compiled method (t4)(c2) 1700 24 4 java.lang.String::charAt (25 bytes) total in heap [0x00007f48211d7510,0x00007f48211d78b8] = 936 relocation [0x00007f48211d7690,0x00007f48211d76a0] = 16 main code [0x00007f48211d76a0,0x00007f48211d7740] = 160 stub code [0x00007f48211d7740,0x00007f48211d7758] = 24 metadata [0x00007f48211d7758,0x00007f48211d7770] = 24 scopes data [0x00007f48211d7770,0x00007f48211d77d0] = 96 scopes pcs [0x00007f48211d77d0,0x00007f48211d78a0] = 208 dependencies [0x00007f48211d78a0,0x00007f48211d78a8] = 8 nul chk table [0x00007f48211d78a8,0x00007f48211d78b8] = 16 -------------------------------------------------------------------------------- [Constant Pool (empty)] -------------------------------------------------------------------------------- [Entry Point] # {method} {0x00007f480ecfaf00} '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 0x00007f48211d76a0 (+0x00): mov 0x8(%rsi),%r10d 0x00007f48211d76a4 (+0x04): shl $0x3,%r10 0x00007f48211d76a8 (+0x08): cmp %r10,%rax 0x00007f48211d76ab (+0x0b): jne 0x00007f482104e4a0 0x00007f48211d76b1 (+0x11): nop 0x00007f48211d76b2 (+0x12): nop 0x00007f48211d76b3 (+0x13): nop 0x00007f48211d76b4 (+0x14): nop 0x00007f48211d76b5 (+0x15): nop 0x00007f48211d76b6 (+0x16): nop 0x00007f48211d76b7 (+0x17): nop 0x00007f48211d76b8 (+0x18): nop 0x00007f48211d76b9 (+0x19): nop 0x00007f48211d76ba (+0x1a): nop 0x00007f48211d76bb (+0x1b): nop 0x00007f48211d76bc (+0x1c): nop 0x00007f48211d76bd (+0x1d): nop 0x00007f48211d76be (+0x1e): nop 0x00007f48211d76bf (+0x1f): nop [Verified Entry Point] ;; B1: # out( B5 B2 ) <- BLOCK HEAD IS JUNK Freq: 1 0x00007f48211d76c0 (+0x20): mov %eax,-0x16000(%rsp) 0x00007f48211d76c7 (+0x27): push %rbp 0x00007f48211d76c8 (+0x28): sub $0x20,%rsp 0x00007f48211d76cc (+0x2c): movsbl 0x14(%rsi),%r11d 0x00007f48211d76d1 (+0x31): test %r11d,%r11d 0x00007f48211d76d4 (+0x34): jne 0x00007f48211d76f7 ;; B2: # out( B7 B3 ) <- in( B1 ) Freq: 1 0x00007f48211d76d6 (+0x36): mov 0xc(%rsi),%ebp 0x00007f48211d76d9 (+0x39): mov 0xc(%rbp),%r11d ;; B3: # out( B6 B4 ) <- in( B2 ) Freq: 0.999999 0x00007f48211d76dd (+0x3d): cmp %r11d,%edx 0x00007f48211d76e0 (+0x40): jae 0x00007f48211d770e ;; B4: # out( N65 ) <- in( B3 ) Freq: 0.999998 0x00007f48211d76e2 (+0x42): movzbl 0x10(%rbp,%rdx,1),%eax 0x00007f48211d76e7 (+0x47): add $0x20,%rsp 0x00007f48211d76eb (+0x4b): pop %rbp 0x00007f48211d76ec (+0x4c): mov 0x128(%r15),%r10 0x00007f48211d76f3 (+0x53): test %eax,(%r10) 0x00007f48211d76f6 (+0x56): retq ;; B5: # out( N65 ) <- in( B1 ) Freq: 5e-07 0x00007f48211d76f7 (+0x57): mov %rsi,%rbp 0x00007f48211d76fa (+0x5a): mov %edx,(%rsp) 0x00007f48211d76fd (+0x5d): mov %r11d,0x4(%rsp) 0x00007f48211d7702 (+0x62): mov $0xffffff4d,%esi 0x00007f48211d7707 (+0x67): callq 0x00007f482104fea0 0x00007f48211d770c (+0x6c): ud2 ;; B6: # out( N65 ) <- in( B3 ) Freq: 4.76836e-07 0x00007f48211d770e (+0x6e): mov $0xffffffe5,%esi 0x00007f48211d7713 (+0x73): mov %edx,0x4(%rsp) 0x00007f48211d7717 (+0x77): callq 0x00007f482104fea0 0x00007f48211d771c (+0x7c): ud2 ;; B7: # out( N65 ) <- in( B2 ) Freq: 1.01328e-06 0x00007f48211d771e (+0x7e): mov $0xfffffff6,%esi 0x00007f48211d7723 (+0x83): mov %edx,0x4(%rsp) 0x00007f48211d7727 (+0x87): callq 0x00007f482104fea0 0x00007f48211d772c (+0x8c): ud2 0x00007f48211d772e (+0x8e): hlt 0x00007f48211d772f (+0x8f): hlt 0x00007f48211d7730 (+0x90): hlt 0x00007f48211d7731 (+0x91): hlt 0x00007f48211d7732 (+0x92): hlt 0x00007f48211d7733 (+0x93): hlt 0x00007f48211d7734 (+0x94): hlt 0x00007f48211d7735 (+0x95): hlt 0x00007f48211d7736 (+0x96): hlt 0x00007f48211d7737 (+0x97): hlt 0x00007f48211d7738 (+0x98): hlt 0x00007f48211d7739 (+0x99): hlt 0x00007f48211d773a (+0x9a): hlt 0x00007f48211d773b (+0x9b): hlt 0x00007f48211d773c (+0x9c): hlt 0x00007f48211d773d (+0x9d): hlt 0x00007f48211d773e (+0x9e): hlt 0x00007f48211d773f (+0x9f): hlt [Exception Handler] 0x00007f48211d7740 (+0xa0): jmpq 0x00007f48211b56a0 [Deopt Handler Code] 0x00007f48211d7745 (+0xa5): callq 0x00007f48211d774a 0x00007f48211d774a (+0xaa): subq $0x5,(%rsp) 0x00007f48211d774f (+0xaf): jmpq 0x00007f482104f8e0 0x00007f48211d7754 (+0xb4): hlt 0x00007f48211d7755 (+0xb5): hlt 0x00007f48211d7756 (+0xb6): hlt 0x00007f48211d7757 (+0xb7): hlt --------------------------------------------------------------------------------