-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regressions in System.Text.Json.Tests.Perf_Reader #82107
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsRun Information
Regressions in System.Text.Json.Tests.Perf_Reader
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Tests.Perf_Reader*' PayloadsHistogramSystem.Text.Json.Tests.Perf_Reader.ReadReturnBytes(IsDataCompact: True, TestCase: LotsOfStrings)
Description of detection logic
; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,20
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqu xmmword ptr [rsp+8],xmm4
xor eax,eax
mov [rsp+18],rax
mov rbx,rcx
mov r14d,r8d
mov rbp,r9
lea rdi,[rbx+30]
mov rsi,rdx
call CORINFO_HELP_ASSIGN_BYREF
movsq
mov [rbx+24],r14b
mov byte ptr [rbx+25],0
mov rax,[rbp]
mov [rbx],rax
mov rax,[rbp+8]
mov [rbx+8],rax
movzx eax,byte ptr [rbp+10]
mov [rbx+26],al
movzx eax,byte ptr [rbp+11]
mov [rbx+27],al
movzx eax,byte ptr [rbp+12]
mov [rbx+2E],al
movzx eax,byte ptr [rbp+13]
mov [rbx+2C],al
movzx eax,byte ptr [rbp+14]
mov [rbx+28],al
movzx eax,byte ptr [rbp+15]
mov [rbx+29],al
mov rax,[rbp+18]
mov [rbx+40],rax
cmp dword ptr [rbx+40],0
jne short M01_L00
mov dword ptr [rbx+40],40
M01_L00:
lea rsi,[rbp+20]
lea rdi,[rbx+48]
call CORINFO_HELP_ASSIGN_BYREF
movsq
movsq
xor eax,eax
mov [rbx+20],eax
mov [rbx+18],rax
mov [rbx+10],rax
movzx eax,byte ptr [rbx+24]
mov [rbx+2A],al
mov byte ptr [rbx+2B],0
xor eax,eax
mov [rbx+98],rax
mov [rbx+0A0],rax
mov [rbx+70],rax
mov [rbx+78],rax
mov [rbx+60],rax
mov [rbx+68],rax
mov [rbx+80],rax
mov [rbx+88],rax
mov [rbx+90],rax
mov byte ptr [rbx+2D],0
mov rax,1810CC07D50
mov rax,[rax]
vmovdqu xmm0,xmmword ptr [rax+8]
vmovdqu xmmword ptr [rsp+8],xmm0
mov rdx,[rax+18]
mov [rsp+18],rdx
lea rdi,[rbx+0A8]
lea rsi,[rsp+8]
call CORINFO_HELP_ASSIGN_BYREF
call CORINFO_HELP_ASSIGN_BYREF
movsq
add rsp,20
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
; Total bytes of code 305 ; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
push rdi
push rsi
vzeroupper
mov rax,rcx
sub rax,rdx
cmp rax,r8
jb near ptr M02_L09
mov rax,rdx
sub rax,rcx
cmp rax,r8
jb near ptr M02_L09
lea rsi,[rdx+r8]
lea rdi,[rcx+r8]
cmp r8,10
jbe short M02_L05
cmp r8,40
ja short M02_L03
M02_L00:
vmovups xmm0,[rdx]
vmovups [rcx],xmm0
cmp r8,20
jbe short M02_L01
vmovups xmm0,[rdx+10]
vmovups [rcx+10],xmm0
cmp r8,30
ja near ptr M02_L08
M02_L01:
vmovups xmm0,[rsi-10]
vmovups [rdi-10],xmm0
M02_L02:
pop rsi
pop rdi
ret
M02_L03:
cmp r8,800
ja near ptr M02_L10
mov rax,r8
shr rax,6
M02_L04:
vmovdqu ymm0,ymmword ptr [rdx]
vmovdqu ymmword ptr [rcx],ymm0
vmovdqu ymm0,ymmword ptr [rdx+20]
vmovdqu ymmword ptr [rcx+20],ymm0
add rcx,40
add rdx,40
dec rax
jne short M02_L04
and r8,3F
cmp r8,10
ja short M02_L00
jmp short M02_L01
M02_L05:
test r8b,18
jne short M02_L06
test r8b,4
jne short M02_L07
test r8,r8
je short M02_L02
movzx edx,byte ptr [rdx]
mov [rcx],dl
test r8b,2
je short M02_L02
movsx r8,word ptr [rsi-2]
mov [rdi-2],r8w
jmp short M02_L02
M02_L06:
mov rdx,[rdx]
mov [rcx],rdx
mov rcx,[rsi-8]
mov [rdi-8],rcx
jmp short M02_L02
M02_L07:
mov eax,[rdx]
mov [rcx],eax
mov eax,[rsi-4]
mov [rdi-4],eax
jmp near ptr M02_L02
M02_L08:
vmovups xmm0,[rdx+20]
vmovups [rcx+20],xmm0
jmp near ptr M02_L01
M02_L09:
cmp rcx,rdx
je near ptr M02_L02
M02_L10:
pop rsi
pop rdi
jmp qword ptr [7FF9A7E610C0]
; Total bytes of code 268 ; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,30
xor eax,eax
mov [rsp+20],rax
mov rsi,rcx
xor edi,edi
xor ecx,ecx
mov [rsi+98],rcx
mov [rsi+0A0],rcx
mov byte ptr [rsi+2E],0
mov ecx,[rsi+20]
movsxd rax,ecx
mov edx,[rsi+38]
cmp rax,rdx
jl short M03_L02
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L00
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L00:
cmp dword ptr [rsi+58],0
jne near ptr M03_L16
cmp byte ptr [rsi+44],2
jne short M03_L01
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L01:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L17
jmp near ptr M03_L14
M03_L02:
lea rax,[rsi+30]
cmp ecx,[rax+8]
jae near ptr M03_L21
mov rax,[rax]
mov ecx,ecx
movzx edx,byte ptr [rax+rcx]
cmp edx,20
jg near ptr M03_L06
mov rcx,rsi
call qword ptr [7FF9A83EDBD0]
mov ecx,[rsi+20]
movsxd rdx,ecx
mov eax,[rsi+38]
cmp rdx,rax
jl short M03_L05
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L03
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L03:
cmp dword ptr [rsi+58],0
jne near ptr M03_L18
cmp byte ptr [rsi+44],2
jne short M03_L04
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L04:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L19
jmp near ptr M03_L14
M03_L05:
lea rdx,[rsi+30]
cmp ecx,[rdx+8]
jae near ptr M03_L21
mov rdx,[rdx]
mov ecx,ecx
movzx edx,byte ptr [rdx+rcx]
M03_L06:
movsxd rcx,dword ptr [rsi+20]
mov [rsi+18],rcx
movzx ebx,byte ptr [rsi+28]
test ebx,ebx
je near ptr M03_L15
cmp edx,2F
jne short M03_L08
M03_L07:
mov rcx,rsi
call qword ptr [7FF9A83EDD50]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte)
mov edi,eax
jmp short M03_L14
M03_L08:
cmp ebx,1
jne short M03_L10
cmp edx,7D
jne short M03_L09
mov rcx,rsi
call qword ptr [7FF9A83EDB10]; System.Text.Json.Utf8JsonReader.EndObject()
jmp short M03_L13
M03_L09:
cmp edx,22
jne near ptr M03_L20
mov ebx,[rsi+20]
mov rbp,[rsi+8]
mov r14,[rsi]
mov rcx,rsi
call qword ptr [7FF9A83EDC60]; System.Text.Json.Utf8JsonReader.ConsumePropertyName()
mov edi,eax
test edi,edi
jne short M03_L14
mov [rsi+20],ebx
mov byte ptr [rsi+28],1
mov [rsi+8],rbp
mov [rsi],r14
jmp short M03_L14
M03_L10:
cmp ebx,3
jne short M03_L12
cmp edx,5D
jne short M03_L11
mov rcx,rsi
call qword ptr [7FF9A83EDB40]; System.Text.Json.Utf8JsonReader.EndArray()
jmp short M03_L13
M03_L11:
mov rcx,rsi
call qword ptr [7FF9A83EDBE8]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte)
mov edi,eax
jmp short M03_L14
M03_L12:
cmp ebx,5
jne short M03_L07
jmp short M03_L11
M03_L13:
mov edi,1
M03_L14:
mov eax,edi
add rsp,30
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
M03_L15:
mov rcx,rsi
call qword ptr [7FF9A83EDBB8]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)
mov edi,eax
jmp short M03_L14
M03_L16:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L17:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L18:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L19:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L20:
xor ecx,ecx
mov [rsp+20],rcx
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov r8d,edx
mov edx,0C
call qword ptr [7FF9A8431378]
int 3
M03_L21:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 687 Compare Jit Disasm; System.Text.Json.Tests.Perf_Reader.ReadReturnBytes()
push rdi
push rsi
push rbp
push rbx
sub rsp,128
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqa xmmword ptr [rsp+20],xmm4
mov rax,0FFFFFFFFFFFFFF10
M00_L00:
vmovdqa xmmword ptr [rsp+rax+120],xmm4
vmovdqa xmmword ptr [rsp+rax+130],xmm4
vmovdqa xmmword ptr [rsp+rax+140],xmm4
add rax,30
jne short M00_L00
mov [rsp+120],rax
mov rsi,rcx
M00_L01:
mov rdx,[rsi+18]
test rdx,rdx
je near ptr M00_L14
lea rdi,[rdx+10]
mov ebx,[rdx+8]
M00_L02:
mov rdx,[rsi+10]
test rdx,rdx
je short M00_L04
lea rcx,[rdx+10]
mov r9d,[rdx+8]
M00_L03:
xor edx,edx
mov [rsp+30],rdx
mov [rsp+38],rdx
mov byte ptr [rsp+40],0
mov byte ptr [rsp+41],0
mov byte ptr [rsp+42],0
mov byte ptr [rsp+43],0
mov byte ptr [rsp+44],0
mov byte ptr [rsp+45],0
mov [rsp+48],rdx
vxorps xmm0,xmm0,xmm0
vmovdqu xmmword ptr [rsp+50],xmm0
mov [rsp+60],rdx
mov [rsp+20],rcx
mov [rsp+28],r9d
lea rdx,[rsp+20]
lea rcx,[rsp+68]
lea r9,[rsp+30]
mov r8d,1
call qword ptr [7FFA7D6ED960]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
jmp near ptr M00_L06
M00_L04:
xor ecx,ecx
xor r9d,r9d
jmp short M00_L03
M00_L05:
movzx ecx,byte ptr [rsp+90]
mov rdx,[rsp+100]
mov ebp,[rsp+108]
add ecx,0FFFFFFFB
cmp ecx,6
ja near ptr M00_L06
mov ecx,ecx
lea r8,[7FFA7D0C8F88]
mov r8d,[r8+rcx*4]
lea rax,[M00_L01]
add r8,rax
jmp r8
mov rcx,rdi
cmp ebp,ebx
ja near ptr M00_L11
mov r8d,ebp
call qword ptr [7FFA7D1610A8]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
cmp ebp,ebx
jae near ptr M00_L15
mov ecx,ebp
mov byte ptr [rdi+rcx],2C
lea ecx,[rbp+1]
cmp ecx,ebx
jae near ptr M00_L15
mov ecx,ecx
mov byte ptr [rdi+rcx],20
add ebp,2
cmp ebp,ebx
ja near ptr M00_L12
mov ecx,ebp
add rdi,rcx
sub ebx,ebp
jmp near ptr M00_L06
mov rcx,rdi
cmp ebp,ebx
ja near ptr M00_L11
mov r8d,ebp
call qword ptr [7FFA7D1610A8]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja near ptr M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
jmp near ptr M00_L06
test ebx,ebx
je near ptr M00_L15
mov byte ptr [rdi],54
cmp ebx,1
jbe near ptr M00_L15
mov byte ptr [rdi+1],72
cmp ebx,2
jbe near ptr M00_L15
mov byte ptr [rdi+2],75
cmp ebx,3
jbe near ptr M00_L15
mov byte ptr [rdi+3],65
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja near ptr M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
jmp short M00_L06
test ebx,ebx
je near ptr M00_L15
mov byte ptr [rdi],46
cmp ebx,1
jbe near ptr M00_L15
mov byte ptr [rdi+1],61
cmp ebx,2
jbe near ptr M00_L15
mov byte ptr [rdi+2],6C
cmp ebx,3
jbe near ptr M00_L15
mov byte ptr [rdi+3],73
cmp ebx,4
jbe near ptr M00_L15
mov byte ptr [rdi+4],65
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja short M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
M00_L06:
cmp byte ptr [rsp+93],0
jne short M00_L07
lea rcx,[rsp+68]
call qword ptr [7FFA7D6EDB70]; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
jmp short M00_L08
M00_L07:
lea rcx,[rsp+68]
call qword ptr [7FFA7D6EDF18]
M00_L08:
movzx eax,al
test eax,eax
jne short M00_L09
cmp byte ptr [rsp+8C],0
je short M00_L10
cmp byte ptr [rsp+90],0
je short M00_L13
M00_L09:
test eax,eax
jne near ptr M00_L05
M00_L10:
mov rax,[rsi+18]
add rsp,128
pop rbx
pop rbp
pop rsi
pop rdi
ret
M00_L11:
call qword ptr [7FFA7D3AD4F8]
int 3
M00_L12:
call qword ptr [7FFA7D3AD4E0]
int 3
M00_L13:
xor r9d,r9d
mov [rsp+20],r9
xor r9d,r9d
mov [rsp+28],r9d
lea r9,[rsp+20]
lea rcx,[rsp+68]
mov edx,20
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M00_L14:
xor edi,edi
xor ebx,ebx
jmp near ptr M00_L02
M00_L15:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 808 ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,20
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqu xmmword ptr [rsp+8],xmm4
xor eax,eax
mov [rsp+18],rax
mov rbx,rcx
mov r14d,r8d
mov rbp,r9
lea rdi,[rbx+30]
mov rsi,rdx
call CORINFO_HELP_ASSIGN_BYREF
movsq
mov [rbx+24],r14b
mov byte ptr [rbx+25],0
mov rax,[rbp]
mov [rbx],rax
mov rax,[rbp+8]
mov [rbx+8],rax
movzx eax,byte ptr [rbp+10]
mov [rbx+26],al
movzx eax,byte ptr [rbp+11]
mov [rbx+27],al
movzx eax,byte ptr [rbp+12]
mov [rbx+2E],al
movzx eax,byte ptr [rbp+13]
mov [rbx+2C],al
movzx eax,byte ptr [rbp+14]
mov [rbx+28],al
movzx eax,byte ptr [rbp+15]
mov [rbx+29],al
mov rax,[rbp+18]
mov [rbx+40],rax
cmp dword ptr [rbx+40],0
jne short M01_L00
mov dword ptr [rbx+40],40
M01_L00:
lea rsi,[rbp+20]
lea rdi,[rbx+48]
call CORINFO_HELP_ASSIGN_BYREF
movsq
movsq
xor eax,eax
mov [rbx+20],eax
mov [rbx+18],rax
mov [rbx+10],rax
movzx eax,byte ptr [rbx+24]
mov [rbx+2A],al
mov byte ptr [rbx+2B],0
xor eax,eax
mov [rbx+98],rax
mov [rbx+0A0],rax
mov [rbx+70],rax
mov [rbx+78],rax
mov [rbx+60],rax
mov [rbx+68],rax
mov [rbx+80],rax
mov [rbx+88],rax
mov [rbx+90],rax
mov byte ptr [rbx+2D],0
mov rax,1984AC07D50
mov rax,[rax]
vmovdqu xmm0,xmmword ptr [rax+8]
vmovdqu xmmword ptr [rsp+8],xmm0
mov rdx,[rax+18]
mov [rsp+18],rdx
lea rdi,[rbx+0A8]
lea rsi,[rsp+8]
call CORINFO_HELP_ASSIGN_BYREF
call CORINFO_HELP_ASSIGN_BYREF
movsq
add rsp,20
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
; Total bytes of code 305 ; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
push rdi
push rsi
vzeroupper
mov rax,rcx
sub rax,rdx
cmp rax,r8
jb near ptr M02_L09
mov rax,rdx
sub rax,rcx
cmp rax,r8
jb near ptr M02_L09
lea rsi,[rdx+r8]
lea rdi,[rcx+r8]
cmp r8,10
jbe short M02_L05
cmp r8,40
ja short M02_L03
M02_L00:
vmovups xmm0,[rdx]
vmovups [rcx],xmm0
cmp r8,20
jbe short M02_L01
vmovups xmm0,[rdx+10]
vmovups [rcx+10],xmm0
cmp r8,30
ja near ptr M02_L08
M02_L01:
vmovups xmm0,[rsi-10]
vmovups [rdi-10],xmm0
M02_L02:
pop rsi
pop rdi
ret
M02_L03:
cmp r8,800
ja near ptr M02_L10
mov rax,r8
shr rax,6
M02_L04:
vmovdqu ymm0,ymmword ptr [rdx]
vmovdqu ymmword ptr [rcx],ymm0
vmovdqu ymm0,ymmword ptr [rdx+20]
vmovdqu ymmword ptr [rcx+20],ymm0
add rcx,40
add rdx,40
dec rax
jne short M02_L04
and r8,3F
cmp r8,10
ja short M02_L00
jmp short M02_L01
M02_L05:
test r8b,18
jne short M02_L06
test r8b,4
jne short M02_L07
test r8,r8
je short M02_L02
movzx edx,byte ptr [rdx]
mov [rcx],dl
test r8b,2
je short M02_L02
movsx r8,word ptr [rsi-2]
mov [rdi-2],r8w
jmp short M02_L02
M02_L06:
mov rdx,[rdx]
mov [rcx],rdx
mov rcx,[rsi-8]
mov [rdi-8],rcx
jmp short M02_L02
M02_L07:
mov eax,[rdx]
mov [rcx],eax
mov eax,[rsi-4]
mov [rdi-4],eax
jmp near ptr M02_L02
M02_L08:
vmovups xmm0,[rdx+20]
vmovups [rcx+20],xmm0
jmp near ptr M02_L01
M02_L09:
cmp rcx,rdx
je near ptr M02_L02
M02_L10:
pop rsi
pop rdi
jmp qword ptr [7FFA7D1610C0]
; Total bytes of code 268 ; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,30
xor eax,eax
mov [rsp+20],rax
mov rsi,rcx
xor edi,edi
xor ecx,ecx
mov [rsi+98],rcx
mov [rsi+0A0],rcx
mov byte ptr [rsi+2E],0
mov ecx,[rsi+20]
movsxd rax,ecx
mov edx,[rsi+38]
cmp rax,rdx
jl short M03_L02
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L00
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L00:
cmp dword ptr [rsi+58],0
jne near ptr M03_L16
cmp byte ptr [rsi+44],2
jne short M03_L01
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L01:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L17
jmp near ptr M03_L14
M03_L02:
lea rax,[rsi+30]
cmp ecx,[rax+8]
jae near ptr M03_L21
mov rax,[rax]
mov ecx,ecx
movzx edx,byte ptr [rax+rcx]
cmp edx,20
jg near ptr M03_L06
mov rcx,rsi
call qword ptr [7FFA7D6EDBD0]
mov ecx,[rsi+20]
movsxd rdx,ecx
mov eax,[rsi+38]
cmp rdx,rax
jl short M03_L05
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L03
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L03:
cmp dword ptr [rsi+58],0
jne near ptr M03_L18
cmp byte ptr [rsi+44],2
jne short M03_L04
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L04:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L19
jmp near ptr M03_L14
M03_L05:
lea rdx,[rsi+30]
cmp ecx,[rdx+8]
jae near ptr M03_L21
mov rdx,[rdx]
mov ecx,ecx
movzx edx,byte ptr [rdx+rcx]
M03_L06:
movsxd rcx,dword ptr [rsi+20]
mov [rsi+18],rcx
movzx ebx,byte ptr [rsi+28]
test ebx,ebx
je near ptr M03_L15
cmp edx,2F
jne short M03_L08
M03_L07:
mov rcx,rsi
call qword ptr [7FFA7D6EDD50]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte)
mov edi,eax
jmp short M03_L14
M03_L08:
cmp ebx,1
jne short M03_L10
cmp edx,7D
jne short M03_L09
mov rcx,rsi
call qword ptr [7FFA7D6EDB10]; System.Text.Json.Utf8JsonReader.EndObject()
jmp short M03_L13
M03_L09:
cmp edx,22
jne near ptr M03_L20
mov ebx,[rsi+20]
mov rbp,[rsi+8]
mov r14,[rsi]
mov rcx,rsi
call qword ptr [7FFA7D6EDC60]; System.Text.Json.Utf8JsonReader.ConsumePropertyName()
mov edi,eax
test edi,edi
jne short M03_L14
mov [rsi+20],ebx
mov byte ptr [rsi+28],1
mov [rsi+8],rbp
mov [rsi],r14
jmp short M03_L14
M03_L10:
cmp ebx,3
jne short M03_L12
cmp edx,5D
jne short M03_L11
mov rcx,rsi
call qword ptr [7FFA7D6EDB40]; System.Text.Json.Utf8JsonReader.EndArray()
jmp short M03_L13
M03_L11:
mov rcx,rsi
call qword ptr [7FFA7D6EDBE8]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte)
mov edi,eax
jmp short M03_L14
M03_L12:
cmp ebx,5
jne short M03_L07
jmp short M03_L11
M03_L13:
mov edi,1
M03_L14:
mov eax,edi
add rsp,30
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
M03_L15:
mov rcx,rsi
call qword ptr [7FFA7D6EDBB8]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)
mov edi,eax
jmp short M03_L14
M03_L16:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L17:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L18:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L19:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L20:
xor ecx,ecx
mov [rsp+20],rcx
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov r8d,edx
mov edx,0C
call qword ptr [7FFA7D731378]
int 3
M03_L21:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 687 DocsProfiling workflow for dotnet/runtime repository
|
Probably caused by #81758. cc @radekdoulik |
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsRun Information
Regressions in System.Text.Json.Tests.Perf_Reader
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md Payloadsgit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Json.Tests.Perf_Reader*' PayloadsHistogramSystem.Text.Json.Tests.Perf_Reader.ReadReturnBytes(IsDataCompact: True, TestCase: LotsOfStrings)
Description of detection logic
; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,20
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqu xmmword ptr [rsp+8],xmm4
xor eax,eax
mov [rsp+18],rax
mov rbx,rcx
mov r14d,r8d
mov rbp,r9
lea rdi,[rbx+30]
mov rsi,rdx
call CORINFO_HELP_ASSIGN_BYREF
movsq
mov [rbx+24],r14b
mov byte ptr [rbx+25],0
mov rax,[rbp]
mov [rbx],rax
mov rax,[rbp+8]
mov [rbx+8],rax
movzx eax,byte ptr [rbp+10]
mov [rbx+26],al
movzx eax,byte ptr [rbp+11]
mov [rbx+27],al
movzx eax,byte ptr [rbp+12]
mov [rbx+2E],al
movzx eax,byte ptr [rbp+13]
mov [rbx+2C],al
movzx eax,byte ptr [rbp+14]
mov [rbx+28],al
movzx eax,byte ptr [rbp+15]
mov [rbx+29],al
mov rax,[rbp+18]
mov [rbx+40],rax
cmp dword ptr [rbx+40],0
jne short M01_L00
mov dword ptr [rbx+40],40
M01_L00:
lea rsi,[rbp+20]
lea rdi,[rbx+48]
call CORINFO_HELP_ASSIGN_BYREF
movsq
movsq
xor eax,eax
mov [rbx+20],eax
mov [rbx+18],rax
mov [rbx+10],rax
movzx eax,byte ptr [rbx+24]
mov [rbx+2A],al
mov byte ptr [rbx+2B],0
xor eax,eax
mov [rbx+98],rax
mov [rbx+0A0],rax
mov [rbx+70],rax
mov [rbx+78],rax
mov [rbx+60],rax
mov [rbx+68],rax
mov [rbx+80],rax
mov [rbx+88],rax
mov [rbx+90],rax
mov byte ptr [rbx+2D],0
mov rax,1810CC07D50
mov rax,[rax]
vmovdqu xmm0,xmmword ptr [rax+8]
vmovdqu xmmword ptr [rsp+8],xmm0
mov rdx,[rax+18]
mov [rsp+18],rdx
lea rdi,[rbx+0A8]
lea rsi,[rsp+8]
call CORINFO_HELP_ASSIGN_BYREF
call CORINFO_HELP_ASSIGN_BYREF
movsq
add rsp,20
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
; Total bytes of code 305 ; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
push rdi
push rsi
vzeroupper
mov rax,rcx
sub rax,rdx
cmp rax,r8
jb near ptr M02_L09
mov rax,rdx
sub rax,rcx
cmp rax,r8
jb near ptr M02_L09
lea rsi,[rdx+r8]
lea rdi,[rcx+r8]
cmp r8,10
jbe short M02_L05
cmp r8,40
ja short M02_L03
M02_L00:
vmovups xmm0,[rdx]
vmovups [rcx],xmm0
cmp r8,20
jbe short M02_L01
vmovups xmm0,[rdx+10]
vmovups [rcx+10],xmm0
cmp r8,30
ja near ptr M02_L08
M02_L01:
vmovups xmm0,[rsi-10]
vmovups [rdi-10],xmm0
M02_L02:
pop rsi
pop rdi
ret
M02_L03:
cmp r8,800
ja near ptr M02_L10
mov rax,r8
shr rax,6
M02_L04:
vmovdqu ymm0,ymmword ptr [rdx]
vmovdqu ymmword ptr [rcx],ymm0
vmovdqu ymm0,ymmword ptr [rdx+20]
vmovdqu ymmword ptr [rcx+20],ymm0
add rcx,40
add rdx,40
dec rax
jne short M02_L04
and r8,3F
cmp r8,10
ja short M02_L00
jmp short M02_L01
M02_L05:
test r8b,18
jne short M02_L06
test r8b,4
jne short M02_L07
test r8,r8
je short M02_L02
movzx edx,byte ptr [rdx]
mov [rcx],dl
test r8b,2
je short M02_L02
movsx r8,word ptr [rsi-2]
mov [rdi-2],r8w
jmp short M02_L02
M02_L06:
mov rdx,[rdx]
mov [rcx],rdx
mov rcx,[rsi-8]
mov [rdi-8],rcx
jmp short M02_L02
M02_L07:
mov eax,[rdx]
mov [rcx],eax
mov eax,[rsi-4]
mov [rdi-4],eax
jmp near ptr M02_L02
M02_L08:
vmovups xmm0,[rdx+20]
vmovups [rcx+20],xmm0
jmp near ptr M02_L01
M02_L09:
cmp rcx,rdx
je near ptr M02_L02
M02_L10:
pop rsi
pop rdi
jmp qword ptr [7FF9A7E610C0]
; Total bytes of code 268 ; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,30
xor eax,eax
mov [rsp+20],rax
mov rsi,rcx
xor edi,edi
xor ecx,ecx
mov [rsi+98],rcx
mov [rsi+0A0],rcx
mov byte ptr [rsi+2E],0
mov ecx,[rsi+20]
movsxd rax,ecx
mov edx,[rsi+38]
cmp rax,rdx
jl short M03_L02
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L00
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L00:
cmp dword ptr [rsi+58],0
jne near ptr M03_L16
cmp byte ptr [rsi+44],2
jne short M03_L01
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L01:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L17
jmp near ptr M03_L14
M03_L02:
lea rax,[rsi+30]
cmp ecx,[rax+8]
jae near ptr M03_L21
mov rax,[rax]
mov ecx,ecx
movzx edx,byte ptr [rax+rcx]
cmp edx,20
jg near ptr M03_L06
mov rcx,rsi
call qword ptr [7FF9A83EDBD0]
mov ecx,[rsi+20]
movsxd rdx,ecx
mov eax,[rsi+38]
cmp rdx,rax
jl short M03_L05
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L03
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L03:
cmp dword ptr [rsi+58],0
jne near ptr M03_L18
cmp byte ptr [rsi+44],2
jne short M03_L04
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L04:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L19
jmp near ptr M03_L14
M03_L05:
lea rdx,[rsi+30]
cmp ecx,[rdx+8]
jae near ptr M03_L21
mov rdx,[rdx]
mov ecx,ecx
movzx edx,byte ptr [rdx+rcx]
M03_L06:
movsxd rcx,dword ptr [rsi+20]
mov [rsi+18],rcx
movzx ebx,byte ptr [rsi+28]
test ebx,ebx
je near ptr M03_L15
cmp edx,2F
jne short M03_L08
M03_L07:
mov rcx,rsi
call qword ptr [7FF9A83EDD50]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte)
mov edi,eax
jmp short M03_L14
M03_L08:
cmp ebx,1
jne short M03_L10
cmp edx,7D
jne short M03_L09
mov rcx,rsi
call qword ptr [7FF9A83EDB10]; System.Text.Json.Utf8JsonReader.EndObject()
jmp short M03_L13
M03_L09:
cmp edx,22
jne near ptr M03_L20
mov ebx,[rsi+20]
mov rbp,[rsi+8]
mov r14,[rsi]
mov rcx,rsi
call qword ptr [7FF9A83EDC60]; System.Text.Json.Utf8JsonReader.ConsumePropertyName()
mov edi,eax
test edi,edi
jne short M03_L14
mov [rsi+20],ebx
mov byte ptr [rsi+28],1
mov [rsi+8],rbp
mov [rsi],r14
jmp short M03_L14
M03_L10:
cmp ebx,3
jne short M03_L12
cmp edx,5D
jne short M03_L11
mov rcx,rsi
call qword ptr [7FF9A83EDB40]; System.Text.Json.Utf8JsonReader.EndArray()
jmp short M03_L13
M03_L11:
mov rcx,rsi
call qword ptr [7FF9A83EDBE8]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte)
mov edi,eax
jmp short M03_L14
M03_L12:
cmp ebx,5
jne short M03_L07
jmp short M03_L11
M03_L13:
mov edi,1
M03_L14:
mov eax,edi
add rsp,30
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
M03_L15:
mov rcx,rsi
call qword ptr [7FF9A83EDBB8]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)
mov edi,eax
jmp short M03_L14
M03_L16:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L17:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L18:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L19:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FF9A8431378]
int 3
M03_L20:
xor ecx,ecx
mov [rsp+20],rcx
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov r8d,edx
mov edx,0C
call qword ptr [7FF9A8431378]
int 3
M03_L21:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 687 Compare Jit Disasm; System.Text.Json.Tests.Perf_Reader.ReadReturnBytes()
push rdi
push rsi
push rbp
push rbx
sub rsp,128
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqa xmmword ptr [rsp+20],xmm4
mov rax,0FFFFFFFFFFFFFF10
M00_L00:
vmovdqa xmmword ptr [rsp+rax+120],xmm4
vmovdqa xmmword ptr [rsp+rax+130],xmm4
vmovdqa xmmword ptr [rsp+rax+140],xmm4
add rax,30
jne short M00_L00
mov [rsp+120],rax
mov rsi,rcx
M00_L01:
mov rdx,[rsi+18]
test rdx,rdx
je near ptr M00_L14
lea rdi,[rdx+10]
mov ebx,[rdx+8]
M00_L02:
mov rdx,[rsi+10]
test rdx,rdx
je short M00_L04
lea rcx,[rdx+10]
mov r9d,[rdx+8]
M00_L03:
xor edx,edx
mov [rsp+30],rdx
mov [rsp+38],rdx
mov byte ptr [rsp+40],0
mov byte ptr [rsp+41],0
mov byte ptr [rsp+42],0
mov byte ptr [rsp+43],0
mov byte ptr [rsp+44],0
mov byte ptr [rsp+45],0
mov [rsp+48],rdx
vxorps xmm0,xmm0,xmm0
vmovdqu xmmword ptr [rsp+50],xmm0
mov [rsp+60],rdx
mov [rsp+20],rcx
mov [rsp+28],r9d
lea rdx,[rsp+20]
lea rcx,[rsp+68]
lea r9,[rsp+30]
mov r8d,1
call qword ptr [7FFA7D6ED960]; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
jmp near ptr M00_L06
M00_L04:
xor ecx,ecx
xor r9d,r9d
jmp short M00_L03
M00_L05:
movzx ecx,byte ptr [rsp+90]
mov rdx,[rsp+100]
mov ebp,[rsp+108]
add ecx,0FFFFFFFB
cmp ecx,6
ja near ptr M00_L06
mov ecx,ecx
lea r8,[7FFA7D0C8F88]
mov r8d,[r8+rcx*4]
lea rax,[M00_L01]
add r8,rax
jmp r8
mov rcx,rdi
cmp ebp,ebx
ja near ptr M00_L11
mov r8d,ebp
call qword ptr [7FFA7D1610A8]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
cmp ebp,ebx
jae near ptr M00_L15
mov ecx,ebp
mov byte ptr [rdi+rcx],2C
lea ecx,[rbp+1]
cmp ecx,ebx
jae near ptr M00_L15
mov ecx,ecx
mov byte ptr [rdi+rcx],20
add ebp,2
cmp ebp,ebx
ja near ptr M00_L12
mov ecx,ebp
add rdi,rcx
sub ebx,ebp
jmp near ptr M00_L06
mov rcx,rdi
cmp ebp,ebx
ja near ptr M00_L11
mov r8d,ebp
call qword ptr [7FFA7D1610A8]; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja near ptr M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
jmp near ptr M00_L06
test ebx,ebx
je near ptr M00_L15
mov byte ptr [rdi],54
cmp ebx,1
jbe near ptr M00_L15
mov byte ptr [rdi+1],72
cmp ebx,2
jbe near ptr M00_L15
mov byte ptr [rdi+2],75
cmp ebx,3
jbe near ptr M00_L15
mov byte ptr [rdi+3],65
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja near ptr M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
jmp short M00_L06
test ebx,ebx
je near ptr M00_L15
mov byte ptr [rdi],46
cmp ebx,1
jbe near ptr M00_L15
mov byte ptr [rdi+1],61
cmp ebx,2
jbe near ptr M00_L15
mov byte ptr [rdi+2],6C
cmp ebx,3
jbe near ptr M00_L15
mov byte ptr [rdi+3],73
cmp ebx,4
jbe near ptr M00_L15
mov byte ptr [rdi+4],65
cmp ebp,ebx
jae near ptr M00_L15
mov eax,ebp
mov byte ptr [rdi+rax],2C
lea eax,[rbp+1]
cmp eax,ebx
jae near ptr M00_L15
mov eax,eax
mov byte ptr [rdi+rax],20
lea eax,[rbp+2]
cmp eax,ebx
ja short M00_L12
mov edx,eax
add rdx,rdi
sub ebx,eax
mov rdi,rdx
M00_L06:
cmp byte ptr [rsp+93],0
jne short M00_L07
lea rcx,[rsp+68]
call qword ptr [7FFA7D6EDB70]; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
jmp short M00_L08
M00_L07:
lea rcx,[rsp+68]
call qword ptr [7FFA7D6EDF18]
M00_L08:
movzx eax,al
test eax,eax
jne short M00_L09
cmp byte ptr [rsp+8C],0
je short M00_L10
cmp byte ptr [rsp+90],0
je short M00_L13
M00_L09:
test eax,eax
jne near ptr M00_L05
M00_L10:
mov rax,[rsi+18]
add rsp,128
pop rbx
pop rbp
pop rsi
pop rdi
ret
M00_L11:
call qword ptr [7FFA7D3AD4F8]
int 3
M00_L12:
call qword ptr [7FFA7D3AD4E0]
int 3
M00_L13:
xor r9d,r9d
mov [rsp+20],r9
xor r9d,r9d
mov [rsp+28],r9d
lea r9,[rsp+20]
lea rcx,[rsp+68]
mov edx,20
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M00_L14:
xor edi,edi
xor ebx,ebx
jmp near ptr M00_L02
M00_L15:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 808 ; System.Text.Json.Utf8JsonReader..ctor(System.ReadOnlySpan`1<Byte>, Boolean, System.Text.Json.JsonReaderState)
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,20
vzeroupper
vxorps xmm4,xmm4,xmm4
vmovdqu xmmword ptr [rsp+8],xmm4
xor eax,eax
mov [rsp+18],rax
mov rbx,rcx
mov r14d,r8d
mov rbp,r9
lea rdi,[rbx+30]
mov rsi,rdx
call CORINFO_HELP_ASSIGN_BYREF
movsq
mov [rbx+24],r14b
mov byte ptr [rbx+25],0
mov rax,[rbp]
mov [rbx],rax
mov rax,[rbp+8]
mov [rbx+8],rax
movzx eax,byte ptr [rbp+10]
mov [rbx+26],al
movzx eax,byte ptr [rbp+11]
mov [rbx+27],al
movzx eax,byte ptr [rbp+12]
mov [rbx+2E],al
movzx eax,byte ptr [rbp+13]
mov [rbx+2C],al
movzx eax,byte ptr [rbp+14]
mov [rbx+28],al
movzx eax,byte ptr [rbp+15]
mov [rbx+29],al
mov rax,[rbp+18]
mov [rbx+40],rax
cmp dword ptr [rbx+40],0
jne short M01_L00
mov dword ptr [rbx+40],40
M01_L00:
lea rsi,[rbp+20]
lea rdi,[rbx+48]
call CORINFO_HELP_ASSIGN_BYREF
movsq
movsq
xor eax,eax
mov [rbx+20],eax
mov [rbx+18],rax
mov [rbx+10],rax
movzx eax,byte ptr [rbx+24]
mov [rbx+2A],al
mov byte ptr [rbx+2B],0
xor eax,eax
mov [rbx+98],rax
mov [rbx+0A0],rax
mov [rbx+70],rax
mov [rbx+78],rax
mov [rbx+60],rax
mov [rbx+68],rax
mov [rbx+80],rax
mov [rbx+88],rax
mov [rbx+90],rax
mov byte ptr [rbx+2D],0
mov rax,1984AC07D50
mov rax,[rax]
vmovdqu xmm0,xmmword ptr [rax+8]
vmovdqu xmmword ptr [rsp+8],xmm0
mov rdx,[rax+18]
mov [rsp+18],rdx
lea rdi,[rbx+0A8]
lea rsi,[rsp+8]
call CORINFO_HELP_ASSIGN_BYREF
call CORINFO_HELP_ASSIGN_BYREF
movsq
add rsp,20
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
; Total bytes of code 305 ; System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
push rdi
push rsi
vzeroupper
mov rax,rcx
sub rax,rdx
cmp rax,r8
jb near ptr M02_L09
mov rax,rdx
sub rax,rcx
cmp rax,r8
jb near ptr M02_L09
lea rsi,[rdx+r8]
lea rdi,[rcx+r8]
cmp r8,10
jbe short M02_L05
cmp r8,40
ja short M02_L03
M02_L00:
vmovups xmm0,[rdx]
vmovups [rcx],xmm0
cmp r8,20
jbe short M02_L01
vmovups xmm0,[rdx+10]
vmovups [rcx+10],xmm0
cmp r8,30
ja near ptr M02_L08
M02_L01:
vmovups xmm0,[rsi-10]
vmovups [rdi-10],xmm0
M02_L02:
pop rsi
pop rdi
ret
M02_L03:
cmp r8,800
ja near ptr M02_L10
mov rax,r8
shr rax,6
M02_L04:
vmovdqu ymm0,ymmword ptr [rdx]
vmovdqu ymmword ptr [rcx],ymm0
vmovdqu ymm0,ymmword ptr [rdx+20]
vmovdqu ymmword ptr [rcx+20],ymm0
add rcx,40
add rdx,40
dec rax
jne short M02_L04
and r8,3F
cmp r8,10
ja short M02_L00
jmp short M02_L01
M02_L05:
test r8b,18
jne short M02_L06
test r8b,4
jne short M02_L07
test r8,r8
je short M02_L02
movzx edx,byte ptr [rdx]
mov [rcx],dl
test r8b,2
je short M02_L02
movsx r8,word ptr [rsi-2]
mov [rdi-2],r8w
jmp short M02_L02
M02_L06:
mov rdx,[rdx]
mov [rcx],rdx
mov rcx,[rsi-8]
mov [rdi-8],rcx
jmp short M02_L02
M02_L07:
mov eax,[rdx]
mov [rcx],eax
mov eax,[rsi-4]
mov [rdi-4],eax
jmp near ptr M02_L02
M02_L08:
vmovups xmm0,[rdx+20]
vmovups [rcx+20],xmm0
jmp near ptr M02_L01
M02_L09:
cmp rcx,rdx
je near ptr M02_L02
M02_L10:
pop rsi
pop rdi
jmp qword ptr [7FFA7D1610C0]
; Total bytes of code 268 ; System.Text.Json.Utf8JsonReader.ReadSingleSegment()
push r14
push rdi
push rsi
push rbp
push rbx
sub rsp,30
xor eax,eax
mov [rsp+20],rax
mov rsi,rcx
xor edi,edi
xor ecx,ecx
mov [rsi+98],rcx
mov [rsi+0A0],rcx
mov byte ptr [rsi+2E],0
mov ecx,[rsi+20]
movsxd rax,ecx
mov edx,[rsi+38]
cmp rax,rdx
jl short M03_L02
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L00
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L00:
cmp dword ptr [rsi+58],0
jne near ptr M03_L16
cmp byte ptr [rsi+44],2
jne short M03_L01
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L01:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L17
jmp near ptr M03_L14
M03_L02:
lea rax,[rsi+30]
cmp ecx,[rax+8]
jae near ptr M03_L21
mov rax,[rax]
mov ecx,ecx
movzx edx,byte ptr [rax+rcx]
cmp edx,20
jg near ptr M03_L06
mov rcx,rsi
call qword ptr [7FFA7D6EDBD0]
mov ecx,[rsi+20]
movsxd rdx,ecx
mov eax,[rsi+38]
cmp rdx,rax
jl short M03_L05
cmp byte ptr [rsi+27],0
je near ptr M03_L14
cmp byte ptr [rsi+24],0
je near ptr M03_L14
cmp byte ptr [rsi+2B],0
je short M03_L03
movzx ecx,byte ptr [rsi+2A]
test ecx,ecx
je near ptr M03_L14
M03_L03:
cmp dword ptr [rsi+58],0
jne near ptr M03_L18
cmp byte ptr [rsi+44],2
jne short M03_L04
movzx ecx,byte ptr [rsi+28]
cmp ecx,6
je near ptr M03_L14
M03_L04:
movzx ecx,byte ptr [rsi+28]
cmp ecx,4
je near ptr M03_L14
cmp ecx,2
jne near ptr M03_L19
jmp near ptr M03_L14
M03_L05:
lea rdx,[rsi+30]
cmp ecx,[rdx+8]
jae near ptr M03_L21
mov rdx,[rdx]
mov ecx,ecx
movzx edx,byte ptr [rdx+rcx]
M03_L06:
movsxd rcx,dword ptr [rsi+20]
mov [rsi+18],rcx
movzx ebx,byte ptr [rsi+28]
test ebx,ebx
je near ptr M03_L15
cmp edx,2F
jne short M03_L08
M03_L07:
mov rcx,rsi
call qword ptr [7FFA7D6EDD50]; System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte)
mov edi,eax
jmp short M03_L14
M03_L08:
cmp ebx,1
jne short M03_L10
cmp edx,7D
jne short M03_L09
mov rcx,rsi
call qword ptr [7FFA7D6EDB10]; System.Text.Json.Utf8JsonReader.EndObject()
jmp short M03_L13
M03_L09:
cmp edx,22
jne near ptr M03_L20
mov ebx,[rsi+20]
mov rbp,[rsi+8]
mov r14,[rsi]
mov rcx,rsi
call qword ptr [7FFA7D6EDC60]; System.Text.Json.Utf8JsonReader.ConsumePropertyName()
mov edi,eax
test edi,edi
jne short M03_L14
mov [rsi+20],ebx
mov byte ptr [rsi+28],1
mov [rsi+8],rbp
mov [rsi],r14
jmp short M03_L14
M03_L10:
cmp ebx,3
jne short M03_L12
cmp edx,5D
jne short M03_L11
mov rcx,rsi
call qword ptr [7FFA7D6EDB40]; System.Text.Json.Utf8JsonReader.EndArray()
jmp short M03_L13
M03_L11:
mov rcx,rsi
call qword ptr [7FFA7D6EDBE8]; System.Text.Json.Utf8JsonReader.ConsumeValue(Byte)
mov edi,eax
jmp short M03_L14
M03_L12:
cmp ebx,5
jne short M03_L07
jmp short M03_L11
M03_L13:
mov edi,1
M03_L14:
mov eax,edi
add rsp,30
pop rbx
pop rbp
pop rsi
pop rdi
pop r14
ret
M03_L15:
mov rcx,rsi
call qword ptr [7FFA7D6EDBB8]; System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte)
mov edi,eax
jmp short M03_L14
M03_L16:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L17:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L18:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,19
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L19:
xor edi,edi
mov [rsp+20],rdi
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov edx,16
xor r8d,r8d
call qword ptr [7FFA7D731378]
int 3
M03_L20:
xor ecx,ecx
mov [rsp+20],rcx
xor ecx,ecx
mov [rsp+28],ecx
mov rcx,rsi
lea r9,[rsp+20]
mov r8d,edx
mov edx,0C
call qword ptr [7FFA7D731378]
int 3
M03_L21:
call CORINFO_HELP_RNGCHKFAIL
int 3
; Total bytes of code 687 DocsProfiling workflow for dotnet/runtime repository
|
Similar to #83398, perf numbers for this benchmark have since recovered. |
Run Information
Regressions in System.Text.Json.Tests.Perf_Reader
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
Payloads
Baseline
Compare
Histogram
System.Text.Json.Tests.Perf_Reader.ReadReturnBytes(IsDataCompact: True, TestCase: LotsOfStrings)
Description of detection logic
Compare Jit Disasm
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: