platform/upstream/dotnet/runtime.git
4 years agoAdd more WASM Substitutions (#37744)
Marek Safar [Thu, 18 Jun 2020 22:21:32 +0000 (00:21 +0200)]
Add more WASM Substitutions (#37744)

* Add more WASM Substitutions

* Remove internal method

4 years agoFix comment in XmlStreamConfigurationProvider (#38084)
lindexi [Thu, 18 Jun 2020 21:42:10 +0000 (05:42 +0800)]
Fix comment in XmlStreamConfigurationProvider (#38084)

4 years agoFix multi-reg temporary copy (#38052)
Carol Eidt [Thu, 18 Jun 2020 21:38:57 +0000 (14:38 -0700)]
Fix multi-reg temporary copy (#38052)

If we need to insert a COPY node to signify a temporary copy of field of a multi-reg lclVar, we need to set the appropriate last use bit.

Fix #37830

4 years agoOptimize memory allocations in ActivitySource (#38064)
Tarek Mahmoud Sayed [Thu, 18 Jun 2020 21:16:05 +0000 (14:16 -0700)]
Optimize memory allocations in ActivitySource (#38064)

* Optimize memory allocations in ActivitySource

* revert back  using anonymous methods

* remove empty line

* Address the feedback

4 years agoAlign some Console properties on iOS/Android/WASM with other Unix implementations...
Maxim Lipnin [Thu, 18 Jun 2020 20:54:46 +0000 (23:54 +0300)]
Align some Console properties on iOS/Android/WASM with other Unix implementations (#38088)

4 years agoMerge pull request #37976 from steveharter/TechEmPower
Steve Harter [Thu, 18 Jun 2020 20:52:00 +0000 (15:52 -0500)]
Merge pull request #37976 from steveharter/TechEmPower

Perf improvements mostly for small or value-type POCOs

4 years agoFix infinite loop for UOH allocations with hardlimit in Server GC (#38071)
Maoni Stephens [Thu, 18 Jun 2020 20:50:58 +0000 (13:50 -0700)]
Fix infinite loop for UOH allocations with hardlimit in Server GC (#38071)

In Server GC when we allocate UOH objects and decide whether we should retry
when hardlimit is in effect we have an inconsistency between should_retry_other_heap
and virtual_commit. The former uses current_total_committed - current_total_committed_bookkeeping while the latter uses current_total_committed.
This causes us to be in a situation where we may have an infinite loop
since the allocate_uoh says to retry but virtual_commit fails.

4 years agoMoving StandardOleMarshalObject type down to corelib (#38072)
Anirudh Agnihotry [Thu, 18 Jun 2020 20:43:29 +0000 (13:43 -0700)]
Moving StandardOleMarshalObject type down to corelib (#38072)

* moving coMarshal type down

* add unix implementation

* setting default value for out params in unix

* remove unsafe

4 years agonew GetGCMemoryInfo API (#37879)
Maoni Stephens [Thu, 18 Jun 2020 19:50:49 +0000 (12:50 -0700)]
new GetGCMemoryInfo API (#37879)

* new GetGCMemoryInfo API

This implements the new GetGCMemoryInfo API that provides much more info than the one we shipped in 3.0. Also added an overload to query GCs by kind - ephemeral, full blocking or BGC, to facilitate not having to keep a really small sampling interval but can still get the kinds of GCs that happen very infrequently.

Most of the changes inside GC are the following -

All the info is updated at the end of a GC with the exception of BGC which needs special care. We maintain 2 BGC info data structures and one could be in the process of getting updated and if the user requests either BGC info or the last GC info which is also a BGC, we would return the one that's complete. See comments in code for a more detailed explanation.

Fill in the after size data for all generations instead of just the affected generations.

Timing info recording -

+ Changed the GC time recording from ms to us. Previously we did the timing analysis with events which also carry their own high res timestamps so in GC using ms is good enough. But now since we are returning the timing info we want to record it in us instead of ms.
+ Consolidated when we get end_gc_time. It was not including all of the GC work before (eg, decommit eph seg). And moving it to do_post_gc makes it easier for getting the GC info.
+ Not including the EE restart time for blocking GCs - the reason being restart takes very little time and by the time we get to the actual RestartEE the GC settings could be changed and it's not worth the effort to wait till RestartEE at which point we have to spend more effort to figure out which GC to attribute it to.
+ Maintain the running % Pause time in GC info.

4 years ago[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#38082)
dotnet-maestro[bot] [Thu, 18 Jun 2020 18:55:16 +0000 (11:55 -0700)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#38082)

* Update dependencies from https://github.com/dotnet/arcade build 20200616.1

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.XUnitConsoleRunner
 From Version 5.0.0-beta.20309.1 -> To Version 5.0.0-beta.20316.1

* Update dependencies from https://github.com/mono/linker build 20200617.2

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20317.1 -> To Version 5.0.0-preview.3.20317.2

* Update dependencies from https://github.com/dotnet/xharness build 20200618.2

Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20315.3 -> To Version 1.0.0-prerelease.20318.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoAdd a test and other misc feedback
Steve Harter [Thu, 18 Jun 2020 18:27:34 +0000 (13:27 -0500)]
Add a test and other misc feedback

4 years agoAdd hostfxr.h and coreclr_delegates.h to Microsoft.NETCore.DotNetAppHost (#38062)
Sean Hall [Thu, 18 Jun 2020 17:52:05 +0000 (03:52 +1000)]
Add hostfxr.h and coreclr_delegates.h to Microsoft.NETCore.DotNetAppHost (#38062)

4 years agoAdd trimming tests for System.Private.Xml changes (#38068)
Layomi Akinrinade [Thu, 18 Jun 2020 17:45:26 +0000 (10:45 -0700)]
Add trimming tests for System.Private.Xml changes (#38068)

* Add trimming tests for System.Private.Xml changes

* Address review feedback

4 years agoDelegate cmake version check to cmake when possible (#37447)
Adeel Mujahid [Thu, 18 Jun 2020 16:47:34 +0000 (19:47 +0300)]
Delegate cmake version check to cmake when possible (#37447)

* Delegate cmake version check to cmake when possible
There are two kinds of old cmake versions:
* <ins>v3.13.0 onwards that support `-B` command-line option:</ins>
  cmake will print the error message based on `cmake_minimum_required`
  specified.
* <ins>< v3.13.0, which do not have `-B` option:</ins> cmake will fail
  before the version check with an obscure message, quite implicitly
  indicating that it doesn't understand `-B`. For that we have an
  up-front check just for `-B` option, covering the existence of cmake
  as well.

* Update eng/native/build-commons.sh

Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
4 years agoUse Array.Empty in CompositeFileProvider (#38086)
lindexi [Thu, 18 Jun 2020 14:55:03 +0000 (22:55 +0800)]
Use Array.Empty in CompositeFileProvider (#38086)

4 years agoEnable the multifolder test on ARM64 (#38081)
Tomáš Rylek [Thu, 18 Jun 2020 14:25:53 +0000 (16:25 +0200)]
Enable the multifolder test on ARM64 (#38081)

The PE issues that were causing issues in the multifolder test
on ARM64 have been fixed with

https://github.com/dotnet/runtime/pull/37518

so I'm reenabling the temporarily disabled test.

4 years agoFix HTTP/2 race condition with concurrent window update (#38065)
Stephen Toub [Thu, 18 Jun 2020 13:13:53 +0000 (09:13 -0400)]
Fix HTTP/2 race condition with concurrent window update (#38065)

If a window update is received from the server between the time when we were creating an Http2Stream (initializing its available credit with the current initial window size) and when we stored the stream into the  streams dictionary, we might miss out on updating the stream's window size, which could in turn lead to stalls.

4 years agoOptimize reset_memory to only kick in for low memory situations. (#37894)
Peter Sollich [Thu, 18 Jun 2020 12:29:19 +0000 (14:29 +0200)]
Optimize reset_memory to only kick in for low memory situations. (#37894)

This will save time both in VirtualReset and later in page faults.

4 years ago[mono] Don't contribute to inline_const if ctor has AggressiveInlining (#37544)
Egor Bogatov [Thu, 18 Jun 2020 12:24:36 +0000 (15:24 +0300)]
[mono] Don't contribute to inline_const if ctor has AggressiveInlining (#37544)

* don't contribute to inline_const if ctor has [MethodImpl(MethodImplOptions.AggressiveInlining)]

* reformat

* inverse condition

4 years agoAdd linker annotations to System.Runtime (#38021)
Michal Strehovský [Thu, 18 Jun 2020 11:59:38 +0000 (13:59 +0200)]
Add linker annotations to System.Runtime (#38021)

4 years agoNetworking stress tests moved out of Hosted pool (#35011)
Alexander Nikolaev [Thu, 18 Jun 2020 11:50:09 +0000 (13:50 +0200)]
Networking stress tests moved out of Hosted pool (#35011)

HttpStress and SslStress tests moved off hosted pool to different queues.

Note: HttpStress runs are failing but it's actual test code or prod code issue which will be investigated. Infrastructure-wise everything looks good now.

Fixes #34780

4 years ago[wasm] Disable some existing System.Console library tests throwing PNSE (#37975)
Maxim Lipnin [Thu, 18 Jun 2020 11:41:38 +0000 (14:41 +0300)]
[wasm] Disable some existing System.Console library tests throwing PNSE (#37975)

* [wasm] Disable existing System.Console library tests which fail on WASM with PlatformNotSupportedException; add several tests to reflect WASM PNSE-behavior

* Address feedback

4 years agoCG2 ARM64 composite run; PE fixes for Windows ARM64 (#37518)
Tomáš Rylek [Thu, 18 Jun 2020 11:14:05 +0000 (13:14 +0200)]
CG2 ARM64 composite run; PE fixes for Windows ARM64 (#37518)

(*) OS loader apparently doesn't like zero-length relocation sections;

(*) The executable doesn't run without the NxCompatible
DllCharacteristics flag.

Thanks

Tomas

4 years agoFix typo (#38074)
Maxim Lipnin [Thu, 18 Jun 2020 10:26:44 +0000 (13:26 +0300)]
Fix typo (#38074)

4 years agoAddress CborReader/Writer API review feedback (#37956)
Eirik Tsarpalis [Thu, 18 Jun 2020 08:38:56 +0000 (09:38 +0100)]
Address CborReader/Writer API review feedback (#37956)

* fix documentation issues

* simplify checks in PeekStateCore

* fix naming issue in CborReader

* apply dirty tricks

* rename CborConformanceLevel to CborConformanceMode

* change default conformance mode to strict

* add cls compliance attributes to offending members

* add CborWriter.Encode(Span<byte>) method

* make CborWriter.WriteStartArray/WriteStartMap methods accept nullable definiteLength parameters

* add WriteTextString(string?) and WriteByteString(byte[]?) methods

* address feedback

* s/None/Undefined/

* replace CborReader.HasData/BytesRead with CborReader.BytesRemaining

* rename Read/WriteCborNegativeIntegerEncoding to Read/WriteCborNegativeIntegerRepresentation

* add a disableConformanceModeChecks parameters to ReadEncodedValue

* make CborReader.PeekState() throw and remove format error enum values.

* move CborReader.SkipValue() implementation to a dedicated source file

* add ReadDefiniteLength(Byte|Text)String() methods

* split string tests into separate source files for each type

* implement CborContentException and use instead of FormatException

* address feedback

4 years agoAdd support to map test support files to wasm vfs in WasmAppBuilder (#37938)
Santiago Fernandez Madero [Thu, 18 Jun 2020 08:28:07 +0000 (01:28 -0700)]
Add support to map test support files to wasm vfs in WasmAppBuilder (#37938)

* Add support to map test support files to wasm vfs in WasmAppBuilder

* PR Feedback

* Remove workaround for System.Reflection.Metadata.Tests

* Add BCL and BuildReference assets to VFS

* PR Feedback and fix more test projects

* Avoid potential null ref

4 years agoRemove indexer from ref (#37949)
Jan Jahoda [Thu, 18 Jun 2020 07:51:46 +0000 (09:51 +0200)]
Remove indexer from ref (#37949)

Co-authored-by: Jan Jahoda <jajahoda@.microsoft.com>
4 years agoDac changes for pinned object heap (#37853)
David Mason [Thu, 18 Jun 2020 05:30:06 +0000 (22:30 -0700)]
Dac changes for pinned object heap (#37853)

* Dac changes for pinned object heap

* code review feedback

* code review feedback

* remove whitespace changes in gc.cpp

* comments

* Update src/coreclr/src/gc/gcinterface.dac.h

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
* add checks to see if gc structures exist

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
4 years agoRename src\coreclr\src\tools\crossgen2 to src\coreclr\src\tools\aot (#38038)
Jan Kotas [Thu, 18 Jun 2020 05:29:29 +0000 (22:29 -0700)]
Rename src\coreclr\src\tools\crossgen2 to src\coreclr\src\tools\aot (#38038)

4 years agoShare portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file (#37996)
Eric Erhardt [Thu, 18 Jun 2020 04:43:31 +0000 (23:43 -0500)]
Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file (#37996)

This reduces the duplication between these libraries, and allows for easier maintenance going forward.

Fix #37255

4 years agoMerge pull request #38067 from lewing/standard
Larry Ewing [Thu, 18 Jun 2020 04:17:38 +0000 (23:17 -0500)]
Merge pull request #38067 from lewing/standard

Fix typo

4 years agoAdd libunwind to cross DAC (#37521)
Steve MacLean [Thu, 18 Jun 2020 03:43:50 +0000 (23:43 -0400)]
Add libunwind to cross DAC (#37521)

* Libunwind v1.5-rc1-28-g9165d2a1

Pull upstream libunwind which supports building on Windows

* Alignas and typos libunwind/libunwind#186
* Update libunwind-version.txt

* Add libunwind to cross DAC

* Colocate Unix/Windows compiler config
* Unify Windows/Unix configure.cmake

4 years agoObsolete PrincipalPermissionAttribute ctor as error (#37536)
Levi Broderick [Thu, 18 Jun 2020 01:57:32 +0000 (18:57 -0700)]
Obsolete PrincipalPermissionAttribute ctor as error (#37536)

4 years agoMove hostfxr API comments into header file. (#38019)
Sean Hall [Thu, 18 Jun 2020 01:44:35 +0000 (11:44 +1000)]
Move hostfxr API comments into header file. (#38019)

4 years agoBinder tracing tests: print more info on missing start event (#38048)
Elinor Fung [Thu, 18 Jun 2020 01:41:05 +0000 (18:41 -0700)]
Binder tracing tests: print more info on missing start event (#38048)

4 years agoEnable source link for Microsoft.Extensions.HostFactoryResolver (#38009)
Eric StJohn [Thu, 18 Jun 2020 01:00:54 +0000 (18:00 -0700)]
Enable source link for Microsoft.Extensions.HostFactoryResolver (#38009)

4 years agoFix typo
Larry Ewing [Wed, 17 Jun 2020 22:49:53 +0000 (17:49 -0500)]
Fix typo

4 years agoSupport for multi-folder composite builds (#37130)
Tomáš Rylek [Wed, 17 Jun 2020 22:32:04 +0000 (00:32 +0200)]
Support for multi-folder composite builds (#37130)

This change adds support for Crossgen2 input files residing in a
directory structure; the same directory structure gets created
under the output path and the output composite image sits at its
root. The component R2R headers store the file name of the
composite image.

For unification and prevention of double loading we use a
dictionary keyed off simple names of the composite assemblies.
We can also use this mechanism for AssemblyLoadContext checking.
When we load a component assembly into two different ALC's, for the
second ALC (along the execution timeline) we cannot reuse the
composite image that got loaded into the first ALC and we cannot
load it a second time so we just pretend there's no image.

Thanks

Tomas

4 years agoSkip Bundle_can_be_renamed() installer test (#38014)
Swaroop Sridhar [Wed, 17 Jun 2020 22:03:54 +0000 (15:03 -0700)]
Skip Bundle_can_be_renamed() installer test (#38014)

This test is randomly failing in the lab: #35068
Therefore skip this test until the underlying problem is resolved.
Enabling the test is tracked by #38013

Fixes #35068.

4 years agoRemove alpine old distros from test matrix and just run on alpne 3.12 (#38042)
Santiago Fernandez Madero [Wed, 17 Jun 2020 21:44:59 +0000 (14:44 -0700)]
Remove alpine old distros from test matrix and just run on alpne 3.12 (#38042)

4 years agoUpdate IL SDK and ILasm (#37994)
Santiago Fernandez Madero [Wed, 17 Jun 2020 21:42:52 +0000 (14:42 -0700)]
Update IL SDK and ILasm (#37994)

* Update IL SDK and ILasm

* PR Feedback

4 years agoRestore solution when using vs switch (#38024)
Viktor Hofer [Wed, 17 Jun 2020 21:42:25 +0000 (23:42 +0200)]
Restore solution when using vs switch (#38024)

* Restore solution when using vs switch

Restore the solution up-front when using the vs switch until https://github.com/NuGet/Home/issues/5154 is fixed.

4 years ago[master] Update dependencies from mono/linker dotnet/runtime-assets dotnet/llvm-proje...
dotnet-maestro[bot] [Wed, 17 Jun 2020 21:12:16 +0000 (16:12 -0500)]
[master] Update dependencies from mono/linker dotnet/runtime-assets dotnet/llvm-project dotnet/xharness (#37856)

* Update dependencies from https://github.com/dotnet/runtime-assets build 20200612.1

System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 5.0.0-beta.20310.1 -> To Version 5.0.0-beta.20312.1

* Update dependencies from https://github.com/dotnet/xharness build 20200611.4

Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20311.3 -> To Version 1.0.0-prerelease.20311.4

* Update dependencies from https://github.com/mono/linker build 20200616.1

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20311.3 -> To Version 5.0.0-preview.3.20316.1

* Update dependencies from https://github.com/dotnet/llvm-project build 20200615.1

runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
 From Version 9.0.1-alpha.1.20308.1 -> To Version 9.0.1-alpha.1.20315.1

* Update dependencies from https://github.com/dotnet/xharness build 20200615.3

Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20311.3 -> To Version 1.0.0-prerelease.20315.3

* Update dependencies from https://github.com/mono/linker build 20200617.1

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20311.3 -> To Version 5.0.0-preview.3.20317.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoFix nullable annotation on IEnumerator.Current (#37969)
Stephen Toub [Wed, 17 Jun 2020 21:09:44 +0000 (17:09 -0400)]
Fix nullable annotation on IEnumerator.Current (#37969)

For the non-generic IEnumerator, we don't have any idea whether the type contains nulls or not.  If we're forced to annotate it, `?` is correct, because it says "it's possible this is null" and we can't prove it's not.  But that ends up leading to lots of spurious warnings, in particular when enumerating over supplied collections that won't ever contain null, e.g. enumerating a CookieCollection.  Since the non-generic IEnumerator is effectively legacy, our best path forward while maintaining correctness and avoiding causing unnecessary warnings is to simply not annotate `IEnumerator.Current` at all, leaving it "oblivious"; in that way, we don't make any claims about its state, and leave it up to tooling how to best convey that.

4 years agoAnnotate System.Threading.AccessControl for nullable reference types (#37797)
Stephen Toub [Wed, 17 Jun 2020 21:09:20 +0000 (17:09 -0400)]
Annotate System.Threading.AccessControl for nullable reference types (#37797)

* Annotate System.Threading.AccessControl for nullable reference types

* Address PR feedback

4 years agoAdd int AsnWriter.Encode(Span)
Jeremy Barton [Wed, 17 Jun 2020 20:55:28 +0000 (13:55 -0700)]
Add int AsnWriter.Encode(Span)

4 years agoadd checks to see if gc structures exist
David Mason [Wed, 17 Jun 2020 20:51:07 +0000 (13:51 -0700)]
add checks to see if gc structures exist

4 years agoUpdate src/coreclr/src/gc/gcinterface.dac.h
David Mason [Wed, 17 Jun 2020 20:42:35 +0000 (13:42 -0700)]
Update src/coreclr/src/gc/gcinterface.dac.h

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
4 years agoVarious createdump changes (#37998)
Mike McLaughlin [Wed, 17 Jun 2020 20:26:23 +0000 (13:26 -0700)]
Various createdump changes (#37998)

4 years agoOnly run interpreter jobs on internal queues (#38039)
Drew Scoggins [Wed, 17 Jun 2020 20:25:36 +0000 (13:25 -0700)]
Only run interpreter jobs on internal queues (#38039)

The interpreter runs were too much for Helix to run per pr. This
moves their execution to only on the internal queues.

4 years agoFix XML .tt/.ttinclude files to match sources (#37771)
Krzysztof Wicher [Wed, 17 Jun 2020 20:17:03 +0000 (13:17 -0700)]
Fix XML .tt/.ttinclude files to match sources (#37771)

* Fix XML .tt/.ttinclude files to match sources

4 years ago[Arm64] ASIMD By Element Intrinsics (#36916)
Egor Chesakov [Wed, 17 Jun 2020 19:05:02 +0000 (12:05 -0700)]
[Arm64] ASIMD By Element Intrinsics (#36916)

* FusedMultiplyAddByScalar

* FusedMultiplyAddBySelectedScalar

* FusedMultiplyAddScalarBySelectedScalar

* FusedMultiplySubtractByScalar

* FusedMultiplySubtractBySelectedScalar

* FusedMultiplySubtractScalarBySelectedScalar

* InsertSelectedScalar

* LoadAndInsertScalar

* LoadAndReplicateToVector128

* LoadAndReplicateToVector64

* MultiplyAddByScalar

* MultiplyAddBySelectedScalar

* MultiplyByScalar

* MultiplyBySelectedScalar

* MultiplyBySelectedScalarWideningLower

* MultiplyBySelectedScalarWideningLowerAndAdd

* MultiplyBySelectedScalarWideningLowerAndSubtract

* MultiplyBySelectedScalarWideningUpper

* MultiplyBySelectedScalarWideningUpperAndAdd

* MultiplyBySelectedScalarWideningUpperAndSubtract

* MultiplyExtendedByScalar

* MultiplyExtendedBySelectedScalar

* MultiplyExtendedScalarBySelectedScalar

* MultiplyScalarBySelectedScalar

* MultiplySubtractByScalar

* MultiplySubtractBySelectedScalar

* StoreSelectedScalar

4 years agoFix MemoryCache Trim test (#38007)
Santiago Fernandez Madero [Wed, 17 Jun 2020 18:50:39 +0000 (11:50 -0700)]
Fix MemoryCache Trim test (#38007)

4 years agoNullable: System.Xml, part 4 (schema) (#37724)
Krzysztof Wicher [Wed, 17 Jun 2020 18:30:54 +0000 (11:30 -0700)]
Nullable: System.Xml, part 4 (schema) (#37724)

* Nullable: System.Xml, part 4 (schema)

4 years agoImprove Crossgen2 compiler perf measurement (#37839)
Simon Nattress [Wed, 17 Jun 2020 18:27:10 +0000 (11:27 -0700)]
Improve Crossgen2 compiler perf measurement (#37839)

Capture the full execution of Crossgen2 with ETW events by measuring command line parsing and moving the point we begin `Loading` measurement to the start of `Program.Run`. This accounts for about 300ms of time we were not measuring previously.

* Add ETW start/stop events around the command line parsing so we can time it and have a number to improve
* Fix up r2rtest `--measure-perf` switch which I broke when I renamed the graph provider and also add the new event.
* Move easily factorable pieces of `Run` into subroutines.

On small compile inputs such as a "Hello World" console app, a surprising amount of time is spent parsing the input arguments in the `System.CommandLine` library. Example perf of helloworld CG2 compilation:
```
Command line processing time: 192.46 ms
Total average compilation time: 594.46 ms
Phase breakdown (average):
    Loading time: 350.26 ms
    Graph processing time: 136.67 ms
        Added 108 nodes to mark stack
        Dependency analysis time: 57.38 ms
        Wall clock JIT time: 71.09 ms
        Total JIT time: 136.93 ms (sum of all threads)
        2 methods JITed
    Emitting time: 103.80 ms
```

4 years ago[interp] Switch locals and execution stack order (#37927)
monojenkins [Wed, 17 Jun 2020 18:20:43 +0000 (14:20 -0400)]
[interp] Switch locals and execution stack order (#37927)

The order before was execution stack, vtstack, locals. The order now is locals, vtstack, execution stack. The reason for this is that in the future we would like to access arguments as locals, so the args pushed by the caller will end up being locals in the new frame. Additionally, this enables us to further compact the stack use in the future since a new frame will be allocated immediately following the current stack top. This also can also make calls up to 10% faster.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[libraries] Add ConditionalFact to wasm failing tests (#37822)
Mitchell Hwang [Wed, 17 Jun 2020 17:48:00 +0000 (13:48 -0400)]
[libraries] Add ConditionalFact to wasm failing tests (#37822)

* [libraries] Add IsThreadingSupported

* [libraries] Add IsThreadingSupported attribute to failing wasm tests

* [libraries] Add IsObdcNotAvailableAndThreadingSupported property to DependencyCheckTest

* [libraries] Include system namespace in RedactedLogValueIntegrationTest and fix DependencyCheckTest ConditionalFact

* [libraries] Revert System.Console IsThreadingSupported changes

* [libraries] Remove IsThreadingSupported attribute from EncodingCodePages

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoAdd proposal for breaking changes (#37779)
Rich Lander [Wed, 17 Jun 2020 17:42:52 +0000 (10:42 -0700)]
Add proposal for breaking changes (#37779)

* Add proposal for breaking changes

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
4 years agoMerge pull request #38012 from maryamariyan/bugfix
Maryam Ariyan [Wed, 17 Jun 2020 17:14:00 +0000 (10:14 -0700)]
Merge pull request #38012 from maryamariyan/bugfix

Makes DI InternalsVisibleTo MicroBenchmarks in perf repo

4 years agoNon-functional nits
Steve Harter [Wed, 17 Jun 2020 16:52:07 +0000 (11:52 -0500)]
Non-functional nits

4 years agoAdd 2 more areas to area-owners (#37922)
Dan Moseley [Wed, 17 Jun 2020 14:47:47 +0000 (07:47 -0700)]
Add 2 more areas to area-owners (#37922)

* 2 more areas

* typo

* merge

4 years agoDisable mono perf jobs. (#38030)
Viktor Hofer [Wed, 17 Jun 2020 14:28:17 +0000 (16:28 +0200)]
Disable mono perf jobs. (#38030)

Drains the pool: https://github.com/dotnet/core-eng/issues/10070

4 years agoAddress edge scenarios with JsonSerializer's property visibility (#37720)
Layomi Akinrinade [Wed, 17 Jun 2020 13:29:49 +0000 (06:29 -0700)]
Address edge scenarios with JsonSerializer's property visibility (#37720)

* Ignore properties that were hidden in a more derived type

* Update EnumConverterTests comment

* Add more tests and align with Newtonsoft.Json behavior

* Clean up using statement

4 years agoMerge pull request #37968 from akoeplinger/sqlclient-packagereference
Alexander Köplinger [Wed, 17 Jun 2020 13:16:24 +0000 (15:16 +0200)]
Merge pull request #37968 from akoeplinger/sqlclient-packagereference

Essentially reverts #31850 and fixes the underlying issue, which was that alpine-arm64 was missing from the RID graph.

This allows us to switch to PackageReference for SqlClient as the old approach doesn't work for mobile targets where we do self-contained publishing since we don't have the SqlClient dll in the in-tree runtime pack (and we don't want to put it there).
While working on this I also removed some unnecessary duplication between Mono and CoreCLR in runtime.depproj.

Also bumps Microsoft.DotNet.ProjectModel version in Microsoft.Extensions.DependencyModel.Tests.csproj

The older version references a non-existing assembly "System.Runtime.InteropServices.Pinvoke".

4 years agoAdd build instructions for pkg-config (#38017)
Hugh Bellamy [Wed, 17 Jun 2020 12:54:34 +0000 (13:54 +0100)]
Add build instructions for pkg-config (#38017)

4 years agoUpdate steps to rebuild System.Runtime ref source (#38020)
Michal Strehovský [Wed, 17 Jun 2020 12:48:07 +0000 (14:48 +0200)]
Update steps to rebuild System.Runtime ref source (#38020)

Fixes #37966.

4 years agoMark token based resolution APIs trimming unfriendly (#37965)
Michal Strehovský [Wed, 17 Jun 2020 12:00:34 +0000 (14:00 +0200)]
Mark token based resolution APIs trimming unfriendly (#37965)

4 years agoAnnotate delegate APIs for trimming friendliness (#37964)
Michal Strehovský [Wed, 17 Jun 2020 12:00:14 +0000 (14:00 +0200)]
Annotate delegate APIs for trimming friendliness (#37964)

4 years agoAnnotate GetUninitializedObject (#37741)
Michal Strehovský [Wed, 17 Jun 2020 11:58:51 +0000 (13:58 +0200)]
Annotate GetUninitializedObject (#37741)

We don't have a good annotation for this so going with a superset. We could choose to intrinsify it in the linker to restrict this if necessary.

4 years agodelete low value tests (#38002)
Maoni Stephens [Wed, 17 Jun 2020 11:42:10 +0000 (04:42 -0700)]
delete low value tests (#38002)

4 years agoDisable two more tests that use RemoteExecutor on platforms where it's not supported...
Alexander Köplinger [Wed, 17 Jun 2020 10:32:34 +0000 (12:32 +0200)]
Disable two more tests that use RemoteExecutor on platforms where it's not supported (#37992)

Those sneaked in with https://github.com/dotnet/runtime/pull/37528 which was merged at the same time as my PR https://github.com/dotnet/runtime/pull/37479.

4 years agoremoved unused local (#38000)
Nicholas Orlowsky [Wed, 17 Jun 2020 09:23:48 +0000 (04:23 -0500)]
removed unused local (#38000)

4 years agoRemove some stale nullable suppressions / TODOs (#37978)
Stephen Toub [Wed, 17 Jun 2020 09:22:28 +0000 (05:22 -0400)]
Remove some stale nullable suppressions / TODOs (#37978)

4 years ago[browser][wasm] Default Debug Write to StdErr (#37886)
Kenneth Pouncey [Wed, 17 Jun 2020 08:15:34 +0000 (10:15 +0200)]
[browser][wasm] Default Debug Write to StdErr (#37886)

* [browser][wasm] Default Debug Write to StdErr

- COMPlus_DebugWriteToStdErr environment variable when set to `1` will write to `stderr` so it show up in the browser console log.

* Address review comment about adding a comment

* Address review comments

Add conditional compile for DEBUG build to only set debug environment variables when /p:Configuration=Debug is specified

4 years ago- Make IVT MicroBenchmarks on DI to enable remaining DI tests in performance repo
Maryam Ariyan [Wed, 17 Jun 2020 05:31:44 +0000 (22:31 -0700)]
- Make IVT MicroBenchmarks on DI to enable remaining DI tests in performance repo

Needed to enable DI tests that require internal ServiceProviderMode

4 years ago[browser][wasm] Fix already disposed error (#37887)
Kenneth Pouncey [Wed, 17 Jun 2020 04:15:26 +0000 (06:15 +0200)]
[browser][wasm] Fix already disposed error (#37887)

* [browser][wasm] Fix already disposed error

* Remove CancellationTokenSource redundant disposal

* Address redundant initialization

* Address review comments bailing first think if already disposed

* Address review comment

4 years agoFix build break in System.Net.Sockets (#38006)
Stephen Toub [Wed, 17 Jun 2020 03:34:04 +0000 (23:34 -0400)]
Fix build break in System.Net.Sockets (#38006)

4 years agoUse Latest Linker for our Trimming tests and reenable test (#37999)
Jose Perez Rodriguez [Wed, 17 Jun 2020 03:31:04 +0000 (20:31 -0700)]
Use Latest Linker for our Trimming tests and reenable test (#37999)

* Use Latest Linker for our Trimming tests and reenable test

* Address feedback

* Add environment variables to the Publish command so that it won't try to use a globally installed sdk

4 years agoComWrappers isolation (#37861)
Elinor Fung [Wed, 17 Jun 2020 03:10:20 +0000 (20:10 -0700)]
ComWrappers isolation (#37861)

- Assign/track ID of ComWrappers used to create object/wrapper.
- Only reuse object/wrapper created by same instance for GetOrCreate*
- Rehydrate RCW on WeakReference for global ComWrapper instances only

4 years agoUnix: add mode to inline Socket continuations (#37974)
Tom Deseyn [Wed, 17 Jun 2020 02:08:18 +0000 (04:08 +0200)]
Unix: add mode to inline Socket continuations (#37974)

* Unix: add mode to inline Socket continuations

On Unix, socket continuations are dispatched to the ThreadPool
from an event thread. This avoids continuations blocking the
event handling.

This adds an option to disable that dispatch. Continuations for
socket operations will be executed on the event thread directly.
This removes the overhead of context switching to the ThreadPool.

Currently this is implemented as an application level switch for
benchmarking, and experimentation. It may be made controllable
at the Socket level.

To avoid the event threads being a bottleneck, ProcessorCount
event threads are created.

* Add assert to verify Error is filtered out

* Add internal Socket.PreferInlineCompletions

* Add envvar to control PreferInlineCompletions default

* PR feedback

* Squash DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS envvars

* Don't use Unix specific SocketAsyncEngine in common SafeHandle code

* PR feedback

4 years agoUse sync IO when the physical path is available (#37846)
David Fowler [Wed, 17 Jun 2020 01:42:46 +0000 (18:42 -0700)]
Use sync IO when the physical path is available (#37846)

* Use sync IO when the physical path is available
- This should remove the overhead of doing async io for the synchronous configuration system

4 years agocomments
David Mason [Wed, 17 Jun 2020 00:51:38 +0000 (17:51 -0700)]
comments

4 years agoDisable GenericArraySortHelperTest to fix CI (#37997)
Jose Perez Rodriguez [Tue, 16 Jun 2020 23:05:51 +0000 (16:05 -0700)]
Disable GenericArraySortHelperTest to fix CI (#37997)

4 years agoreduce use of TRACE_VERBOSE in SslStream (#37917)
Tomas Weinfurt [Tue, 16 Jun 2020 22:44:48 +0000 (15:44 -0700)]
reduce use of TRACE_VERBOSE in SslStream (#37917)

* reduce use of TRACE_VERBOSE

* add NetEventSource.Verbose

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoAdding linker correctness tests to test library annotations for the linker (#37618)
Jose Perez Rodriguez [Tue, 16 Jun 2020 22:00:46 +0000 (15:00 -0700)]
Adding linker correctness tests to test library annotations for the linker (#37618)

4 years agoExclude the AdvSimd_Part* tests for mono (#37979)
Tanner Gooding [Tue, 16 Jun 2020 21:53:54 +0000 (14:53 -0700)]
Exclude the AdvSimd_Part* tests for mono (#37979)

4 years agoEnable startup events over EventPipe (#36720)
John Salem [Tue, 16 Jun 2020 21:46:26 +0000 (14:46 -0700)]
Enable startup events over EventPipe (#36720)

* Add PauseOnStart inside ceemain
* Add DOTNET_ env vars for opting out of pause on start
* Add Resume command to Diagnostics IPC

4 years agoBump Microsoft.DotNet.ProjectModel version in Microsoft.Extensions.DependencyModel...
Alexander Köplinger [Tue, 16 Jun 2020 13:40:52 +0000 (15:40 +0200)]
Bump Microsoft.DotNet.ProjectModel version in Microsoft.Extensions.DependencyModel.Tests.csproj

The older version references a non-existing assembly "System.Runtime.InteropServices.Pinvoke".

4 years agoUse PackageReference for System.Data.SqlClient again
Alexander Köplinger [Tue, 16 Jun 2020 13:40:09 +0000 (15:40 +0200)]
Use PackageReference for System.Data.SqlClient again

The old approach doesn't work for mobile targets where we do self-contained publishing since we don't have the SqlClient dll in the in-tree runtime pack (and we don't want to put it there).
While working on this I also removed some unnecessary duplication between Mono and CoreCLR in runtime.depproj.

4 years agoAdd alpine-arm64 to the RID graph
Alexander Köplinger [Tue, 16 Jun 2020 21:41:43 +0000 (23:41 +0200)]
Add alpine-arm64 to the RID graph

It was missing and caused a wrong RID graph to be generated.

4 years agoremove whitespace changes in gc.cpp
David Mason [Tue, 16 Jun 2020 20:51:11 +0000 (13:51 -0700)]
remove whitespace changes in gc.cpp

4 years agoPerf improvements for small or value-type POCOs
Steve Harter [Thu, 11 Jun 2020 17:58:25 +0000 (12:58 -0500)]
Perf improvements for small or value-type POCOs

4 years agoUse DynamicDependencyAttribute (#37780)
Sven Boemer [Tue, 16 Jun 2020 19:52:12 +0000 (12:52 -0700)]
Use DynamicDependencyAttribute (#37780)

* Use DynamicDependencyAttribute

* PR feedback

- Use typeof in more places
- Add comments about DynamicallyAccessedMembers
- Add comments about cases where we work around linker limitations
- Also move AssemblyBuilder`s DynamicDependency closer to where it
is actually needed.

* Add issue links

* Include internal attribute for OOB packages

On down-level platforms where DynamicDependencyAttribute doesn't exist
in corelib, this includes it in the OOB assemblies.

4 years agoHelp illinker remove all ICU dependencies in Invariant mode (#37832)
Marek Safar [Tue, 16 Jun 2020 19:45:19 +0000 (21:45 +0200)]
Help illinker remove all ICU dependencies in Invariant mode (#37832)

* Help illinker remove all ICU dependencies in Invariant mode

Data for browser-wasm hello world
|Mode  | SPC Size | Delta
|-|-|-|
|Default| 1449 KB | |
|Invariant| 1345 KB| -50 KB |

* Review feedback

4 years ago[eng] Build Mono Arm64 Release on runtime test builds (#37916)
Nathan Ricci [Tue, 16 Jun 2020 19:43:00 +0000 (15:43 -0400)]
[eng] Build Mono Arm64 Release on runtime test builds (#37916)

This change will build Mono on Arm64 if the runtime tests are changed. This is required so that the runtime tests will run on arm64 if the tests are changed.

4 years agocode review feedback
David Mason [Tue, 16 Jun 2020 17:57:57 +0000 (10:57 -0700)]
code review feedback

4 years agoFix a bug in 64-bit signed integer division. (#37570)
Anton Lapounov [Tue, 16 Jun 2020 19:03:43 +0000 (12:03 -0700)]
Fix a bug in 64-bit signed integer division. (#37570)

Calculation of `absNc` involves adding the sign bit of the denominator. It incorrectly used bit 31 of the denominator instead of bit 63.

4 years agoDisable test on mono interpreter (#37957)
Vlad Brezae [Tue, 16 Jun 2020 18:32:56 +0000 (21:32 +0300)]
Disable test on mono interpreter (#37957)

Which relies on a particular locals init behavior. Fixing this naively right now could have a noticeable perf regression, so we should postpone fixing this, until we have a better optimization pass design.

4 years agoMove the Buffer.Memmove<T> implementation into the runtime specific files since it...
Zoltan Varga [Tue, 16 Jun 2020 18:07:36 +0000 (14:07 -0400)]
Move the Buffer.Memmove<T> implementation into the runtime specific files since it requires a runtime specific BulkMoveWithWriteBarrier icall. (#37920)

The mono version has an extra type argument since it uses copy functions which are type specific.
Also add an elementCount > 0 check to avoid icall overhead if possible.

4 years agoAllow X509Certificates to be trimmed in HttpClientHandler. (#37909)
Eric Erhardt [Tue, 16 Jun 2020 18:02:00 +0000 (13:02 -0500)]
Allow X509Certificates to be trimmed in HttpClientHandler. (#37909)

* Allow X509Certificates to be trimmed in HttpClientHandler.

When DangerousAcceptAnyServerCertificateValidator is never used, the backing static field won't be trimmed by the ILLinker. This will keep empty X509Certificate2 and X509Chain types around, which is the only thing in the X509Certificates assembly.

See https://github.com/mono/linker/issues/1270