David Wrighton [Fri, 16 Apr 2021 17:22:30 +0000 (10:22 -0700)]
New pgo data (#51360)
* Update to more recent PGO data
* Use old pgo data for windows x86 and linx x64 to avoid possible perf loss problems.
Jeremy Barton [Fri, 16 Apr 2021 16:38:47 +0000 (09:38 -0700)]
Work around OpenSSL 3.0 ciphers not restoring original IV on reset.
Dong-Heon Jung [Fri, 16 Apr 2021 15:20:21 +0000 (00:20 +0900)]
Fix build fail by NEED_OPENSSL_3_0 is not defined
SingleAccretion [Fri, 16 Apr 2021 14:51:50 +0000 (17:51 +0300)]
Disable tests exercising implementation-defined behavior (#51348)
Vlad Brezae [Fri, 16 Apr 2021 14:49:12 +0000 (17:49 +0300)]
[interp] Add more super instructions and other small optimizations (#51273)
* [interp] Replace ldloca + initobj pair with initlocal
We do it in the cprop pass because ldloca removal can enable additional copy propagations.
* [interp] Replace ldloca + ldobj.vt with mov.vt
* [interp] Add superinstructions for multiplication with constant
* [interp] Remove redundant opcode
* [interp] Update indirects count if removing bblock with ldloca
If the var no longer has indirects, we might be able to do cprop through it
* [interp] Refactor ldind/stind opcodes
Remove some unnecessary opcodes. Always do a null check when dereferencing pointers with ldind. Having an unsafe version of this is really useless performance wise and can only be used in very few cases.
* [interp] Add super instructions for ldind/stind with offset
* [interp] Remove opcode for conversion from i8 to i4
It is redundant, we replace it with a MOV_8 which will end up being removed by the cprop pass.
David Pine [Fri, 16 Apr 2021 14:33:55 +0000 (09:33 -0500)]
Add the ability to stop the `Host` when one of its `BackgroundService` instances errors (#50569)
* Added background service exception behavior enum. Update HostOptions and Host accordingly.
* Added corresponding unit tests for host when ignoring or stopping.
* Call StopAsync rather than FailFast
* Call `IApplicationLifetime.StopApplication()` instead of `StopAsync()`.
* Moved enum out of abstractions. Encapsulate logging logic in extensions. Define new EventId. Simplify check, avoid null eval. Update triple dash comments per peer review.
* Set the default as `StopHost`
* Move ref bits from hosting.abstractions to hosting proper.
* Address feedback from peer review
* Added unit test to verify background service 1 gets started, and runs a bit - and other service can cause stop
* Use explicitly controlled timing for unit test and remove args: ex
* Convert from Fact, to Theory. Test both enum values.
* Separate StartAsync and ExecuteTask, let StartAsync bubble. Adjust unit tests...
* Update the background service async exceptions get logged unit test
Thays Grazia [Fri, 16 Apr 2021 12:42:56 +0000 (09:42 -0300)]
[wasm][debugger] Implement support to modify values. (#49557)
* [wasm][debugger] Implement support to modify values.
* Apply suggestions from code review
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Adding first test.
* Adding more tests, fixing boolean behavior, ignore value change when the new value type is incompatible.
* Implement set value on object -> property and attribute.
* Fix compilation
* Changing what @radical suggested.
* Adding tests.
* Adding test.
* Fix what @radical suggested.
* Fix compilation.
* Fix what @radical suggested.
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Kunal Pathak [Fri, 16 Apr 2021 05:19:17 +0000 (22:19 -0700)]
Improve Lsra stats (#51281)
* Improve LsraStat
- Improve LsraStat by including various register selection heuristics count
- Generalize updateLsraStat and dumpLsraStat to operate on array of stats
* jit format
* Display LSRA stats in csv format
* review comments
* Include PerfScore in LsraStatsCsv
* review comments'
Andrew Au [Fri, 16 Apr 2021 05:16:04 +0000 (22:16 -0700)]
Fail the GCHeap initialization if large page is specified without a heap hard limit (#51282)
Bruce Forstall [Fri, 16 Apr 2021 04:46:59 +0000 (21:46 -0700)]
Flow graph "dot" graph output improvements (#51357)
* Flow graph "dot" graph output improvements
Added optional support for adding EH regions and loops in the loop table
to the ".dot" format flow graph display. To enable one or both of
these, use:
```
set COMPlus_JitDumpFgEH=1
set COMPlus_JitDumpFgLoops=1
```
Also, I added a config variable to allow disabling the use of "invisible"
edges that forces the graph to be in mostly lexical linear order in the layout.
To use this, use:
```
set COMPlus_JitDumpFgConstrained=0
```
(COMPlus_JitDumpFgConstrained=1 is the default.)
* Remove trailing newlines from block label
Andy Ayers [Fri, 16 Apr 2021 04:43:14 +0000 (21:43 -0700)]
JIT: fix BasicBlock::isEmpty() (#51340)
The detection of blocks with only PHI assignments was broken by #50806.
Fix by using existing helper to find the first non-PHI assignment.
Closes #51326.
Eric Erhardt [Fri, 16 Apr 2021 01:33:04 +0000 (20:33 -0500)]
Remove unnecessary GetTypeInfo() calls. (#51339)
* Remove unnecessary GetTypeInfo() calls.
Calls to GetTypeInfo() are unnecessary, and are a hold-over from when System.Reflection was refactored in legacy versions of .NET.
David Fowler [Fri, 16 Apr 2021 01:10:43 +0000 (18:10 -0700)]
Removed scope pooling and added diagnostics (#51163)
- Remove scope pooling
- Added an event that we can ask customers to turn on to see if scope in real applications are mostly homogeneous
- Add the hash code of the container so that we can detect scope sizes per container instance.
- The ConcurrentQueue showed a 48% regression on AMD scenarios and a 4% regression on citrine
linux.
Elinor Fung [Fri, 16 Apr 2021 00:33:27 +0000 (17:33 -0700)]
[AndroidCrypto] Fix handling of no peer certificates (#51316)
Mateo Torres-Ruiz [Thu, 15 Apr 2021 23:50:23 +0000 (16:50 -0700)]
Remove unnecessary realpath calls from host probing logic (#50671)
* Skip test on windows
* Delay file existence check
* Check file existence if there are additional probbing paths
* PR feedback
* Add needs_file_existence_checks
* Clean symlinks causing CI problems with stat
* Switch back to libc
* Ignore symlink deletion in osx
Bruce Bowyer-Smyth [Thu, 15 Apr 2021 23:21:24 +0000 (09:21 +1000)]
Use Invariant culture for datetime parse test (#50680)
John Salem [Thu, 15 Apr 2021 23:20:30 +0000 (16:20 -0700)]
lockless buffer reservation/release in EventPipe (#50797)
Carlos Sanchez [Thu, 15 Apr 2021 22:50:18 +0000 (15:50 -0700)]
FileStream rewrite: Use IValueTaskSource instead of TaskCompletionSource (#50802)
* Remove IFileStreamCompletionStrategy. This makes FileStreamCompletionSource only needed by Net5CompatFileStreamStrategy.
* Use AwaitableProvider for AsyncWindowsFileStreamStrategy.
* No need for ManualResetValueTaskSource class. Remove it to get rid of one allocation and get the actual profiling improvement.
Rename FileStreamAwaitableProvider.
* Bring back ReadAsync/WriteAsync code to the strategy for simpler code review. Shorter filename for awaitable provider.
* FileStreamCompletionSource can now be nested in Net5CompatFileStreamStrategy, and its _fileHandle can now be private.
* Remove duplicate error definitions, use centralized Interop.Errors.
* Move shared mask values to FileStreamHelpers to avoid duplication.
* Use Interop.Errors also in SyncWindowsFileStreamStrategy.
* Move misplaced comment, move method location.
* Slightly better comment.
* Rename FileStreamAwaitableProvider to FileStreamValueTaskSource to keep in sync with the name of FileStreamCompletionSource.
* Bring back the raw pointer intOverlapped.
* Rename MemoryAwaitableProvider to MemoryFileStreamValueTaskSource.
* Remove numBufferedBytes and avoid unnecessary allocation in Read(byte[],int,int).
* Rename files of nested types.
* Nested async result codes in static class.
* Address feedback.
* Address suggestions
* Bring back RunContinuationAsynchronously=true
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Mike McLaughlin [Thu, 15 Apr 2021 21:45:55 +0000 (14:45 -0700)]
Add MachO dump writer to createdump (#51150)
* Add MachO dump writer to createdump
Instead of the hacky ELF core dumps on MacOS now createdump generates true MachO dumps.
Setting the COMPlus_DbgEnableElfDumpOnMacOS environment variable is no longer needed.
Add special thread info memory region containing the OS thread ids missing from macho core dumps. This allows SOS to map the thread indexes to thread ids. The address (0x7fffffff00000000) of this special memory region is above the highest user address (0x0007FFFFFFFFF000) and below a kernel reserved address (0xffffff8000xxxxxx) which is kind of moot because dumps don't include any kernel regions. lldb seems just fine with this memory region.
The changes include ARM64 support also, but since I don't have a M1 device I can't build/test them. I'm hoping Steve can at least review them.
Add --verbose/TRACE_VERBOSE support to tone down all the macho dump generation spew.
Issue: #48664
* Fix build problem
* Update docs
* Code review feedback
Co-authored-by: Juan Sebastian Hoyos Ayala <juhoyosa@microsoft.com>
Kunal Pathak [Thu, 15 Apr 2021 20:42:57 +0000 (13:42 -0700)]
Include condition inside assert for forward jump loops (#51164)
* Include condition for forward jump loops
* Remove IGF_FINALLY_TARGET and surrounding code
Pass DEBUG_ARG(bbnum) to `emitAddLabel()` to print the BB->IG mapping.
* Revert "Remove IGF_FINALLY_TARGET and surrounding code"
This reverts commit
284c0abc202cca2de22787bf18081076200e5272.
* Pass bbNum to emitAddLabel
* fix Release build break
Steve MacLean [Thu, 15 Apr 2021 20:41:17 +0000 (16:41 -0400)]
Apple Silicon bundle distribution template (#51262)
Apple Silicon requires a different distribution template
Set options.hostArchitectures to stop requiring Rosetta
Adjust minimum required version to 11.0
Tarek Mahmoud Sayed [Thu, 15 Apr 2021 20:36:26 +0000 (13:36 -0700)]
Address the remaining comments from Date/TimeOnly PR (#51261)
Jan Vorlicek [Thu, 15 Apr 2021 20:32:09 +0000 (22:32 +0200)]
Update Alpine ARM docker image (#51099)
* Update Alpine ARM docker image
The Alpine ARM docker image is used for cross compilation. There was a
breaking change in Alpine 3.13 - it uses a new MUSL that has 64 bit
time_t even on 32 bit platforms. Since the official support for Alpine
ARM was not announced yet, it was decided that we will support it only
on Alpine >= 3.13 instead of having to build and distribute two different
versions of runtime.
This change updates the docker image used to build Alpine ARM runtime to
a new version that uses Alpine 3.13 rootfs. It is also using Ubuntu
16.04 instead of 18.04 as a host to unify it with the one we use to
build for Alpine ARM64.
* Update helix queue for Alpine ARM to use Alpine 3.13
SingleAccretion [Thu, 15 Apr 2021 19:01:32 +0000 (22:01 +0300)]
Handle casts done via helpers and fold overflow operations in value numbering (#50450)
* Added a missing license header
* Added a test verifying that checked arithmetic is correct
* Added a test verifying that checked casts are correct
* Refactored VNEvalShouldFold
* Refactored gtFoldExprConst to use helpers and follow the common code style
* Fixed the comment stating TYP_BYREF has no zero value
* Moved checking of overflow for arithmetic operations from gtFoldExprConst into a separate namespace
* Implemented folding of overflow arithmetic in value numbering
* Fixed some typos in valuenum.cpp/h
* Added identity-based evaluation for overflow arithmetic
* Refactored gtFoldExpr some more, moved the overflow checking logic to CheckedOps, implemented overflow checking for floating point -> integer casts
* Implemented folding of checked casts in value numbering, started value numbering casts via helpers like normal casts
* Fixed the formatting
* Made the definition of var_types a standalone header so that it can be safely #included'ed in utils.h
* Replaced uses of GTF_CALL_M_SPECIAL_INTRINSIC with the equivalent helpers
* Fold cast via helpers in morph
* Disable the test for checked casts on Mono
Alexander Köplinger [Thu, 15 Apr 2021 18:06:02 +0000 (20:06 +0200)]
Improve backport command (#51306)
GitHub Actions started doing shallow checkouts so we often ran into the case where applying the patch would fail with an error due to the commit blobs not being available:
```
error: sha1 information is lacking or useless (eng/pipelines/common/xplat-setup.yml).
error: could not build fake ancestor
```
Fix this by always checking out the whole history. Since this makes checkout quite slow (~2mins), refactor the action so we post the "Started backporting" comment before doing the checkout so the user isn't confused why nothing happens.
David Wrighton [Thu, 15 Apr 2021 17:25:02 +0000 (10:25 -0700)]
Fix issue with Win32 resource placement (#51291)
* Fix issue with Win32 resource placement
Windows has a bug in its resource processing logic that occurs when
1. A PE file is loaded as a data file
2. The resource data found in the resources has an RVA which has a magnitude greater than the size of the section which holds the resources
3. The offset of the start of the resource data from the start of the section is not zero.
As it is impossible to effect condition 1 in the compiler, and changing condition 2 would require bloating the virtual size of the sections, instead require that the resource data is located at offset 0 within its section, by sorting the Win32ResourceNode to be the first node.
* Update src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SectionBuilder.cs
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tomáš Rylek [Thu, 15 Apr 2021 17:10:43 +0000 (10:10 -0700)]
Clean up Crossgen2 executions in installer after SDK P2 ingestion (#49004)
ws77.cho [Thu, 15 Apr 2021 16:51:30 +0000 (01:51 +0900)]
Modify test OOMException01 and enable test OOMException01 (#51280)
* Modify TC to compare strings before ':'
In order to avoid failure due to modification of #44013,
the TC has been modified so that the content after':' is not compared.
* Enable OOMException01
Failed TC is fixed at #51280
Radek Doulik [Thu, 15 Apr 2021 16:50:49 +0000 (18:50 +0200)]
[wasm] Pass configuration to samples build (#51304)
Bruce Forstall [Thu, 15 Apr 2021 16:45:51 +0000 (09:45 -0700)]
Simplify JIT label handling (#51208)
* Simplify JIT label handling
Remove the BBF_JMP_TARGET flag that was set early and attempted
to be maintained all through compilation. Instead, use
BBF_USE_LABEL to indicate to the emitter where we need labels.
Also, stop setting and maintaining BBF_USE_LABEL early.
Add a pass over the blocks when preparing for codegen that sets
most of the necessary BBF_USE_LABEL flags. This flag will never
be set before codegen. A few places set the flag after codegen starts,
namely `genCreateTempLabel` and BBJ_COND handling for alignment.
Note that this flag must be set before the block is processed for
codegen (and an insGroup is created).
Together, these changes make it easier to work with the flow graph
without worrying about maintaining these bits of information through
various optimizations.
Add a few more details about alignment processing to the dump.
There are a few code asm diffs due to alignment processing not previously
creating a label to help compute how large a loop is.
There are a lot of textual asm diffs due to there being (mostly)
fewer labels, plus some additional insGroup output. This can happen if
a block was labeled with `BBF_JMP_TARGET` or `BBF_USE_LABEL` before,
but didn't need to be, perhaps after some optimizations. Now, the flag is
never added in the first place.
There are a large number of GC info diffs. Labels are where GC info state
changes are recorded between codegen and the emitter. If we eliminate an
unnecessary emitter label, then we also eliminate a capture of the current
codegen GC state. Since the emitter is lazy at marking GC deaths, this
means that we see a lot of lengthened GC lifetimes -- until the next
label, or some other cause of GC kill. Often, you see a register kill
followed by register birth just disappear, and the register is maintained
alive across the interim.
* Remove loop align flag if we decide a loop is no longer a loop
Tomáš Rylek [Thu, 15 Apr 2021 16:35:41 +0000 (09:35 -0700)]
Fix for RoslynPad crash found in targeted preview testing (#51173)
I found out that the crash was caused by an incompletely handled
corner case in generic lookup - incomplete comparison of
GenericLookupKey matched two generic lookups which in reality
involved two different constrained types.
While fixing this I added a new variant to
RuntimeDeterminedTypeHelpers for comparing MethodWithToken and
I fixed null handling that was inconsistent among the individual
type variants of the Equals and GetHashCode methods.
Thanks
Tomas
Jeremy Koritzinsky [Thu, 15 Apr 2021 16:29:56 +0000 (09:29 -0700)]
Add stub definitions of inject debug resources targets to fix runtimeinfo build dependency issues. (#51254)
Nathan Ricci [Thu, 15 Apr 2021 15:35:52 +0000 (11:35 -0400)]
[MONO][WASM] Fix System.ComponentModel.TypeConverter tests by adding missing ILLink dependencies (#50645)
Added missing ILLink descriptors for TypeConverter tests.
Geoff Kizer [Thu, 15 Apr 2021 15:29:19 +0000 (08:29 -0700)]
clean up some logic around non-blocking sockets on Unix (#50985)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Marek Safar [Thu, 15 Apr 2021 15:26:41 +0000 (17:26 +0200)]
Don't call into unsupported APIs on build targets which don't support quic (#49261)
* Don't call into unsupported APIs on build targets which don't support quic
The code could be extracted to HttpConnectionPool.quick.cs but not sure
it's worth the split as that would move the majority of the code.
Fixes #49201
Fixes #49187
* if-def less version
* Quic IsSupported working and not throwing for AnyOS.
* Fix for running the newly added UnitTest.
* Add missing unsupported targets
* Reverted Quic changes.
* Unsupported to Supported
* Guarded unsupported calls with OperationgSystem.Is...()
* Addressed comments.
* Analyzer fixed, macOS fixed.
* Trimming test.
* Removed test.
* Guard more unsupported platform calls
* Some more analyzer attributes.
* Fix for Android, which returns true for IsLinux().
* Skip failing trimming test on wasm
* Removed additional UnsupportedOS attributes, referenced issue.
Co-authored-by: Marie Píchová <mapichov@microsoft.com>
Jeremy Barton [Thu, 15 Apr 2021 15:06:27 +0000 (08:06 -0700)]
OpenSSL3: Register legacy algorithms when needed
Stephen Toub [Thu, 15 Apr 2021 13:57:04 +0000 (09:57 -0400)]
Fix closure in HttpConnectionPoolManager.StartMonitoringNetworkChanges (#50487)
Alexander Köplinger [Thu, 15 Apr 2021 12:39:17 +0000 (14:39 +0200)]
Add additional compiler flags for tvOS (#51241)
We had those in the original mono/mono build.
Thays Grazia [Thu, 15 Apr 2021 12:37:50 +0000 (09:37 -0300)]
Fix side effect of icordbg (#51264)
Aleksey Kliger (λgeek) [Thu, 15 Apr 2021 12:35:16 +0000 (08:35 -0400)]
[sdb][coop] Switch to GC Safe before calling debugger transport callbacks (#51185)
* [sdb][coop] Switch to GC Safe before calling debugger transport callbacks
Fixes https://github.com/dotnet/runtime/issues/50966
Under hybrid suspend, if we call the debugger callbacks like `transport_recv`
in GC Unsafe (cooperative) mode, we could get a GC suspend deadlock: the
suspend initiator will be waiting for the debugger thread to self-suspend, but
the debugger thread will be blocked in `recv` until it receives a debugger
command (which probably will not come since from the debugger's point of view
nothing is happening in the debuggee, so there's no event to respond to).
The socket transport already had GC safe transitions, but since the runtime
allows external embedders to register their own protocols, we need the GC state
transitions around the calls to the callbacks, not around the I/O operations.
The tricky bit is `transport_connect` - as far as I can tell it's always called
after the MonoThreadInfo has been initialized and the current thread has been
attached to the runtime - so thread state transitions should work. (The tricky
one is `transport_connect` which happens early in startup in some
configurations. But in that case `finish_agent_init` is called by
`debugger_agent_init` which also calls `mono_gc_base_init` which sets up the
thread state and attaches the thread)
As followup work, we will need to adjust net7+ watchOS in
https://github.com/xamarin/xamarin-macios _not_ to do a transition to GC Safe
in its `sdb_send` and `sdb_recv` functions. This is https://github.com/xamarin/xamarin-macios/issues/11220
* add transitions to unsafe in calls back into mono
Maxim Lipnin [Thu, 15 Apr 2021 12:06:36 +0000 (15:06 +0300)]
[Android] Disable a socket address test
SocketAddressTest.ToString_UnsupportedFamily_Throws test fails on Android in case of AddressFamily.Packet and AddressFamily.ControllerAreaNetwork because it expects PNSE for both address family types but there is no any exception thrown.
This change disables the mentioned test on Android due to different behavior. Also, I'm not sure whether the test has right name.
#47911 (comment)
Thays Grazia [Thu, 15 Apr 2021 11:26:11 +0000 (08:26 -0300)]
Fix debugger problem when debugging interpreter after remove domain from StackFrameInfo (#51271)
Marie Píchová [Thu, 15 Apr 2021 11:13:30 +0000 (13:13 +0200)]
Update msquic revision in docs after certificate work. (#51230)
* Update msquic revision in docs after certificate work.
* New ActiveIssue and a type in comment.
Maxim Lipnin [Thu, 15 Apr 2021 10:48:37 +0000 (13:48 +0300)]
Mark PNSE-throwing methods in System.Net.NetworkInformation.IPGlobalProperties as unsupported on Android (#50855)
Part of #47911.
This is to annotate the following methods in System.Net.NetworkInformation.IPGlobalProperties as unsupported on Android since they throw PNSE:
- GetActiveTcpConnections();
- GetActiveTcpListeners();
- GetActiveUdpListeners();
Stephen Toub [Thu, 15 Apr 2021 10:22:44 +0000 (06:22 -0400)]
Add S.R.CompilerServices.InterpolatedStringBuilder (#51086)
* Add InterpolatedStringBuilder
* Address PR feedback
* Revise based on API review
* Address PR feedback
* Fix DateOnly/TimeOnly
Mansoor Saqib [Thu, 15 Apr 2021 05:53:31 +0000 (22:53 -0700)]
Fix silent fallback to Debug when building native libs (#51210)
* Currently the CMAKE_BUILD_TYPE is not being passed in when
creating the native library intermediates.
* Before the change to Ninja for CMake generation (
8c2158f9fe1)
the default uninitialized cmake build type was set to Release so the
bug was not visible.
* After the Ninja change, the default uninitialized cmake build type
is set to Debug so it becomes more apparent.
* This improves performance of native libs like System.IO.Compression
by a considerable amount as they are currently being built in Debug,
even when the Release configuration is specified.
Santiago Fernandez Madero [Thu, 15 Apr 2021 04:56:46 +0000 (21:56 -0700)]
Update Ubuntu build pools to 1804 (#51279)
Tomáš Matoušek [Thu, 15 Apr 2021 03:56:59 +0000 (20:56 -0700)]
Fix disposal of MetadataProvider on failure to read Embedded PDB (#51288)
Stephen Toub [Thu, 15 Apr 2021 03:14:38 +0000 (23:14 -0400)]
Update RuntimeTypeMetadataUpdateHandler to be able to clear all caches (#51242)
Matt Thalman [Thu, 15 Apr 2021 03:10:54 +0000 (22:10 -0500)]
Remove unused Mac interop libraries (#51247)
`LibSystemCommonCrypto` and `LibSystemKernel` are unused by any code so removing them as dead code.
Aleksey Kliger (λgeek) [Thu, 15 Apr 2021 03:08:54 +0000 (23:08 -0400)]
[custom_attrs] Fix incorrect refactoring (#51275)
In
https://github.com/dotnet/runtime/pull/49738/files#diff-9bd9d0e46241d07dc62110246c89c9f056333eff4b0b089551780a625c871d0dL1982
When the code changed from acessing ca->rows directly, to using
table_info_get_rows, the "then" branch here was changed incorrectly.
The old code was
```c
if (method_index == ca->rows) {
ca = &image->tables [MONO_TABLE_PARAM];
param_last = ca->rows + 1;
```
So `param_last` should be set to one past the last row of
MONO_TABLE_PARAM, not one past the number of rows in MONO_TABLE_METHOD (ca)
Jan Kotas [Thu, 15 Apr 2021 03:05:26 +0000 (17:05 -1000)]
Delete unused variables in build-runtime.sh (#51197)
Layomi Akinrinade [Thu, 15 Apr 2021 02:55:48 +0000 (19:55 -0700)]
[JSON source gen 1/3] Implement APIs needed by JSON source generator (#51149)
* Rename JsonClassInfo to JsonTypeInfo
* Move existing metadata types to new Metadata sub-folder/sub-namespace
* Add JsonMetadataServices and APIs needed by source generator
* Add tests and address feedback
* Rename ClassType to ConverterStrategy and clean up usage
* Move JsonSerializerContext to S.T.J.Serialization namespace and address doc feedback
Vladimir Sadov [Thu, 15 Apr 2021 02:00:31 +0000 (19:00 -0700)]
Singlefile: enabling compression for managed assemblies. (#50817)
* enable compression of assemblies
* fix Unix build
* map should use converted layout for compressed
* enable execution for R2R
* fixes for OSX
* PR feedback (comments)
* more PR feedback
* shorter include path to pal_zlib.h
* Apply suggestions from code review
Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>
Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>
Egor Bogatov [Thu, 15 Apr 2021 01:52:43 +0000 (04:52 +0300)]
JIT: Give up on the tail call if there are unexpected blocks after it (#50806)
Inlinee guarded devirtualization candidates that are also tail call
candidates can share the return temp with the parent inline.
Blocks containing only GT_NOP or only GT_PHI are empty.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Pent Ploompuu [Thu, 15 Apr 2021 01:19:23 +0000 (04:19 +0300)]
Fix SQRT, RCP, RSQRT PerfScores (#50813)
Bruce Forstall [Thu, 15 Apr 2021 01:09:34 +0000 (18:09 -0700)]
Disable failing test `bigevent` for GCStress macOS arm64 (#51267)
Tracking: https://github.com/dotnet/runtime/issues/51133
Bruce Forstall [Thu, 15 Apr 2021 01:07:37 +0000 (18:07 -0700)]
Disable failing test OOMException01 (#51263)
Tracking issue: #51209
Andy Gocke [Thu, 15 Apr 2021 00:52:52 +0000 (17:52 -0700)]
Enable PGO packaging for Linux & win-x86 (#51047)
Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
Fan Yang [Thu, 15 Apr 2021 00:24:34 +0000 (20:24 -0400)]
Create a nuget package for RuntimeConfigParser (#51240)
Fixes #51236
Stephen Toub [Wed, 14 Apr 2021 23:58:30 +0000 (19:58 -0400)]
Enable JsonSerializerOptions cache clearing for hot reload metadata update (#51160)
* Enable JsonSerializerOptions cache clearing for hot reload metadata update
* Address PR feedback
Jeremy Barton [Wed, 14 Apr 2021 23:38:19 +0000 (16:38 -0700)]
Make portable builds work across OpenSSL 1.0.2/1.1.1/3.0
Overall structure of changes
* Pull compatibility headers out into separate include files, because opensslshim.h is too big.
* Use forward definition of EVP_PKEY_CTX_set_rsa_keygen_bits and friends.
* These are in a new apibridge file because they're for bridging up to 3.0, and the existing one was for 1.1(.1)
* Some constants needed for this file changed between 1.1 and 3.0, so there are a lot of asserts and redefines.
* On OpenSSL 3.0, build a legacy version of ERR_put_error since it has the easier signature to work with.
* FALLBACK_FUNCTION doesn't care which version it bound to, if it doesn't find it use a local_ function.
* Renamed NEW_REQUIRED_FUNCTION to REQUIRED_FUNCTION_110 because "new" is now "sort of old".
* There's a manual sanity test that either ERR_put_error or the three new functions that together replace it are found, so we don't end up in a state where we can't report shim-injected errors.
Portable build checker:
* Built with OpenSSL 1.0.2 headers (Ubuntu 16.04 default libssl-dev)
* Ran with 1.0.2 (Ubuntu 16.04 default libssl)
* Ran with 1.1.1 (Ubuntu 18.04 default libssl)
* Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)
* Built with OpenSSL 1.1.1 headers (Ubuntu 18.04 default libssl-dev)
* Ran with 1.0.2 (Ubuntu 16.04 default libssl)
* Ran with 1.1.1 (Ubuntu 18.04 default libssl)
* Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)
* Built with OpenSSL 3.0 headers (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13 and some surgery to the extra_libs.cmake)
* Ran with 1.0.2 (Ubuntu 16.04 default libssl)
* Ran with 1.1.1 (Ubuntu 18.04 default libssl)
* Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)
3.0 doesn't run error-free, but it runs with the same error rate from portable and direct builds. All verification was limited to the System.Security.Cryptography.Algorithms.Tests run, but that's generally representative of the bindings.
Aleksey Kliger (λgeek) [Wed, 14 Apr 2021 22:07:49 +0000 (18:07 -0400)]
[mbr] Add support for editing property getters/setters (#51011)
* wip: allow Property table (0x17) EnCLog entries in pass1
* [mbr] Allow MONO_TABLE_PROPERTY updates in pass2
Note that modifications of getter or setter bodies add new rows to the
MethodSemantics table that point to an existing method def (with an updated IL)
and to an existing row in the property table. So there is nothing to do.
* [mbr] Add pass1 check that new MethodSemantics are pointing at existing methods.
We only support modifications of getters/setters, not adding a new getter or
setter where there wasn't one previously.
(Adding new methods in general fails right now)
* address feedback
dotnet-maestro[bot] [Wed, 14 Apr 2021 21:38:19 +0000 (21:38 +0000)]
Update dependencies from https://github.com/dotnet/xharness build
20210414.1 (#51228)
[main] Update dependencies from dotnet/xharness
Brian Sullivan [Wed, 14 Apr 2021 20:50:18 +0000 (13:50 -0700)]
Use target_size_t for VNForByrefCon (#50984)
* Use target_size_t for VNForByrefCon
* run clang-format
* Change assert to use TYP_I_IMPL
Larry Ewing [Wed, 14 Apr 2021 20:45:58 +0000 (15:45 -0500)]
[Wasm] Add AutoImport.props to indicated native workload is installed (#51192)
* Set sentinel property that auto enables the workload
* include the AutoImports.props in the package
Andy Ayers [Wed, 14 Apr 2021 19:18:43 +0000 (12:18 -0700)]
JIT: reduce importer spilling for some stfld (#51158)
If we know which local is going to be updated, just spill that local.
Mansoor Saqib [Wed, 14 Apr 2021 18:54:33 +0000 (11:54 -0700)]
Optimize KnownColor value lookup via a combined color table (#50489)
* Optimize KnownColor value lookup via a combined color table
Andrew Au [Wed, 14 Apr 2021 18:32:33 +0000 (11:32 -0700)]
Improve background mark stack overflow performance (#50214)
Kunal Pathak [Wed, 14 Apr 2021 18:18:15 +0000 (11:18 -0700)]
Fix resolution code for scenarios where values are copied from stack (#50890)
* Fix resolution code for scenarios where values are copied from stack
During resolution, when we decide to resolve a `targetReg` "RA" which is the source of
another register "RB" that is also participating in resolution, we would spill "RA" and
add resolution move into "RA". However, we were not recording the fact that resolution of "RB"
now has to happen from `REG_STK`.
Also, when we perform resolution, we add back the source register into `targetRegsReady`
(data structure to tell which `targetReg`s are ready for resolution). This is not needed if
that source register was never one of the `targetReg`s we decided to resolve.
* Do not resolve targets using "reg to reg" mov
if they are set to be resolved from "stack to reg" mov.
* jit format
* Revert "Disable JIT/Methodical/fp/exgen/10w5d_cs_ro for Linux/arm32 (#50056)"
This reverts commit
8722cdac9b5d6837cf6232a34c95b6cf24e9bbc4.
* fix assert
Steve Harter [Wed, 14 Apr 2021 17:30:38 +0000 (12:30 -0500)]
Add JsonNode feature (#51025)
Miha Zupan [Wed, 14 Apr 2021 15:57:55 +0000 (17:57 +0200)]
Disable SendRecvPollSync_TcpListener_Socket on Windows 8 (#51186)
Ryan Lucia [Wed, 14 Apr 2021 15:44:04 +0000 (11:44 -0400)]
[mono] Enable explicit null checks on tvOS and watchOS (#51136)
The implicit checks do not work due to platform limitations in the signal handling
Tarek Mahmoud Sayed [Wed, 14 Apr 2021 15:34:01 +0000 (08:34 -0700)]
Introduce DateOnly and TimeOnly types (#50980)
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Marek Safar [Wed, 14 Apr 2021 14:58:32 +0000 (16:58 +0200)]
Remove not needed properties from specially recognizes list for mono host (#51225)
Thays Grazia [Wed, 14 Apr 2021 14:08:07 +0000 (11:08 -0300)]
[mono][debugger ]Adding version to dbgshim and mscordbi (#51194)
* Adding version to dbgshim and mscordbi
* Adding code owners
* Fix Mac compilation
Filip Navara [Wed, 14 Apr 2021 13:48:08 +0000 (15:48 +0200)]
Compile tvOS Mono and libs with bitcode (#51220)
Contributes to #48508.
Zoltan Varga [Wed, 14 Apr 2021 12:08:57 +0000 (08:08 -0400)]
[mono] Add a comment about freeing caches. (#51223)
Elinor Fung [Wed, 14 Apr 2021 04:12:15 +0000 (21:12 -0700)]
Put native library loading helpers in a separate file from dllimport.cpp (#51201)
Tarek Mahmoud Sayed [Wed, 14 Apr 2021 04:08:52 +0000 (21:08 -0700)]
IANA To/From Windows Ids Conversion APIs (#51093)
* Iana To/From Windows Ids Conversion APIs
* Address the feedback and fix the browser build breaks
* Address the feedback
Tanner Gooding [Wed, 14 Apr 2021 03:03:45 +0000 (20:03 -0700)]
Expose an eeIsJitIntrinsic method for quickly determining if a method handle represents an intrinsic method (#51124)
* Updating the JIT/EE interface to expose `isJitIntrinsic`
* Update JITEEVersionIdentifier
* Update fgFindJumpTargets to use the much cheaper `eeIsJitIntrinsic`
* Ensure IsJitIntrinsic exists in the LightWeightMap and fix a copy/paste error
* Run ThunkGenerator
* Don't resolve tokens for CEE_CONSTRAINED when making inlining observations
Andy Ayers [Wed, 14 Apr 2021 02:53:30 +0000 (19:53 -0700)]
Fix issues with version resilient hash (#51191)
I noticed that some methods under dynamic PGO did not have PGO data.
Tracked this down to the Tier0 jit being unable to allocate a PGO schema.
This in turn was caused by the IL hash computation failing.
So, this PR fixes issues in the IL hash:
* pass in the right pointer to the IL
* advance the pointer as we scan the IL
* don't bail out early for the InlineNone case
David Wrighton [Wed, 14 Apr 2021 00:35:31 +0000 (17:35 -0700)]
Simplify mibc usage in the build (#50536)
- Produce a merged mibc with all scenarios squished together
- Properly attach the mibc data to the incremental build for System.Private.CoreLib
- This can't be done for the framework here. It will require mibc integration in the SDK
- Enable pgo optimization in checked builds
- Enable pgo optimization in framework compile for outerloop runs
Zoltan Varga [Wed, 14 Apr 2021 00:27:32 +0000 (20:27 -0400)]
[mono] Use the proper memory manager in the JIT code. (#51175)
Zoltan Varga [Wed, 14 Apr 2021 00:27:13 +0000 (20:27 -0400)]
[mono] Transition memory allocations from image sets to memory managers. (#50299)
* [mono] Transition memory allocations from image sets to memory managers.
* Move hashes from MonoImageSet to MonoGenericMemoryManager.
* Add a mono_mem_manager_get_generic () function which returns
a memory manager for a set images. Same as the get_image_set ()
function.
* Transition users of image sets to use MonoGenericMemoryManager.
* [mono] Unify MonoMemoryManager subclasses.
* Remove unused image set code.
Tomáš Rylek [Tue, 13 Apr 2021 23:40:53 +0000 (16:40 -0700)]
Fix Crossgen2 compilation failures in several type generator tests (#51090)
As the PR
https://github.com/dotnet/runtime/pull/44041
effectively decoupled OwningType from Method in MethodWithToken,
I believe we now need to include OwningType in the Equals check,
otherwise we may (and sometimes do) crash in the assertion failure
checking that OwningType matches between instances.
Thanks
Tomas
Jan Vorlicek [Tue, 13 Apr 2021 23:07:41 +0000 (01:07 +0200)]
Fix native stack size alignment on macOS arm64 (#51179)
We were setting an unaligned stack size to the MethodDesc of ILStub. The
lowest two bits actually overlap with two flags in the extended flags,
so the size is expected to be aligned at least to 4 to not to overwrite
the flags. On macOS arm64, the computed native stack size can be misaligned,
so this change adds explicit alignment before storing the stack size to
the MethodDesc.
Kunal Pathak [Tue, 13 Apr 2021 22:44:44 +0000 (15:44 -0700)]
Update lpFirst and lpTop to reflect accurate compacted blocks (#51033)
* include first and top in compacting
* Convert to assert
* Revert "Convert to assert"
This reverts commit
7da1a8c7d910ad00bbc7b40314997f70960729a5.
Andy Ayers [Tue, 13 Apr 2021 20:10:49 +0000 (13:10 -0700)]
JIT: remove guarded devirtualization restriction for small struct returns (#51157)
Now that we're not retyping small structs, the existing transformation works
for methods returning small structs too.
Fixes #51138.
Radek Doulik [Tue, 13 Apr 2021 19:48:35 +0000 (21:48 +0200)]
[wasm] Initial test support on windows (#49830)
Add support to run libraries tests on windows. Examples of how to run the tests:
.\build.cmd libs.tests -test -os browser
.\dotnet.cmd build /t:Test /p:TargetOS=Browser src\libraries\System.Collections.Concurrent\tests
.\dotnet.cmd build /t:Test /p:TargetOS=Browser /p:JSEngine="SpiderMonkey" src\libraries\System.Text.Json\tests
Tom McDonald [Tue, 13 Apr 2021 19:40:39 +0000 (12:40 -0700)]
Update SOS readme install instructions (#51181)
dotnet-maestro[bot] [Tue, 13 Apr 2021 19:28:59 +0000 (19:28 +0000)]
[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project (#51145)
[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project
Zoltan Varga [Tue, 13 Apr 2021 19:23:59 +0000 (15:23 -0400)]
[mono] Emit instances for EnumComparer<T> into the mscorlib aot image, so the (#51180)
gsharedvt version is not used.
Fixes https://github.com/dotnet/runtime/issues/51113.
Tarek Mahmoud Sayed [Tue, 13 Apr 2021 18:17:44 +0000 (11:17 -0700)]
Expose Adjustment Rule BaseUtcOffsetDelta (#51055)
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Eric StJohn [Tue, 13 Apr 2021 18:00:14 +0000 (11:00 -0700)]
Add support for adding RIDs to runtime.json during build (#50818)
* Add support for adding RIDs to RidGraph during build
* Address code review feedback
* Ensure GenerateRuntimeJson runs before Pack
The pack task itself doesn't do anything but depend on a sequence of tasks.
As a result running a target `BeforeTargets="Pack"` actually runs after
the package is created, since dependencies run before BeforeTargets.
Sequence the target before GenerateNuspec instead.
* Only add target RID to the RID graph
Bruce Forstall [Tue, 13 Apr 2021 17:11:22 +0000 (10:11 -0700)]
Clean up optSetBlockWeights (#51044)
Try to avoid traversing the return block list it it's not necessary.
Add a header comment.
No diffs.
Alexander Köplinger [Tue, 13 Apr 2021 15:59:26 +0000 (17:59 +0200)]
Enable MacCatalyst tests in System.Runtime.Extensions.Tests (#51169)
We now have the necessary support in the runtime and arcade.
dotnet-maestro[bot] [Tue, 13 Apr 2021 15:54:07 +0000 (17:54 +0200)]
[main] Update dependencies from mono/linker (#51162)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Thays Grazia [Tue, 13 Apr 2021 15:11:06 +0000 (12:11 -0300)]
[debugger][mono][icordbg] Implement minimal version of dbgshim to start an application on desktop (#50505)
* Running debugger tests on windows using mono runtime
* Coreclr Debugger Tests are running on windows
* Removing wrong comments
* Update src/mono/dlls/dbgshim/dbgshim.cpp
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Changing what was suggested by @lambdageek
* Fix running tests on Mac
* Fix windows compilation removing unused messages
* Fix merge
* Fix compilation on other platforms then amd64
* Fix copy files when does not generate dbgshim and mscordbi
* Ignore when mscodbig and dbgshim is not found
* Fix copy files when they don't exist
* Update src/mono/mono/mini/debugger-protocol.c
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Aleksey Kliger (λgeek) [Tue, 13 Apr 2021 14:55:34 +0000 (10:55 -0400)]
[design] Mono runtime components (#49913)
* [design] MonoVM Runtime Components
* Add details about writing a new component
* Update design doc to reflect latest changes in the prototype