Jeremy Koritzinsky [Thu, 3 Mar 2022 01:07:43 +0000 (17:07 -0800)]
Update Roslyn and use new step tracking API in incremental tests. (#63978)
Ankit Jain [Thu, 3 Mar 2022 00:57:08 +0000 (19:57 -0500)]
[wasm] Bump sdk for workload testing to `7.0.100-preview.3.22151.18` (#65003)
* [wasm] bump sdk for workload testing to 7.0.100-preview.2.22108.4
* [wasm] dotnet-install.sh logs errors from curl, while trying older urls,
.. don't let that fail the build.
* [wasm] trigger Wasm.Build.Tests when workload-testing.targets changes
* [wasm] trigger Wasm.Build.Tests on CI when eng/Versions.props changes
* [wasm] Update Wasm.Build.Tests to target net7.0 by default
net6 projects don't build with the workload currently. Tests will be
added for that once it is fixed.
* Bump sdk for workload testing to 7.0.100-preview.3.22128.3
* Bump sdk version for workload testing to 7.0.100-preview.3.22151.18
Julie Lee [Wed, 2 Mar 2022 23:33:11 +0000 (15:33 -0800)]
SPMI no ASMDiff between Checked and Release (#61335)
* SPMI no ASMDiff between Checked and Release
Created the first file that builds release and checked builds
* SuperPMI asmdiff checked and release
* Added downloading JIT release builds in superpmi-asmdiff-job
* Added dummy 'run-superpmi-asmdiff-job'
* SuperPmi asmdiff checked release
* Added JIT release download
* Added dummy run job that just runs superpmi replay
* SuperPMI asmdiff checked release
* Remove the 4th argument for jobName and displayName
* SuperPMI asmdiff checked release
* In run-superpmi-asmdiff-checked-release-job.yml,
* Added release_directory and release artifact to the script arguments
* Added ReleaseCorrelationPayloadDirectory and ReleaseArtifactName to parameters to send-to-helix-step.yml
* In superpmi_asmdiff_checked_release_setup.py
* Added release_directory and release_artifactname arguments
* Copied release binaries to source_directory/payload_release
* SuperPMI asmdiffs checked release
* Added superpmi_asmdiffs_checked_release_setup.py to set up Helix directories for checked in base and release in diff directories.
* Use superpmi_asmdiffs.py and superpmi-asmdiffs.proj.
* Renamed files from asmdiff to asmdiffs.
* SuperPMI asmdiffs checked release: resolve merge conflict
* SuperPMI asmdiffs checked release: Fixed to use a proj and a script file that compare with Release
* Superpmi asmdiffs checked release: changed to --diff_with_release as a boolean arg
* SuperPMI asmdiffs checked release: Add dependency to completed Release build
* Superpmi asmdiffs checked release: add diff_with_release back that got removed from merge
* SuperPMI asmdiffs checked release: Do not create asm file for asmdiff check with release
* SuperPMI asmdiffs checked release: Report failure asm diffs (return code 2) if --diff_with_release
* SuperPMI asmdiffs checked release: Handled code review feedback to remove jit-analyze and diff_summary.md
* SuperPMI asmdiffs checked release: Changed to checked_directory instead of base_directory
* SuperPMI asmdiffs checked release: explictly say checked_directory
* SuperPMI asmdiffs checked release: schedule to run on Saturdays and Sundays only.
Bruce Forstall [Wed, 2 Mar 2022 23:10:50 +0000 (15:10 -0800)]
Try to work around random CI failures in "dotnet restore" of benchmarks (#66116)
Set the "retry" environment variable described in
https://github.com/NuGet/NuGet.Client/pull/4259.
Bruce Forstall [Wed, 2 Mar 2022 23:04:59 +0000 (15:04 -0800)]
Partition SuperPMI replay task (#66065)
* Partition SuperPMI replay task
Split per-platform/architecture work into multiple partitions to increase pipeline
parallelism and reduce overall job time. The partitions are sets of
different JitStressRegs options.
We could create a partition for each JitStressRegs option, but the concern
is that there is potentially a lot of overhead downloading the large set
of MCH files, and we might want to share that overhead between work partitions.
* Add comment
SingleAccretion [Wed, 2 Mar 2022 22:28:41 +0000 (01:28 +0300)]
Do not value number locals on the LHS (#65902)
* Consistently number LHSs with VNForVoid
And account for this in copy propagation.
No diffs.
* Remove the copy block quirk
Removing the PHI quirk is more problematic due to regressions.
* Tentative: remove the PHI quirk
Let's assess the diffs.
* Revert "Tentative: remove the PHI quirk"
This reverts commit
b22d20ef390a846369a17755627aeba7923867c0.
Stephen Toub [Wed, 2 Mar 2022 22:01:16 +0000 (17:01 -0500)]
Switch field being examined by NullablePublicOnlyOtherTypesTest (#66113)
We should subsequently rewrite the tests to stop relying on the private members of types in other assemblies, but for now this gets the test passing.
Stephen Toub [Wed, 2 Mar 2022 21:29:10 +0000 (16:29 -0500)]
Fix cross-arch build compilation error about missing O_RDONLY (#66094)
Stephen Toub [Wed, 2 Mar 2022 21:28:46 +0000 (16:28 -0500)]
Disable Match_Timeout_Repetition_Throws test with NonBacktracking (#66093)
Bruce Forstall [Wed, 2 Mar 2022 19:39:48 +0000 (11:39 -0800)]
Disable SuperPMI replay jobs until #65332 is fixed (#66062)
Specifically, JitStressRegs=1 and JitStressRegs=8 legs.
Note that #65332 only hits 1 failure in each of these legs, and
only on arm64 platforms, but we don't have a way to be more
precise in our disabling.
Andy Ayers [Wed, 2 Mar 2022 19:26:29 +0000 (11:26 -0800)]
JIT: fix interaction of PGO and partial compilation (#66061)
Partially compiled methods must use the dense block based profile schema
instead of the sparse edge based profile schema.
Fixes #65977.
Elinor Fung [Wed, 2 Mar 2022 19:08:29 +0000 (11:08 -0800)]
Address TODO to switch to generated p/invoke (#66057)
Egor Bogatov [Wed, 2 Mar 2022 17:56:50 +0000 (20:56 +0300)]
JIT: Unroll Equals and StartsWith for constant strings and spans. [0..32] chars (#65288)
Co-authored-by: Andy Ayers <andya@microsoft.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Ankit Jain [Wed, 2 Mar 2022 17:47:58 +0000 (12:47 -0500)]
[wasm] Fix S.T.Regex test failures due to line ending differences (#66017)
Theodore Tsirpanis [Wed, 2 Mar 2022 16:27:18 +0000 (18:27 +0200)]
Use generic `Enum` methods when possible. (#64850)
* Use generic `Enum` methods when possible.
* Update src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ToolboxItemFilterAttribute.cs
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Günther Foidl <gue@korporal.at>
Viktor Hofer [Wed, 2 Mar 2022 15:17:47 +0000 (16:17 +0100)]
Keep CLSCompliantAttribute in sync for src <-> ref (#66075)
ApiCompat actually ran validation for that attribute until the check was
disabled with
a675e1c2c4f46b98ecac1253223649d8f36d5da7.
Enable it again and only disable it for baseline api compat validation,
which is performed in ApiCompat.proj.
Mitchell Hwang [Wed, 2 Mar 2022 14:54:01 +0000 (09:54 -0500)]
[tests][eventpipe] Port over Dotnet/Diagnostics to enable eventpipe tests on Android (#64358)
* [tests][eventpipe] Port over Dotnet/Diagnostics files for mobile eventpipe tests
Copied over files from src/Microsoft.Diagnostics.NETCore.Client based off of
99fab307
* [tests][eventpipe] Add TCP/IP logic for mobile eventpipe tests
* [tests] Remove Microsoft.Diagnostics.NETCore.Client package reference
* [tests][eventpipe] Downstream Diagnostics IpcTraceTest DiagnosticsClient bootstrap
https://github.com/dotnet/diagnostics/pull/720
* [tests][eventpipe] Downstream Diagnostics roslyn analyzer IpcTraceTest change
https://github.com/dotnet/diagnostics/pull/1044
* [tests][eventpipe] Enable TCPIP DiagnosticsClient in IpcTraceTest for Android
* [tests][eventpipe] Aesthetic IpcTraceTest modifications
* [tests][eventpipe] Disable subprocesses tests on Android
* [tests][eventpipe] Update processinfo
* [tests][eventpipe] Update processinfo2
* [tests][eventpipe] Update eventsourceerror
* [tests][eventpipe] Update bigevent
* [tests][eventpipe] Update buffersize
* [tests][eventpipe] Update rundownvalidation
* [tests][eventpipe] Update providervalidation
* [tests][eventpipe] Update gcdump
* [tests][JIT] Update debuginfo/tester
* [tests] Segment Microsoft.Diagnostics.NETCore.Client relevant tests for Linux arm coreclr
* Account for nonspecified RuntimeFlavor
* [tests] Moveup Default coreclr RuntimeFlavor property explicit declaration
* [tests] Duplicate Microsoft.Diagnostics.NETCore.Client dependent tests for Linux arm
* Fix debuginfo/tester test skip
* Temporarily enable bigevent on Linux arm and remove duplicate exclude
* Fix unaligned UTF16 string read in collect tracing EventPipe command.
Collect tracing 2 EventPipe command triggers an unaligned UTF16 string
read that could cause a SIGBUS on platforms not supporting unalinged
reads of UTF16 strings (so far only seen on 32-bit ARM Linux CI machine).
On CoreCLR this could even cause a unalinged int read due to
optimizations used in UTF8Encoding::GetByteCount.
* Revert "[tests] Duplicate Microsoft.Diagnostics.NETCore.Client dependent tests for Linux arm"
This reverts commit
cb2cacd93bb61b74b36c2d2d26cccec38b51b8f7.
* Revert "[tests] Segment Microsoft.Diagnostics.NETCore.Client relevant tests for Linux arm coreclr"
This reverts commit
dc29676bcea3a6073decf15a9f1dbc9b2e7b3bd8.
* Revert "Fix debuginfo/tester test skip"
This reverts commit
1e90d7e4667c0570c8f4c2536a25620697027c97.
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: lateralusX <lateralusx.github@gmail.com>
Jan Kotas [Wed, 2 Mar 2022 14:43:03 +0000 (06:43 -0800)]
Simplify RuntimeHelpers.GetSubArray (#66011)
The special casing of co-variant arrays was added in the original safe implementation to avoid exceptions from AsSpan (https://github.com/dotnet/coreclr/pull/22331#discussion_r252904254). ArrayTypeMismatchException is no longer a concern with the new unsafe implementation. There is a subtle behavior change in the actual type for co-variant arrays of reference types. However, the new behavior matches Array.Resize and it is very unlikely for any code out there to depend on this co-variant arrays corner case.
Ilona Tomkowicz [Wed, 2 Mar 2022 13:03:10 +0000 (14:03 +0100)]
[wasm][debugger] Support "on frame evaluation" of functions returning char (#65842)
* Optional parameter fix.
* Working version of optional parameter support, requires refactoring.
* Refactored.
* Fixed failing tests.
* Add support to functions returning char, add test to an existing case.
* Simplified tests.
* Merged with optional params, uncommented char test
* Remove spaces.
* Applied @radical's suggestions.
* Removed indentation.
* Another indentation.
* Removed comment.
* Reverted type=char, as @radical suggested.
* Applied @radical's suggestions. No need for escaping + reverting original name.
Stephen Toub [Wed, 2 Mar 2022 12:52:37 +0000 (07:52 -0500)]
Avoid RegexCode/RegexWriter for all engines other than RegexInterpreter (#65986)
* Avoid RegexCode/RegexWriter for all engines other than RegexInterpreter
* Address PR feedback
Jeremy Koritzinsky [Wed, 2 Mar 2022 05:45:31 +0000 (21:45 -0800)]
Make DllImportGenerator emit a GeneratedCodeAttribute on our stubs (#65868)
Vladimir Sadov [Wed, 2 Mar 2022 04:21:51 +0000 (20:21 -0800)]
EE Suspension on x86 should use RtlRestoreContext when available (#65878)
* RestoreContextSimulated
* probe for RtlRestoreContext
* ntdll.dll
* restore self-trap sequence
* PR feedback
* Clarify CopyContext in RedirectedHandledJITCaseExceptionFilter
* simpler indentation.
* restore last error on the legacy path.
* Update src/coreclr/vm/threads.h
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Ankit Jain [Wed, 2 Mar 2022 04:06:31 +0000 (23:06 -0500)]
[wasm] Update path to regex tests project, to be excluded for AOT (#66044)
The project path changed in
b4c746b7712e887af066d66d1ec777be6283f6f9,
causing the project to not get excluded on CI, and causing OOM failures
on rolling builds.
Fred Silberberg [Wed, 2 Mar 2022 03:05:12 +0000 (19:05 -0800)]
Remove incorrect exception comment from AsSpan (#66051)
This method never throws an `ArgumentNullException` for a null `text` input, and is even annotated as accepting `string?`.
Egor Bogatov [Wed, 2 Mar 2022 00:55:43 +0000 (03:55 +0300)]
Fix div-by-zero introduced in https://github.com/dotnet/runtime/pull/65926 (#66035)
Elinor Fung [Tue, 1 Mar 2022 22:24:04 +0000 (14:24 -0800)]
Update p/invoke source generator errors to use SYSLIB prefix (#65983)
Aleksey Kliger (λgeek) [Tue, 1 Mar 2022 21:17:38 +0000 (16:17 -0500)]
[hot_reload] various post-Preview 1 fixes (#65973)
* [debug] Handle gen-seq-points, and hot reload updates without PDBs
When hot reload is used with dotnet watch, the baseline PDBs are available, and sequence points are enabled, but there are no PDB updates.
* [hot_reload] Fix off by one error
when counting added and modified rows
* [hot_reload] Allow custom attribute deletions, even without ChangeCustomAttributes capability
Roslyn seems to delete nullability annotations sometimes
* Add regression test for adding static lambdas
* param attributes for hot reload
* don't run test where it isn't supported
imhameed [Tue, 1 Mar 2022 21:15:35 +0000 (16:15 -0500)]
[mono] Decompress ICU data during iOS/tvOS app startup (#64967)
This change adds support for decompressing ICU data files using the lzfse
decompressor built into Apple OSes.
If the data file path passed to `GlobalizationNative_LoadICUData` does not have
`.lzfse` as a suffix, then the contents of this file will be mapped into
shareable memory and passed directly to ICU.
Otherwise, the contents are decompressed using a fixed-size working buffer and
are stored inside a cache file with a name that contains a decimal encoded
representation of the originating compressed file's inode number, modification
time, and size. This filesystem metadata is extremely likely to change if the
contents of the source file ever changes, so there's no need to compute a
checksum of the data to determine if the cache is still valid. If a cache file
with an appropriate name is already present then it is mapped into shareable
memory and passed to ICU. Stale cache files (defined here to be any file with a
filename that ends with "-icudt.dat.uncompressed" that doesn't exactly match
the desired cache file name) are purged on startup.
`icudt.dat` for mobile is 2126 KiB right now; when compressed with lzfse it
shrinks to 675 KiB. On an iPhone SE 1st gen, this takes 4ms to decompress.
The "decompression framework" also supports lz4, zlib, and lzma. They are all
worse either in decompression time (lzma especially + zlib) or compression
ratio (lz4):
| Algorithm | icudt.dat compressed size | decompression time |
| --------- | ------------------------- | ------------------ |
| lz4 | 1031 KiB | 2.41 ms |
| lzfse | 675 KiB | 4.20 ms |
| zlib | 659 KiB | 9.61 ms |
| lzma | 427 KiB | 49.20 ms |
I am not comfortable adding 50ms to app startup time. On this same
iPhone SE 1st gen, the "Contacts" app takes 166.7ms to display app-generated
pixels. This is end-to-end latency, from the first indication that iOS has
recognized my finger tap, to the display displaying any non-placeholder
content. This was measured with with a 240fps camera. A barebones
xamarin-macios app takes 125ms to display a "Hello world!" message.
This uses the filename's suffix to control decompression for simplicity, but it
would also be possible to instead frame compressed data with a very simple
header consisting of a long-enough magic number and a decompressed payload size
that can be used as a buffer sizing hint to the decompression loop.
Miscellany:
- On iOS, the cache-directory appears to be app-specific. Example: `/var/mobile/Containers/Data/Application/
0C22E0D1-26CD-46CB-9EBC-
6CF55B513ED1/Library/Caches/`.
- https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-pillai.pdf
Zoltan Varga [Tue, 1 Mar 2022 20:09:47 +0000 (15:09 -0500)]
Revert "[mono][jit] Remove support for -O=-float32, i.e. treating r4 values as r8 on the IL stack. (#65740)" (#66006)
This reverts commit
e069de8777bc7c972b898a5c31d80ca9e23bbbef.
Egor Bogatov [Tue, 1 Mar 2022 19:43:37 +0000 (22:43 +0300)]
FastMod for EEHashTable (Faster virtual generics) (#65926)
dotnet-maestro[bot] [Tue, 1 Mar 2022 19:43:20 +0000 (11:43 -0800)]
[main] Update dependencies from dotnet/linker (#65844)
* Update dependencies from https://github.com/dotnet/linker build
20220223.2
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22123.2
* Update dependencies from https://github.com/dotnet/linker build
20220224.4
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22124.4
* Update dependencies from https://github.com/dotnet/linker build
20220225.2
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22125.2
* Update dependencies from https://github.com/dotnet/linker build
20220228.3
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22122.1 -> To Version 7.0.100-1.22128.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Viktor Hofer [Tue, 1 Mar 2022 19:31:17 +0000 (20:31 +0100)]
Keep Obsolete and EditorBrowsable attributes consistent between ref and src and DefineConst clean-up (#65847)
* NET5_0_OR_GREATER, NET6_0_OR_GREATER -> NETCOREAPP
The minimum supported .NETCoreApp version in the repository is 6.0,
hence both defines can be replaced with the versionless NETCOREAPP one.
There is no need to version APIs below the minimum supported .NETCoreApp
version.
* Sync ObsoleteAttribute between ref and src
ApiCompat wasn't enabled to check if the ObsoleteAttribute is in sync
between the ref and the src assembly. Enabling it showed numerous
mismatches which this commit fixes.
Also making sure that the ApiCompat run that compares the live build
against the previous version of .NETCoreApp and .NETStandard2.x doesn't
complain about ObsoleteAttribute API changes as those are intentional.
* Sync EditorBrowsableAttribute between ref and src
The EditorBrowsableAttribute attribute wasn't enabled to be checked by
ApiCompat and in many cases there were mismatches. The most prominent
were InteropServices.
* HttpListenerContext pr feedback
* ResourceManager pr feedback
* Json PR feedback
* Fix cryptography PNSE build
Michael Ketting [Tue, 1 Mar 2022 18:43:17 +0000 (19:43 +0100)]
Improve nullability for TypeConverter.CanConvertTo (#63874)
The nullability of parameter 'destinationType' in
TypeConverter.CanConvertTo(...) was changed from
not-nullable to nullable during the development of .NET 6.
Since a destination type supported by this TypeConverter
can never be null, a NotNullWhenAttribute is added to the
'destinationType' parameter when the result value of
TypeConverter.CanConvertTo(...) is 'true'.
Fix #63186
Bruce Forstall [Tue, 1 Mar 2022 18:20:06 +0000 (10:20 -0800)]
Fix libraries GCStress pipeline (#65924)
* Remove reference to deleted setup-stress-dependencies.cmd/sh
Automatically download and copy coredistools.dll to the libraries testhost.
* Remove reference to setup-stress-dependencies.cmd/sh scripts
This is in the libraries gcstress pipeline.
It is no longer necessary.
* Set a huge timeout for GCStress
Lakshan Fernando [Tue, 1 Mar 2022 17:31:05 +0000 (09:31 -0800)]
Native aot trim annotations experiment (#65816)
* Add nativeaot trim annotations experiment
* Fix mono libraries
* Update src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* FB on attribute message
* FB
* missed nativeaot message change
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Ankit Jain [Tue, 1 Mar 2022 16:37:11 +0000 (11:37 -0500)]
[wasm] Fix a race condition in adding payloads for helix (#65995)
* [wasm] Fix a race condition in adding payloads for helix
The issue shows up only in Wasm.Build.Tests for the
`TestUsingWorkloads!=true` case, as `clang --version` failing with:
```
/datadisks/disk1/work/
A0100914/p/build/emsdk/upstream/bin/clang: error while loading shared libraries: libLLVM-13git.so: cannot open shared object file: No such file or directory (TaskId:231)
```
For this non-workloads testing case, we copy `emscripten` from the
system copy to the git checkout. And then use that directory for the
payload.
The build logs show that the missing file (`libLLVM-13git.so`) does get
copied as part of copying `/usr/local/emscripten/emsdk` to
`$(RepoRoot)/src/mono/wasm/emsdk`. But the file, and a few others seem
to be missing in the final helix payload.
We add `emsdk` to the payload for target path `build/emsdk`.
But a recent change also added `node` for this case with a target path
`build/emsdk/node`, with an overlapping path with `build/emsdk`. I
believe this is causing an issue where these directories are being
processed in parallel, and cause some files get missed.
This commit:
1. Add `node` only when needed (skip WBT for example);
2. Use a non-overlapping path for `node`, `build/emsdk-node`.
Fixes https://github.com/dotnet/runtime/issues/65956
* Change `_HelixLocalNodePath` evaluation order
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
Peter Sollich [Tue, 1 Mar 2022 16:34:00 +0000 (17:34 +0100)]
Optimize clear_brick_table. (#65837)
I observed that the inlined call to clear_brick_table in clear_region_info took more CPU samples than necessary - it's about 7x faster to call memset than it is to code a straighforward loop.
Adam Sitnik [Tue, 1 Mar 2022 13:15:47 +0000 (14:15 +0100)]
add missing GC.SuppressFinalize(this) to FileStream.DisposeAsync (#65899)
* add missing GC.SuppressFinalize(this) to FileStream.DisposeAsync
* DerivedFileStreamStrategy.DisposeAsync does not need to call _fileStream.BaseDisposeAsync, as FileStream.DisposeAsync calls Dispose(false) now
Eirik Tsarpalis [Tue, 1 Mar 2022 13:08:27 +0000 (13:08 +0000)]
Make ObjectConverter use ConverterStrategy.Object (#65748)
* Use ConvereterStrategy.Object in ObjectConverter
* address feedback
Stephen Toub [Tue, 1 Mar 2022 11:44:08 +0000 (06:44 -0500)]
Fix name of regex unit tests project (#65990)
Zoltan Varga [Tue, 1 Mar 2022 06:59:52 +0000 (01:59 -0500)]
[mono][wasm] Allow AOTing methods with catch/filter clauses. (#64867)
* [mono][wasm] Allow AOTing methods with catch clauses.
This works as follows:
* During EH, when a catch clause is found in an AOTed method, the
EH state is saved into TLS and a c++ exception is thrown.
* The C++ exception is caught by the AOTed method, and the landing
pad code calls mono_llvm_resume_exception_il_state ().
* That call will run the catch clause and the rest of the method
code using the interpreter, storing the possible return value
back into the AOTed method's stack frame.
* After the call, the method skips the rest of its code, and
returns immediately to its caller.
* Fix console bench sample.
* Fix landing pads.
* Fix issues.
* Add support for filter clauses.
* Implement all wasm return conventions.
* Fix arg/local write back.
* Avoid throwing a c++ exception from do_jit_call () so the caller can clean up the interpreter stack.
* Disable AOTing some more assemblies on CI.
* Rename llvmonly EH functions to mini_llvmonly_ for clarity.
* Improve unwinding through interpreter frames.
Instead of throwing a c++ exception from mono_handle_exception ()
when an exception is caught in AOTed code, set context->has_resume_state,
so the intepreter will normally unwind until exiting interpreted code.
Then throw the c++ exception after the call to interp_exec_method ()
to unwind through the runtime code and the AOTed frames
which can't handle the exception.
Vladimir Sadov [Tue, 1 Mar 2022 06:51:51 +0000 (22:51 -0800)]
null-check the redirect context before using. (#65910)
* null-check the redirect context before using.
* tweak the comment
* do not allocate context if InitializeContext has unexpected results.
Jan Kotas [Tue, 1 Mar 2022 05:49:50 +0000 (21:49 -0800)]
Add AssemblyName overload for ILVerify.IResolver.Resolve method (#65905)
Fixes #65573
Bruce Forstall [Tue, 1 Mar 2022 05:47:41 +0000 (21:47 -0800)]
Fix GC hole with multi-reg local var stores (#65916)
* Fix GC hole with multi-reg local var stores
Change #64857 exposed an existing problem where when generating code
for a multi-reg GT_STORE_LCL_VAR, if the first register slot was not
enregistered, but the second or subsequent slots was, and those non-first
slots contained GC pointers, we wouldn't properly add those GC pointers
to the GC tracking sets. This led to cases where the register lifetimes
would be killed in the GC info before the actual lifetime was complete.
The primary fix is to make `gtHasReg()` handle the `IsMultiRegLclVar()`
case. As a side-effect, this fixes some LSRA dumps that weren't displaying
multiple registers properly.
There are about 50 SPMI asm diffs on win-arm64 where register lifetimes
get extended, fixing GC holes.
I also made `GetMultiRegCount()` handle the `IsMultiRegLclVar()` case.
I made a number of cleanup changes along the way:
1. Fixed two cases of calling `gcInfo.gcMarkRegSetNpt` with regNumber, not regMaskTP
2. Marked some functions `const`
3. Improved some comments
4. Changed "ith" to "i'th" in comments which still doesn't read great,
but at least I'm not left trying to parse "ith" as an English word.
5. Use `OperIsScalarLocal()` more broadly
6. Renamed `gtDispRegCount` to `gtDispMultiRegCount` to make it clear
it only applies to the multi-reg case.
Fixes #65476.
* Update src/coreclr/jit/gentree.cpp
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Elinor Fung [Tue, 1 Mar 2022 00:57:47 +0000 (16:57 -0800)]
Move diagnostics for invalid GeneratedDllImportAttribute usage to generator instead of analyzer (#65915)
Stephen Toub [Mon, 28 Feb 2022 22:55:35 +0000 (17:55 -0500)]
Add regex "unit tests" test project (#65944)
* Add regex "unit tests" test project
This follows the convention used by the networking tests, which typically have two distinct test projects per library: functional tests and unit tests. The former are what we typically refer to as our tests for a library, whereas the latter build product source into the test project in order to directly validate internals (an alternative to this is to use InternalsVisibleTo, but that negatively impacts trimming and makes it more challenging to maintain a property boundary for the functional tests). All the existing tests are moved unedited into the FunctionalTests, and a new UnitTests project is added with some initial tests for the RegexTreeAnalyzer code. The generator parser tests were also consolidated into the functional tests, as there's no longer a good reason for those few tests to be separate.
I fixed a few bugs in RegexTreeAnalyzer as a result. In particular, we were over-annotating things as potentially containing captures or backtracking because in the implementation we were using the lookup APIs meant to be used only once all analysis was complete. This doesn't have a negative functional impact, but it does negatively impact perf of compiled / source generator, which then generate unnecessary code. We were also incorrectly conflating atomicity conferred by a grandparent with atomicity conferred by a parent; we need MayBacktracks to reflect only the atomicity directly contributed by a node, not by its parent's influence, as we need the parent to be able to understand whether the child might backtrack.
* Add some unit tests for RegexFindOptimizations
* Address PR feedback
Kevin Jones [Mon, 28 Feb 2022 22:11:18 +0000 (17:11 -0500)]
Fix minor random bias
This corrects two uses of RandomNumberGenerator that resulted in slight
bias in their results.
Viktor Hofer [Mon, 28 Feb 2022 20:13:22 +0000 (21:13 +0100)]
Make Is*Project properties unambiguous and improve IsGeneratorProject detection (#65896)
* Make Is*Project properties unambiguous
Currently these properties exist which categorize projects:
- IsReferenceAssembly: The project's parent directory is 'ref'
- IsGeneratorProject: The project's parent directory is 'gen'
- IsTestProject: The project is located somewhere under a '/tests/'
directory and the project name's suffix is either
'.Tests' or '.UnitTests'.
- IsTrimmingTestProject: Same as IsTestProject but the project name's
suffix is '.TrimmingTests'.
- IsTestSupportProject: The project is located somewhere under a
'/tests/' directory and the above IsTestProject
property is false.
- UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK
- UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK
- IsRuntimeAssembly: True when all above is false
- IsSourceProject: True when the project's parent directory is 'src'
The IsRuntimeAssembly and IsSourceProject properties meanings are
ambiguous and the property names aren't consistent (IsReferenceAssembly
vs IsGeneratorProject).
I'm changing the above to the following:
- **IsReferenceSourceProject: The project's parent directory is 'ref'
or the parent of the parent directory is 'ref'**
- IsGeneratorProject: The project's parent directory is 'gen'
- IsTestProject: The project is located somewhere under a '/tests/'
directory and the project name's suffix is either
'.Tests' or '.UnitTests'.
- IsTrimmingTestProject: Same as IsTestProject but the project name's
suffix is '.TrimmingTests'.
- IsTestSupportProject: The project is located somewhere under a
'/tests/' directory and the above IsTestProject
**and IsTrimmingTestProject** props are false.
- UsingMicrosoftNoTargetsSdk: The project uses the NoTargets msbuild SDK
- UsingMicrosoftTraversalSdk: The project uses the Traversal msbuild SDK
- IsSourceProject: **True when all above is false.**
* React to PR feedback
Steve Sanderson [Mon, 28 Feb 2022 16:43:03 +0000 (16:43 +0000)]
Update WASI-enabled runtime to support running ASP.NET Core (#65888)
Viktor Hofer [Mon, 28 Feb 2022 16:35:51 +0000 (17:35 +0100)]
Update GenAPI usage and code clean-up (#65887)
* Update GenAPI usage and code clean-up
Parker Bibus [Mon, 28 Feb 2022 03:30:29 +0000 (21:30 -0600)]
[PERF][MAUI] Add Maui version info to stored data. Runtime Side (#65800)
* Setup pipeline for testing.
* First test with the Maui Version.
* Remove perf-job parameter version typo.
* Try another way of doing the output variable.
* Third times the charm?
* Add a second test for two to be done in one run.
* Fix variable problem with xplat-setup.yml
* Third time was not the charm...
* Try another setup.
* Only include one of the tests as the perf setup is failing potentially due to this.
* Try 2 variable attempts and write out potential get methods.
* Remove failed thing and split them to all be seperate and always run.
* Move variables into the second job stuff.
* Won't run when specified under the job parameters.
* Try hardcoded values to see if it is the output or input that seems to not be connected properly.
* Try new variable format.
* Missed bracket that wasn't found until after most of the way through.
* Maui installs are failing, work around this for variable testing.
* Need to keep mono build enabled.
* Revert "Need to keep mono build enabled."
This reverts commit
ff32e46c080efb8a103907de6dd1a13cd0d1be04.
* Revert "Maui installs are failing, work around this for variable testing."
This reverts commit
6dbf6b0ee26d8047d14be86e12e56872c7dab7cc.
* Temp fix for workload install.
* Removed breaking variable test as the new format works along with changing to only having one variable for testing. This should allow us to have access to the maui version in the perf setup for testing.
* Full run test. Still using perf repo fork.
* Add comment explaining RetrievedMauiVersion.
* Add maui version to the iOS runs.
* Undo testing changes to prepare for merge once install is working again.
Jeff Handley [Mon, 28 Feb 2022 03:21:49 +0000 (19:21 -0800)]
Update stale comments that reference GitHub issues (#65932)
* Update comment in BinaryFormatterWriter to indicate a NRT bug won't be fixed
* Update comment to reflect known issue in .NET Framework
* Update comment to indicate a known issue
SingleAccretion [Sun, 27 Feb 2022 15:52:50 +0000 (18:52 +0300)]
ZeroObj assertions (#65257)
It is the case that the IR supports the "zero" node for structs
in two positions: on the RHS of an assignment (InitBlk form) and
under a return, in case the ABI return type is scalar.
Meanwhile, assertion propagation "blindly" replaced structs with
zeroes, and so workarounds had to be applied in order for the IR
to remain valid, in the form of the NO_CSE flag, applied either
explicitly (multi-reg returns) or implicitly (ADDR(LCL) created by
"impNormSturctVal" for call args).
This was:
a) A CQ problem in cases where we forgot to clear the NO_CSE flag
when the node's parent was updated, say after inlining.
b) A burden for enabling struct LCL_VAR arguments, as one had to
remembered to mark them NO_CSE in all situation.
This change fixes the problem by deleting propagation of zeroes for
local uses, instead propagating them as part of their parents (ASGs
and RETURNs).
This has the CQ benefits of not being affected by stale NO_CSEs and
the drawback of not participating in the "chained" propagation, where
we first copy-propagated something, and then zero-propagated into the
new local as well. These cases seem rather rare, so I decided not to
spend TP on fixing them by looking at the copy assertions in the new
code.
This change also deletes the zero propagation code for SIMDs. It was
only useful in cases we had a promoted SIMD field that was zero-inited
via an InitBlk on the parent struct. That promotion code was (and is)
creating nodes that look like integral constants, except they are of
TYP_SIMD. We should delete that form and use proper SIMD zero nodes
instead, and design the propagation story for them separately.
Stephen Toub [Sun, 27 Feb 2022 03:20:46 +0000 (22:20 -0500)]
Change regex source generator to emit returns rather than jumps to NoMatch (#65599)
Jose Perez Rodriguez [Sat, 26 Feb 2022 15:25:25 +0000 (07:25 -0800)]
Adding Regex.IsMatch(Span) and RegexRunner.Scan() methods (#65473)
* Adding Regex.IsMatch(Span) and RegexRunner.Scan() methods
* Addressing some PR Feedback
* Fixing case where span-based APIs are called from a precompiled regex and adding a test for it.
* Adding Tests for IsMatch span overload
* Refactor Run<TState> and Run to share centralized logic
* Emit IsBoundary and IsECMABoundary instead of exposing them.
* Address Emitter changes feedback.
* Addressing PR Feedback.
* Addressing most of the PR comments
* Fix issue where runtextbeg and length do not match the size of the input
* Add Precompiled tests for all overloads of methods.
* Fix precompiled test failing in non-Windows due to new lines.
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Addressing more PR Feedback
* Fix protected Scan method
* Addressing feedback and adding more tests
* Fix few failing tests in Mono runtime
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Alexander Köplinger [Sat, 26 Feb 2022 10:27:55 +0000 (11:27 +0100)]
[mono] Delete unicode-data.h and related code, cleanup unused eglib functions (#65751)
This allows us to remove a bunch of huge tables that weren't actually needed.
Removes support for setting MONO_EXTERNAL_ENCODINGS env var which is discouraged.
Also removes the code for .mdb debug symbol support which was already disabled everywhere.
Andy Ayers [Sat, 26 Feb 2022 03:32:05 +0000 (19:32 -0800)]
JIT: OSR jitstress fixes; enable struct promotion (#65903)
Fix OSR jitstress failures by disabling STRESS_LCL_FLD for two cases:
* for Tier0 methods with patchpoints (because patchpoint info generation
does not produce the right offsets when locals are padded)
* for OSR locals in OSR methods (because they live on the Tier0 frame and
so can't have their storage altered.
Enable struct promotion for OSR locals. In most cases this ends up being
dependent promotion. Enabling independent promotion will take more work.
Aaron Robinson [Sat, 26 Feb 2022 02:38:27 +0000 (18:38 -0800)]
`GetTypeFields` should return `ELEMENT_TYPE_BYREF`. (#65880)
* GetTypeField should return ELEMENT_TYPE_BYREF.
* Remove setting of token2 in all cases. This value is not used in any
scenario and therefore is more confusing than helpful. Add a comment about
the expectations of the returned values.
Maxim Lipnin [Sat, 26 Feb 2022 02:36:04 +0000 (05:36 +0300)]
Disable System.IO.Tests.FileStream_DisposeAsync.DisposeAsyncFlushes test (#65892)
Parker Bibus [Sat, 26 Feb 2022 02:17:11 +0000 (20:17 -0600)]
[PERF][MAUI] Update Startup scenarios (#65911)
* Setup pipeline and setup for testing.
* Updated scenario names for new scenario name setup and added no animation tests.
* Revert "Setup pipeline and setup for testing."
Jeff Handley [Sat, 26 Feb 2022 01:16:11 +0000 (17:16 -0800)]
Generate fabricbot config for the machinelearning repo (#65875)
Stephen Toub [Thu, 24 Feb 2022 03:50:32 +0000 (22:50 -0500)]
Overhaul SymbolicRegexMatcher to avoid DFA perf regressions from NFA changes
This does a few things:
- The previous changes for Antimirov changed the representation from being represented as a DfaMatchingState to instead being a list of states. Unfortunately, this came at the expense of a significant increase in overhead for the DFA mode. This commit melds the old and new design, by still using a CurrentState struct that can be either a DFA state or an NFA state, but with a simplified representation that lacks any processing. The processing is left to two separate structs that implement static abstract interface methods, as was previously done, using that to provide streamlined, generic-specialized processing for the DFA path.
- Overhauled how we switch from DFA mode to NFA mode. Previously, the builder would store whether we were in NFA mode, and any matching after it had been switched over immediately started in NFA mode. We now always start in DFA, and only switch over to NFA if we try to create a new state but doing so would exceed the graph size constraint.
- Overhauled how we handle the outer/inner loop logic. Previously we wanted to remain in a tight inner loop and so would use some "leeway" to allow us to go beyond the graph size constraint in order to avoid having to check too frequently whether we'd exceeded that size. Now, the transition function itself returns whether we need to exit out to the outer loop in order to upgrade from DFA to NFA, and until/unless that happens, we can stay in the inner loop.
- Avoids inlining huge amounts of NFA code that can result in worse DFA code
- Renamed Brzozowski and Antimirov to DFA and NFA.
- Added a lot of comments to SymbolicRegexMatcher
- Fixes "watchdog" issue with captures
- A few other renames / cleanups.
Margus Veanes [Sun, 20 Feb 2022 18:51:32 +0000 (10:51 -0800)]
Improvements to Antimirov mode and misc small formatting edits
Tomas Weinfurt [Sat, 26 Feb 2022 00:36:47 +0000 (16:36 -0800)]
add RID for Ubuntu 22.04 (#65483)
Parker Bibus [Fri, 25 Feb 2022 23:02:46 +0000 (17:02 -0600)]
[Perf][Maui] Set only android-arm64 to be built for Maui (#65747)
* Set android to only build one RID (android-arm64).
* Update the mv file path for the android apk.
* Add --self-contained to get rid of android build warning.
* Add comment about dotnet restore being done before publish.
Parker Bibus [Fri, 25 Feb 2022 22:07:58 +0000 (16:07 -0600)]
[PERF][MAUI]Maui Install Workaround Fix (#65904)
* Test a potential fix for the maui install failures.
* Only run the app build.
* Reenable rest of the pipeline.
Juan Hoyos [Fri, 25 Feb 2022 22:06:33 +0000 (14:06 -0800)]
Remove usages of native bootstrapping (#65901)
* Remove usages of native bootstrapping
* Make sure cmake is in the path for mono wasm builds
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Stephen Toub [Fri, 25 Feb 2022 21:43:06 +0000 (16:43 -0500)]
Centralize regex tree analysis for atomic/capture/backtracking detection (#65734)
We currently either guess at some of this state based on the immediate surrounding nodes (e.g. whether the immediate child backtracks) or we do potentially-expensive walks each time we need to check (e.g. walking all ancestors until root to determine whether a given node is to be considered atomic). This changes the code to do a pass over the graph to compute the relevant information, which can then be used by the code generators any time they need to access that information. This provides the code with faster and more accurate answers.
Tomáš Rylek [Fri, 25 Feb 2022 20:42:58 +0000 (21:42 +0100)]
Reduce TypeGeneratorTests log spew to 1% of its previous size (#65871)
As JanV noticed during an independent investigation,
TypeGeneratorTests historically used to produce an enormous amount
of stdout spew due to individually reporting the details of all
passing test cases; for the entire set of 1501 tests the total
size of the spew was about 150 MB. In combination with the change
to capture stdout spew in the xml test reports this effectively
canceled out all previous wins achieved via test merging - in fact,
the tests became twice as slow compared to before the merging.
This modification only reports mismatches i.e. failures where we
don't receive the expected answer in one of the test cases. This
reduces the total spew from 150 MB to just over a megabyte and
restores the perf improvement achieved via test merging.
Thanks
Tomas
Tomáš Rylek [Fri, 25 Feb 2022 20:42:39 +0000 (21:42 +0100)]
Mark architecture-specific tests with ConditionalFact attributes (#65862)
This change adds initial provisions for platform detection similar
to library logic to CoreCLRTestLibrary and marks a few
architecture-conditional tests with ConditionalFact attributes.
While I must admit I'm not happy about the IL representation of
the ConditionalFact attributes, it's technically using the same
representation as the library tests do and it only affects a handful
of tests. During consolidation of the remaining tests we'll
continue working on an easier solution even though it may require
diverging further away from Xunit.
I'm not yet removing the CLRTestTargetUnsupported clauses from
the corresponding project files, that can only be done after
switching these tests over to use the merged wrappers (my next
change) as the legacy XUnit wrapper generator (in particular the
test execution script generator) relies on those properties.
Thanks
Tomas
Elinor Fung [Fri, 25 Feb 2022 15:59:26 +0000 (07:59 -0800)]
[wasm] Add disabled tests to ProjectExclusions (#65877)
Ilona Tomkowicz [Fri, 25 Feb 2022 14:01:01 +0000 (15:01 +0100)]
[wasm][debugger] Run debugger test in codespace (#64746)
* Tmp change for debugging.
* Added chromium, needed for running debugger tests.
* Corrected line breaking, removed suso.
* Removed update duplicate.
* Prevent regex on null.
* Set special env variable only for containers.
* Locally docker build crashes without it.
* Applied @eerhardt suggestion.
* Moved env assignment to a place that is executed by onCreateCommand.sh
* Revert accidential new line removal.
* Upgrade is unnecessary, works without it.
* Moved all logic to C# code.
* Remove duplicated line.
* Applied @thays's and @lewing's comments.
* Enabling @radical approach for chromium installation.
Co-authored-by: Ankit Jain <radical@gmail.com>
Aleksey Kliger (λgeek) [Fri, 25 Feb 2022 13:57:38 +0000 (08:57 -0500)]
[mono][hot reload] Fix sequence point logic for compiler-generated methods in updates (#65865)
* [tests] Pass PDB delta to ApplyUpdate
* extra tracing output
* Return 0 if a method has no sequence points
-1 means there was some kind of problem
0 means 0 sequence points
In particular for mono_ppdb_get_seq_points_enc a compiler-generated method might have 0 sequence points in the PDB delta, but we should consider that as ok, and not fall back to looking in the baseline image
* pass MONO_DEBUG=getn-seq-points to hot reload tests
For platforms where we use the remote executor, set the environment variable when starting the remote process.
For WASM, pass --setenv when building the project.
* fix whitespace
Egor Bogatov [Fri, 25 Feb 2022 12:04:02 +0000 (15:04 +0300)]
JIT: Range Checks for "(uint)i > cns" pattern (#62864)
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Simon Rozsival [Fri, 25 Feb 2022 09:52:08 +0000 (10:52 +0100)]
[Mono] Add SIMD intrinsic for Vector64/128 comparisons (#65128)
* Add vector comparison intrinsics
* Add EqualsAll and EqualsAny intrinsics
* Remove broken EqualsAny
* Fix EqualsAny
* Enable xequal also for arm64
* Fix xzero type
* Fix bad merge
* Add guards for invalid types
* Revert unrelated change
* Extract duplicate code blocks to a new function
* Fix EqualsAny
* Fix typo + code improvements
SingleAccretion [Fri, 25 Feb 2022 07:19:51 +0000 (10:19 +0300)]
Use SSA def descriptors in copy propagation (#65250)
* Use direct SSA defs in copy propagation
* Add asserts
Jan Kotas [Fri, 25 Feb 2022 05:57:13 +0000 (21:57 -0800)]
Cleanup fragile NGen leftovers (#65869)
Elinor Fung [Fri, 25 Feb 2022 01:44:54 +0000 (17:44 -0800)]
Add `StringMarshallingCustomType` to `GeneratedDllImportAttribute` (#65855)
Vladimir Sadov [Fri, 25 Feb 2022 01:23:22 +0000 (17:23 -0800)]
Do not copy XState other than AVX when redirecting for GC stress (#65825)
* Do not copy XState other than AVX
* #if defined(TARGET_X86) || defined(TARGET_AMD64)
* mask XState unconditionally
* Ensure XSTATE_MASK_AVX is set before calling EEGetThreadContext
* redundant supportsAVX, more clear comment
* PR feedback
Sven Boemer [Thu, 24 Feb 2022 22:58:58 +0000 (14:58 -0800)]
Disable failing EventLogSession.GetProviderNames test (#64780)
* Disable failing EventLogSession.GetProviderNames test
Jeremy Koritzinsky [Thu, 24 Feb 2022 22:20:27 +0000 (14:20 -0800)]
Swap out a Debug.Fail for a more graceful diagnostic failure. (#65861)
Trayan Zapryanov [Thu, 24 Feb 2022 21:06:13 +0000 (23:06 +0200)]
Use ValueStringBuilder to fix allocations in ToString() methods of XdsDateTime and XsdDuration (#64868)
* Use ValueStringBuilder to fix allocations in XdsDateTime struct method ToString()
* Use ValueStringBuilder in XsdDuration
* Fix failing tests
* Address feedback
* Address feedback 2
* few more brackets rmoved
* Use previous methods for formatting into 2/4/X digits as they are faster than AppendSpanFormattable
Co-authored-by: Traian Zaprianov <Traian.Zaprianov@docuware.com>
Jeff Handley [Thu, 24 Feb 2022 20:48:52 +0000 (12:48 -0800)]
Move the fabricbot config files to the eng folder to avoid changes triggering CI (#65856)
Tom Deseyn [Thu, 24 Feb 2022 19:05:14 +0000 (20:05 +0100)]
NetworkAddressChange.Unix: fix error checking. (#65849)
Marek Fišera [Thu, 24 Feb 2022 18:54:31 +0000 (19:54 +0100)]
[wasm] Refactor script to load NPM modules for NodeJS on Helix (#65774)
- Refactor script to load NPM modules for NodeJS on Helix to tests.wasm.targets.
- Move NODE_TLS_REJECT_UNAUTHORIZED=0 to LocalEchoServer.props.
Eirik Tsarpalis [Thu, 24 Feb 2022 18:48:07 +0000 (18:48 +0000)]
Fix Queryable-to-Enumerable overload mapping logic (#65569)
* Fix Queryable-to-Enumerable overload mapping logic
* fix linker warnings
* address feedback
* use strict order when calculating maximal elements
SingleAccretion [Thu, 24 Feb 2022 15:58:18 +0000 (18:58 +0300)]
Handle direct addresses for statics in `IsFieldAddr` (#64846)
* DEBUG-ONLY: FieldInfo
Allows this change to be tested via SPMI.
* Handle direct addresses in IsFieldAddr
* Always use NotAField in IsFieldAddr
No diffs.
* Revert "DEBUG-ONLY: FieldInfo"
This reverts commit
b17817e0354a63319256a0fa0d21b74c2cfbf781.
Radek Zikmund [Thu, 24 Feb 2022 12:54:34 +0000 (13:54 +0100)]
Add support for sending CA names in handshake on Linux and OSX (#65195)
dotnet-maestro[bot] [Thu, 24 Feb 2022 12:49:02 +0000 (13:49 +0100)]
[main] Update dependencies from 10 repositories (#65504)
* Update dependencies from https://github.com/dotnet/icu build
20220216.2
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.3.22115.2 -> To Version 7.0.0-preview.3.22116.2
* Update dependencies from https://github.com/dotnet/runtime-assets build
20220216.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 7.0.0-beta.22115.1 -> To Version 7.0.0-beta.22116.1
* Update dependencies from https://github.com/dotnet/emsdk build
20220216.2
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-alpha.2.22111.1 -> To Version 7.0.0-preview.3.22116.2
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220216.1
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22115.3 -> To Version 7.0.0-preview1.22116.1
* Update dependencies from https://github.com/dotnet/arcade build
20220217.2
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22114.7 -> To Version 2.5.1-beta.22117.2
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220219.1
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22115.3 -> To Version 7.0.0-preview1.22119.1
* Update dependencies from https://github.com/dotnet/runtime build
20220220.1
runtime.native.System.IO.Ports , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , System.Text.Json , Microsoft.NET.Sdk.IL
From Version 7.0.0-preview.2.22113.2 -> To Version 7.0.0-preview.3.22120.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20220221.2
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.22078.3 -> To Version 1.0.0-prerelease.22121.2
* Update dependencies from https://github.com/dotnet/icu build
20220221.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.2.22081.1 -> To Version 7.0.0-preview.3.22121.1
* Update dependencies from https://github.com/dotnet/xharness build
20220221.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22114.1 -> To Version 1.0.0-prerelease.22121.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20220221.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 7.0.0-beta.22115.1 -> To Version 7.0.0-beta.22121.1
* Update dependencies from https://github.com/dotnet/emsdk build
20220221.1
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-alpha.2.22077.1 -> To Version 7.0.0-preview.3.22121.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20220221.2
runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
From Version 11.1.0-alpha.1.22114.2 -> To Version 11.1.0-alpha.1.22121.2
* Update dependencies from https://github.com/dotnet/arcade build
20220222.3
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22114.7 -> To Version 2.5.1-beta.22122.3
* Update dependencies from https://github.com/dotnet/icu build
20220222.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.2.22081.1 -> To Version 7.0.0-preview.3.22122.1
* Update dependencies from https://github.com/dotnet/emsdk build
20220222.1
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-alpha.2.22077.1 -> To Version 7.0.0-preview.3.22122.1
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20220222.2
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.2-alpha.0.22114.2 -> To Version 1.0.2-alpha.0.22122.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Maksym Koshovyi [Thu, 24 Feb 2022 12:45:45 +0000 (14:45 +0200)]
Fix nullability mismatch between `ref` and `src` in `Microsoft.Extensions.Caching.Abstractions` (#65804)
* Update PostEvictionDelegate.cs
* Fix GetOrCreateAsync
Stephen Toub [Thu, 24 Feb 2022 12:44:26 +0000 (07:44 -0500)]
Add [NotNullWhen(true)] to Enum.TryParse overloads (#65827)
Stephen A. Imhoff [Thu, 24 Feb 2022 12:43:27 +0000 (04:43 -0800)]
Add RegexGenerator to System.ComponentModel.TypeConverter. (#62325)
* Add RegGen to System.ComponentModel.TypeConverter.
Added to src, not to test (no test found)
* Change to targets generator enablement
* Correct RegGen for System.ComponentModel.TypeConverter
* Remove extra space
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
* Remove .NetF inclusion definition
* Remove implicit regex generator entrypoint
* Remove regex generator enabled variable target.
* Update eng/generators.targets
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
Radek Zikmund [Thu, 24 Feb 2022 12:33:34 +0000 (13:33 +0100)]
Unify reading from procfs to get network related information (#63696)
Throw NetworkInformationException instead of PNSE
Radek Zikmund [Thu, 24 Feb 2022 12:29:33 +0000 (13:29 +0100)]
Use SECPKG_ATTR_REMOTE_CERT_CHAIN to retrieve server cert during handshake (#65134)
This allows us to query peer cert even before Tls Handshake completes.
Ilona Tomkowicz [Thu, 24 Feb 2022 12:19:59 +0000 (13:19 +0100)]
[wasm][debugger] Optional param fix 56251 (#64970)
* Optional parameter fix.
* Working version of optional parameter support, requires refactoring.
* Refactored.
* Fixed failing tests.
* Simplified tests.
* @radical's parenthesis refactor.
Co-authored-by: Ankit Jain <radical@gmail.com>
* Add nullable tests, rename mixed params function.
* Applied @radical suggestions + fixed tests failing because of double separator.
* Capitalised params first letter, removed explicit getters.
* Applied @radical's and @lewing's comments where it was possible.
* Applied @radical's suggestions.
* Handle Linq with ParamsCnt = methodParamsCnt. OptionalParamsCnt not used anymore.
* Fix: previos commit worked only in tests, not in browser.
* Applied @radical's approach.
* Fixed ParamsInfo so that it will be loaded on demand only.
* Update src/mono/wasm/debugger/tests/debugger-test/debugger-evaluate-test.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Viktor Hofer [Sat, 12 Feb 2022 14:47:35 +0000 (15:47 +0100)]
Use TargetFramework singular for tests
Use TargetFramework instead of TargetFrameworks property whenever a
test project targets a single target framework only.
This avoid unnecessary outer builds and evaluations and makes the build
faster.
Viktor Hofer [Tue, 18 Jan 2022 15:07:01 +0000 (16:07 +0100)]
sfx+oob split, shim project refactoring, P2Ps
Split the build of shared framework and out-of-band projects so that
it's possible to just build the shard framework projects, which was
requested by the CLR teams. In the next infrastructure rollout, the
current "libs.ref+libs.src" subsets should be removed. Generate the
targeting pack with an incomplete (without shims) frameworklist as part
of the "libs.sfx" subset.
Build the shim projects after the shared framework and oob projects and
re-generate the targeting pack's frameworklist to include the shims.
Refactor the shims so that they aren't grouped anymore by generated &
manual. Instead group them by "ref" and "src" same as other libraries
in the tree which allows to reference the source project shims and read
from the ReferenceAssembly metadata.
Use ProjectReferences in traversal projects and shim projects instead
of named references that point to binplace directories (see graph below)
This allows to build parts of the product dynamically, i.e. the shim
projects, apicompat.proj, sfx.proj and oob.proj.
Viktor Hofer [Tue, 18 Jan 2022 15:03:50 +0000 (16:03 +0100)]
Move ApiCompat files into own directory
Peter Sollich [Thu, 24 Feb 2022 11:16:22 +0000 (12:16 +0100)]
Equalize promoted (#64206)
I have observed that in server GC scenarios, the amount of promoted memory is often very uneven between heaps, which leads to suboptimal work distribution between server GC threads.
The PR introduces a new method equalize_promoted_bytes that attemps to even out the promoted memory between heaps by moving regions from heaps with lots of promotion of heaps with less promotion.
The algorithm used removes regions from heaps that have more than average promotion. These surplus regions are arranged into size classes by the amount of promoted memory in them. The heaps are also arranged into size classes by how much their promoted memory is short of the average promoted memory per heap.
Then we repeatedly move the surplus region with the most promoted memory to the heap with the biggest deficit. If the heap still has a deficit, it is reconsidered under its new deficit size class. Otherwise, it now has average or more promoted memory and is removed from further consideration.
Because regions may now move between heaps, it is no longer true that the finalization queue entry for an object is always on the same heap as the object itself. This necessitated moving the call to finalize_queue->UpdatePromotedGenerations to a later point in time when all threads have finished updating the final generation for a region.
Peter Sollich [Thu, 24 Feb 2022 10:17:16 +0000 (11:17 +0100)]
Changes to reduce committed memory: (#65367)
* Changes to reduce committed memory:
- Be more careful about estimating what is needed in the future
- Decommit regions that haven't been used in 20 GCs
- Keep regions sorted by decreasing commit size and increasing age
- Insturmentation enhancements
* Address code review feedback:
- optimize add_region_in_descending_order to search backwards if the region to be added is not fully committed
- adjust dprintf levels
- fix formatting issues
- made merge_sort_by_committed_and_age more efficient
- fix comment to use symbolic constant instead of number
- added new helper generation_start_segment_rw