Closed EgorBot closed 4 days ago
@EgorBot -codesafety -pr 109896
@EgorBot -codesafety -pr 109896
Assembly | Total methods |
P/Invokes | Methods with 'unsafe' context |
Methods with Unsafe API calls |
---|---|---|---|---|
CDACReader | 1083 | 0 | 423 | 1 |
Common | 5945 | 2143 | 973 | 172 |
Microsoft.Bcl.Cryptography | 46 | 0 | 11 | 2 |
Microsoft.Bcl.Numerics | 30 | 0 | 2 | 0 |
Microsoft.CSharp | 1597 | 0 | 10 | 4 |
Microsoft.Extensions.Configuration.EnvironmentVariables | 12 | 0 | 0 | 0 |
Microsoft.Extensions.Configuration.Xml | 28 | 0 | 0 | 0 |
Microsoft.Extensions.DependencyModel | 188 | 0 | 0 | 2 |
Microsoft.Extensions.FileProviders.Physical | 71 | 0 | 1 | 0 |
Microsoft.Extensions.HostFactoryResolver | 17 | 0 | 0 | 0 |
Microsoft.Extensions.Hosting.WindowsServices | 19 | 0 | 1 | 0 |
Microsoft.Extensions.Http | 145 | 0 | 0 | 0 |
Microsoft.Extensions.Logging.Configuration | 15 | 0 | 0 | 0 |
Microsoft.Extensions.Logging.Console | 128 | 0 | 1 | 1 |
Microsoft.Extensions.Logging.EventSource | 37 | 0 | 6 | 1 |
Microsoft.Extensions.Primitives | 126 | 0 | 2 | 9 |
Microsoft.NETCore.Platforms | 1 | 0 | 0 | 0 |
Microsoft.Win32.Registry | 103 | 0 | 4 | 3 |
Microsoft.Win32.SystemEvents | 53 | 0 | 2 | 0 |
mono | 5197 | 12 | 155 | 18 |
nativeaot | 4350 | 40 | 833 | 111 |
System.Collections | 622 | 0 | 6 | 5 |
System.Collections.Concurrent | 328 | 0 | 0 | 1 |
System.Collections.Immutable | 1821 | 0 | 5 | 25 |
System.Console | 439 | 0 | 22 | 1 |
System.Data.Odbc | 868 | 0 | 2 | 0 |
System.Data.OleDb | 1524 | 1 | 24 | 0 |
System.Diagnostics.DiagnosticSource | 755 | 0 | 5 | 12 |
System.Diagnostics.EventLog | 515 | 36 | 6 | 2 |
System.Diagnostics.FileVersionInfo | 44 | 0 | 6 | 0 |
System.Diagnostics.PerformanceCounter | 272 | 0 | 52 | 6 |
System.Diagnostics.Process | 465 | 0 | 21 | 6 |
System.Diagnostics.StackTrace | 60 | 0 | 3 | 0 |
System.DirectoryServices | 1373 | 0 | 35 | 0 |
System.DirectoryServices.AccountManagement | 1026 | 0 | 9 | 0 |
System.DirectoryServices.Protocols | 500 | 0 | 16 | 2 |
System.Formats.Asn1 | 268 | 0 | 12 | 4 |
System.Formats.Cbor | 223 | 0 | 17 | 9 |
System.Formats.Nrbf | 187 | 0 | 0 | 3 |
System.Formats.Tar | 257 | 0 | 1 | 13 |
System.IO.Compression | 411 | 0 | 14 | 9 |
System.IO.Compression.Brotli | 60 | 0 | 4 | 6 |
System.IO.FileSystem.AccessControl | 80 | 0 | 1 | 0 |
System.IO.FileSystem.DriveInfo | 28 | 0 | 2 | 0 |
System.IO.FileSystem.Watcher | 111 | 0 | 8 | 3 |
System.IO.Hashing | 170 | 0 | 37 | 16 |
System.IO.MemoryMappedFiles | 91 | 0 | 5 | 0 |
System.IO.Packaging | 507 | 0 | 0 | 3 |
System.IO.Pipelines | 274 | 0 | 0 | 8 |
System.IO.Pipes | 257 | 0 | 21 | 2 |
System.IO.Ports | 205 | 0 | 17 | 0 |
System.Linq | 897 | 0 | 0 | 10 |
System.Linq.Expressions | 3190 | 0 | 0 | 4 |
System.Management | 925 | 0 | 0 | 1 |
System.Memory | 163 | 0 | 3 | 10 |
System.Memory.Data | 38 | 0 | 1 | 0 |
System.Net.Http | 2260 | 90 | 85 | 17 |
System.Net.Http.Json | 130 | 0 | 0 | 6 |
System.Net.Http.WinHttpHandler | 187 | 0 | 6 | 4 |
System.Net.HttpListener | 730 | 0 | 62 | 1 |
System.Net.Mail | 760 | 0 | 4 | 0 |
System.Net.NameResolution | 82 | 0 | 17 | 1 |
System.Net.NetworkInformation | 874 | 0 | 48 | 2 |
System.Net.Ping | 96 | 0 | 8 | 2 |
System.Net.Primitives | 281 | 0 | 3 | 11 |
System.Net.Quic | 351 | 2 | 93 | 43 |
System.Net.Security | 686 | 0 | 46 | 14 |
System.Net.ServerSentEvents | 16 | 0 | 1 | 3 |
System.Net.Sockets | 1026 | 0 | 155 | 36 |
System.Net.WebSockets | 162 | 0 | 8 | 13 |
System.Net.WebSockets.Client | 103 | 0 | 3 | 0 |
System.Numerics.Tensors | 1581 | 0 | 39 | 156 |
System.Private.CoreLib | 20924 | 325 | 1705 | 1347 |
System.Private.DataContractSerialization | 4052 | 0 | 52 | 16 |
System.Private.Uri | 251 | 0 | 34 | 5 |
System.Private.Xml | 14059 | 0 | 97 | 2 |
System.Reflection.Metadata | 2591 | 0 | 80 | 12 |
System.Reflection.MetadataLoadContext | 1432 | 0 | 5 | 0 |
System.Resources.Extensions | 79 | 0 | 1 | 0 |
System.Runtime.Caching | 336 | 0 | 2 | 0 |
System.Runtime.InteropServices | 1064 | 0 | 31 | 0 |
System.Runtime.InteropServices.JavaScript | 382 | 0 | 102 | 15 |
System.Runtime.Numerics | 352 | 0 | 4 | 53 |
System.Runtime.Serialization.Formatters | 530 | 0 | 1 | 3 |
System.Security.AccessControl | 395 | 0 | 3 | 0 |
System.Security.Cryptography | 4818 | 0 | 219 | 73 |
System.Security.Cryptography.Cose | 168 | 0 | 2 | 10 |
System.Security.Cryptography.Pkcs | 785 | 0 | 43 | 4 |
System.Security.Cryptography.ProtectedData | 5 | 0 | 1 | 0 |
System.Security.Principal.Windows | 150 | 0 | 12 | 0 |
System.ServiceProcess.ServiceController | 95 | 0 | 18 | 0 |
System.Text.Encoding.CodePages | 255 | 0 | 116 | 3 |
System.Text.Encodings.Web | 135 (${\textsf{\color{green}-8}}$) 🟩 | 0 | 18 | 6 (${\textsf{\color{green}-7}}$) 🟩 |
System.Text.Json | 2664 | 0 | 11 | 108 |
System.Text.RegularExpressions | 934 | 0 | 4 | 6 |
System.Threading | 98 | 0 | 1 | 0 |
System.Threading.AccessControl | 123 | 0 | 3 | 0 |
System.Transactions.Local | 1197 | 1 | 6 | 0 |
System.Web.HttpUtility | 64 | 0 | 0 | 1 |
System.Windows.Extensions | 50 | 0 | 3 | 0 |
Other | 24806 | 0 | 0 | 0 |
Total | 130264 (${\textsf{\color{green}-8}}$) 🟩 | 2650 | 5931 | 2458 (${\textsf{\color{green}-7}}$) 🟩 |
cc @EgorBo
@EgorBot -codesafety -pr 109896
@EgorBot -codesafety -pr 109896
Processing https://github.com/dotnet/runtime/pull/109570#issuecomment-2466405619 command:
Command
-aws_cached2_genoa -aws_arm64 ```cs using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; using System.Runtime.CompilerServices; using BenchmarkDotNet.Running; BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args); public unsafe class Bench { static byte* _srcAlign64; static byte* _srcAlign8; [GlobalSetup] public void Setup() { _srcAlign64 = (byte*)NativeMemory.AlignedAlloc(1024 * 1024, 64); _srcAlign8 = _srcAlign64 + 8; } [GlobalCleanup] public void Cleanup() => NativeMemory.AlignedFree(_srcAlign64); [Benchmark] public void Zero256_Align64() => Unsafe.InitBlockUnaligned(_srcAlign64, 0, 256); } ```(EgorBot will reply in this issue)