platform/upstream/coreclr.git
5 years agoFix PGO on Windows (#24949)
Jeremy Koritzinsky [Tue, 4 Jun 2019 18:49:51 +0000 (11:49 -0700)]
Fix PGO on Windows (#24949)

* Add warning disables around InitJITHelpers1 for C4731

* Move configureoptimization up in configurecompiler.

5 years ago[master] Update dependencies from dotnet/corefx (#24883)
dotnet-maestro[bot] [Tue, 4 Jun 2019 16:20:49 +0000 (09:20 -0700)]
[master] Update dependencies from dotnet/corefx (#24883)

* Update dependencies from https://github.com/dotnet/corefx build 20190603.11

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview7.19303.11
- Microsoft.NETCore.Platforms - 3.0.0-preview7.19303.11
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview7.19303.11

* Add Microsoft.Diagnostics.Runtime to CoreFx.depproj

* Remove removed commands from RunTests.cmd/sh

5 years agoUpdate to AutoTrace (#24936)
John Salem [Tue, 4 Jun 2019 16:09:59 +0000 (09:09 -0700)]
Update to AutoTrace (#24936)

* * Add license headers to autotrace.h|cpp
* use W() macro for getting correct string literal type
* formalize env vars to be COMPlus_* style
* add documentation
* modify cmake files to have the flag and set default value to 0

* Fix typo

5 years agoBeing consistent (#24927)
Youssef1313 [Tue, 4 Jun 2019 15:30:26 +0000 (17:30 +0200)]
Being consistent (#24927)

Being consistent using all if statement with curly braces.

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20190604.1 (#24944)
dotnet-maestro[bot] [Tue, 4 Jun 2019 15:16:53 +0000 (08:16 -0700)]
Update dependencies from https://github.com/dotnet/arcade build 20190604.1 (#24944)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19304.1
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19304.1
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19304.1
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19304.1

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190603.11 ...
dotnet-maestro[bot] [Tue, 4 Jun 2019 15:16:38 +0000 (08:16 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190603.11 (#24945)

- Microsoft.NETCore.App - 3.0.0-preview7-27803-11

5 years agofollow the ICU User Guide recommendation to optimize the perf of InvariantCultureIgno...
Adam Sitnik [Tue, 4 Jun 2019 13:20:28 +0000 (15:20 +0200)]
follow the ICU User Guide recommendation to optimize the perf of InvariantCultureIgnoreCase on Linux (#24889)

* follow the ICU User Guide recommendation to optimize the perf of InvariantCultureIgnoreCase on Linux:

1. try to guess the max size and call ucol_getSortKey just once
2. if the buffer is not big enough, call the method again providing the actual sort key length

* handle 0 case

* handle integer overflow

* shorten the time the buffers are pinned

* use the cheapest pinning

* code review fixes: don't use variable length stackalloc, don't copy text from docs (licensing) + don't try to go with the fast path when it would require allocating more managed memory for big strings

* simplify the condition

5 years agofix doc for stress run instructions (#24941)
Maoni Stephens [Tue, 4 Jun 2019 04:28:01 +0000 (21:28 -0700)]
fix doc for stress run instructions (#24941)

5 years agoSpecify TaskScheduler.Default in EventPipeEventDispatcher (#24930)
Stephen Toub [Tue, 4 Jun 2019 03:56:17 +0000 (23:56 -0400)]
Specify TaskScheduler.Default in EventPipeEventDispatcher (#24930)

Just in case there's a non-default TaskScheduler in play, explicitly specify TaskScheduler.Default so that we don't accidentally schedule this task to another scheduler, in which case it's up to that scheduler if and how to respect the LongRunning request.

5 years agoAdded scenario to test that CallGetTotalAllocatedBytes is monotonic in imprecise...
Vladimir Sadov [Tue, 4 Jun 2019 03:55:42 +0000 (20:55 -0700)]
Added scenario to test that CallGetTotalAllocatedBytes is monotonic in imprecise mode. (#24935)

5 years agoAvoid moving the bitOffset twice when enumerating safepoints
Andrew Au [Sat, 1 Jun 2019 06:58:38 +0000 (23:58 -0700)]
Avoid moving the bitOffset twice when enumerating safepoints

5 years agoFix signature mismatch between managed and unmanaged GetCodeInfo signatures (#24932)
Jan Kotas [Tue, 4 Jun 2019 02:38:02 +0000 (19:38 -0700)]
Fix signature mismatch between managed and unmanaged GetCodeInfo signatures (#24932)

Fixes #24925

5 years agoRemove some event trace asserts that can fail if tracing is stopped at a particular...
Koundinya Veluri [Tue, 4 Jun 2019 02:07:06 +0000 (19:07 -0700)]
Remove some event trace asserts that can fail if tracing is stopped at a particular point (#24897)

5 years agoRemove unnecessary Shared<T> class from Task (#24931)
Stephen Toub [Tue, 4 Jun 2019 01:00:04 +0000 (21:00 -0400)]
Remove unnecessary Shared<T> class from Task (#24931)

It's just StrongBox<T>.

5 years agoAdjust several `where T : class?` constraints (#24894)
Stephen Toub [Mon, 3 Jun 2019 20:26:24 +0000 (16:26 -0400)]
Adjust several `where T : class?` constraints (#24894)

* Adjust several `where T : class?` constraints

* Address PR feedback

5 years agoRemoving the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41...
Tanner Gooding [Mon, 3 Jun 2019 19:15:32 +0000 (12:15 -0700)]
Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class (#24886)

* Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class

* Removing JIT support for the SSE41_TestAllOnes, SSE41_TestAllZeros, and SSE41_TestMixOnesZeros intrinsics

* Removing tests for the Sse41.TestAllOnes, Sse41.TestAllZeros, and Sse41.TestMixOnesZeros methods

5 years agoFix initialize methods to set m_Header correctly (#24892)
John Salem [Mon, 3 Jun 2019 17:16:38 +0000 (10:16 -0700)]
Fix initialize methods to set m_Header correctly (#24892)

* put check in to ensure incoming message header has reasonable size

5 years agoFix armel tests build (#24678)
Gleb Balykov [Mon, 3 Jun 2019 16:29:39 +0000 (19:29 +0300)]
Fix armel tests build (#24678)

* Fix build-tests script for cross build and fix tests for armel

* Handle case of -skipcrossgen for cross builds

* Fix build error in case of cross builds when ROOTFS_DIR is not passed explicitly

* Fix portable build parameter setup for armel tests build

* Move force of non-portable build for armel from build.sh/build-test.sh to init-distro-rid.sh

* Fix priority1 tests build for armel

5 years agoReenable tests
Juan Hoyos [Fri, 31 May 2019 19:40:44 +0000 (12:40 -0700)]
Reenable tests

5 years agoFix logic for deletion
Juan Hoyos [Fri, 31 May 2019 19:33:04 +0000 (12:33 -0700)]
Fix logic for deletion

5 years agoDisable event pipe tests for investigation
Juan Hoyos [Fri, 31 May 2019 17:44:00 +0000 (10:44 -0700)]
Disable event pipe tests for investigation

5 years agoReenable tests turned off in #24772
Juan Sebastian Hoyos Ayala [Thu, 30 May 2019 18:16:00 +0000 (18:16 +0000)]
Reenable tests turned off in #24772

5 years agoFix event pipe session provider list clear
Juan Sebastian Hoyos Ayala [Thu, 30 May 2019 18:12:41 +0000 (18:12 +0000)]
Fix event pipe session provider list clear

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20190602.2 (#24918)
dotnet-maestro[bot] [Mon, 3 Jun 2019 14:33:16 +0000 (10:33 -0400)]
Update dependencies from https://github.com/dotnet/arcade build 20190602.2 (#24918)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19302.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19302.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19302.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19302.2

5 years agoJIT HW Intrinsic implementation doc (#23622)
Carol Eidt [Mon, 3 Jun 2019 13:48:47 +0000 (06:48 -0700)]
JIT HW Intrinsic implementation doc (#23622)

* JIT HW Intrinsic implementation doc

5 years agoFinal touch
Andrew Au [Fri, 31 May 2019 22:28:16 +0000 (15:28 -0700)]
Final touch

5 years agoProductize auto_trace
John Salem [Sat, 25 May 2019 00:13:06 +0000 (17:13 -0700)]
Productize auto_trace

5 years agoAutoTrace - launch dotnet trace to capture trace as soon as the runtime is available...
Andrew Au [Fri, 3 May 2019 22:43:43 +0000 (15:43 -0700)]
AutoTrace - launch dotnet trace to capture trace as soon as the runtime is available to trace

5 years ago[master] Update dependencies from dotnet/arcade (#24906)
dotnet-maestro[bot] [Sun, 2 Jun 2019 14:45:40 +0000 (07:45 -0700)]
[master] Update dependencies from dotnet/arcade (#24906)

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19301.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19301.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19301.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19301.2

5 years agoImprove fatal err msg (#24390)
Dan Moseley [Sun, 2 Jun 2019 13:53:55 +0000 (06:53 -0700)]
Improve fatal err msg (#24390)

* Improve fatal err msg

* Match SO format

* a

* Remove dead define

* More adjustments to ex msg

* And PAL

* Remove special case for SOE

* Remove excess Debug.Assert newline

* Remove excess newline

* typo

* New format

* Remove DebugProvider redundancy

* Adjustments

* Remove preceding newline

* Make other SOE and OOM consistent

* Tidy up assertion msg

* Fix missing newline after inner exception divider

* CR when no inner exception

* ToString never CR terminated

* disable corefx tests temporarily

5 years agoMove EventPipeEventSource deletion to a better place (#24901)
Sung Yoon Whang [Sat, 1 Jun 2019 00:17:12 +0000 (17:17 -0700)]
Move EventPipeEventSource deletion to a better place (#24901)

* Move EventPipeEventSource deletion to a better place

* typo

5 years agoFix FileStream.FlushAsync() to behave like Flush() (#24902)
Stephen Toub [Fri, 31 May 2019 23:41:59 +0000 (19:41 -0400)]
Fix FileStream.FlushAsync() to behave like Flush() (#24902)

Flush() behaves like Flush(false) and writes out any buffered data but doesn't P/Invoke to FlushFileBuffers/FSync to flush the OS buffers.

But whereas FlushAsync() is supposed to just be an async equivalent of Flush(), it's actually behaving like Flush(true).  This makes FlushAsync() inconsistent and much more expensive.  (This is separate from FlushAsync not actually being async, which is an impactful problem to be solved separately.)

This changes FlushAsync to behave like Flush()/Flush(false) rather than Flush(true).  If someone wants the FlushFileBuffers/FSync behavior, they can call Flush(true).

5 years agoAdd workaround for native tool installation CI hang (#24899)
Juan Hoyos [Fri, 31 May 2019 23:04:38 +0000 (16:04 -0700)]
Add workaround for native tool installation CI hang (#24899)

5 years agoRevert "Update dependencies from https://github.com/dotnet/arcade build 20190530...
William Godbe [Fri, 31 May 2019 21:02:43 +0000 (14:02 -0700)]
Revert "Update dependencies from https://github.com/dotnet/arcade build 20190530.2 (#24882)" (#24898)

This reverts commit aa26688ee5e2b03945a22cda324887341e10595f.

5 years agoUpdate branding to preview7 in master (#24895)
William Godbe [Fri, 31 May 2019 19:48:54 +0000 (12:48 -0700)]
Update branding to preview7 in master (#24895)

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190530.01 ...
dotnet-maestro[bot] [Fri, 31 May 2019 18:49:08 +0000 (11:49 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190530.01 (#24884)

- Microsoft.NETCore.App - 3.0.0-preview6-27730-01

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20190530.2 (#24882)
dotnet-maestro[bot] [Fri, 31 May 2019 18:06:41 +0000 (11:06 -0700)]
Update dependencies from https://github.com/dotnet/arcade build 20190530.2 (#24882)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19280.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19280.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19280.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19280.2

5 years agoHandle a zero byte cpblk (#24871)
Carol Eidt [Fri, 31 May 2019 18:02:02 +0000 (11:02 -0700)]
Handle a zero byte cpblk (#24871)

Fix #24846

5 years agoFix overlooked moduleIndex initial value (#24881)
Jan Vorlicek [Fri, 31 May 2019 16:46:12 +0000 (18:46 +0200)]
Fix overlooked moduleIndex initial value (#24881)

When adding the signature copying some time ago, I have overlooked one
place where the moduleIndex was set to -1 instead of MODULE_INDEX_NONE.
I was using the -1 during the development and replaced it by creating
MODULE_INDEX_NONE during final cleanup at all but one places.

This caused issues during crossgen even without large version bubble
enabled. Methods requiring generic constraint were not crossgen-ed due
to this.

5 years agoMakes GetTotalAllocatedBytes monotonic in nonprecise case. (#24875)
Vladimir Sadov [Fri, 31 May 2019 14:45:03 +0000 (07:45 -0700)]
Makes GetTotalAllocatedBytes monotonic in nonprecise case. (#24875)

* Makes GetTotalAllocatedBytes monotonic in nonprecise case.

Fixes:#24615

* read `dead_threads_non_alloc_bytes` atomically on 32bit platforms

* Update src/vm/comutilnative.cpp

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
5 years agoDelete dead code (#24876)
Jan Kotas [Fri, 31 May 2019 06:35:35 +0000 (23:35 -0700)]
Delete dead code (#24876)

5 years agoCheck that we are using a valid IDispatch invocation flag earlier to limit the amount...
Jeremy Koritzinsky [Fri, 31 May 2019 03:40:51 +0000 (20:40 -0700)]
Check that we are using a valid IDispatch invocation flag earlier to limit the amount of work we do when we're going to return early anyway. (#24872)

5 years agoFix #24867 (#24870)
Jarret Shook [Fri, 31 May 2019 02:07:50 +0000 (19:07 -0700)]
Fix #24867 (#24870)

Pre SDK 3.0, a project type that is not .csproj would not include Directory.Build.targets. Change empty.proj to empty.csproj to allow source build, which uses a 2.1 sdk to build, correctly import Directory.Build.targets.

5 years agoRemove unused code in vm/util.* (#24863)
Aaron Robinson [Fri, 31 May 2019 01:38:33 +0000 (18:38 -0700)]
Remove unused code in vm/util.* (#24863)

* Remove unused code in vm/util.*

5 years agoAdd information in docs for required Windows SDK version for test build. (#24865)
Jeremy Koritzinsky [Fri, 31 May 2019 00:33:21 +0000 (17:33 -0700)]
Add information in docs for required Windows SDK version for test build. (#24865)

5 years agoMerge pull request #24869 from briansull/desktop-build-fixes
Brian Sullivan [Thu, 30 May 2019 23:49:40 +0000 (16:49 -0700)]
Merge pull request #24869 from briansull/desktop-build-fixes

Fixes for building the Desktop JIT in CodegenMirror

5 years agoCreate NearDiffer in SuperPMI based on specified targetArchitecture (#24860)
Egor Chesakov [Thu, 30 May 2019 23:40:50 +0000 (16:40 -0700)]
Create NearDiffer in SuperPMI based on specified targetArchitecture (#24860)

5 years agoSupport running SuperPMI with ARM protononjit.dll (#24840)
Egor Chesakov [Thu, 30 May 2019 23:26:12 +0000 (16:26 -0700)]
Support running SuperPMI with ARM protononjit.dll (#24840)

5 years agoRemove BuildTools from product build (#24841)
Elinor Fung [Thu, 30 May 2019 21:58:09 +0000 (14:58 -0700)]
Remove BuildTools from product build (#24841)

* Remove BuildTools imports from product build
* Split scripts for installing dotnet vs BuildTools

5 years agoFixes for building the Desktop JIT in CodegenMirror
Brian Sullivan [Thu, 30 May 2019 21:34:55 +0000 (14:34 -0700)]
Fixes for building the Desktop JIT in CodegenMirror

5 years agoAdd build-tools.cmd (#24817)
Jan Vorlicek [Thu, 30 May 2019 20:07:06 +0000 (22:07 +0200)]
Add build-tools.cmd (#24817)

* Add build-tools.cmd

This script builds selected tools in the src/tools directory (for the
time being, it builds just the runincontext tool). This is a preparation
step to enable nightly runs with unloadability tests. The
build-tools.cmd should build helper tools needed during test runs.

* Remove the build-tools.cmd

* Build the tools as part of the managed runtime build.
* Update the R2RDump project to put binaries into the bin/Product/...

* Update runincontext.cmd/sh scripts

Reflect the new location of the runincontext binary

5 years agoMove CI to supported queues
Russ Keldorph [Tue, 28 May 2019 20:05:54 +0000 (13:05 -0700)]
Move CI to supported queues

5 years ago[master] Update dependencies from dotnet/arcade (#24854)
dotnet-maestro[bot] [Thu, 30 May 2019 19:04:15 +0000 (12:04 -0700)]
[master] Update dependencies from dotnet/arcade (#24854)

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19279.5
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19279.5
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19279.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19279.5

* Work around dotnet/arcade#2673

5 years agoUpdate CoreClr to preview6.19280.1 (#24848)
dotnet-maestro-bot [Thu, 30 May 2019 17:09:48 +0000 (10:09 -0700)]
Update CoreClr to preview6.19280.1 (#24848)

5 years agoAdd Environment.TickCount64 (#24857)
Stephen Toub [Thu, 30 May 2019 16:54:55 +0000 (12:54 -0400)]
Add Environment.TickCount64 (#24857)

5 years agoImplement R2R helpers for synchronized methods (#24646)
Michal Strehovský [Thu, 30 May 2019 15:37:23 +0000 (17:37 +0200)]
Implement R2R helpers for synchronized methods (#24646)

Synchronized methods show up when `Console` is used and the missing helper mapping would cause us not to AOT compile them.

5 years agoUpdate dependencies from https://github.com/dotnet/corefx build 20190529.8 (#24855)
dotnet-maestro[bot] [Thu, 30 May 2019 15:24:28 +0000 (08:24 -0700)]
Update dependencies from https://github.com/dotnet/corefx build 20190529.8 (#24855)

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview6.19279.8
- Microsoft.NETCore.Platforms - 3.0.0-preview6.19279.8
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview6.19279.8

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190529.07 ...
dotnet-maestro[bot] [Thu, 30 May 2019 15:23:35 +0000 (08:23 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190529.07 (#24856)

- Microsoft.NETCore.App - 3.0.0-preview6-27729-07

5 years agoFrkaya/gcc fix 052919 (#24845)
Sinan Kaya [Thu, 30 May 2019 08:35:37 +0000 (04:35 -0400)]
Frkaya/gcc fix 052919 (#24845)

* fix compilation with gcc7.x

In file included from src/inc/sstring.h:1029:0,
                 from src/inc/ex.h:19,
                 from src/inc/stgpool.h:28,
                 from src/inc/../md/inc/metamodel.h:18,
                 from src/inc/../md/inc/metamodelro.h:19,
                 from src/inc/metadata.h:17,
                 from src/inc/corpriv.h:21,
                 from src/md/compiler/stdafx.h:20,
                 from src/md/compiler/mdutil.cpp:12:
src/inc/sstring.inl: In member function â€˜const WCHAR* SString::GetUnicode() const’:
src/inc/sstring.inl:650:5: error: nonnull argument â€˜this’ compared to NULL [-Werror=nonnull-compare]
     if (this == NULL)
     ^~

add version check

* Use the abstracted version of __nodebug__

* cc1: warning: command line option â€˜-fpermissive’ is valid for C++/ObjC++ but not for C

5 years agoAllow generating HW intrinsics in crossgen (#24689)
Michal Strehovský [Thu, 30 May 2019 07:48:07 +0000 (09:48 +0200)]
Allow generating HW intrinsics in crossgen (#24689)

We currently don't precompile methods that use hardware intrinsics because we don't know the CPU that the generated code will run on. Jitting these methods slows down startup and accounts for 3% of startup time in PowerShell.
With this change, we're going to lift this restriction for CoreLib (the thing that matters for startup) and support generating HW intrinsics for our minimum supported target ISA (SSE/SSE2).

5 years agoRemove all uses of CanRunManagedCode() (#24847)
Aaron Robinson [Thu, 30 May 2019 06:51:51 +0000 (23:51 -0700)]
Remove all uses of CanRunManagedCode() (#24847)

* Remove all uses of CanRunManagedCode()

5 years agoUse /proc/<pid>/mem to read memory in remote DBI data target. It makes the test case...
Mike McLaughlin [Thu, 30 May 2019 06:39:31 +0000 (23:39 -0700)]
Use /proc/<pid>/mem to read memory in remote DBI data target. It makes the test case run at (#24844)

least 4 to 5 times faster than before.

Fallback to old transport ReadMemory if /proc/<pid>/mem can't be opened. This happens
on attach because of permissions/access, but works fine on the launch (the most
important case).

5 years agoAdd COMPlus_LTTng environment variable (#24733)
John Salem [Thu, 30 May 2019 01:59:27 +0000 (18:59 -0700)]
Add COMPlus_LTTng environment variable (#24733)

* default value is 1, and when set to 0 will disable loading LTTng.

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
5 years ago[master] Update dependencies from dotnet/arcade (#24780)
dotnet-maestro[bot] [Thu, 30 May 2019 00:58:14 +0000 (17:58 -0700)]
[master] Update dependencies from dotnet/arcade (#24780)

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19274.6
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19274.6
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19274.6
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19274.6

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19278.1
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19278.1
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19278.1
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19278.1

* Work around native initialization

5 years agoSort out ARM load/store instruction size issues (#20126)
mikedn [Thu, 30 May 2019 00:53:11 +0000 (03:53 +0300)]
Sort out ARM load/store instruction size issues (#20126)

* Avoid using ins_Load/ins_Store with constant type

* Use ldr to load array lengths/lower bounds

genCodeForArrIndex and genCodeForArrOffset emit a ldrsw on ARM64 but that's not necessary. Array lengths are always positive. Lower bounds are signed but then the subsequent subtract is anyway EA_4BYTE so sign extension isn't actually needed. Just use ldr on both ARM32 and ARM64.

* Use ldr to load array length (part 2)

genCodeForIndexAddr's range check generation is messed up:
- It uses ldrsw to load array length on ARM64. Not needed, the length is positive.
- It uses sxtw to sign etxend the array length if the index is native int. But it was already extended by the load.
- It creates IND and LEA nodes out of thin air. Just call the appropiate emitter functions.
- It always generates a TYP_I_IMPL cmp, even when the index is TYP_INT. Well, that's just bogus.

* Stop the using the instruction size for immediate scaling on ARM32

The scaling of immediate operands is a property of the instruction and its encoding. It doesnt' make sense to throw the instruction size (emitAttr) into the mix, that's a codegen/emitter specific concept. On ARM32 it's also almost meaningless, at least in the case of integer types - all instructions are really EA_4BYTE, even ldrb, ldrh etc.

The ARM64 emitter already extracts the scaling factor from the instruction. It can't use the instruction size as on ARM64 the size is used to select between 32 bit and 64 bit instructions so it's never EA_1BYTE/EA_2BYTE.

* Stop using ldrsw for TYP_INT loads

ARM64's ins_Load returns INS_ldrsw for TYP_INT but there's nothing in the JIT type system that requires sign extending TYP_INT values on load. The fact that an indir node has TYP_INT doesn't even imply that the value to load is signed, it may be unsigned and indir nodes will never have type TYP_UINT nor have the GTF_UNSIGNED flag set.

XARCH uses a mov (rather than movsxd, the equivalent of ldrsw) so it zero extends. There's no reason for ARM64 to behave differently and doing so makes it more difficult to share codegen logic between XARCH and ARM64

Other ARM64 compilers also use ldr rather than ldrsw.

This requires patching up emitInsAdjustLoadStoreAttr so EA_4BYTE loads don't end up using EA_8BYTE, which ldrsw requires.

* Cleanup genCodeForIndir/genCodeForStoreInd

In particular, cleanup selection of acquire/release instructions. The existing code starts by selecting a "normal" instruction, only to throw it away and redo the type/size logic in the volatile case. And get it wrong in the process, it required that "targetType" be TYP_UINT or TYP_LONG to use ldar. But there are no TYP_UINT indirs.

Also rename "targetType" to "type", using "target" is misleading. The real target type would be genActualType(tree->TypeGet()).

* Remove ARM32/64 load/store instruction size inconsistencies

- Require EA_4BYTE for byte/halfword instructions on ARM32.
- Remove emitInsAdjustLoadStoreAttr on ARM64. Getting the correct instruction size simply requires using emitActualTypeSize, that will provide the correct size on both ARM32 and ARM64.
- Replace emitTypeSize with emitActualTypeSize as needed.

* Remove unnecessary insUnscaleImm parameter

5 years agoStop using %~dp0 in build scripts after args processing (#24842)
Elinor Fung [Thu, 30 May 2019 00:10:41 +0000 (17:10 -0700)]
Stop using %~dp0 in build scripts after args processing (#24842)

5 years agoUpdate CoreClr to preview6.19279.1 (#24829)
dotnet-maestro-bot [Wed, 29 May 2019 22:57:42 +0000 (15:57 -0700)]
Update CoreClr to preview6.19279.1 (#24829)

5 years agoRefactor native build to remove the compiler-override files (#23897)
Jeremy Koritzinsky [Wed, 29 May 2019 21:40:31 +0000 (14:40 -0700)]
Refactor native build to remove the compiler-override files (#23897)

* On systems that have both cmake 2 and cmake 3, use cmake 3.

Move CMAKE_EXPORT_COMPILE_COMMANDS to top level instead of in gen-buildsys-*. Define the CMake install prefix in gen-buildsys-* instead of pulling from an environment variable.

Define C++ standard as CMake property instead of as flag.

Move CLR_DEFINES_*_INIT out of overrides and into configurecompiler.cmake

Move flags that generate debug info into configurecompiler.cmake

Remove the CMAKE_USER_RULES_OVERRIDE files.

Add cmake version output for determining what cmake versions each CI system has.

Fix syntax in gen-buildsys-clang.

Change add_compile_definitions back to add_definitions

Add -D prefix for adding definitions via add_definitions

Remove extraneous double-quote

Change default config definition adding to the syntax in master

Switch back to old CMAKE_<LANG>_FLAGS way of setting the language standards and try to go back to 2.8.12 minimum

Switch back setting compile definitions for non-Windows branch too.

Use SET with CMAKE_<LANG>_FLAGS. Convert some usages of appending to CMAKE_<LANG>_FLAGS to add_compile_options where possible.

Set CMAKE_<LANG>_FLAGS_INIT instead of CMAKE_<LANG>_FLAGS

Make sure configureopimitzation.cmake is included correctly in test build.

Try to add brackets to get the Linux ARM compilation working correctly.

Define standard language version in configurecompiler.cmake instead of root CMakeLists (so tests get it)

Try to move langauge standard check to configure.cmake

define language standard in each root CMakeLists.txt

Fix off-Windows test build.

Set CMAKE_EXPORT_COMPILE_COMMANDS after the project() call

* Set CMAKE_USER_MAKE_RULES_OVERRIDE to "" to not break incremental builds after building on a branch that had it set to a path.

* Remove CMake version output.

* Move comment outside of multiline command.

* Retry setting CMAKE_USER_MAKE_RULES_OVERRIDE

* Remove unnecessary variable wrappers.

* Simplify cmake 3 resolution.

* Explicitly use CMAKE_CXX_FLAGS for C++-only flags that GCC complains about on C files.

* Set -Wall via CMAKE_<LANG>_FLAGS until we can move all flag settings to add_compile_options

* Fix typos

* Another temporary precedence issue.

* include configureoptimization.cmake in configurecompiler.cmake

* Move setting CMAKE_EXPORT_COMPILE_COMMANDS to configurecompiler.cmake.

* Rename configure.cmake -> verify_lto.cmake.

* Fix path to verify-lto

* Try using CMAKE_<LANG>_FLAGS instead of CMAKE_<LANG>_FLAGS_INIT.

* Revert name change to configure.camek

5 years agoUse Ubuntu 14.04-on-16.04 Docker image for arm cross builds. (#23999)
Jeremy Koritzinsky [Wed, 29 May 2019 20:47:52 +0000 (13:47 -0700)]
Use Ubuntu 14.04-on-16.04 Docker image for arm cross builds. (#23999)

5 years agoStop specifying cdecl for ComponentEntryPoint (default to stdcall) (#24833)
Elinor Fung [Wed, 29 May 2019 20:32:07 +0000 (13:32 -0700)]
Stop specifying cdecl for ComponentEntryPoint (default to stdcall) (#24833)

5 years ago[master] Update dependencies from dotnet/corefx (#24781)
dotnet-maestro[bot] [Wed, 29 May 2019 18:14:05 +0000 (11:14 -0700)]
[master] Update dependencies from dotnet/corefx (#24781)

* Update dependencies from https://github.com/dotnet/corefx build 20190524.8

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview6.19274.8
- Microsoft.NETCore.Platforms - 3.0.0-preview6.19274.8
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview6.19274.8

* Update dependencies from https://github.com/dotnet/corefx build 20190527.2

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview6.19277.2
- Microsoft.NETCore.Platforms - 3.0.0-preview6.19277.2
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview6.19277.2

* Update dependencies from https://github.com/dotnet/corefx build 20190528.7

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview6.19278.7
- Microsoft.NETCore.Platforms - 3.0.0-preview6.19278.7
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview6.19278.7

5 years agoChange binary op tree display (#20045)
mikedn [Wed, 29 May 2019 17:37:25 +0000 (20:37 +0300)]
Change binary op tree display (#20045)

5 years agoAdd back AssemblyDescription attribute (#24819)
Sven Boemer [Wed, 29 May 2019 16:06:55 +0000 (09:06 -0700)]
Add back AssemblyDescription attribute (#24819)

This was present in System.Private.CoreLib previously, but removed in recent versions (I compared 3.0.0-preview5-27610-03 and 3.0.0-preview6-27715-05 on macos). It's unclear to me what used to be adding the attribute  - https://github.com/dotnet/coreclr/commit/099177b0899156a4e8a352083a273805240c0ccd touched the SPC logic, but even in that change I see no mention of it. Maybe it used to be autogenerated by the old project files. In any case, I believe it should be added back.
Its value used to be System.Private.CoreLib:
```diff
-  .custom instance void System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 16 53 79 73 74 65 6D 2E 50 72 69 76 61 74   // ...System.Privat
-                                                                                          65 2E 43 6F 72 65 4C 69 62 00 00 )                // e.CoreLib..
```

5 years agoUpdate MicrosoftDotNetXUnitConsoleRunnerVersion to reflect changes in Arcade (#24822)
Egor Chesakov [Wed, 29 May 2019 14:42:55 +0000 (07:42 -0700)]
Update MicrosoftDotNetXUnitConsoleRunnerVersion to reflect changes in Arcade (#24822)

* Update tf to netcoreapp2.1

* Bump up version of xunit.console package to 2.5.1-beta.19278.1

* Fix type in the version

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190528.04 ...
dotnet-maestro[bot] [Wed, 29 May 2019 14:42:25 +0000 (10:42 -0400)]
Update dependencies from https://github.com/dotnet/core-setup build 20190528.04 (#24827)

- Microsoft.NETCore.App - 3.0.0-preview6-27728-04

5 years agoSpecify restore sources in optdata.csproj (#24825)
Elinor Fung [Wed, 29 May 2019 07:40:39 +0000 (00:40 -0700)]
Specify restore sources in optdata.csproj (#24825)

5 years agoCreate the Concept of Multiple EventPipe Sessions (#24417)
José Rivero [Wed, 29 May 2019 06:17:02 +0000 (23:17 -0700)]
Create the Concept of Multiple EventPipe Sessions (#24417)

This is the initial work to enable https://github.com/dotnet/coreclr/issues/15377

## What's here?

- A lot of code move/split. Some important moves:
  - `EventPipe` has a colection of `EventPipeSessions` instead of a single session.
  - `EventPipeSession` now owns a `EventPipeBufferManager` and a `EventPipeFile`
  - `EventPipeThread` now owns a collection of { EventPipeBufferManager, EventPipeBuffer }, and a collection of { EventPipeBufferManager, EventPipeBufferList }
  - There is a cap on the max number of `EventPipeSession` (64 sessions)
  - `EventPipeProvider` and `EventPipeEvent` use a 64-bit mask to keep track of the sessions that are listening to provider/events.

## What's pending?

https://github.com/dotnet/coreclr/issues/24753

5 years agoChange DllImportPath policy to create unicode-named test library immediately before...
Jeremy Koritzinsky [Wed, 29 May 2019 03:55:52 +0000 (20:55 -0700)]
Change DllImportPath policy to create unicode-named test library immediately before use (#24812)

* Change DllImportPath_Unicode to use valid unicode characters. Create DllImportPath_Unicode via copying in a MSBuild property (copying in the test script doesn't work with batch).

* Have the test create the unicode native library right before use.

* Get first Dllimportpath_local that has the correct extension (check instead of assuming that the first one is the correct one).

5 years agoUse Arcade for native versioning (#24785)
Elinor Fung [Wed, 29 May 2019 01:46:08 +0000 (18:46 -0700)]
Use Arcade for native versioning (#24785)

5 years agoFix nullable annotation
Jan Kotas [Tue, 28 May 2019 22:48:40 +0000 (15:48 -0700)]
Fix nullable annotation

5 years agoFix superfluous delegate allocations in Unix WaitSubsystem (#7454)
Jan Kotas [Tue, 28 May 2019 20:55:06 +0000 (13:55 -0700)]
Fix superfluous delegate allocations in Unix WaitSubsystem (#7454)

Fixes #7452

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoAdd null checks before calling ClassLoader::EnsureLoaded (#24818)
Jan Kotas [Wed, 29 May 2019 01:38:42 +0000 (18:38 -0700)]
Add null checks before calling ClassLoader::EnsureLoaded (#24818)

Fixes #24816

5 years agoStop adding 7 before the build revision number (#24805)
Elinor Fung [Wed, 29 May 2019 00:37:52 +0000 (17:37 -0700)]
Stop adding 7 before the build revision number (#24805)

5 years agoChange StreamReader.ReadBufferAsync to return ValueTask<int> (#24810)
Stephen Toub [Wed, 29 May 2019 00:36:52 +0000 (20:36 -0400)]
Change StreamReader.ReadBufferAsync to return ValueTask<int> (#24810)

It's a private helper that's always directly awaited.  No need to allocate a task each time it's called and data is synchronously available.

5 years agoFix IBC data collection (#24814)
Jan Kotas [Tue, 28 May 2019 23:37:49 +0000 (16:37 -0700)]
Fix IBC data collection (#24814)

5 years agoStop using BuildTools for signing (#24808)
Elinor Fung [Tue, 28 May 2019 23:09:46 +0000 (16:09 -0700)]
Stop using BuildTools for signing (#24808)

5 years agoRename CreateNativeDelegate -> LoadAssemblyAndGetFunctionPointer (#24804)
Elinor Fung [Tue, 28 May 2019 23:05:28 +0000 (16:05 -0700)]
Rename CreateNativeDelegate -> LoadAssemblyAndGetFunctionPointer (#24804)

Change extensibility parameter to void *

5 years agoUsing AllocateUninitializedArray in array pool (#24504)
Vladimir Sadov [Tue, 28 May 2019 21:28:56 +0000 (14:28 -0700)]
Using AllocateUninitializedArray in array pool (#24504)

* Just use `new T[]` when elements are not pointer-free

* reduce zeroing out when not necessary.

* use AllocateUninitializedArray in ArrayPool

5 years agoMove parts of WeakReference to shared partition (#24800)
Marek Safar [Tue, 28 May 2019 20:54:38 +0000 (22:54 +0200)]
Move parts of WeakReference to shared partition (#24800)

5 years agoFixing the epilog size decoding
Andrew Au [Sun, 26 May 2019 23:30:39 +0000 (16:30 -0700)]
Fixing the epilog size decoding

5 years agoCleanup unnecessary code in exception formatting (#24797)
Jan Kotas [Tue, 28 May 2019 18:18:28 +0000 (11:18 -0700)]
Cleanup unnecessary code in exception formatting (#24797)

* Cleanup unnecessary code in exception formatting

* Delete fNeedFileInfo argument for GetStackTrace

Fixes #8694

5 years agoExpose Path.TrimEndingDirectorySeparator (#20805)
Marco Rossignoli [Tue, 28 May 2019 18:14:05 +0000 (20:14 +0200)]
Expose Path.TrimEndingDirectorySeparator (#20805)

* expose TrimEndingDirectorySeparator

* address PR feedback

* updates

* address PR feedback

* fix comment

5 years agoMove some CustomAttribute related types to shared (#23651)
Egor Bogatov [Tue, 28 May 2019 18:12:01 +0000 (21:12 +0300)]
Move some CustomAttribute related types to shared (#23651)

5 years agoMake sure the layout of coreclr!Module is the same as mscordaccore!Module
Andrew Au [Tue, 28 May 2019 08:02:26 +0000 (01:02 -0700)]
Make sure the layout of coreclr!Module is the same as mscordaccore!Module

5 years agoFix initial thread affinity on Linux (#24801)
Jan Vorlicek [Tue, 28 May 2019 16:06:38 +0000 (18:06 +0200)]
Fix initial thread affinity on Linux (#24801)

* Fix initial thread affinity on Linux

On Linux, a new thread inherits the affinity mask of the thread
that created the new thread. This is a problem for background GC
threads that are created by one of the server GC threads that are
affinitized to single core.
This change adds resetting each new thread affinity to match the
current process affinity.
In addition to that, I've also fixed the extraction of the CPU count
that was using PID 0. While the doc says that 0 represents current process,
it in fact means current thread.
And as a small bonus, I've added caching of the value returned by
the PAL_GetLogicalCpuCountFromOS, since it cannot change during runtime.

5 years ago[master] Update dependencies from dotnet/core-setup (#24782)
dotnet-maestro[bot] [Tue, 28 May 2019 15:49:34 +0000 (08:49 -0700)]
[master] Update dependencies from dotnet/core-setup (#24782)

- Microsoft.NETCore.App - 3.0.0-preview6-27727-02

5 years agoUpdate CoreClr to preview6.19277.72 (#24795)
dotnet-maestro-bot [Tue, 28 May 2019 10:07:21 +0000 (03:07 -0700)]
Update CoreClr to preview6.19277.72 (#24795)

5 years agoImprove performance of !dumpasync SOS command
Stephen Toub [Sat, 25 May 2019 02:06:37 +0000 (22:06 -0400)]
Improve performance of !dumpasync SOS command

A significant majority of the time spent in dumpasync was in getting the type name of each object in order to compare it to "AsyncStateMachineBox".  This switches to comparing by module and mdTypeDef.  On an ~1GB dump, the time to execute !dumpasync dropped from 43 to 11 seconds on my machine.

5 years agoDisplay state machine fields in DumpAsync for -stacks
Stephen Toub [Thu, 23 May 2019 02:56:33 +0000 (22:56 -0400)]
Display state machine fields in DumpAsync for -stacks

Currently the DumpAsync -fields option just impacts whether the state machine fields are output for the top-level state machines.  We received feedback that it would be more expected for -fields to also cause the fields to be output for all state machines listed as part of continuation chains.  This does that.

5 years agoAdd and apply nullable attributes (#24679)
Stephen Toub [Tue, 28 May 2019 10:04:13 +0000 (06:04 -0400)]
Add and apply nullable attributes (#24679)

* Add and apply nullable attributes

* Adapt to API review decisions

* Address PR feedback