dotnet / perf-autofiling-issues

A landing place for auto-filed performance issues before they receive triage
MIT License
9 stars 4 forks source link

[Perf] Windows/x86: 11 Regressions on 2/9/2023 10:24:28 PM #12911

Open performanceautofiler[bot] opened 1 year ago

performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 3ff80e90e828bac0370c1930c9950c9650ae61b9
Compare 46cb4eddbb1f4bebdea970964d7449bacde8df1a
Diff Diff

Regressions in System.Net.Http.Tests.SocketsHttpHandlerPerfTest

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[Get_EnumerateHeaders_Validated - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated(ssl%3a%20True%2c%20chunkedResponse%3a%20True%2c%20responseLength%3a%201).html>) 54.25 μs 73.35 μs 1.35 0.30 False 225076.31257631257 232162.92134831462 1.031485360191332) Trace Trace
[Get_EnumerateHeaders_Validated - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated(ssl%3a%20False%2c%20chunkedResponse%3a%20False%2c%20responseLength%3a%201).html>) 35.70 μs 51.67 μs 1.45 0.31 False 160741.4068745004 165833.3333333333 1.0316777522222913) Trace Trace
[Get_EnumerateHeaders_Unvalidated - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Unvalidated(ssl%3a%20True%2c%20chunkedResponse%3a%20True%2c%20responseLength%3a%201).html>) 54.23 μs 68.76 μs 1.27 0.22 False Trace Trace
[Get - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get(ssl%3a%20False%2c%20chunkedResponse%3a%20False%2c%20responseLength%3a%201).html>) 34.75 μs 51.38 μs 1.48 0.38 False Trace Trace

graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Net.Http.Tests.SocketsHttpHandlerPerfTest*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated(ssl: True, chunkedResponse: True, responseLength: 1) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 73.34789780348757 > 58.93747510816446. IsChangePoint: Marked as a change because one of 1/5/2023 11:35:29 PM, 1/11/2023 4:46:06 PM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -29.214917307620507 (T) = (0 -73731.4227405722) / Math.Sqrt((3397180.6659089266 / (34)) + (5966878.88954471 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.3254771793246453 = (55626.32378034581 - 73731.4227405722) / 55626.32378034581 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0BC79468]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11, MicroBenchmarks]](d__11 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0B453EB8] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B455168]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11, MicroBenchmarks]](d__11 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,0CA4E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0BC791B0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B43DA20] jmp short M03_L09 M03_L04: call dword ptr ds:[2FC71F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B43DA20] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A3B9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A3B9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B455180]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### Compare Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0C1BB270]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11, MicroBenchmarks]](d__11 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0B9957E0] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B995A68]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11, MicroBenchmarks]](d__11 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,2F94E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0C1B9DE0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__11.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B95F1C8] jmp short M03_L09 M03_L04: call dword ptr ds:[82171F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B95F1C8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A8F9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A8F9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B995A80]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` #### System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Validated(ssl: False, chunkedResponse: False, responseLength: 1) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 51.66655073366557 > 37.3331074688101. IsChangePoint: Marked as a change because one of 1/5/2023 11:35:29 PM, 1/11/2023 8:19:46 AM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -19.036783256516298 (T) = (0 -50704.94848015073) / Math.Sqrt((1665462.907894807 / (34)) + (11266291.173654301 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.4030647727017244 = (36138.70825258758 - 50704.94848015073) / 36138.70825258758 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; BenchmarkDotNet.Autogenerated.Runnable_0.__ForDisassemblyDiagnoser__() push ebp mov ebp,esp sub esp,8 xor eax,eax mov [ebp-8],eax mov [ebp-4],ecx mov ecx,[ebp-4] cmp dword ptr [ecx+3C],0B jne short M00_L00 mov ecx,[ebp-4] call dword ptr ds:[0AABF450] mov ecx,eax cmp [ecx],ecx call dword ptr ds:[0AA49948] mov [ebp-8],eax lea ecx,[ebp-8] call dword ptr ds:[0BAE5138] M00_L00: mov esp,ebp pop ebp ret ; Total bytes of code 58 ``` ### Compare Jit Disasm ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M01_L01 M01_L00: ret M01_L01: call dword ptr ds:[0BBC5A68]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M01_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M02_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0AB29AE0] M02_L00: mov ecx,esi call dword ptr ds:[0AB29270] mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M02_L01 mov ecx,esi call dword ptr ds:[0BBC5A80] M02_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` #### System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Unvalidated(ssl: True, chunkedResponse: True, responseLength: 1) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 68.76458333333335 > 56.66103197875897. IsChangePoint: Marked as a change because one of 1/5/2023 11:35:29 PM, 1/11/2023 4:46:06 PM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -32.02688907204382 (T) = (0 -72982.65581259177) / Math.Sqrt((2847717.414546207 / (34)) + (5133510.367380648 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.3358322897129086 = (54634.59475760755 - 72982.65581259177) / 54634.59475760755 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Unvalidated() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0BE79468]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12, MicroBenchmarks]](d__12 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0B653EB8] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B655168]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12, MicroBenchmarks]](d__12 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,3074E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0BE791B0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B63DA20] jmp short M03_L09 M03_L04: call dword ptr ds:[4CE71F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B63DA20] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A5C9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A5C9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B655180]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### Compare Jit Disasm ```assembly ; System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get_EnumerateHeaders_Unvalidated() push ebp mov ebp,esp sub esp,20 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-20],xmm4 vmovdqu xmmword ptr [ebp-10],xmm4 mov [ebp-20],ecx mov dword ptr [ebp-14],0FFFFFFFF lea ecx,[ebp-20] call dword ptr ds:[0BBFB270]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12, MicroBenchmarks]](d__12 ByRef) mov eax,[ebp-10] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret M00_L01: lea ecx,[ebp-10] call dword ptr ds:[0B3D5648] jmp short M00_L00 ; Total bytes of code 61 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B3D5A68]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12, MicroBenchmarks]](d__12 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,2E94E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0BBF9DE0]; System.Net.Http.Tests.SocketsHttpHandlerPerfTest+d__12.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B39F1C8] jmp short M03_L09 M03_L04: call dword ptr ds:[49371F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B39F1C8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A339AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A339270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B3D5A80]; System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` #### System.Net.Http.Tests.SocketsHttpHandlerPerfTest.Get(ssl: False, chunkedResponse: False, responseLength: 1) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 51.379897203947365 > 36.4157612943375. IsChangePoint: Marked as a change because one of 1/6/2023 5:32:27 AM, 1/11/2023 2:37:52 AM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -16.640763100908497 (T) = (0 -50496.35169521648) / Math.Sqrt((1944913.463220652 / (34)) + (16751083.37189738 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.4382162457705965 = (35110.40279492916 - 50496.35169521648) / 35110.40279492916 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 3ff80e90e828bac0370c1930c9950c9650ae61b9
Compare 46cb4eddbb1f4bebdea970964d7449bacde8df1a
Diff Diff

