Skip to content

Instantly share code, notes, and snippets.

@EgorBot
Created November 20, 2024 19:47
Show Gist options
  • Save EgorBot/deff79b434c6c9ae6e70df706a028d43 to your computer and use it in GitHub Desktop.
Save EgorBot/deff79b434c6c9ae6e70df706a028d43 to your computer and use it in GitHub Desktop.
diff_asm_6b6a4635.asm
Samples: 10K of event 'cpu-clock', 1999 Hz, Event count (approx.): 5047522500, [percent: local period]
RuntimeTypeHandle::GetElementTypeHandleFromHandle(void*)() /home/egorbot/core_root_diff/libcoreclr.so
Percent
Disassembly of section .text:
00000000003a0020 <GetCLRRuntimeHost@@V1.0+0x188d20>:
13.87 push rbp
mov rbp,rsp
push rbx
sub rsp,0x18
mov rbx,rdi
mov rax,QWORD PTR fs:0x28
13.21 mov QWORD PTR [rbp-0x10],rax
3.80 mov QWORD PTR [rbp-0x18],rdi
test bl,0x2
↓ jne 4b
mov eax,0xc0000
0.03 and eax,DWORD PTR [rbx]
cmp eax,0x80000
↓ jne 78
add rbx,0x30
10.25 mov rax,QWORD PTR [rbx]
2.99 mov rcx,QWORD PTR fs:0x28
cmp rcx,QWORD PTR [rbp-0x10]
↓ je 89
46: → call __stack_chk_fail@plt
4b: lea rdi,[rbp-0x18]
→ call TypeHandle::IsGenericVariable() const
test eax,eax
↓ jne 78
mov rbx,QWORD PTR [rbp-0x18]
add rbx,0xfffffffffffffffe
mov rdi,rbx
→ call TypeDesc::IsGenericVariable()
test eax,eax
↓ jne 78
mov rdi,rbx
→ call TypeDesc::IsFnPtr()
test eax,eax
↓ je 90
78: xor eax,eax
mov rcx,QWORD PTR fs:0x28
cmp rcx,QWORD PTR [rbp-0x10]
↑ jne 46
55.72 89: add rsp,0x18
0.13 pop rbx
pop rbp
← ret
90: add rbx,0x10
mov rax,QWORD PTR [rbx]
mov rcx,QWORD PTR fs:0x28
cmp rcx,QWORD PTR [rbp-0x10]
↑ je 89
↑ jmp 46
Samples: 10K of event 'cpu-clock', 1999 Hz, Event count (approx.): 5047522500, [percent: local period]
RuntimeTypeHandle::GetTypeFromHandleIfExists(void*)() /home/egorbot/core_root_diff/libcoreclr.so
Percent
Disassembly of section .text:
000000000039f500 <GetCLRRuntimeHost@@V1.0+0x188200>:
45.75 push rbp
mov rbp,rsp
test dil,0x2
↓ jne 17
20.51 mov rdi,QWORD PTR [rdi+0x20]
add rdi,0x10
mov rax,QWORD PTR [rdi]
33.57 pop rbp
0.18 ← ret
17: add rdi,0x6
mov rax,QWORD PTR [rdi]
pop rbp
← ret
Samples: 10K of event 'cpu-clock', 1999 Hz, Event count (approx.): 5047522500, [percent: local period]
instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]() /tmp/jitted-44911-7224.so
Percent
Disassembly of section .text:
0000000000000080 <instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]>:
instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]():
push rbp
push r15
push r14
push rbx
push rax
lea rbp,[rsp+0x20]
mov rbx,rdi
test rsi,rsi
↓ jle 234
mov r15,rsi
1b: mov r14,QWORD PTR [rbx+0x38]
0.45 mov rax,QWORD PTR [rbx+0x30]
mov rdi,QWORD PTR [rax+0x8]
0.19 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.21 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
2.01 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.58 mov rdi,QWORD PTR [rax+0x8]
0.91 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.08 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
2.08 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.84 mov rdi,QWORD PTR [rax+0x8]
1.69 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.27 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.69 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.91 mov rdi,QWORD PTR [rax+0x8]
0.84 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
1.75 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.75 xor edi,edi
0.13 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
2.01 mov rdi,QWORD PTR [rax+0x8]
1.75 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
1.62 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.69 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
1.69 mov rdi,QWORD PTR [rax+0x8]
2.34 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.53 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
2.21 xor edi,edi
0.13 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.58 mov rdi,QWORD PTR [rax+0x8]
1.56 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.47 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
2.01 xor edi,edi
0.26 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
1.10 mov rdi,QWORD PTR [rax+0x8]
0.91 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
1.95 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.75 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.78 mov rdi,QWORD PTR [rax+0x8]
0.84 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.21 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.88 xor edi,edi
mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.71 mov rdi,QWORD PTR [rax+0x8]
1.17 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
1.43 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.36 xor edi,edi
0.26 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.58 mov rdi,QWORD PTR [rax+0x8]
0.71 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.47 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
2.34 xor edi,edi
0.13 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.78 mov rdi,QWORD PTR [rax+0x8]
1.62 → call QWORD PTR [rax+0x18]
0.13 lea rdi,[r14+0x8]
mov rsi,rax
1.82 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.69 xor edi,edi
mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.97 mov rdi,QWORD PTR [rax+0x8]
0.91 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.08 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.88 xor edi,edi
0.13 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
1.82 mov rdi,QWORD PTR [rax+0x8]
0.97 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.73 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.82 xor edi,edi
mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
1.17 mov rdi,QWORD PTR [rax+0x8]
0.26 → call QWORD PTR [rax+0x18]
0.06 lea rdi,[r14+0x8]
mov rsi,rax
2.08 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.88 xor edi,edi
0.19 mov QWORD PTR [r14+0x8],rdi
mov r14,QWORD PTR [rbx+0x38]
mov rax,QWORD PTR [rbx+0x30]
0.65 mov rdi,QWORD PTR [rax+0x8]
1.23 → call QWORD PTR [rax+0x18]
lea rdi,[r14+0x8]
mov rsi,rax
2.34 → call instance void [fd79cd18-dfc9-4dc9-ad95-0b905f1dc15dEmitted] BenchmarkDotNet.Autogenerated.Runnable_0::WorkloadActionUnroll(int64)[Optimized]+0x7dadc2b0
1.75 xor eax,eax
0.19 mov QWORD PTR [r14+0x8],rax
dec r15
↑ jne 1b
234: add rsp,0x8
pop rbx
pop r14
pop r15
pop rbp
← ret
Samples: 10K of event 'cpu-clock', 1999 Hz, Event count (approx.): 5047522500, [percent: local period]
instance class [System.Runtime]System.Type [benchapp] Bench::ValueElementType()[OptimizedTier1]() /tmp/jitted-44911-7260.so
Percent
Disassembly of section .text:
0000000000000080 <instance class [System.Runtime]System.Type [benchapp] Bench::ValueElementType()[OptimizedTier1]>:
instance class [System.Runtime]System.Type [benchapp] Bench::ValueElementType()[OptimizedTier1]():
push rbp
push rbx
push rax
lea rbp,[rsp+0x10]
0.09 movabs rdi,0x788f5d31cfd0
47.48 → call instance class [System.Runtime]System.Type [benchapp] Bench::ValueElementType()[OptimizedTier1]+0x7da0e610
mov rbx,rax
2.47 test rbx,rbx
↓ je 4c
mov rdi,rbx
→ call instance class [System.Runtime]System.Type [benchapp] Bench::ValueElementType()[OptimizedTier1]+0x7da0daf0
test rax,rax
↓ jne 3b
mov rdi,rbx
movabs rax,0x788f5cb05ab8
→ call QWORD PTR [rax]
49.04 3b: movabs rcx,0x788fd834af80
45: add rsp,0x8
pop rbx
0.91 pop rbp
← ret
4c: xor eax,eax
↑ jmp 45
Samples: 10K of event 'cpu-clock', 1999 Hz, Event count (approx.): 5047522500, [percent: local period]
JIT_WriteBarrier() /home/egorbot/core_root_diff/libcoreclr.so
Percent
Disassembly of section .text:
00000000004ad2d0 <GetCLRRuntimeHost@@V1.0+0x295fd0>:
92.59 mov QWORD PTR [rdi],rsi
7.41 mov rax,rdi
movabs r10,0xf0f0f0f0f0f0f0f0
shr rax,0xc
xchg ax,ax
movabs r11,0xf0f0f0f0f0f0f0f0
add rax,r10
cmp BYTE PTR [rax],0x0
↓ jne 2e
mov BYTE PTR [rax],0xff
nop
2e: cmp rsi,r11
↓ jb 70
nop
movabs r10,0xf0f0f0f0f0f0f0f0
cmp rsi,r10
↓ jae 70
nop
movabs rax,0xf0f0f0f0f0f0f0f0
shr rdi,0xb
cmp BYTE PTR [rdi+rax*1],0xff
↓ jne 5c
repz ret
5c: mov BYTE PTR [rdi+rax*1],0xff
xchg ax,ax
shr rdi,0xa
movabs rax,0xf0f0f0f0f0f0f0f0
70: cmp BYTE PTR [rdi+rax*1],0xff
↓ jne 78
repz ret
78: mov BYTE PTR [rdi+rax*1],0xff
← ret
nop
repz ret
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
xchg ax,ax
nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment