Commit Graph
103712 Commits
Author SHA1 Message Date
imhameed 37ceb3c260 [mono] Increase the number of preallocated trampolines for Mono FullAOT runtime test runs (#59737)
I have no justification for these numbers; they were pulled from
MonoAOTCompiler.props. It might be a good idea to port the "infinite
trampoline" hack to non-Apple platforms.
2021-09-29 12:41:21 -04:00
Kevin Jones 750965da8d Add PEM export methods to certificates
This allows exporting a certificate directly to a X.509 PEM string
(`-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----`), and cert collections
to either a PKCS#7 SignedData with no signers PEM ("BEGIN PKCS7"), or to a X.509
multi-PEM (including the empty string and a single PEM for the 0 and 1 length collections).
2021-09-29 09:11:47 -07:00
Kunal Pathak e4a842ea73 Arm: Include BBJ_ALWAYS blocks in dominance calculation (#59376)
* Include BBJ_ALWAYS in inverse post ordering for computing reachability

* Add test case

* Add BBJ_ALWAYS in fgAlways list

* jit format
2021-09-29 07:49:55 -07:00
Newell ClarkandGünther Foidl 4590efe666 Prefer readonlyspan properties over readonly array fields (#59670)
* Fix violations in System.IO.Compression

* Fix System.Private.DataContractSerialization

* Fix System.Net.HttpListener

* Fix System.Text.Encoding.CodePages

* Revert changes to .editorconfig

* Apply suggestions from code review

Co-authored-by: Günther Foidl <[email protected]>

Co-authored-by: Günther Foidl <[email protected]>
2021-09-29 09:42:02 -04:00
Ibraheem Ahmed 06a208880f delay locking in ConcurrentDictionary.GrowTable until necessary (#59656) 2021-09-29 09:38:34 -04:00
Thays Grazia e0e174b200 [wasm][debugger] Reusing buffer to avoid allocate every debugger message (#59480)
* Reusing buffer to avoid allocate every debugger message.

* Fixing what was suggested by @radical.

* cleaning code.

* Changing what was suggested by @radical

* Implementing again after merge

* Fix spacing before parentheses.

* Addressing @pavelsavara comments.

* Fix _debugger_buffer type.
2021-09-29 09:34:19 -03:00
Jo Shields aa7a125e4f Revise descriptions of VS workloads, and add missing ones (#59698)
Revise descriptions of VS workloads, and add missing ones
2021-09-29 08:33:23 -04:00
Adeel Mujahid 70b03114f4 Append _FILE_OFFSET_BITS=64 to CMAKE_REQUIRED_DEFINITIONS (#59504)
After setting CMAKE_REQUIRED_DEFINITIONS in PAL introspection, we need
to append this definition.
2021-09-29 10:42:35 +02:00
Michal Strehovský d4e85bf268 Integrate changes from NativeAOT branch (#59510)
* Move TryResolveConstraintMethodApprox to compiler

* Integrate changes from NativeAOT branch
2021-09-28 23:10:44 -07:00
Zoltan Varga d02b5d9d24 [mono][jit] Eliminate some AOTCONST instructions if they are not used. (#59699) 2021-09-29 06:04:18 +02:00
Kunal Pathak 8adff3497b Antigen: Change Antigen's helixqueue to public (#59657)
* Use public helix queue

* Remove helix queue setup from python

* Remove unnecessary comments

* TOREVERT: Download specific artifacts

* change creator to dotnet-bot

* set Creator

* run only for windows x64

* Publish antigen build logs

* put in quotes

* use correct script for helix queue

* Set some helix variables:

* Use Helix properties in proj

* Include the display name

* Revert specific build

* Add continueOnError to display warnings
2021-09-28 19:51:48 -07:00
Jan Kotas 6991dfa085 Deduplicate epilogs in Type.operator== (#59711) 2021-09-28 17:35:07 -07:00
David Wrighton fcaba18061 Universal arm crossgen compiler (#58279)
Stop generating OS specific compilers for the arm and arm64 architectures for use in crossgen2
- As it turns out the OS differences here are relatively minor and fairly easy to handle with runtime switches.
- However, when an exact target is known we can generate better code by having the various if statements evaluate to a constant true/false. (This is done for all runtime jit builds)
- This has been validated to produce binary identical output for generating System.Private.CoreLib.dll on the various architectures.
- This work reduces the distribution size of crossgen2, and also reduces the amount of time it takes to build everything (Most notably, the Mac build times in PR's are reduced by 5-7 minutes, but improvements are visible across all of/architecture pairs)
2021-09-28 16:52:10 -07:00
Santiago Fernandez Madero de4151ef17 Revert bind single elements to array in configuration binder (#59716) 2021-09-28 16:51:31 -07:00
Rikki Gibson b791d8c869 Update HttpConnectionBase.cs (#59722) 2021-09-28 19:43:25 -04:00
Přemek Vysoký 0d0d5a227b Turn on XHarness telemetry for mono runtime tests (#59646) 2021-09-29 00:21:29 +02:00
Tarek Mahmoud Sayed 5bfae1c9ac Fix Time Zone when running with Globalization Invariant Mode (#59710) 2021-09-28 14:42:16 -07:00
David Wrighton fcde5f6d2a Add Compiler record to PDB files in Crossgen2 (#59686) 2021-09-28 13:51:45 -07:00
Wei Zheng 7a58bef749 Fix incorrect tracking of sign bit (#59525)
* Fix incorrect tracking of sign bit

* Perform the 1 check earlier

* Add comment on checking special pattern

* Simplify fix

* Update the test to target 32 bit right shift
as the logic has been restricted to that

* Remove stray newline
2021-09-28 10:26:33 -07:00
Christopher Warrington 87a22d66ff Check Options validations length instead of null (#58157)
The `OptionsFactory` constructors ensure that the member variable
`_validations` is never null. Yet, the `Create` method checks whether
`_validations` is null before running them.

Check that the length of `_validations` is larger than zero instead of
checking for null. This eliminates a `List<>` allocation when there are
no validations.
2021-09-28 11:22:54 -05:00
Andy Ayers be752825a4 JIT: allow suppressing some dumps or parts of dumps (#59299)
Another bit of code that I've had lying around that might be generally useful.
* Optionally suppress Tier0 compilation dumps
* Optionally suppress dumps from inline compiler phases

Setting `JitDumpTier0=0` prevents you from getting two dumps when you specify
dumping a method by name or hash, when TC is enabled.
2021-09-28 09:16:42 -07:00
Allan Targino 0fded2f31a Dependency Injection SAVE_ASSEMBLIES code clean up (#59684)
A simple clean up of the SAVE_ASSEMBLIES symbol code in DI.
I am also adding the service type name to the class name because
it helps a lot when manual inspecting MSIL code for large service trees.
2021-09-28 10:57:24 -05:00
Allan Targino 1e6aba3da0 Removing unused CallSiteKind items from Dependency Injection (#59687)
Removing Scope, Transient and Singleton from enum CallSiteKind.
Their CallSites were removed by 8e8650f9
2021-09-28 10:56:47 -05:00
Pavel Ivanov d5d311eefe Prevent cache from being resized (#59607) 2021-09-28 10:56:20 -05:00
Eric StJohn da358db245 Fix race condition in ServiceProcess tests (#59676) 2021-09-28 09:43:00 -06:00
N0D4N cb78a8999c Reduce allocations in VersionConverter (#55564)
* Add more test cases for VersionConverter

* Reduce allocations in VersionConverter.Read method

* Remove allocations from VersionConverter.Write method

* Parse Version from chars, instead of parsing individual components. Assert successful formatting on write.

* Allow escaping, disallow leading and trailing whitespaces

* Hopefully fix tests for .NET Framework, add few more test cases that should fail

* Assume whitespaces can be only on the start, or only at the end, add one more test case that should fail

* Remove redundant return statements

* Elaborate on comment regarding leading and trailing whitespaces. Copy it to .NetStandard2.0 target.

* Add another test case.
2021-09-28 08:29:58 -07:00
Pavel Ivanov ea0d4c4aa8 Remove redundant checks (#59310)
* Remove useless if-else branch

* Try to change the absolute expiration only if the relative has value
2021-09-28 10:16:47 -05:00
Allan Targino 52d46c9823 Dependency Injection support for ValueTypes as Services (#59625)
* Dependency Injection support for ValueTypes as Services

The only that was thing missing to support ValueTypes as Services
was box the result when visiting constructors call sites.

I am also fixing several tests that were building the ServiceProvider
using the default engine, instead of relying on each specific engine.

fix #42160

* addressing pr feedback regarding tests
2021-09-28 10:14:15 -05:00
Allan Targino 77bd789424 Using optimized ILGenerator.Emit function in Dependency Injection (#59680)
We were doing some local optimizations with MSIL’s Stloc and Ldloc,
but the very same ones are already present in an override of the
ILGenerator.Emit function, so we can remove them.

This PR also fixes the use of Ldloca that was generating additional
nop operations.

fix #59624
2021-09-28 10:01:15 -05:00
Zoltan Varga b8db0ea06e [mono][jit] Eliminate some type comparisons in gshared methods. (#59543)
* [mono][jit] Make MONO_INS_HAS_NO_SIDE_EFFECT () into a function.

* [mono][jit] Eliminate some type comparisons in gshared methods.

Comparisons of the form
```
        internal static void ThrowForUnsupportedIntrinsicsVectorBaseType<T>() where T : struct
        {
            if (typeof(T) != typeof(byte) && typeof(T) != typeof(sbyte) &&
            ...
        }
```
are very common in BCL code. They are compiled to:
```
    IL_0001:  ldtoken    !!T
    IL_0006:  call       [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
    IL_000b:  ldtoken    [System.Runtime]System.Byte
    IL_0010:  call       [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
    IL_0015:  call       bool [System.Runtime]System.Type::op_Inequality([System.Runtime]System.Type,
                                                                         [System.Runtime]System.Type)
    IL_001a:  brfalse    IL_015a
```

In gshared code, !!T is usually constrained to be a reference, or to have a primitive base type.
Use this fact to eliminate some of the Type::op_Equality/op_Inequality () calls.

Fixes https://github.com/dotnet/runtime/issues/54849.
2021-09-28 16:08:52 +02:00
Stephen Toub 5d71e32a4e Disabling Match_ExcessPrefix until the attribute is fixed 2021-09-28 09:28:27 -04:00
Sergey Andreenko 181da3bd9c Fewer AddressExposedReason::TOO_CONSERVATIVE (#59429)
Delete some too_conservative addrExposed reasons.
2021-09-28 14:45:36 +02:00
Thays Grazia 580d17fd33 Remove log message when closing browser while debugging. (#59664) 2021-09-27 21:14:07 -03:00
Steve PfisterandSteve Pfister a526f96d31 Skip ExportPkcs7_Empty test on mobile platforms
* Skip ExportPkcs7_Empty test on mobile platforms

The test made it through and was failing on CI.  PKCS#7 export is not supported on mobile platforms.

* PKCS7_Empty was failing on android b/c 0 length was not allowed.

Co-authored-by: Steve Pfister <[email protected]>
2021-09-27 16:06:01 -07:00
dotnet bot ea274b45d4 Localized file check-in by OneLocBuild Task (#59662) 2021-09-27 14:28:48 -07:00
Alexander RadchenkoandDan Moseley 0d05e3eda4 Add checking SpeechRecognitionEngine Culture to GrammarBuilder test (#59516)
* Add checking SpeechRecognitionEngine Culture to GrammarBuilder test.

* Update GrammarTests.cs

Co-authored-by: Dan Moseley <[email protected]>
2021-09-27 13:24:18 -06:00
Ankit Jain 51e4954e78 forward-port from release/6.0-rc2: MonoAOTCompiler: detect when nothing has changed, a… (#59597)
…nd skip any precompiling (#58979)

Refactor to allow fast-path

implement fast-path for MonoAOTCompiler when nothing has changed

re-enable some tests that got disabled by mistake

(cherry picked from commit 9fd17b1)
2021-09-27 14:10:07 -04:00
Bruce Forstall 9d075aecfd Change loop cloning condition blocks flow graph (#59233)
Currently, the loop choice condition blocks are created in a way that creates
a confusing flow graph. Restructure them to be simpler, and lay the path for
future work.

The simpler layout (and, hopefully, code and logic to create them) also
lays the groundwork to potentially put the slow path loop in the loop table,
if desired, as it creates a "standard" loop header layout.

While the flow graph has an extra block or two, there are almost no diffs,
as subsequent phases clean up any extras.

There are a few diffs where the new layout enables some downstream optimization
phases that were stymied by the old layout, but mostly in cases where we leave
around dead code slow cloned blocks (a known issue). Also, there are a couple
trivial CSE changes.
2021-09-27 10:50:04 -07:00
Bruce Forstall 3cd25f474a Add superpmi.exe option to break to the debugger on exception. (#59234)
If you use `-box` (similar to pre-existing `-boa`, `-boe`), then
an exception with invoke a `DebugBreak`, which will stop in the
debugger when an exception is thrown during replay. This is helpful
when debugging (without needing to configure the debugger to catch
a specific exception).
2021-09-27 10:47:14 -07:00
Eric StJohn 7344435eb2 Add InstallLocation component to host (#59537) 2021-09-27 08:59:51 -07:00
Jakob Botsch Nielsen d0328a64ff Write SPMI download progress in MB (#59647) 2021-09-27 17:39:34 +02:00
Maxim Lipnin b7ac14bf53 Add argument check (#59634) 2021-09-27 07:55:54 -07:00
Radek Doulik e10c927773 [mono] Improve Makefile's dotnet.js dependencies (#59603)
* [mono] Improve Makefile's dotnet.js dependencies

* Pass _MSBUILD_WASM_BUILD_ARGS properly

* And add $(MSBUILD_ARGS) as well
2021-09-27 15:33:09 +02:00
Ankit Jain 0c0bd5a406 [wasm] windows: Fail the build if provisioning fails (#59560) 2021-09-27 11:47:26 +02:00
Pavel Savara ca2cb03215 [draft][wasm] introduce typescript modules (#59392)
- refactor wasm javascript as typescript
- use nodeJs from EMSDK
- use rollup.js for packing code as ES6 IFFE for emcc consumption
- incremental build:
Co-authored-by: Radek Doulik <[email protected]>
- types:
Co-authored-by: Daniel Genkin <[email protected]>

* linker feedback
2021-09-27 09:45:23 +02:00
Kunal Pathak 78ac8430e8 Pipeline to run Exploratory fuzzing tool to catch codegen issues (#59489)
* Exploratory tool pipeline

Add pipeline to run exploratory tools and return back the result

* Use public Antigen repo

* Add RunDuration

* Rename some of the files to antigen

* TOREVERT: download specific artifacts

* Trigger nightly and on PRs

* Adjust the duration

* Exit on fail for Antigen

* Rename yml files

* Add Antigen.md

* Temporarily run for 10 minutes

* Remove non-x64 build download and helix workaround

* Add back HelixResultsDestinationDir

* Change to net6.0

* extra ,

* Antigen is still on net5.0

* Default framework net6.0

* Run for 3 hours

* Run full build

* fix space

* Make the schedule weekly Sun@6am

* Reduce duration to 2 hours
2021-09-26 21:57:36 -07:00
Eric Erhardt e9f32734ae Remove invalid test exclusions. (#59608)
These exclusions are pointing to non-existing files. So they are not doing anything.
2021-09-26 23:15:51 -04:00
Jason Pugsley dff742a06b FreeBSD12 version cleanup and process and thread enhancements (#59339)
* Set FreeBSD 12 as minimum version

This is a small clean-up to remove reliance on FreeBSD versions
prior to 12 and more specifically 12.2 which is the lowest currently
supported version of FreeBSD. 11.4 becomes unsupported as of
October 2021. See https://www.freebsd.org/releases/

* Add functionality for FreeBSD process and threads

Added support for naming native threads, the process disambiguation
key and detecting if the process is running under a debugger.

Changed references to thr_self to pthread_getthreadid_np already
used elsewhere - it returns the same value.
2021-09-25 22:37:11 -07:00
Egor Bogatov b9ef92f05c JIT: Convert Interlocked intrinsics to NamedIntrinsics (#55170) 2021-09-26 01:54:28 +03:00
Aleksey Kliger (λgeek) 234b7891e4 [tests] Fix PlatformDetection.IsMonoInterpreter for mobile (#59587)
* [tests] Correctly detect the Mono interpreter

Checking for MONO_ENV_OPTIONS is not reliable for the mobile test runners
because they use the embedding API to enable the interpreter, rather than
setting an environment option.

Instead detect the interpreter by checking the values of the
IsDynamicCodeSupported and IsDynamicCodeCompiled runtime features.

* [tests] Run System.Threading.Tasks.Dataflow.Tests on Apple platforms

* Only check RuntimeFeature on netcoreapp.  Otherwise return false

these tests are not running on mono if they're running on .NET Framework
2021-09-25 09:55:34 -04:00