Vladimir Sadov [Tue, 14 Mar 2023 19:47:48 +0000 (12:47 -0700)]
[NativeAOT] simpler ObjectHasComponentSize (#83374)
* simplified ObjectHasComponentSize
* removes EETypePtr.ComponentSize and EETypePtr.IsAbstract
* call entire GetUninitializedObject on nullable underlying type (for static ctors)
Stephen Toub [Tue, 14 Mar 2023 19:41:48 +0000 (15:41 -0400)]
Remove the defunct DiagnosticUtility/Fx classes from DataContractSerialization (#82324)
- Fx.Assert just delegated to Debug.Assert: replace all the call sites with Debug.Assert/Fail.
- DiagnosticUtility.DebugAssert just delegated to Debug.Assert: replace all the call sites with Debug.Assert/Fail.
- DiagnosticUtility.ExceptionUtility.ThrowHelperError didn't throw anything and just returned its argument: removed all uses of it
- DiagnosticUtility.ExceptionUtility.ThrowHelperCallback didn't throw anything and just returned its argument: removed all uses of it.
- DiagnosticUtility.ExceptionUtility.ThrowHelperFatal didn't throw anything and just wrapped its arguments in a new Exception that was then returned: just changed the call sites to create that exception.
- DiagnosticUtility.ExceptionUtility.ThrowHelperArgument{Null} didn't throw anything and just returned new instances of Argument{Null}Exception: just changed the call sites to create that exception.
- Replaced some argument validation with helpers like ThrowIfNegative.
- Fx.IsFatal: moved to ExceptionUtility class
Brian Bohe [Tue, 14 Mar 2023 17:06:59 +0000 (14:06 -0300)]
Test merging baseservices/threading (#83143)
* Removing cs test entrypoint args
* Running ILTransform -n
* Running ILTransform -prociso
* Running ILTransform -public
* Running ILTransform -ilfact
* Adding JIT/Directed merge tests wrapper
* Patching merge wrapper generator code
* Fixing accesibility problems after wrapper generator updates
Anton Firszov [Tue, 14 Mar 2023 15:18:57 +0000 (16:18 +0100)]
Fix stress test failures on 1es-windows-2022-open (#83211)
Jakob Botsch Nielsen [Tue, 14 Mar 2023 15:01:07 +0000 (16:01 +0100)]
JIT: Stop relying on type handles in CSE (#83306)
Fix #83215
Kevin Jones [Tue, 14 Mar 2023 14:33:56 +0000 (10:33 -0400)]
Override Write(Span) for CryptoStream to clear arrays before returning to pool (#83338)
Jakob Botsch Nielsen [Tue, 14 Mar 2023 10:43:28 +0000 (11:43 +0100)]
JIT: Remove lvaPInvokeFrameRegSaveVar (#83309)
This does not seem to be used for anything meaningful.
Fix #83052
Pavel Savara [Tue, 14 Mar 2023 10:05:08 +0000 (11:05 +0100)]
[browser] wasm memory snapshot into browser cache (#82049)
Co-authored-by: Marek Fišera <mara@neptuo.com>
Co-authored-by: Katelyn Gadd <kg@luminance.org>
Jakob Botsch Nielsen [Tue, 14 Mar 2023 09:37:31 +0000 (10:37 +0100)]
JIT: Add missing 'MadeChanges = true' in gtSplitTree (#83360)
Fix #83332
Michal Strehovský [Tue, 14 Mar 2023 08:21:42 +0000 (17:21 +0900)]
Do not generate Equals/GetHashCode support for async state machines (#83369)
Saves 0.63% on BasicMinimalApi.
This logic controls whether we inject the `__GetFieldHelper` override for the type (see https://github.com/dotnet/corert/pull/5436).
Bruce Forstall [Tue, 14 Mar 2023 08:20:35 +0000 (02:20 -0600)]
Fix superpmi unit test on Alpine (#83372)
`perl` was removed from the Alpine images we use. The superpmi unit
test harness was using `perl` to convert the line endings in the
superpmicollect.sh wrapper script harness from Windows CR/LF format
to Linux/Mac LF format.
It appears this is no longer necessary, as the wrapper scripts appear
to be built in CI during the "Generate tests wrappers" step on Linux
when they will be run on Linux, so they already have the correct line
endings. Remove the call to invoke `perl`.
Fixes #83320
Qiao Pengcheng [Tue, 14 Mar 2023 08:18:49 +0000 (04:18 -0400)]
Fix the compiling errors for LoongArch64 and (#83370)
delete unused code for ARM64.
Michal Strehovský [Tue, 14 Mar 2023 05:57:45 +0000 (14:57 +0900)]
Do not generate relocs to empty type dictionaries (#83367)
If the generic dictionary is empty, there's no legitimate reason to access it. Saves 20 kB on BasicMinimalApi.
Also deleting a multimodule extensibility point that was getting in the way. We didn't use it and I don't see a future need for it either.
Michal Strehovský [Tue, 14 Mar 2023 05:32:15 +0000 (14:32 +0900)]
Reduce duplicity in GVM analysis (#83250)
There were two very similar pieces of logic in the generic virtual method analysis. First one was deciding whether we need to emit GVM bookkeeping about the type, the second one was deciding whether the type should participate in GVM analysis (the N*M algorithm, "for each type relevant to GVM analysis" * "GVM virtual method called").
Made this into one so that it's in one spot. The interface method resolution is not cheap so this also speeds up the compilation. We should also do this for non-generic virtuals at some point.
I did a test pass with an assert that the analysis came up with the same conclusions to ensure I didn't mess up.
Vladimir Sadov [Tue, 14 Mar 2023 02:39:18 +0000 (19:39 -0700)]
[NativeAOT] Unify common cases of Array.Copy with CoreCLR (#83351)
* Unify common cases of Array.Copy
* ContainsGCPointers
* removed EETypePtr.FastEquals
* AreSameType
* fix the build after rebase
Pavel Savara [Tue, 14 Mar 2023 01:07:29 +0000 (02:07 +0100)]
[browser][debugger] Cleanup runtime_ready tests
Jakob Botsch Nielsen [Mon, 13 Mar 2023 23:01:07 +0000 (00:01 +0100)]
JIT: Remove LclVarDsc::lvExactSize and LclVarDsc::lvSIMDType (#83307)
Turn these into functions.
Michal Strehovský [Mon, 13 Mar 2023 21:17:14 +0000 (06:17 +0900)]
Use `MethodTable.Of` in generated valuetype methods (#83325)
I thought it might improve codegen, but the improvements are marginal. Still, contributes to dotnet/runtimelab#232.
dotnet bot [Mon, 13 Mar 2023 18:26:59 +0000 (11:26 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2133979 (#83240)
* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2131973
* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2132876
Egor Bogatov [Mon, 13 Mar 2023 18:11:08 +0000 (19:11 +0100)]
Constant folding for RuntimeInformation.IsOSPlatform(OSPlatform) (#83308)
Elinor Fung [Mon, 13 Mar 2023 17:49:27 +0000 (10:49 -0700)]
Shared helpers for creating framework-dependent/self-contained apps in host tests (#83291)
- Add centralized helpers for:
- Creating framework-dependent or self-contained apps
- Host binaries' names and paths
- Update native search directories test to validate behaviour with .deps.json (the test was using an app without .deps.json)
Egor Bogatov [Mon, 13 Mar 2023 17:14:22 +0000 (18:14 +0100)]
Unify unroll limits in a single entry point (#83274)
Omair Majid [Mon, 13 Mar 2023 16:33:40 +0000 (12:33 -0400)]
Remove the dotnet (1) man page (#78229)
All the man pages, including a different version of dotnet.1, are
currently maintained in the dotnet/sdk repo. See
https://github.com/dotnet/sdk/tree/main/documentation/manpages and in
particular, the documentation on how those are generated from
dotnet/docs repository:
https://github.com/dotnet/sdk/blob/main/documentation/manpages/tool/README.md
This leftover copy of dotnet.1 in this repository is extremely out of
date and unmaintained. Lets just delete it.
Co-authored-by: Andy Gocke <angocke@microsoft.com>
kasperk81 [Mon, 13 Mar 2023 16:28:39 +0000 (18:28 +0200)]
replace redhawk with nativeaot (#79217)
* replace redhawk with nativeaot
* apply suggestions
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
---------
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Aleksey Kliger (λgeek) [Mon, 13 Mar 2023 14:14:21 +0000 (10:14 -0400)]
[mono] Use unsigned char when computing UTF8 string hashes (#83273)
* [mono] Use `unsigned char` when computing UTF8 string hashes
The C standard does not specify whether `char` is signed or unsigned, it is implementation defined.
Apparently Android aarch64 makes a different choice than other platforms (at least macOS arm64 and Windows x64 give different results).
Mono uses `mono_metadata_str_hash` in the AOT compiler and AOT runtime to optimize class name lookup. As a result, classes whose names include UTF-8 continuation bytes (with the high bit = 1) will hash differently in the AOT compiler and on the device.
Fixes https://github.com/dotnet/runtime/issues/82187
Fixes https://github.com/dotnet/runtime/issues/78638
* [aot] add DEBUG_AOT_NAME_TABLE code for debugging the class names
AOT compiler: Emits a second "class_name_table_debug" symbol that has all the class names and hashes as strings.
AOT runtime: warns if a class is not found in the name cache
* Add regression test
Zoltan Varga [Mon, 13 Mar 2023 13:43:33 +0000 (09:43 -0400)]
[mono] Clean up the delegate ctor code. (#83288)
* [mono] Clean up the delegate ctor code.
* Merge the virtual and non-virtual cases.
* Reorder the code in handle_delegate_ctor () to reduce the llvm_only conditionals.
* Name variables etc. delegate info instead of delegate trampoline.
* Avoid setting the del->is_virtual field if its FALSE.
* Remove some code which is already done by mono_resolve_patch_target_ext ().
* Remove some dead code.
* Unify the virtual/non-virtual case for llvmonly as well.
Jan Dupej [Mon, 13 Mar 2023 12:41:39 +0000 (13:41 +0100)]
[mono][jit] Adding more arm64 SIMD operations, SIMD codegen with instruction table. (#83094)
* [mono][jit] Handling vector operations on arm64, comparisions and a few others, tabular approach to instruciton specs.
* [mono][jit] Adding compare vector operations, not, neg. Mono IR to machine code transformation is now table-generated for select operations. Fixing issues.
* YAGNI on a macro.
* [mono][jit] Table-driven code SIMD generation on arm64 is now restricted to exclude certain operations that are easily implemented manually.
* [mono][jit] Code cleanup.
* Temporarily disable SIMD on arm64. Fix indentation. Comments.
Stephen Toub [Mon, 13 Mar 2023 12:04:12 +0000 (08:04 -0400)]
Override all write/flush methods on NullTextWriter (#83293)
The base implementations do non-trivial work, like calling ToString on the arguments, calling string.Format, queueing tasks, etc. None of that should be done if TextWriter.Null is used.
Filip Navara [Mon, 13 Mar 2023 10:19:02 +0000 (11:19 +0100)]
Fix address data emitted in the MonoProfilerGCRoots ETW event (#83284)
Adeel Mujahid [Mon, 13 Mar 2023 08:52:40 +0000 (10:52 +0200)]
Remove VersionSuffix from servicing builds (#83311)
Jan Kotas [Mon, 13 Mar 2023 03:41:35 +0000 (20:41 -0700)]
Fix culture-specific string comparisons in EventSource (#83319)
* Fix culture-specific string comparisons in EventSource
These string comparisons are clearly not meant to be culture-specific. They were one of the reasons for loading ICU in Console.WriteLine("Hello world"); app.
Context https://github.com/dotnet/aspnetcore/issues/47029#issuecomment-
1455553729
* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
anthonycanino [Sun, 12 Mar 2023 15:57:11 +0000 (08:57 -0700)]
Avx512 extract most significant bits (#82731)
* Add `TYP_MASK` and `Vector512.ExtractMostSignificantBits`.
* Rebase / rename error fix.
* Review edits.
* Formatting.
* Review edits.
* Review cleanup.
* Build fixes.
* Address throughput issues pertaining to `availableRegCount`.
* kmov RR refactor.
* Split kmov into kmov_msk and kmov_gpr.
* Fix thread.
* Review edits.
Jakob Botsch Nielsen [Sat, 11 Mar 2023 21:11:51 +0000 (22:11 +0100)]
JIT: Add a primitive to split statements at a specified tree (#83005)
Add a gtSplitTree that can split a statement at an arbitrary tree: this creates new statements before the statement such that the original statement now executes the input tree as the very first non-invariant node.
This can be used for example to introduce control flow at an arbitrary point within a tree.
Stephen Toub [Sat, 11 Mar 2023 16:36:40 +0000 (11:36 -0500)]
Avoid synchronizing access to TextWriter.Null in Console (#83296)
If SetOut/Error are used to silence Console by using TextWriter.Null, we don't need to wrap the writer in a synchronized one like we normally do, since all operations are nops and there's no need to serialize access.
Stephen Toub [Sat, 11 Mar 2023 16:36:02 +0000 (11:36 -0500)]
Reduce cost of async waiting on SemaphoreSlim with cancellation/timeout (#83294)
If a WaitAsync on a SemaphoreSlim is unable to synchronously acquire the semaphore, it calls an async method that handles the waiting. That method awaits with a custom awaiter that avoids throwing in the case of cancellation or timeout. However, in using a custom awaiter, we get knocked off the highest-perf path that can avoid allocating an Action. This change puts it back onto the golden path by having the awaiter implement our internal interface that lets it backchannel with the async method builders. Eventually we want this awaiter to be available publicly as well, and it'll end up benefiting more than just semaphores.
Vitek Karas [Sat, 11 Mar 2023 08:53:40 +0000 (00:53 -0800)]
Remove the second copy of ILLink.Shared project and source code (#83263)
I compared the two, the one in illink had a couple of small fixes on top of NativeAOT. The only change exclusive to NativeAOT was making the FlowAnnotations public, so I ported that over.
I chose to keep the one in illink. We can discuss moving it around in additional PR.
The rest of this change is solution and project file cleanup.
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Egor Bogatov [Sat, 11 Mar 2023 01:35:17 +0000 (02:35 +0100)]
JIT: Fold string fields in structs stored in static readonly fields (#80431)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Radek Doulik [Sat, 11 Mar 2023 00:41:26 +0000 (01:41 +0100)]
[wasm] Initial emscripten 3.1.30 support (#81215)
* [wasm] Initial emscripten 3.1.30 support
* Update icu dependency
* Update emsdk dependency
* Use new docker images
* Add "icudt68_dat" as JS imported function.
It's an undefined symbol in ICU, because we are not linking in a lib, that should in the end be linked out.
Updated version of emscripten has by default turned on the LLD_REPORT_UNDEFINED .
* Drop build-time support for undefined icudt68_dat.
* Fix linker options
Should be `--lto-O0`
* Fix remaining conflict
* Limit new warnings option to browser
* Try to force reinstall of certifi
* Unset `FROZEN_CACHE` for `embuilder build MINIMAL`
* Update emsdk deps
* Remove assert for stack address
The linker puts stack at 0 sometime, so just check that the stack size
is not zero.
* Get back the stack base assert
For non-wasm targets. Add comment.
* Set stack size to 5MB
Which was the default size in older emscripten versions. Let see if it
is related to some of the issues.
* Disable WBT tests with SkiSharp
context: https://github.com/dotnet/runtime/issues/82725
* Disable more WBT tests with SkiSharp
* Set the stack size also in native targets
* Update icu deps
* Update emsdk deps
* Enable BigInt support
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
* Enable BigInt here as well
* Temporarily allow undefined symbols
To unblock other work. After merge of main we are now again getting
linker errors with:
.nuget/packages/microsoft.netcore.runtime.icu.transport/8.0.0-preview.3.23128.1/runtimes/browser-wasm/native/lib/libicuuc.a(udata.ao): undefined symbol: icudt68_dat
* Try to use pip-system-certs package
Co-authored-by: Ankit Jain <radical@gmail.com>
* Fix merge damage for marking "icudt68_dat" a JS imported function + revert temporal fix.
* Try another python certifi package
* Try install pip-system-certs for emsdk's python
* Try to update machine certs for www.sqlite.org
* Refactor + upgrade pip
Also use the newer pip-system-certs again
* Use new net8 images
* Add `-s INCOMING_MODULE_JS_API=print,printErr`
* Introduce EmccStackSize msbuild property
* Remove FIXME from merge
We don't have afterUpdateGlobalBufferAndViews anymore
* Fixes around updateMemoryViews
* Pass --experimental-wasm-bigint to v8
Ubuntu 18.04 helix image has old v8
* Try multiple --engine-arg options
* Revert "Introduce EmccStackSize msbuild property"
This reverts commit
f67ea5e303421bb89f5521f425f22a82aa5d6f46.
* Disable 3 filesystem related tests
* Add bigint to AOT test template
* Introduce EmccStackSize msbuild property
* Update emsdk deps
* Update icu deps
* Revert "Add `-s INCOMING_MODULE_JS_API=print,printErr`"
This reverts commit
889d0366e4438880029c85ac800d4403f713dfff.
* Update emsdk deps
* Update icu deps
* Disable one more file related test
---------
Co-authored-by: Marek Fišera <mara@neptuo.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Larry Ewing [Sat, 11 Mar 2023 00:26:33 +0000 (18:26 -0600)]
Fix the variable name (#83282)
dotnet-maestro[bot] [Fri, 10 Mar 2023 22:16:06 +0000 (16:16 -0600)]
Update dependencies from https://github.com/dotnet/icu build
20230309.2 (#83262)
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.3.23156.1 -> To Version 8.0.0-preview.3.23159.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Ivan Diaz Sanchez [Fri, 10 Mar 2023 20:06:53 +0000 (12:06 -0800)]
[Merge-on-Red] - Implement Test Process Watcher (#78742)
Initial implementation of the test watcher that looks out for hangs and freezes during test runs.
Tomas Weinfurt [Fri, 10 Mar 2023 19:10:57 +0000 (11:10 -0800)]
update alpine test images (#82931)
* update alpine test images
* tests
Tomas Weinfurt [Fri, 10 Mar 2023 19:00:18 +0000 (11:00 -0800)]
Support sites with invalid IDN in SslStream (#82934)
* initial test
* 'update'
* feedback from review
* android
Jeremy Koritzinsky [Fri, 10 Mar 2023 18:45:02 +0000 (10:45 -0800)]
Update the Roslyn version our ref-pack generators reference to 4.5.0 (#83238)
dotnet-maestro[bot] [Fri, 10 Mar 2023 16:50:16 +0000 (10:50 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build
20230310.1 (#83264)
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23159.1 -> To Version 4.6.0-3.23160.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Katelyn Gadd [Fri, 10 Mar 2023 16:14:40 +0000 (08:14 -0800)]
[wasm] Introduce jiterpreter control flow pass (#83247)
* Checkpoint CFG
Generate fallthrough in CFG
Generate branch block header partially in cfg
Emit branches in CFG
Checkpoint: Emit loop and exit return in CFG (broken)
Fix CFG emitting function header in the wrong place
Improve accuracy of cfg size estimation
Remove log messages
Checkpoint: Forward branches partially working
Fix non-conditional branches not being added to target table
Remove fallthrough
* Implement backward branches via a dispatch table
* Cleanup
* Cleanup
* Remove use of DataView since it has a hazard around heap growth
Use copyWithin to implement appendBytes where possible
More accurate overhead calculation
dotnet-maestro[bot] [Fri, 10 Mar 2023 15:59:15 +0000 (09:59 -0600)]
Update dependencies from https://github.com/dotnet/arcade build
20230309.1 (#83261)
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
From Version 8.0.0-beta.23156.4 -> To Version 8.0.0-beta.23159.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Tanner Gooding [Fri, 10 Mar 2023 15:06:49 +0000 (07:06 -0800)]
Massively simplify getBaseJitTypeAndSizeOfSIMDType and the general SIMD handle caching/lookup (#83228)
Pavel Savara [Fri, 10 Mar 2023 11:41:11 +0000 (12:41 +0100)]
[browser] ts code cleanup (#83210)
Andrii Kurdiumov [Fri, 10 Mar 2023 11:38:02 +0000 (17:38 +0600)]
Fix path for packing (#83017)
* Fix path for packing
* Apply PR feedback
* Update docs/workflow/building/libraries/README.md
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update docs/workflow/building/libraries/README.md
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
---------
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Jan Dupej [Fri, 10 Mar 2023 10:00:23 +0000 (11:00 +0100)]
[mono][jit] Optimized loading imm on arm64. (#83204)
* [mono][jit] Optimized loading certain 32- and 64-bit immediates on arm64.
* [mono][jit] Loading small negative imm32 optimized on arm64.
Vitek Karas [Fri, 10 Mar 2023 09:50:30 +0000 (01:50 -0800)]
Implements correct handling of RequiresAssemblyFiles on properties and events (#83195)
The `RequiresAssemblyFiles` attribute can be present on property or event (in which case it applies to all accessors). The analyzer already handles this case, but the NativeAOT compiler didn't. This change implements the correct behavior in NativeAOT as well.
The implementation actually handles all Requires attributes this way now, but the other two are not allowed on properties or event (yet).
Had to add an optimization to the `GetPropertyForAccessor`/`GetEventForAccessor` as these are now called very frequently and they can be really slow.
Implements a new behavior with regard to IL3003 as described in the comment in the code as well as: #83235
Fixes https://github.com/dotnet/runtime/issues/71985.
Johan Lorensson [Fri, 10 Mar 2023 08:23:08 +0000 (09:23 +0100)]
Implement native container types used by shared EventPipe code. (#78852)
* Implement native container types used by shared EventPipe code.
Use eglib's list, slist, array, ptr_array, queue, hash table as a starting point creating a new set of native container types shared between native runtime components like EventPipe.
EventPipe shim container API used a STL like API, new container types follows STL style container API and match STL type names:
vector
forward list
list
queue
unordered map
Native container types are still included in runtime build artifacts (through EventPipe cmake files), this can be changed/done differently depending on how each runtime would like to build/use the source files. In order to make that intent more clear, container and EventPipe cmake files have been renamed to not use CMakeList.txt, but .cmake.
A number of new native tests for added container types have been added into EventPipe native test runner.
Michal Strehovský [Fri, 10 Mar 2023 05:41:36 +0000 (14:41 +0900)]
Change logic around GC.Collect in objwriter (#83249)
Miha Zupan [Fri, 10 Mar 2023 04:17:27 +0000 (05:17 +0100)]
Vectorize ProbabilisticMap.IndexOfAny (#80963)
* Vectorize ProbabilisticMap.IndexOfAny on AVX2
* Use ResetLowestSetBit from BitOperations
* Speed up Avx2 and add Vector128 support
* Add Vector{128/256}.LoadUnsafe(ref char) and Vector128.ShuffleUnsafe
* Use Vector128.ShuffleUnsafe in more places
* PR feedback
* Replace another ShiftRightLogical with '>>>'
* Add WASM path to Vector128.ShuffleUnsafe
* PR feedback
Steve Pfister [Fri, 10 Mar 2023 00:53:36 +0000 (19:53 -0500)]
[workloads] Add more win-arm64 entries in the net6 manifest (#83237)
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Larry Ewing [Fri, 10 Mar 2023 00:52:16 +0000 (18:52 -0600)]
[wasm] Flow emsdk using a stable package name instead of one that will break every preview (#83208)
* Update dependencies from https://github.com/dotnet/llvm-project build
20230308.1
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23156.3 -> To Version 14.0.0-alpha.1.23158.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230308.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net6.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100-preview.3
From Version 8.0.0-preview.3.23156.1 -> To Version 8.0.0-preview.3.23158.1
* try flowing a stable name
* fix typo
* Update since _ doesn't get removed in the package name
* Update to new name
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 10 Mar 2023 00:49:09 +0000 (18:49 -0600)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230308.3 (#83198)
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23124.1 -> To Version 3.3.5-beta1.23158.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 10 Mar 2023 00:48:31 +0000 (18:48 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build
20230309.1 (#83200)
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23157.14 -> To Version 4.6.0-3.23159.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Will Smith [Fri, 10 Mar 2023 00:42:13 +0000 (16:42 -0800)]
[JIT] ARM64 - Overflow check optimizations for division (#82924)
* Do not emit overflow check for div if we know first operand is a constant that is a not a min value
* Remove redundant branch
* Update codegenarm64.cpp
* Try to use subs, zr, dividendReg, 1 to determine overflow in division
* Cleanup
* Use IsNeverNegative to help not emit overflow checks
* Fix check
* Added helper functions
* Use main node instead of op1 for type check
* Add 64-bit check
* Use cmp instead of subs since it is an alias
* Handle 32-bit arch division for LONG.
* Additional checks
* More cleanup
* More cleanup
* Do not find exception blocks
* Try using flags
* Try using flags
* More checks, more comments
* Update src/coreclr/jit/gentree.cpp
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Flip meaning of check flags. Rename OperExceptions to GetExceptionSetFlags. Use GetExceptionSetFlags to determine to add div-by-zero or overflow blocks for arm64.
* Use GetExceptionSetFlags in arm64 codegen
* Revert name
* Use GTF_DIV_MOD_NO_OVERFLOW_CHK in CanDivOrModPossiblyOverflow
* Fix build
* Rename flags by removing '_CHK'
* Remove break
---------
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Carlos Sánchez López [Fri, 10 Mar 2023 00:29:49 +0000 (16:29 -0800)]
Add tar tests to confirm entries owned by deleted users can still be read or written (#83126)
* Add tar tests to confirm entries owned by deleted users can still be read and written.
* Improve Process execution code to avoid potential deadlock.
Jakob Botsch Nielsen [Fri, 10 Mar 2023 00:27:39 +0000 (01:27 +0100)]
JIT: Disallow 0-sized block ops (#83224)
Avoid creating 0-sized block ops in the importer (but keep the side effects of the addresses). Add asserts that we don't create these nodes and get rid of some downstream checks for the case.
Fix #12807
Also merge CEE_INITBLK and CEE_CPBLK importer cases. As part of this fix a bug where we weren't setting GTF_EXCEPT on the destination in the CEE_INITBLK case.
Katelyn Gadd [Fri, 10 Mar 2023 00:25:59 +0000 (16:25 -0800)]
[wasm] Fix missing branch target table update (#83236)
The jiterpreter was failing to add unconditional branch targets to the branch target table, which could cause branches targeting them to fail and make the trace bail out.
Larry Ewing [Fri, 10 Mar 2023 00:25:38 +0000 (18:25 -0600)]
[workloads] Update the workload descriptions (#83223)
* Update the workload description
* Update the path
* Update the description for net6.0
* Add more descriptions
* Add descriptions for the windows runtime packs
* Update WorkloadManifest.en.json
fix review comment
Pavel Savara [Fri, 10 Mar 2023 00:11:42 +0000 (01:11 +0100)]
[browser] cold start benchmark with download throttling and latency (#83220)
* cold start benchmark with download throttling and latency
* make throttling shared on the same session
* sequential
* removed PageShowCold
Andy Ayers [Thu, 9 Mar 2023 23:46:28 +0000 (15:46 -0800)]
JIT: treat synthesized profile data as pgo data, fix finally weights (#83185)
Once synthesis arrives on the scene, we're not going to want phases in the JIT
to arbitrarily modifying block weights. There is already a guard of this sort
for regular profile data, so it makes sense to extend that to synthesized data
as well.
When synthesizing counts, propagate counts to finallies from the associated
trys. This needs to be done carefully as we have make sure not to visit the
finally until the count in the try is set. We rely on some of the properties
of DFS pre and post number bracketing to do this efficiently, without needing
to track extra state.
Contributes to #82964.
Michal Strehovský [Thu, 9 Mar 2023 23:30:30 +0000 (08:30 +0900)]
Switch to selfhosted NativeAOT compiler (#81205)
This will compile the NativeAOT compiler with the LKG build of the NativeAOT compiler that the repo is building with.
At this point NativeAOT-compiled compiler is significantly better than the R2R+Trimmed+SingleFile-compiled combo we're shipping right now.
ilc.exe size before: 31 MB. ilc.exe size after: 14 MB.
Time to compile hello world before: 2.3 seconds. Time to compile hello world after: 1.3 seconds.
Andy Gocke [Thu, 9 Mar 2023 21:45:56 +0000 (13:45 -0800)]
Enable DwarfDump AOT test in Release (#82862)
* Enable DwarfDump AOT test in Release
There are some reports (#82802) that debugging might be particularly bad
in Release.
* Update warning counts for Release
dotnet-maestro[bot] [Thu, 9 Mar 2023 21:18:02 +0000 (13:18 -0800)]
[main] Update dependencies from dotnet/llvm-project dotnet/emsdk (#83173)
* Update dependencies from https://github.com/dotnet/llvm-project build
20230308.1
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23156.3 -> To Version 14.0.0-alpha.1.23158.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230308.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net6.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100-preview.3
From Version 8.0.0-preview.3.23156.1 -> To Version 8.0.0-preview.3.23158.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Jakob Botsch Nielsen [Thu, 9 Mar 2023 21:02:43 +0000 (22:02 +0100)]
JIT: Fix EQ/NE(relop/SETCC, 0) optimization (#83144)
Fix #83140
Katelyn Gadd [Thu, 9 Mar 2023 20:37:21 +0000 (12:37 -0800)]
[wasm] Add getNN_unaligned memory.ts APIs for potentially unaligned pointers (#83213)
* Add getNN_unaligned memory.ts APIs for cases where we cannot be certain the source address is aligned
* Remove CU64 typescript APIs since they were unused
Badre BSAILA [Thu, 9 Mar 2023 19:58:23 +0000 (20:58 +0100)]
provide custom marshaller for USER_INFO_1 (#82350)
* provide custom marshaller for USER_INFO_1
Steve Pfister [Thu, 9 Mar 2023 19:36:41 +0000 (14:36 -0500)]
[workloads] Add win-arm64 to wasm-tools in the net6 manifest (#83162)
* [workloads] Add win-arm64 in the net6 manifest
This was added in release/7.0, but not in main.
Fixes https://github.com/dotnet/sdk/issues/30019
* alias the aot compiler for win-arm64
---------
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Egor Bogatov [Thu, 9 Mar 2023 18:16:37 +0000 (19:16 +0100)]
Revert changes (#83196)
Stephen Toub [Thu, 9 Mar 2023 18:01:59 +0000 (13:01 -0500)]
Swap order of OnError in FileSystemWatcher.ReadDirectoryChangesCallback on Windows (#83121)
If the directory watching encounters a failure error code other than abort, the Windows implementation raises the Error event and sets EnableRaisingEvents to false. However, because it does so in that order, the Error event handler may or may not see the FSW's EnableRaisingEvents as false, based on whether there's a SynchronizingObject that results in the callback being queued. By swapping the order to always disable first, we can ensure consistency regardless of SynchronizingObject, which also means the Error handler can choose based on the error to set EnableRaisingEvents to true again if it desires.
Jackson Schuster [Thu, 9 Mar 2023 17:03:02 +0000 (09:03 -0800)]
Rename ManagedVirtualMethodTable and adjust VTable indices (#83158)
Steve Pfister [Thu, 9 Mar 2023 16:28:47 +0000 (11:28 -0500)]
[iOS] Add gss framework back into sample linker args (#83182)
https://github.com/dotnet/runtime/pull/81919 introduced a regression where the gss framework was omitted from the sample build. This change adds it back in.
Fixes https://github.com/dotnet/performance/issues/2924
Qiao Pengcheng [Thu, 9 Mar 2023 15:58:44 +0000 (10:58 -0500)]
[LoongArch64] delete the unused code for comparing. (#83187)
xtqqczze [Thu, 9 Mar 2023 13:54:27 +0000 (13:54 +0000)]
Replace `SafeLocalAllocHandle` in `System.Diagnostics.PerformanceCounter` (#82456)
* Replace `SafeLocalAllocHandle` in `Diagnostics.PerformanceCounter`
* Update SharedPerformanceCounter.cs
* Update System.Diagnostics.PerformanceCounter.csproj
Jakob Botsch Nielsen [Thu, 9 Mar 2023 13:09:48 +0000 (14:09 +0100)]
JIT: Remove TYP_BLK and TYP_LCLBLK (#83036)
This PR allows TYP_STRUCT locals to have block layouts and replaces uses
of TYP_BLK and TYP_LCLBLK with such locals instead.
There is still an invariant that any struct parameter local (even SIMD) has a non-block layout.
Also fixes a bug related to GS cookie handle with jit32 GC encoder -- it is
not allowed to be at fp+0, so we need to insert some padding in some cases because
now that some GS cookie-requiring locals are TYP_STRUCT they can sometimes be
removed from the frame.
To fix a TP regression, also precache the 0-sized block layout in the layout table. This
layout is used by all non-x86 compilations because the outgoing arg area starts out
as a 0-sized block local that is always allocated.
Vitek Karas [Thu, 9 Mar 2023 12:09:24 +0000 (04:09 -0800)]
Fix RequiresAccessedThrough tests (#83190)
This was caused by interaction between two PRs.
AOT is now expected to warn on all single-file and dynamic code attributes, just like the analyzer.
Eirik Tsarpalis [Thu, 9 Mar 2023 11:44:58 +0000 (11:44 +0000)]
Fix handling of required & init-only properties with custom property names in source gen. (#83147)
* Fix handling of required & init-only properties with custom property names in source gen.
* Address feedback.
dotnet bot [Thu, 9 Mar 2023 09:43:16 +0000 (01:43 -0800)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2131103 (#83171)
Aleksey Kliger (λgeek) [Thu, 9 Mar 2023 08:36:25 +0000 (03:36 -0500)]
[metadata] make mono_method_get_param_names external only (#83183)
Michal Strehovský [Thu, 9 Mar 2023 06:13:02 +0000 (15:13 +0900)]
Try reducing memory pressure during object writing (#83181)
Michal Strehovský [Thu, 9 Mar 2023 03:25:21 +0000 (12:25 +0900)]
Call FlushInstructionCache in CFG test (#83168)
Should address https://github.com/dotnet/runtime/pull/82307#discussion_r1111436978.
Aaron Robinson [Thu, 9 Mar 2023 02:48:42 +0000 (21:48 -0500)]
Remove fragile NGen logic for precomputed hashcodes (#82563)
* Remove fragile NGen logic for precomputed hashcodes
Hashing was confirmed to offer minor performance wins
but not with lazy hash code generation. Pre hashing was needed
to have a benefit on start-up but even then it was minor.
Carlos Sánchez López [Thu, 9 Mar 2023 02:25:45 +0000 (18:25 -0800)]
Fix PAX extended attribute reading logic to treat '=' character as valid in the value strings. (#82810)
* Move PaxExtendedAttribute_Roundtrips test to correct source code file. It is not handling any filesystem entries.
* Bug fix: Do not fail when reading an extended attribute when the value contains an '=' character.,
* Add unit tests that verify extended attribute and global extended attribute roundtripping when the value contains an '=' character.
Also add a null check for a subsequent GetNextEntry.
* Convert duplicate InlineData to single shared MemberData method.
* Apply suggestion
---------
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Tanner Gooding [Wed, 8 Mar 2023 23:14:40 +0000 (15:14 -0800)]
Ensure that the new Vector512 related ISAs are covered by ILLink Substitutions (#83040)
* Ensure that the new Vector512 related ISAs are covered by ILLink Substitutions
* Define the Avx512F and derived classes
Tanner Gooding [Wed, 8 Mar 2023 22:31:56 +0000 (14:31 -0800)]
Refactoring GenTreeVecCon to support TYP_SIMD64 (#83053)
* Refactoring GenTreeVecCon to support TYP_SIMD64
* Apply formatting patch
* Fixing a couple bugs in the refactoring
* Respond to some PR feedback by deduplicating code
Katelyn Gadd [Wed, 8 Mar 2023 22:20:35 +0000 (14:20 -0800)]
[wasm] Partially revert #82604 (#83156)
#82604 produced more regressions than it did improvements, so this PR relaxes one of its changes and disables the more suspect one temporarily. In the future the heuristic will be significantly revised, and the actual overhead of various parts of traces is going to change once the CFG is added, so it's not worthwhile to invest a bunch of time into tuning the parameters right now. Once things are more stable we will hopefully be able to identify the right parameter values by doing a bunch of benchmark runs.
Michał Petryka [Wed, 8 Mar 2023 22:19:04 +0000 (23:19 +0100)]
Fix undefined behaviour in Array.cs (#83116)
Fixes #83115
Tanner Gooding [Wed, 8 Mar 2023 22:18:53 +0000 (14:18 -0800)]
Adding System.Runtime.CompilerServices.Unsafe.BitCast (#82917)
* Adding System.Runtime.CompilerServices.Unsafe.BitCast
* Adding some basic intrinsic recognition for Unsafe.BitCast
* Use ClassLayout::AreCompatible as part of Unsafe.BitCast
* Fixup BitConverter to use Unsafe.BitCast
* Fixup Enum to use Unsafe.BitCast
* Ensure BitCast resolves the right generic type for toTypeHnd
* Use Unsafe.BitCast in places using the `*(TTo*)&tfrom` pattern
* Don't use BitCast in places the generic constraints disallows it
* Missing semicolon
* Don't use Unsafe.BitCast where it introduces additional generic instantiations
* Don't regress the files that are used for both netstandard and netcoreapp
* Responding to PR feedback
* Fix a typo in the bitcast tests
Ankit Jain [Wed, 8 Mar 2023 22:00:38 +0000 (17:00 -0500)]
[wasm] Revert to using latest chrome for testing (#83150)
https://github.com/dotnet/runtime/issues/81792
DeepakRajendrakumaran [Wed, 8 Mar 2023 21:52:52 +0000 (13:52 -0800)]
Lowering subset of Vector512 methods for avx512. (#82953)
* Load(), LoadUnsafe(), LoadAligned(), LoadAlignedNonTemporal()
* Store(), StoreUnsafe(), StoreAligned(), StoreAlignedNonTemporal()
* Fixing 'HasSideEffect()' check used for RedundantMov
Radek Doulik [Wed, 8 Mar 2023 21:36:36 +0000 (22:36 +0100)]
[wasm] Add tests for build with SIMD disabled (#82845)
* [wasm] Add tests for build with SIMD disabled
Add BuildWithoutSIMD_AOT and PublishWithoutSIMD_AOT tests
Also try to enable SIMD tests on V8 and node
* The BuildWithoutSIMD_AOT should be without AOT
* Feedback
* Removed too much
* Negate the assert, it should not relink
* Update src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Katelyn Gadd [Wed, 8 Mar 2023 20:26:35 +0000 (12:26 -0800)]
[wasm] Consume libc math functions directly from the jiterpreter without wrappers (#82963)
Implement more math opcodes and use the f32 functions as appropriate
Immo Landwerth [Wed, 8 Mar 2023 19:43:41 +0000 (11:43 -0800)]
Add ConsoleKey.None and ConsoleModifiers.None (#83114)
This fixes #79868.
Vitek Karas [Wed, 8 Mar 2023 19:20:08 +0000 (11:20 -0800)]
Implement parity for RAF and RDC attributes in NativeAOT (#83085)
The `RequiresUnreferencedCode` (RDC), `RequiresAssemblyFiles` (RAF) and `RequiresDynamicCode` (RDC) attributes should behave the same way in NativeAOT compiler. This change implements the necessary bits to make them almost 100% the same.
The only difference left is type hierarchy marking doesn't produce RAF/RDC related warnings - this is for now intentional, as it would probably produce unnecessary noise and the need for this seems to be really small.
Test changes are to basically fill in the missing expected warnings. We already have solid tests for pretty much all scenarios, they just didn't baseline these warnings since no tool produced them (illink doesn't produce RAF/RDC warnings, analyzer only produces them on direct access, not on reflection access).
This doesn't yet implement the IL3000 and IL3001 warnings in NativeAOT - that will be done in a subsequent change.
Stephen Toub [Wed, 8 Mar 2023 18:15:09 +0000 (13:15 -0500)]
Change a few more Encoding.UTF8.GetBytes to u8 in json (#83138)