Regressions in System.IO.Tests.Perf_RandomAccess

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[WriteAsync - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_RandomAccess.WriteAsync(fileSize%3a%20104857600%2c%20bufferSize%3a%2016384%2c%20options%3a%20Asynchronous).html>) 106.16 ms 118.75 ms 1.12 0.25 False 455200000 435694444.4444444 0.9571494825229446) Trace Trace
[ReadScatter - Duration of single invocation](<https://pvscmdupload.z22.web.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_RandomAccess.ReadScatter(fileSize%3a%201048576%2c%20buffersSize%3a%2016384%2c%20options%3a%200).html>) 462.12 μs 521.42 μs 1.13 0.32 False

graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.IO.Tests.Perf_RandomAccess*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.IO.Tests.Perf_RandomAccess.WriteAsync(fileSize: 104857600, bufferSize: 16384, options: Asynchronous) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 118.74669473684212 > 114.598288. IsChangePoint: Marked as a change because one of 1/21/2023 8:50:04 PM, 2/1/2023 6:25:50 PM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -14.84159226330488 (T) = (0 -140593875.53871933) / Math.Sqrt((20650060036096.02 / (34)) + (75649408391948.42 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.27647215608654435 = (110142532.18789922 - 140593875.53871933) / 110142532.18789922 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.IO.Tests.Perf_RandomAccess.WriteAsync(Int64, Int32, System.IO.FileOptions) push ebp mov ebp,esp sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-44],xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 vmovdqu xmmword ptr [ebp-14],xmm4 xor eax,eax mov [ebp-4],eax mov [ebp-34],ecx mov ecx,[ebp+0C] mov eax,[ebp+10] mov [ebp-44],ecx mov [ebp-40],eax mov [ebp-28],edx mov ecx,[ebp+8] mov [ebp-24],ecx mov dword ptr [ebp-2C],0FFFFFFFF lea ecx,[ebp-44] call dword ptr ds:[82D34B0]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_RandomAccess+d__17, MicroBenchmarks]](d__17 ByRef) mov eax,[ebp-1C] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret 0C M00_L01: lea ecx,[ebp-1C] call dword ptr ds:[82D1840] jmp short M00_L00 ; Total bytes of code 99 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[82D1738]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_RandomAccess+d__17, MicroBenchmarks]](d__17 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,3644E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[82D33A8]; System.IO.Tests.Perf_RandomAccess+d__17.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B5F19D8] jmp short M03_L09 M03_L04: call dword ptr ds:[84C71F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B5F19D8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0AB99AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0AB99270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[82D1750] M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### Compare Jit Disasm ```assembly ; System.IO.Tests.Perf_RandomAccess.WriteAsync(Int64, Int32, System.IO.FileOptions) push ebp mov ebp,esp sub esp,44 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-44],xmm4 vmovdqu xmmword ptr [ebp-34],xmm4 vmovdqu xmmword ptr [ebp-24],xmm4 vmovdqu xmmword ptr [ebp-14],xmm4 xor eax,eax mov [ebp-4],eax mov [ebp-34],ecx mov ecx,[ebp+0C] mov eax,[ebp+10] mov [ebp-44],ecx mov [ebp-40],eax mov [ebp-28],edx mov ecx,[ebp+8] mov [ebp-24],ecx mov dword ptr [ebp-2C],0FFFFFFFF lea ecx,[ebp-44] call dword ptr ds:[7C33738]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_RandomAccess+d__17, MicroBenchmarks]](d__17 ByRef) mov eax,[ebp-1C] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret 0C M00_L01: lea ecx,[ebp-1C] call dword ptr ds:[7C31BD0] jmp short M00_L00 ; Total bytes of code 99 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[7C31AC8]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_RandomAccess+d__17, MicroBenchmarks]](d__17 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,29B4E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[7C33630]; System.IO.Tests.Perf_RandomAccess+d__17.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0AF631C8] jmp short M03_L09 M03_L04: call dword ptr ds:[4B471F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0AF631C8] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0A4F9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0A4F9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[7C31AE0] M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` #### System.IO.Tests.Perf_RandomAccess.ReadScatter(fileSize: 1048576, buffersSize: 16384, options: 0) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 521.4194166666667 > 488.3050805481284. IsChangePoint: Marked as a change because one of 1/25/2023 8:05:29 AM, 2/11/2023 1:50:45 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -6.260156744395101 (T) = (0 -530896.8312262793) / Math.Sqrt((941765414.2394812 / (41)) + (485428955.247702 / (14))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (41) + (14) - 2, .025) and -0.09832915924721551 = (483367.6924230537 - 530896.8312262793) / 483367.6924230537 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)
performanceautofiler[bot] commented 1 year ago

Run Information

Architecture x86
OS Windows 10.0.18362
Baseline 3ff80e90e828bac0370c1930c9950c9650ae61b9
Compare 46cb4eddbb1f4bebdea970964d7449bacde8df1a
Diff Diff

Regressions in System.IO.Tests.Perf_FileStream

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
[WriteAsync_NoBuffering_PreallocationSize - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_FileStream.WriteAsync_NoBuffering_PreallocationSize(fileSize%3a%20104857600%2c%20userBufferSize%3a%2016384%2c%20options%3a%20Asynchronous).html>) 106.41 ms 132.52 ms 1.25 0.22 False Trace Trace
[Read - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_FileStream.Read(fileSize%3a%201048576%2c%20userBufferSize%3a%204096%2c%20options%3a%200).html>) 467.72 μs 520.09 μs 1.11 0.25 False
[OpenClose - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_FileStream.OpenClose(fileSize%3a%201024%2c%20options%3a%20Asynchronous).html>) 17.06 μs 21.76 μs 1.28 0.55 False Trace Trace
[SeekBackward - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_FileStream.SeekBackward(fileSize%3a%201024%2c%20options%3a%200).html>) 36.54 μs 42.87 μs 1.17 0.35 False
[Read - Duration of single invocation](<https://pvscmdupload.blob.core.windows.net/reports/allTestHistory/refs/heads/main_x86_Windows 10.0.18362/System.IO.Tests.Perf_FileStream.Read(fileSize%3a%201048576%2c%20userBufferSize%3a%20512%2c%20options%3a%200).html>) 520.53 μs 585.88 μs 1.13 0.31 False

graph graph graph graph graph Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

Payloads

Baseline Compare

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.IO.Tests.Perf_FileStream*'
### Payloads [Baseline]() [Compare]() ### Histogram #### System.IO.Tests.Perf_FileStream.WriteAsync_NoBuffering_PreallocationSize(fileSize: 104857600, userBufferSize: 16384, options: Asynchronous) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 132.51828214285715 > 111.095929. IsChangePoint: Marked as a change because one of 1/21/2023 11:57:09 PM, 2/1/2023 4:12:58 PM, 2/9/2023 4:10:34 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -14.769911231908708 (T) = (0 -132087562.48438175) / Math.Sqrt((8928520867252.025 / (34)) + (74828779855071.45 / (21))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (34) + (21) - 2, .025) and -0.27994512829908175 = (103197832.12887636 - 132087562.48438175) / 103197832.12887636 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.IO.Tests.Perf_FileStream.WriteAsync_NoBuffering_PreallocationSize(Int64, Int32, System.IO.FileOptions) push ebp mov ebp,esp sub esp,3C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-3C],xmm4 vmovdqu xmmword ptr [ebp-2C],xmm4 vmovdqu xmmword ptr [ebp-1C],xmm4 xor eax,eax mov [ebp-0C],eax mov [ebp-8],eax mov [ebp-4],eax mov [ebp-34],ecx mov ecx,[ebp+0C] mov eax,[ebp+10] mov [ebp-3C],ecx mov [ebp-38],eax mov [ebp-28],edx mov ecx,[ebp+8] mov [ebp-24],ecx mov dword ptr [ebp-2C],0FFFFFFFF lea ecx,[ebp-3C] call dword ptr ds:[0B87B738]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_FileStream+d__41, MicroBenchmarks]](d__41 ByRef) mov eax,[ebp-1C] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret 0C M00_L01: lea ecx,[ebp-1C] call dword ptr ds:[0B879BD0] jmp short M00_L00 ; Total bytes of code 100 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0B879AC8]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_FileStream+d__41, MicroBenchmarks]](d__41 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,5354E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0B87B630]; System.IO.Tests.Perf_FileStream+d__41.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0B87B930] jmp short M03_L09 M03_L04: call dword ptr ds:[55771F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0B87B930] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0ADD9AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0ADD9270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0B879AE0] M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` ### Compare Jit Disasm ```assembly ; System.IO.Tests.Perf_FileStream.WriteAsync_NoBuffering_PreallocationSize(Int64, Int32, System.IO.FileOptions) push ebp mov ebp,esp sub esp,3C vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-3C],xmm4 vmovdqu xmmword ptr [ebp-2C],xmm4 vmovdqu xmmword ptr [ebp-1C],xmm4 xor eax,eax mov [ebp-0C],eax mov [ebp-8],eax mov [ebp-4],eax mov [ebp-34],ecx mov ecx,[ebp+0C] mov eax,[ebp+10] mov [ebp-3C],ecx mov [ebp-38],eax mov [ebp-28],edx mov ecx,[ebp+8] mov [ebp-24],ecx mov dword ptr [ebp-2C],0FFFFFFFF lea ecx,[ebp-3C] call dword ptr ds:[0BA0B738]; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_FileStream+d__41, MicroBenchmarks]](d__41 ByRef) mov eax,[ebp-1C] test eax,eax je short M00_L01 M00_L00: mov esp,ebp pop ebp ret 0C M00_L01: lea ecx,[ebp-1C] call dword ptr ds:[0BA09BD0] jmp short M00_L00 ; Total bytes of code 100 ``` ```assembly ; System.Threading.Tasks.Task.GetAwaiter() mov eax,ecx ret ; Total bytes of code 3 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.GetResult() mov ecx,[ecx] mov eax,[ecx+1C] and eax,11000000 cmp eax,1000000 jne short M02_L01 M02_L00: ret M02_L01: call dword ptr ds:[0BA09AC8]; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) jmp short M02_L00 ; Total bytes of code 26 ``` ```assembly ; System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.IO.Tests.Perf_FileStream+d__41, MicroBenchmarks]](d__41 ByRef) push ebp mov ebp,esp push edi push esi push ebx sub esp,20 xor eax,eax mov [ebp-18],eax mov esi,ecx mov ebx,esi cmp [ebx],bl mov ecx,3A54E68 mov edx,2FE call CORINFO_HELP_GETSHARED_GCTHREADSTATIC_BASE mov eax,[eax+0C] test eax,eax je short M03_L04 M03_L00: mov edi,eax mov [ebp-24],edi mov ecx,[eax+4] mov [ebp-28],ecx mov eax,[eax+8] mov [ebp-2C],eax mov ecx,esi call dword ptr ds:[0BA0B630]; System.IO.Tests.Perf_FileStream+d__41.MoveNext() mov eax,[ebp-2C] cmp eax,[edi+8] je short M03_L01 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L01: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L09 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L02 cmp dword ptr [ecx+8],0 jne short M03_L03 M03_L02: test eax,eax je short M03_L09 cmp dword ptr [eax+8],0 je short M03_L09 M03_L03: mov edx,eax call dword ptr ds:[0BA0B930] jmp short M03_L09 M03_L04: call dword ptr ds:[88971F8] jmp short M03_L00 mov eax,[ebp-2C] mov edi,[ebp-24] cmp eax,[edi+8] je short M03_L05 lea edx,[edi+8] call CORINFO_HELP_ASSIGN_REF_EAX M03_L05: mov ecx,[edi+4] mov edx,[ebp-28] cmp edx,ecx je short M03_L08 lea edx,[edi+4] mov eax,[ebp-28] call CORINFO_HELP_ASSIGN_REF_EAX test ecx,ecx je short M03_L06 cmp dword ptr [ecx+8],0 jne short M03_L07 M03_L06: test eax,eax je short M03_L08 cmp dword ptr [eax+8],0 je short M03_L08 M03_L07: mov edx,eax call dword ptr ds:[0BA0B930] M03_L08: pop eax jmp eax M03_L09: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret ; Total bytes of code 221 ``` ```assembly ; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) push ebp mov ebp,esp push esi mov esi,ecx test dword ptr [esi+1C],1600000 jne short M04_L00 push 0 mov ecx,esi mov edx,0FFFFFFFF call dword ptr ds:[0AF69AE0]; System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) M04_L00: mov ecx,esi call dword ptr ds:[0AF69270]; System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletionIfNecessary() mov ecx,[esi+1C] and ecx,1600000 cmp ecx,1000000 je short M04_L01 mov ecx,esi call dword ptr ds:[0BA09AE0] M04_L01: pop esi pop ebp ret ; Total bytes of code 66 ``` #### System.IO.Tests.Perf_FileStream.Read(fileSize: 1048576, userBufferSize: 4096, options: 0) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 520.0899444444444 > 491.09226222704984. IsChangePoint: Marked as a change because one of 1/27/2023 3:53:39 PM, 2/9/2023 1:20:08 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -5.365473435278017 (T) = (0 -512354.06095105014) / Math.Sqrt((719721187.2068585 / (32)) + (433338216.1128244 / (23))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (32) + (23) - 2, .025) and -0.07218575890108081 = (477859.41633488867 - 512354.06095105014) / 477859.41633488867 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.IO.Tests.Perf_FileStream.OpenClose(fileSize: 1024, options: Asynchronous) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 21.756275023277468 > 18.15073222082235. IsChangePoint: Marked as a change because one of 1/25/2023 2:34:16 AM, 2/11/2023 1:50:45 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -6.097742574902279 (T) = (0 -21669.081272124204) / Math.Sqrt((4926472.271273191 / (41)) + (2532711.1932477597 / (14))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (41) + (14) - 2, .025) and -0.1825982114732036 = (18323.282634708434 - 21669.081272124204) / 18323.282634708434 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```### Baseline Jit Disasm ```assembly ; System.IO.Tests.Perf_FileStream.OpenClose(Int64, System.IO.FileOptions) push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-28],xmm4 xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov esi,edx mov ecx,[ecx+4] cmp [ecx],cl push dword ptr [ebp+0C] push dword ptr [ebp+8] call dword ptr ds:[0B40DB40]; System.Collections.Generic.Dictionary`2[[System.Int64, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].FindValue(Int64) test eax,eax je near ptr M00_L07 mov edi,[eax] mov ecx,offset MT_System.IO.FileStream call CORINFO_HELP_NEWFAST mov ebx,eax push 1 push 1 push 1000 push esi push 0 push 0 mov ecx,edi mov edx,3 call dword ptr ds:[0A9D7600]; System.IO.Strategies.FileStreamHelpers.ValidateArguments(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, Int64) test esi,40000000 jne near ptr M00_L08 mov ecx,offset MT_System.IO.Strategies.SyncWindowsFileStreamStrategy call CORINFO_HELP_NEWSFAST mov [ebp-30],eax push 3 push 1 push 1 push esi push 0 push 0 push 0 push 0 mov ecx,eax mov edx,edi call dword ptr ds:[0A9D7750]; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov edi,[ebp-30] M00_L00: mov ecx,offset MT_System.IO.Strategies.BufferedFileStreamStrategy call CORINFO_HELP_NEWSFAST lea edx,[eax+8] call CORINFO_HELP_ASSIGN_REF_EDI mov dword ptr [eax+10],1000 mov ecx,ebx mov edx,eax call dword ptr ds:[0A9D75D0]; System.IO.Strategies.FileStreamHelpers.WrapIfDerivedType(System.IO.FileStream, System.IO.Strategies.FileStreamStrategy) lea edx,[ebx+8] call CORINFO_HELP_ASSIGN_REF_EAX mov ecx,ebx mov [ebp-28],ecx mov eax,[ecx+8] mov ecx,eax mov eax,[eax] mov eax,[eax+3C] call dword ptr [eax+8] mov [ebp-24],eax mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L01 jmp short M00_L02 M00_L01: mov dword ptr [ebp-18],0 jmp short M00_L06 M00_L02: mov ecx,[ebp-28] mov edx,[ecx+8] mov [ebp-34],edx test edx,edx je short M00_L05 cmp dword ptr [edx],offset MT_System.IO.Strategies.SyncWindowsFileStreamStrategy jne short M00_L04 mov eax,[edx+1C] test eax,eax je short M00_L05 test byte ptr [eax+8],1 jne short M00_L05 mov esi,[edx+1C] mov eax,[esi+24] test eax,eax je short M00_L03 mov byte ptr [eax+8],1 M00_L03: mov ebx,esi cmp [ebx],bl mov ecx,esi mov edx,1 call dword ptr ds:[4EA9480]; System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean) mov ecx,esi call dword ptr ds:[88CF2E8]; System.GC.SuppressFinalize(System.Object) jmp short M00_L05 M00_L04: mov ecx,edx mov edx,1 mov eax,[ebp-34] mov eax,[eax] mov eax,[eax+30] call dword ptr [eax+10] M00_L05: mov ecx,[ebp-28] call System.GC._SuppressFinalize(System.Object) pop eax jmp eax M00_L06: mov eax,[ebp-24] lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M00_L07: push dword ptr [ebp+0C] push dword ptr [ebp+8] call dword ptr ds:[0B469390] int 3 M00_L08: mov ecx,offset MT_System.IO.Strategies.AsyncWindowsFileStreamStrategy call CORINFO_HELP_NEWSFAST mov [ebp-2C],eax push 3 push 1 push 1 push esi push 0 push 0 push 0 push 0 mov ecx,eax mov edx,edi call dword ptr ds:[0A9D7750]; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov edi,[ebp-2C] jmp near ptr M00_L00 ; Total bytes of code 417 ``` ```assembly ; System.Collections.Generic.Dictionary`2[[System.Int64, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].FindValue(Int64) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C mov esi,ecx cmp dword ptr [esi+4],0 je near ptr M01_L08 mov edi,[esi+0C] mov [ebp-24],edi test edi,edi jne short M01_L02 mov ecx,[ebp+8] xor ecx,[ebp+0C] mov [ebp-10],ecx mov edi,[esi+4] mov ebx,[edi+4] mov eax,ecx xor edx,edx div ebx cmp edx,ebx jae near ptr M01_L10 mov edi,[edi+edx*4+8] mov ebx,[esi+8] xor eax,eax dec edi M01_L00: mov edx,[ebx+4] cmp edx,edi jbe near ptr M01_L08 lea edi,[edi+edi*4] lea edi,[ebx+edi*4+8] cmp [edi+0C],ecx jne short M01_L01 mov esi,edi mov ecx,[esi] mov esi,[esi+4] xor ecx,[ebp+8] xor esi,[ebp+0C] or ecx,esi je near ptr M01_L06 M01_L01: mov edi,[edi+10] inc eax cmp edx,eax jb near ptr M01_L09 mov ecx,[ebp-10] jmp short M01_L00 M01_L02: push dword ptr [ebp+0C] push dword ptr [ebp+8] mov ecx,edi call dword ptr ds:[4CF02D8] mov ebx,eax mov [ebp-14],ebx mov ecx,[esi+4] mov [ebp-28],ecx mov edx,[ecx+4] mov ecx,edx mov eax,ebx xor edx,edx div ecx cmp edx,ecx jae short M01_L10 mov ecx,[ebp-28] mov ecx,[ecx+edx*4+8] mov esi,[esi+8] xor eax,eax mov [ebp-18],eax dec ecx M01_L03: mov edx,[esi+4] mov [ebp-1C],edx cmp edx,ecx jbe short M01_L08 lea ecx,[ecx+ecx*4] lea ecx,[esi+ecx*4+8] cmp [ecx+0C],ebx jne short M01_L04 mov [ebp-20],ecx mov edi,ecx mov ebx,[edi] push dword ptr [edi+4] push ebx push dword ptr [ebp+0C] push dword ptr [ebp+8] mov ecx,[ebp-24] call dword ptr ds:[4CF02DC] test eax,eax jne short M01_L05 mov ecx,[ebp-20] M01_L04: mov ecx,[ecx+10] mov eax,[ebp-18] inc eax cmp [ebp-1C],eax jb short M01_L09 mov [ebp-18],eax mov ebx,[ebp-14] jmp short M01_L03 M01_L05: mov edi,[ebp-20] M01_L06: mov eax,edi cmp [eax],al lea eax,[edi+8] M01_L07: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L08: xor eax,eax jmp short M01_L07 M01_L09: call dword ptr ds:[8985888] int 3 M01_L10: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 299 ``` ```assembly ; System.IO.Strategies.FileStreamHelpers.ValidateArguments(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, Int64) push ebp mov ebp,esp push edi push esi push ebx push eax mov edi,ecx mov esi,edx mov ebx,[ebp+1C] mov eax,[ebp+10] test edi,edi je near ptr M02_L07 cmp dword ptr [edi+4],0 je near ptr M02_L07 mov ecx,[ebp+18] and ecx,0FFFFFFEF xor edi,edi test esi,esi jle near ptr M02_L17 cmp esi,6 jg near ptr M02_L17 test ebx,ebx jle near ptr M02_L08 cmp ebx,3 jg near ptr M02_L08 test ecx,ecx jl near ptr M02_L09 cmp ecx,7 jg near ptr M02_L09 M02_L00: test edi,edi jne near ptr M02_L10 test eax,eax jne short M02_L06 M02_L01: cmp dword ptr [ebp+14],0 jl near ptr M02_L12 cmp dword ptr [ebp+0C],0 jl near ptr M02_L13 test bl,2 jne short M02_L02 cmp esi,5 je near ptr M02_L14 cmp esi,1 je near ptr M02_L14 cmp esi,2 je near ptr M02_L14 cmp esi,6 je near ptr M02_L14 M02_L02: test bl,1 je short M02_L03 cmp esi,6 je near ptr M02_L15 M02_L03: cmp dword ptr [ebp+8],1 mov ecx,[ebp+0C] sbb ecx,0 jge near ptr M02_L16 M02_L04: test bl,2 je short M02_L05 mov ecx,82C7110 mov edx,4E059A0 call dword ptr ds:[0B441708] M02_L05: pop ecx pop ebx pop esi pop edi pop ebp ret 18 M02_L06: test eax,3FFBFFF jne short M02_L11 jmp near ptr M02_L01 M02_L07: mov ecx,18F88 mov edx,3544000 call CORINFO_HELP_STRCNS mov edx,eax mov ecx,edi call dword ptr ds:[4EABC48] int 3 M02_L08: mov edi,82C49B8 jmp near ptr M02_L00 M02_L09: mov edi,82C70C8 jmp near ptr M02_L00 M02_L10: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax call dword ptr ds:[88979F0] push eax mov edx,edi mov ecx,esi call dword ptr ds:[88A9870] mov ecx,esi call CORINFO_HELP_THROW M02_L11: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov ebx,eax mov ecx,1C89 mov edx,3544000 call CORINFO_HELP_STRCNS mov esi,eax call dword ptr ds:[88979F0] push eax mov edx,esi mov ecx,ebx call dword ptr ds:[88A9870] mov ecx,ebx call CORINFO_HELP_THROW M02_L12: mov ecx,1A4FE mov edx,3544000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8985930] int 3 M02_L13: mov ecx,1A850 mov edx,3544000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8985930] int 3 M02_L14: mov ecx,offset MT_System.IO.FileMode call CORINFO_HELP_NEWSFAST mov edi,eax call dword ptr ds:[8895810] mov [ebp-10],eax mov [edi+4],esi mov ecx,offset MT_System.IO.FileAccess call CORINFO_HELP_NEWSFAST mov esi,eax mov [esi+4],ebx mov ecx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov ebx,eax push esi mov edx,edi mov ecx,[ebp-10] call dword ptr ds:[8891078] mov esi,eax mov ecx,1A10E mov edx,3544000 call CORINFO_HELP_STRCNS push eax mov edx,esi mov ecx,ebx call dword ptr ds:[4EABBA0] mov ecx,ebx call CORINFO_HELP_THROW M02_L15: mov ecx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov esi,eax call dword ptr ds:[8895570] mov edi,eax mov ecx,1A10E mov edx,3544000 call CORINFO_HELP_STRCNS push eax mov edx,edi mov ecx,esi call dword ptr ds:[4EABBA0] mov ecx,esi call CORINFO_HELP_THROW M02_L16: mov ecx,esi mov edx,ebx call dword ptr ds:[0A9D7618] jmp near ptr M02_L04 M02_L17: mov edi,82C70B0 jmp near ptr M02_L00 ; Total bytes of code 597 ``` ```assembly ; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) push ebp mov ebp,esp push edi push esi sub esp,20 xor eax,eax mov [ebp-14],eax mov [ebp-28],ecx mov esi,[ebp+24] mov edi,[ebp+20] mov ecx,edx call dword ptr ds:[0AF2D450]; System.IO.Path.GetFullPath(System.String) mov ecx,eax mov eax,[ebp-28] mov [eax+20],edi push edi push dword ptr [ebp+1C] push dword ptr [ebp+18] push dword ptr [ebp+14] push dword ptr [ebp+10] push dword ptr [ebp+0C] push dword ptr [ebp+8] mov edx,esi call dword ptr ds:[0A9D1DF8]; Microsoft.Win32.SafeHandles.SafeFileHandle.Open(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov ecx,[ebp-28] lea edx,[ecx+1C] call CORINFO_HELP_ASSIGN_REF_EAX cmp esi,6 je short M03_L01 M03_L00: mov ecx,[ebp-28] lea eax,[ecx+14] mov dword ptr [eax],0FFFFFFFF mov dword ptr [eax+4],0FFFFFFFF jmp short M03_L02 M03_L01: mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[0A9D1D98]; Microsoft.Win32.SafeHandles.SafeFileHandle.get_CanSeek() test eax,eax je short M03_L00 mov ecx,[ebp-28] mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[0A9D1EA0] mov ecx,[ebp-28] lea esi,[ecx+0C] mov [esi],eax mov [esi+4],edx lea esi,[ecx+14] mov [esi],eax mov [esi+4],edx jmp short M03_L02 mov ecx,[ebp-28] mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[4E5BB94]; System.Runtime.InteropServices.SafeHandle.Dispose() xor eax,eax mov ecx,[ebp-28] mov [ecx+1C],eax call CORINFO_HELP_RETHROW int 3 M03_L02: lea esp,[ebp-8] pop esi pop edi pop ebp ret 20 ; Total bytes of code 189 ``` ```assembly ; System.IO.Strategies.FileStreamHelpers.WrapIfDerivedType(System.IO.FileStream, System.IO.Strategies.FileStreamStrategy) push edi push esi push ebx mov esi,ecx mov edi,edx cmp dword ptr [esi],offset MT_System.IO.FileStream jne short M04_L00 mov eax,edi pop ebx pop esi pop edi ret M04_L00: mov ecx,offset MT_System.IO.Strategies.DerivedFileStreamStrategy call CORINFO_HELP_NEWSFAST mov ebx,eax push edi mov ecx,ebx mov edx,esi call dword ptr ds:[0A9D7B70] mov eax,ebx pop ebx pop esi pop edi ret ; Total bytes of code 50 ``` ```assembly ; System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 xor eax,eax mov [ebp-20],eax mov esi,ecx mov edi,edx M05_L00: mov ebx,[esi+8] mov [ebp-10],edi mov eax,edi movzx eax,al mov [ebp-1C],eax test eax,eax je short M05_L01 test bl,2 je short M05_L01 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M05_L01: mov edx,ebx and edx,0FFFFFFFC mov [ebp-18],edx test edx,edx je near ptr M05_L07 mov ecx,ebx and ecx,0FFFFFFFD cmp ecx,4 jne short M05_L02 cmp byte ptr [esi+0C],0 je short M05_L02 mov ecx,esi mov [ebp-20],ecx mov ecx,[esi] mov ecx,[ecx+28] mov [ebp-24],ecx mov ecx,[ebp-20] mov edi,[ebp-24] call dword ptr [edi+10] test eax,eax sete al movzx eax,al jmp short M05_L03 M05_L02: xor ecx,ecx mov eax,ecx M05_L03: movzx ecx,al mov [ebp-14],ecx lea eax,[ebx-4] cmp dword ptr [ebp-18],4 jne short M05_L04 or eax,1 M05_L04: cmp dword ptr [ebp-1C],0 je short M05_L05 or eax,2 M05_L05: lea edx,[esi+8] mov ecx,eax mov eax,ebx lock cmpxchg [edx],ecx cmp eax,ebx movzx edi,byte ptr [ebp-10] jne near ptr M05_L00 cmp dword ptr [ebp-14],0 je short M05_L06 call System.Runtime.InteropServices.Marshal.GetLastPInvokeError() mov edi,eax mov ecx,esi mov eax,[esi] mov eax,[eax+28] call dword ptr [eax+1C] mov ecx,edi call System.Runtime.InteropServices.Marshal.SetLastPInvokeError(Int32) M05_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M05_L07: mov ecx,esi call dword ptr ds:[8985708] int 3 ; Total bytes of code 214 ``` ```assembly ; System.GC.SuppressFinalize(System.Object) push ebp mov ebp,esp test ecx,ecx je short M06_L00 call System.GC._SuppressFinalize(System.Object) pop ebp ret M06_L00: mov ecx,1337 mov edx,3544000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8925AF8] int 3 ; Total bytes of code 38 ``` ### Compare Jit Disasm ```assembly ; System.IO.Tests.Perf_FileStream.OpenClose(Int64, System.IO.FileOptions) push ebp mov ebp,esp push edi push esi push ebx sub esp,28 vxorps xmm4,xmm4,xmm4 vmovdqu xmmword ptr [ebp-28],xmm4 xor eax,eax mov [ebp-18],eax mov [ebp-14],eax mov esi,edx mov ecx,[ecx+4] cmp [ecx],cl push dword ptr [ebp+0C] push dword ptr [ebp+8] call dword ptr ds:[0AC2F2E8]; System.Collections.Generic.Dictionary`2[[System.Int64, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].FindValue(Int64) test eax,eax je near ptr M00_L07 mov edi,[eax] mov ecx,offset MT_System.IO.FileStream call CORINFO_HELP_NEWFAST mov ebx,eax push 1 push 1 push 1000 push esi push 0 push 0 mov ecx,edi mov edx,3 call dword ptr ds:[0A247600]; System.IO.Strategies.FileStreamHelpers.ValidateArguments(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, Int64) test esi,40000000 jne near ptr M00_L08 mov ecx,offset MT_System.IO.Strategies.SyncWindowsFileStreamStrategy call CORINFO_HELP_NEWSFAST mov [ebp-30],eax push 3 push 1 push 1 push esi push 0 push 0 push 0 push 0 mov ecx,eax mov edx,edi call dword ptr ds:[0A247750]; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov edi,[ebp-30] M00_L00: mov ecx,offset MT_System.IO.Strategies.BufferedFileStreamStrategy call CORINFO_HELP_NEWSFAST lea edx,[eax+8] call CORINFO_HELP_ASSIGN_REF_EDI mov dword ptr [eax+10],1000 mov ecx,ebx mov edx,eax call dword ptr ds:[0A2475D0]; System.IO.Strategies.FileStreamHelpers.WrapIfDerivedType(System.IO.FileStream, System.IO.Strategies.FileStreamStrategy) lea edx,[ebx+8] call CORINFO_HELP_ASSIGN_REF_EAX mov ecx,ebx mov [ebp-28],ecx mov eax,[ecx+8] mov ecx,eax mov eax,[eax] mov eax,[eax+3C] call dword ptr [eax+8] mov [ebp-24],eax mov dword ptr [ebp-1C],0 mov dword ptr [ebp-18],0FC push offset M00_L01 jmp short M00_L02 M00_L01: mov dword ptr [ebp-18],0 jmp short M00_L06 M00_L02: mov ecx,[ebp-28] mov edx,[ecx+8] mov [ebp-34],edx test edx,edx je short M00_L05 cmp dword ptr [edx],offset MT_System.IO.Strategies.SyncWindowsFileStreamStrategy jne short M00_L04 mov eax,[edx+1C] test eax,eax je short M00_L05 test byte ptr [eax+8],1 jne short M00_L05 mov esi,[edx+1C] mov eax,[esi+24] test eax,eax je short M00_L03 mov byte ptr [eax+8],1 M00_L03: mov ebx,esi cmp [ebx],bl mov ecx,esi mov edx,1 call dword ptr ds:[7B79480]; System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean) mov ecx,esi call dword ptr ds:[81AF2E8]; System.GC.SuppressFinalize(System.Object) jmp short M00_L05 M00_L04: mov ecx,edx mov edx,1 mov eax,[ebp-34] mov eax,[eax] mov eax,[eax+30] call dword ptr [eax+10] M00_L05: mov ecx,[ebp-28] call System.GC._SuppressFinalize(System.Object) pop eax jmp eax M00_L06: mov eax,[ebp-24] lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M00_L07: push dword ptr [ebp+0C] push dword ptr [ebp+8] call dword ptr ds:[0AD097C8] int 3 M00_L08: mov ecx,offset MT_System.IO.Strategies.AsyncWindowsFileStreamStrategy call CORINFO_HELP_NEWSFAST mov [ebp-2C],eax push 3 push 1 push 1 push esi push 0 push 0 push 0 push 0 mov ecx,eax mov edx,edi call dword ptr ds:[0A247750]; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov edi,[ebp-2C] jmp near ptr M00_L00 ; Total bytes of code 417 ``` ```assembly ; System.Collections.Generic.Dictionary`2[[System.Int64, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].FindValue(Int64) push ebp mov ebp,esp push edi push esi push ebx sub esp,1C mov esi,ecx cmp dword ptr [esi+4],0 je near ptr M01_L08 mov edi,[esi+0C] mov [ebp-24],edi test edi,edi jne short M01_L02 mov ecx,[ebp+8] xor ecx,[ebp+0C] mov [ebp-10],ecx mov edi,[esi+4] mov ebx,[edi+4] mov eax,ecx xor edx,edx div ebx cmp edx,ebx jae near ptr M01_L10 mov edi,[edi+edx*4+8] mov ebx,[esi+8] xor eax,eax dec edi M01_L00: mov edx,[ebx+4] cmp edx,edi jbe near ptr M01_L08 lea edi,[edi+edi*4] lea edi,[ebx+edi*4+8] cmp [edi+0C],ecx jne short M01_L01 mov esi,edi mov ecx,[esi] mov esi,[esi+4] xor ecx,[ebp+8] xor esi,[ebp+0C] or ecx,esi je near ptr M01_L06 M01_L01: mov edi,[edi+10] inc eax cmp edx,eax jb near ptr M01_L09 mov ecx,[ebp-10] jmp short M01_L00 M01_L02: push dword ptr [ebp+0C] push dword ptr [ebp+8] mov ecx,edi call dword ptr ds:[9702DC] mov ebx,eax mov [ebp-14],ebx mov ecx,[esi+4] mov [ebp-28],ecx mov edx,[ecx+4] mov ecx,edx mov eax,ebx xor edx,edx div ecx cmp edx,ecx jae short M01_L10 mov ecx,[ebp-28] mov ecx,[ecx+edx*4+8] mov esi,[esi+8] xor eax,eax mov [ebp-18],eax dec ecx M01_L03: mov edx,[esi+4] mov [ebp-1C],edx cmp edx,ecx jbe short M01_L08 lea ecx,[ecx+ecx*4] lea ecx,[esi+ecx*4+8] cmp [ecx+0C],ebx jne short M01_L04 mov [ebp-20],ecx mov edi,ecx mov ebx,[edi] push dword ptr [edi+4] push ebx push dword ptr [ebp+0C] push dword ptr [ebp+8] mov ecx,[ebp-24] call dword ptr ds:[9702E0] test eax,eax jne short M01_L05 mov ecx,[ebp-20] M01_L04: mov ecx,[ecx+10] mov eax,[ebp-18] inc eax cmp [ebp-1C],eax jb short M01_L09 mov [ebp-18],eax mov ebx,[ebp-14] jmp short M01_L03 M01_L05: mov edi,[ebp-20] M01_L06: mov eax,edi cmp [eax],al lea eax,[edi+8] M01_L07: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret 8 M01_L08: xor eax,eax jmp short M01_L07 M01_L09: call dword ptr ds:[8265888] int 3 M01_L10: call CORINFO_HELP_RNGCHKFAIL int 3 ; Total bytes of code 299 ``` ```assembly ; System.IO.Strategies.FileStreamHelpers.ValidateArguments(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, Int64) push ebp mov ebp,esp push edi push esi push ebx push eax mov edi,ecx mov esi,edx mov ebx,[ebp+1C] mov eax,[ebp+10] test edi,edi je near ptr M02_L07 cmp dword ptr [edi+4],0 je near ptr M02_L07 mov ecx,[ebp+18] and ecx,0FFFFFFEF xor edi,edi test esi,esi jle near ptr M02_L17 cmp esi,6 jg near ptr M02_L17 test ebx,ebx jle near ptr M02_L08 cmp ebx,3 jg near ptr M02_L08 test ecx,ecx jl near ptr M02_L09 cmp ecx,7 jg near ptr M02_L09 M02_L00: test edi,edi jne near ptr M02_L10 test eax,eax jne short M02_L06 M02_L01: cmp dword ptr [ebp+14],0 jl near ptr M02_L12 cmp dword ptr [ebp+0C],0 jl near ptr M02_L13 test bl,2 jne short M02_L02 cmp esi,5 je near ptr M02_L14 cmp esi,1 je near ptr M02_L14 cmp esi,2 je near ptr M02_L14 cmp esi,6 je near ptr M02_L14 M02_L02: test bl,1 je short M02_L03 cmp esi,6 je near ptr M02_L15 M02_L03: cmp dword ptr [ebp+8],1 mov ecx,[ebp+0C] sbb ecx,0 jge near ptr M02_L16 M02_L04: test bl,2 je short M02_L05 mov ecx,7BA7F9C mov edx,9C59A0 call dword ptr ds:[0ACA1E40] M02_L05: pop ecx pop ebx pop esi pop edi pop ebp ret 18 M02_L06: test eax,3FFBFFF jne short M02_L11 jmp near ptr M02_L01 M02_L07: mov ecx,18F88 mov edx,6A4000 call CORINFO_HELP_STRCNS mov edx,eax mov ecx,edi call dword ptr ds:[7B7BC48] int 3 M02_L08: mov edi,7BA57F0 jmp near ptr M02_L00 M02_L09: mov edi,7BA7F54 jmp near ptr M02_L00 M02_L10: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov esi,eax call dword ptr ds:[81779F0] push eax mov edx,edi mov ecx,esi call dword ptr ds:[8189870] mov ecx,esi call CORINFO_HELP_THROW M02_L11: mov ecx,offset MT_System.ArgumentOutOfRangeException call CORINFO_HELP_NEWSFAST mov ebx,eax mov ecx,1C89 mov edx,6A4000 call CORINFO_HELP_STRCNS mov esi,eax call dword ptr ds:[81779F0] push eax mov edx,esi mov ecx,ebx call dword ptr ds:[8189870] mov ecx,ebx call CORINFO_HELP_THROW M02_L12: mov ecx,1A4FE mov edx,6A4000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8265930] int 3 M02_L13: mov ecx,1A850 mov edx,6A4000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8265930] int 3 M02_L14: mov ecx,offset MT_System.IO.FileMode call CORINFO_HELP_NEWSFAST mov edi,eax call dword ptr ds:[8175810] mov [ebp-10],eax mov [edi+4],esi mov ecx,offset MT_System.IO.FileAccess call CORINFO_HELP_NEWSFAST mov esi,eax mov [esi+4],ebx mov ecx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov ebx,eax push esi mov edx,edi mov ecx,[ebp-10] call dword ptr ds:[8171078] mov esi,eax mov ecx,1A10E mov edx,6A4000 call CORINFO_HELP_STRCNS push eax mov edx,esi mov ecx,ebx call dword ptr ds:[7B7BBA0] mov ecx,ebx call CORINFO_HELP_THROW M02_L15: mov ecx,offset MT_System.ArgumentException call CORINFO_HELP_NEWSFAST mov esi,eax call dword ptr ds:[8175570] mov edi,eax mov ecx,1A10E mov edx,6A4000 call CORINFO_HELP_STRCNS push eax mov edx,edi mov ecx,esi call dword ptr ds:[7B7BBA0] mov ecx,esi call CORINFO_HELP_THROW M02_L16: mov ecx,esi mov edx,ebx call dword ptr ds:[0A247618] jmp near ptr M02_L04 M02_L17: mov edi,7BA7F3C jmp near ptr M02_L00 ; Total bytes of code 597 ``` ```assembly ; System.IO.Strategies.OSFileStreamStrategy..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) push ebp mov ebp,esp push edi push esi sub esp,20 xor eax,eax mov [ebp-14],eax mov [ebp-28],ecx mov esi,[ebp+24] mov edi,[ebp+20] mov ecx,edx call dword ptr ds:[0A79D450]; System.IO.Path.GetFullPath(System.String) mov ecx,eax mov eax,[ebp-28] mov [eax+20],edi push edi push dword ptr [ebp+1C] push dword ptr [ebp+18] push dword ptr [ebp+14] push dword ptr [ebp+10] push dword ptr [ebp+0C] push dword ptr [ebp+8] mov edx,esi call dword ptr ds:[0A241DF8]; Microsoft.Win32.SafeHandles.SafeFileHandle.Open(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions, Int64, System.Nullable`1) mov ecx,[ebp-28] lea edx,[ecx+1C] call CORINFO_HELP_ASSIGN_REF_EAX cmp esi,6 je short M03_L01 M03_L00: mov ecx,[ebp-28] lea eax,[ecx+14] mov dword ptr [eax],0FFFFFFFF mov dword ptr [eax+4],0FFFFFFFF jmp short M03_L02 M03_L01: mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[0A241D98]; Microsoft.Win32.SafeHandles.SafeFileHandle.get_CanSeek() test eax,eax je short M03_L00 mov ecx,[ebp-28] mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[0A241EA0] mov ecx,[ebp-28] lea esi,[ecx+0C] mov [esi],eax mov [esi+4],edx lea esi,[ecx+14] mov [esi],eax mov [esi+4],edx jmp short M03_L02 mov ecx,[ebp-28] mov ecx,[ecx+1C] cmp [ecx],ecx call dword ptr ds:[2F0BB94]; System.Runtime.InteropServices.SafeHandle.Dispose() xor eax,eax mov ecx,[ebp-28] mov [ecx+1C],eax call CORINFO_HELP_RETHROW int 3 M03_L02: lea esp,[ebp-8] pop esi pop edi pop ebp ret 20 ; Total bytes of code 189 ``` ```assembly ; System.IO.Strategies.FileStreamHelpers.WrapIfDerivedType(System.IO.FileStream, System.IO.Strategies.FileStreamStrategy) push edi push esi push ebx mov esi,ecx mov edi,edx cmp dword ptr [esi],offset MT_System.IO.FileStream jne short M04_L00 mov eax,edi pop ebx pop esi pop edi ret M04_L00: mov ecx,offset MT_System.IO.Strategies.DerivedFileStreamStrategy call CORINFO_HELP_NEWSFAST mov ebx,eax push edi mov ecx,ebx mov edx,esi call dword ptr ds:[0A247B70] mov eax,ebx pop ebx pop esi pop edi ret ; Total bytes of code 50 ``` ```assembly ; System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean) push ebp mov ebp,esp push edi push esi push ebx sub esp,18 xor eax,eax mov [ebp-20],eax mov esi,ecx mov edi,edx M05_L00: mov ebx,[esi+8] mov [ebp-10],edi mov eax,edi movzx eax,al mov [ebp-1C],eax test eax,eax je short M05_L01 test bl,2 je short M05_L01 lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M05_L01: mov edx,ebx and edx,0FFFFFFFC mov [ebp-18],edx test edx,edx je near ptr M05_L07 mov ecx,ebx and ecx,0FFFFFFFD cmp ecx,4 jne short M05_L02 cmp byte ptr [esi+0C],0 je short M05_L02 mov ecx,esi mov [ebp-20],ecx mov ecx,[esi] mov ecx,[ecx+28] mov [ebp-24],ecx mov ecx,[ebp-20] mov edi,[ebp-24] call dword ptr [edi+10] test eax,eax sete al movzx eax,al jmp short M05_L03 M05_L02: xor ecx,ecx mov eax,ecx M05_L03: movzx ecx,al mov [ebp-14],ecx lea eax,[ebx-4] cmp dword ptr [ebp-18],4 jne short M05_L04 or eax,1 M05_L04: cmp dword ptr [ebp-1C],0 je short M05_L05 or eax,2 M05_L05: lea edx,[esi+8] mov ecx,eax mov eax,ebx lock cmpxchg [edx],ecx cmp eax,ebx movzx edi,byte ptr [ebp-10] jne near ptr M05_L00 cmp dword ptr [ebp-14],0 je short M05_L06 call System.Runtime.InteropServices.Marshal.GetLastPInvokeError() mov edi,eax mov ecx,esi mov eax,[esi] mov eax,[eax+28] call dword ptr [eax+1C] mov ecx,edi call System.Runtime.InteropServices.Marshal.SetLastPInvokeError(Int32) M05_L06: lea esp,[ebp-0C] pop ebx pop esi pop edi pop ebp ret M05_L07: mov ecx,esi call dword ptr ds:[8265708] int 3 ; Total bytes of code 214 ``` ```assembly ; System.GC.SuppressFinalize(System.Object) push ebp mov ebp,esp test ecx,ecx je short M06_L00 call System.GC._SuppressFinalize(System.Object) pop ebp ret M06_L00: mov ecx,1337 mov edx,6A4000 call CORINFO_HELP_STRCNS mov ecx,eax call dword ptr ds:[8205AF8] int 3 ; Total bytes of code 38 ``` #### System.IO.Tests.Perf_FileStream.SeekBackward(fileSize: 1024, options: 0) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 42.86724157559199 > 38.41953582425777. IsChangePoint: Marked as a change because one of 1/25/2023 9:58:39 PM, 2/10/2023 8:33:51 PM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -6.9121829571546956 (T) = (0 -41434.372314241955) / Math.Sqrt((6494036.28791439 / (40)) + (1668699.2372925673 / (15))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (40) + (15) - 2, .025) and -0.09560112691794584 = (37818.84784182515 - 41434.372314241955) / 37818.84784182515 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ```#### System.IO.Tests.Perf_FileStream.Read(fileSize: 1048576, userBufferSize: 512, options: 0) ```log ``` ### Description of detection logic ```IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsRegressionBase: Marked as regression because the compare was 5% greater than the baseline, and the value was not too small. IsRegressionChecked: Marked as regression because the three check build points were 0.05 greater than the baseline. IsRegressionWindowed: Marked as regression because 585.8821943681318 > 540.5832913306452. IsChangePoint: Marked as a change because one of 1/17/2023 5:52:57 PM, 2/11/2023 1:50:45 AM, 2/14/2023 7:27:15 AM falls between 2/5/2023 7:19:43 PM and 2/14/2023 7:27:15 AM. IsRegressionStdDev: Marked as regression because -6.350195596575055 (T) = (0 -571701.4845285814) / Math.Sqrt((923100106.1308861 / (41)) + (294383845.91113544 / (14))) is less than -2.005745995316835 = MathNet.Numerics.Distributions.StudentT.InvCDF(0, 1, (41) + (14) - 2, .025) and -0.07909163746823707 = (529798.8277157873 - 571701.4845285814) / 529798.8277157873 is less than -0.05. IsImprovementBase: Marked as not an improvement because the compare was not 5% less than the baseline, or the value was too small. IsChangeEdgeDetector: Marked not as a regression because Edge Detector said so. ``` ### Docs [Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md) [Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)