-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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.Tests.Perf_Uri #78975
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsRun Information
Regressions in System.Tests.Perf_Uri
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*' PayloadsHistogramSystem.Tests.Perf_Uri.Ctor
Description of detection logic
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,1F9A3610008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FF9C3BD5318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FF9C3BD5198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FF9C388BB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 Compare Jit Disasm; System.Tests.Perf_Uri.Ctor()
push rsi
sub rsp,30
mov rcx,offset MT_System.Uri
call CORINFO_HELP_NEWSFAST
mov rsi,rax
lea rcx,[rsp+28]
mov byte ptr [rcx],0
mov [rsp+20],rcx
mov rcx,rsi
mov rdx,2D6B2B065F0
xor r8d,r8d
mov r9d,1
call qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
mov rax,rsi
add rsp,30
pop rsi
ret
; Total bytes of code 73 ; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,2D6B2B00008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FFC6D115318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FFC6D115198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FFC6CDCBB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 DocsProfiling workflow for dotnet/runtime repository
|
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsRun Information
Regressions in System.Tests.Perf_Uri
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*' PayloadsHistogramSystem.Tests.Perf_Uri.Ctor
Description of detection logic
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,1F9A3610008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FF9C3BD5318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FF9C3BD5198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FF9C388BB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 Compare Jit Disasm; System.Tests.Perf_Uri.Ctor()
push rsi
sub rsp,30
mov rcx,offset MT_System.Uri
call CORINFO_HELP_NEWSFAST
mov rsi,rax
lea rcx,[rsp+28]
mov byte ptr [rcx],0
mov [rsp+20],rcx
mov rcx,rsi
mov rdx,2D6B2B065F0
xor r8d,r8d
mov r9d,1
call qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
mov rax,rsi
add rsp,30
pop rsi
ret
; Total bytes of code 73 ; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,2D6B2B00008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FFC6D115318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FFC6D115198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FFC6CDCBB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 DocsProfiling workflow for dotnet/runtime repository
|
@MihaZupan likely regresses via #78666 |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsRun Information
Regressions in System.Tests.Perf_Uri
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_Uri*' PayloadsHistogramSystem.Tests.Perf_Uri.Ctor
Description of detection logic
; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,1F9A3610008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FF9C3BD39D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FF9C3BD3D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FF9C3BD5318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FF9C3BD5198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FF9C388BB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 Compare Jit Disasm; System.Tests.Perf_Uri.Ctor()
push rsi
sub rsp,30
mov rcx,offset MT_System.Uri
call CORINFO_HELP_NEWSFAST
mov rsi,rax
lea rcx,[rsp+28]
mov byte ptr [rcx],0
mov [rsp+20],rcx
mov rcx,rsi
mov rdx,2D6B2B065F0
xor r8d,r8d
mov r9d,1
call qword ptr [7FFC6D113D20]; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
mov rax,rsi
add rsp,30
pop rsi
ret
; Total bytes of code 73 ; System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
push rdi
push rsi
push rbx
sub rsp,30
xor eax,eax
mov [rsp+28],rax
mov rsi,rcx
mov ebx,r8d
mov edi,r9d
test edi,edi
jl short M01_L03
cmp edi,2
jg short M01_L03
test rdx,rdx
jne short M01_L00
mov rdx,2D6B2B00008
M01_L00:
lea rcx,[rsi+8]
call CORINFO_HELP_ASSIGN_REF
test bl,bl
je short M01_L01
or qword ptr [rsi+28],80000
M01_L01:
mov rbx,[rsp+70]
cmp byte ptr [rbx],0
je short M01_L02
mov rcx,200000000000
or [rsi+28],rcx
M01_L02:
mov rcx,[rsi+8]
lea rdx,[rsi+28]
lea r8,[rsi+18]
call qword ptr [7FFC6D1139D8]; System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
mov edx,eax
lea r9,[rsp+28]
mov rcx,rsi
mov r8d,edi
call qword ptr [7FFC6D113D38]; System.Uri.InitializeUri(System.ParsingError, System.UriKind, System.UriFormatException ByRef)
cmp qword ptr [rsp+28],0
jne short M01_L04
add rsp,30
pop rbx
pop rsi
pop rdi
ret
M01_L03:
mov rcx,offset MT_System.UriKind
call CORINFO_HELP_NEWSFAST
mov rsi,rax
call qword ptr [7FFC6D115318]
mov rbx,rax
mov [rsi+8],edi
mov rcx,offset MT_System.ArgumentException
call CORINFO_HELP_NEWSFAST
mov rdi,rax
mov rdx,rsi
mov rcx,rbx
call qword ptr [7FFC6D115198]
mov rdx,rax
mov rcx,rdi
call qword ptr [7FFC6CDCBB88]
mov rcx,rdi
call CORINFO_HELP_THROW
M01_L04:
mov rcx,[rsp+28]
call CORINFO_HELP_THROW
int 3
; Total bytes of code 236 DocsProfiling workflow for dotnet/runtime repository
|
I'll take a look |
This specific benchmark is public Uri Ctor() => new Uri("http://dot.net"); I'll double-check the numbers locally, but some regression is not unreasonable given the host is relatively short (7 chars aka max before it becomes fast 😄), so the new approach with vectorization doesn't help at all. |
Can we treat this as a new baseline for this benchmark? This method is now using 3 vectorized helpers for the purposes of this benchmark:
All three fall back to scalar paths because the input is short in this benchmark. |
@MihaZupan another regression here dotnet/perf-autofiling-issues#10174, I'm assuming this is the same case? |
(Whoops, accidental close) |
Yep, that one is the same |
Closing this per comment above: #78975 (comment) |
Should we be augmenting the benchmark to also test a longer url? |
|
Run Information
Regressions in System.Tests.Perf_Uri
Test Report
Repro
Payloads
Baseline
Compare
Histogram
System.Tests.Perf_Uri.Ctor
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: