Matt Mitchell [Sun, 15 Sep 2019 15:43:32 +0000 (08:43 -0700)]
Merge pull request dotnet/coreclr#26717 from dotnet/darc-master-
3fc25abf-8a12-476c-aa6d-
42a6aa19d865
[master] Update dependencies from dotnet/corefx
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0ba9d3435e260d89c44c73afd14dc12301d72ef
Matt Mitchell [Sun, 15 Sep 2019 15:42:18 +0000 (08:42 -0700)]
Merge pull request dotnet/coreclr#26720 from dotnet/darc-master-
235c35b1-7984-4aa9-934a-
e66ba37b92a6
[master] Update dependencies from dotnet/core-setup
Commit migrated from https://github.com/dotnet/coreclr/commit/
766b8f471bfcef03b008545484cc825838f7dcef
Andrew Au [Sun, 15 Sep 2019 12:50:03 +0000 (05:50 -0700)]
Fixing a simple typo (dotnet/coreclr#26707)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3dd49891bea252bee43e4b28a788a45887e51e19
Sung Yoon Whang [Sun, 15 Sep 2019 08:31:08 +0000 (01:31 -0700)]
Mark remaining counter tests as JIT sensitive (dotnet/coreclr#26708)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f11600bb2dd78eac2d2bd83e7f52c385a885c39
Stephen Toub [Sun, 15 Sep 2019 01:37:28 +0000 (21:37 -0400)]
Remove some boxing from tuples with >= 8 elements (dotnet/coreclr#26584)
Take advantage of https://github.com/dotnet/coreclr/pull/14698 to avoid boxing the TRest argument and improve devirtualization.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f678ae7aa547fc86cf00459506d6ca170a5f5cc
Mike McLaughlin [Sat, 14 Sep 2019 14:00:00 +0000 (07:00 -0700)]
Fix watson bucketing/broken triage dumps (dotnet/coreclr#26714)
The DAC EnumMemoryRegions needs to include some missing code version
manager memory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7071577a4d95596cf84b313e87a8c5b47f2d493
Tomáš Rylek [Sat, 14 Sep 2019 12:31:39 +0000 (05:31 -0700)]
Fix PInvoke transition frame in CPAOT (dotnet/coreclr#26706)
During investigation of Linux CPAOT failures Jan Vorlicek discovered
that we were using the wrong constant for the PInvoke transition
frame. I have verified that the change fixes all tests under
JIT\methodical\explicit\basic I was previously seeing; I am running
the complete Pridotnet/coreclr#1 test suite to get an overall picture.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4f35bf59cd2a96e00232ce7e004ec33d8317183
Michal Strehovský [Sat, 14 Sep 2019 10:52:09 +0000 (12:52 +0200)]
Add coverage of shared code in pointer casting test (dotnet/coreclr#26715)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9878935593cea202bd76af7d7fb060d7a2b7a021
Sergey Andreenko [Sat, 14 Sep 2019 07:36:09 +0000 (00:36 -0700)]
Continue cleaning GenTreeStmt. (dotnet/coreclr#26668)
* Rename `GenTreeStmt` to `Statement`.
* Move `Statements::IsPhiDefnStmt` implementation to the header.
* Add iterators for statements.
So we have less places where we access Statement's fields.
* Add a header for `fgInsertStmtListAfter`,
# Conflicts:
# src/jit/flowgraph.cpp
* Change `fgInsertStmtAtBeg` not to return a value.
and add headers for `fgInsertStmtAtBeg` and `fgNewStmtAtBeg`.
* Change `fgInsertStmtBefore` and `fgInsertStmtAfter` not to return.
* Change `fgInsertStmtNearEnd` not to return.
* Change `fgInsertStmtAtEnd` not to return.
# Conflicts:
# src/jit/flowgraph.cpp
* Fix comments.
* Add a header for `gtDispBlockStmts`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef585a4658a830945f24d635b234f44bd0c81e84
Jan Kotas [Sat, 14 Sep 2019 01:04:16 +0000 (18:04 -0700)]
More PAL cleanup (dotnet/coreclr#26709)
* Delete more unused methods from PAL
* Delete PAL_EntryPoint
* Delete always defined FEATURE_PAL_SXS and related code
Commit migrated from https://github.com/dotnet/coreclr/commit/
59002f56b5a2a4e13d4adee9f21942855c0955d3
Jan Kotas [Fri, 13 Sep 2019 23:12:10 +0000 (16:12 -0700)]
Delete wchar_t redefinition in the PAL (dotnet/coreclr#26705)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bce868f1ce96200f727784f1b855afb8a69513a3
Carol Eidt [Fri, 13 Sep 2019 21:41:47 +0000 (14:41 -0700)]
Update first-class-structs.md
Add a link to issue dotnet/coreclr#26710 in the relevant section.
Commit migrated from https://github.com/dotnet/coreclr/commit/
747d235f56c1e58e6ba5dd3d644f07acece39231
Michal Strehovský [Fri, 13 Sep 2019 20:58:46 +0000 (22:58 +0200)]
Re-enable incremental linking (dotnet/coreclr#26704)
This was disabled due to a linker bug that was fixed in 2017. Maybe it's time to re-enable this.
Fixes dotnet/coreclr#13344.
Commit migrated from https://github.com/dotnet/coreclr/commit/
80d94c634b5968d0c817c322923bbf1415f86416
Jan Kotas [Fri, 13 Sep 2019 16:51:01 +0000 (09:51 -0700)]
Matching doc update
Commit migrated from https://github.com/dotnet/coreclr/commit/
cdc35c96d7312aad3f81a5d9b031fbb29dbdd5f1
Michal Strehovský [Fri, 13 Sep 2019 16:17:26 +0000 (18:17 +0200)]
Get rid of unnecessary ilproj entries
Commit migrated from https://github.com/dotnet/coreclr/commit/
708055b58c52d21875a7f0a33ce3c828fc849ad0
Konstantin Baladurin [Fri, 13 Sep 2019 17:28:08 +0000 (20:28 +0300)]
[JIT/x86] Fix LinearScan::allocateRegisters (dotnet/coreclr#26649)
Check for `lvLRACandidate` instead of `!lvDoNotEnregister` when checking whether `this` may be enregistered and has an Interval.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e41d8f0390323bba033a1ace2570c1099cf7443b
Michal Strehovský [Fri, 13 Sep 2019 15:47:03 +0000 (17:47 +0200)]
Add test coverage for casting to pointers (dotnet/coreclr#26698)
I was fixing a customer-reported bug related to this in .NET Native and decided to check whether there's any test coverage for this in CoreCLR. There isn't, so adding a test.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f8d0e92ada4f1bc37e93c644054acf0a43692cf
mikedn [Fri, 13 Sep 2019 14:45:05 +0000 (17:45 +0300)]
Improve LclVar sorting throughput (dotnet/coreclr#23234)
* Add tracked variable accessor functions
* Delete bogus lvaSortByRefCount call
There's no need to sort at the end of lvaMarkLocalVars. Tracked variables aren't needed until liveness and that does its own sort call.
* Replace qsort with (jit)std::sort
qsort is rather cumbersome to use and inefficient. It's not a template
so it operates with void pointers that can make swapping problematic.
The comparison callback is unnecessarily complex because it has to return
-1,0,+1 when "less" style comparison functions only return true/false.
It's also impossible to inline the callback, even if it's a trivial
"return a < b;" function.
* Get rid of lvaRefSorted
While it could be slightly faster than lvaTrackedToVarNum because it stores
pointers rather than indices, it also uses more memory and it's not safe to
use beyond sorting. If new variables are added the variable table may have
to be resized and that invalidates the stored pointers.
At the same time, stop sorting untracked variables, nothing in the JIT needs
that. Collect only tracked variables in lvaTrackedToVarNum, sort them and
then "untrack" the ones that exceed the lclMAX_TRACKED limit.
* Remove bogus lvRegister checks
Variables are not sorted after LSRA has ran so these checks are not needed.
* Turn RefCntCmp/WtdRefCntCmp into real "less"
* Use functors rather than lambdas
It's too much code to put it all in the lambda so we might as well go the other way and get rid of the lambda.
* Add some comments to sort functions
* Fix comments
* Change to the real insertion sort
* Fix comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
42e810630af30672b000f03f9d265fc683d46f97
Jan Kotas [Fri, 13 Sep 2019 11:33:42 +0000 (04:33 -0700)]
Delete dead code in PAL related to locale handling (dotnet/coreclr#26693)
* Delete dead code in PAL related to locale handling
* Fix build break
* Delete PAL_ACP
* Delete HAVE_COREFOUNDATION
Commit migrated from https://github.com/dotnet/coreclr/commit/
6b0dab793260d36e35d66c82678c63046828d01b
Tomáš Rylek [Fri, 13 Sep 2019 08:02:41 +0000 (01:02 -0700)]
Some SuperIlc cleanup and improvements (dotnet/coreclr#26690)
1) Remove the parameter -cpaot as it's no longer needed now that
Crossgen2 also resides under Core_Root.
2) Add new parameter --exe to only execute the tests without
compilation. JanV specifically asked for this to speed up his
inner testing loop on Linux.
3) Don't pass /largeversionbubble to the [legacy] Crossgen
compilation of System.Private.CoreLib as it apparently crashes
on Linux and we are no longer interested in fixing that.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ef00c124829ac3b748326bfbeb490387d8ce3d2
Jeremy Koritzinsky [Fri, 13 Sep 2019 01:31:53 +0000 (18:31 -0700)]
Remove unused code in marshalnative. (dotnet/coreclr#26689)
Commit migrated from https://github.com/dotnet/coreclr/commit/
46348ff653f38749e87f5939c134fcdc832cb646
Next Turn [Thu, 12 Sep 2019 19:04:57 +0000 (03:04 +0800)]
Modernize Array constructor (dotnet/coreclr#26684)
Commit migrated from https://github.com/dotnet/coreclr/commit/
85eb43f20ae9b1ce32ba4631e476ba0e120d5c0b
Omair Majid [Thu, 12 Sep 2019 19:03:45 +0000 (15:03 -0400)]
Remove CLR_CMAKE_TARGET_UBUNTU_LINUX and CLR_CMAKE_PLATFORM_UBUNTU_LINUX (dotnet/coreclr#26663)
They are unused. Nothing ever checks for either of them.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac9b8110ce037f367d739c57a5907edf9f7355c1
Tomas [Thu, 12 Sep 2019 09:36:15 +0000 (11:36 +0200)]
Fix SuperIlc build in CoreCLR
I'm not sure about the dotnetcore3.0 version but that lets me run
"dotnet blahblahblah/ReadyToRun.SuperIlc.dll and actually launch the
app. Please help me figure out what else needs fixing. I should
probably add a test at some point but I don't yet know how it should
work, I'll look into it as part of my work on the CPAOT pipeline.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
0cf6e1ae0400cf62a00dd03178add648b53a0321
dotnet-bot [Wed, 11 Sep 2019 13:40:40 +0000 (15:40 +0200)]
Move the ReadyToRun.SuperIlc tool to CoreCLR
After Michal moved the Crossgen2 compiler source code to CoreCLR,
this testing tool is the last bit that only exists in CoreRT so
I'm moving it too. This initial commit amounts to a straightforward
copy of SuperIlc source code from the CoreRT repo.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f04a3d720be9bd673c874c73517d4322934a10b
Sung Yoon Whang [Thu, 12 Sep 2019 07:08:49 +0000 (00:08 -0700)]
Mark counter tests as JITStress incompatible (dotnet/coreclr#26666)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f049c3e15a7003efa4daa075d4e9ec11cff2e78
Sung Yoon Whang [Thu, 12 Sep 2019 01:28:35 +0000 (18:28 -0700)]
Improve the performance of Environment.WorkingSet in Windows (dotnet/coreclr#26522)
* Use win32 api directly for workingset counter
* Fix build warnings
* Removing useless code
* more cleanup
* remove size annotation
* remove useless comment
* Move all the changes to Environment.WorkingSet and remove it from RuntimeEventSourceHelper
* removing useless usings
* Use kernel32.dll instead of psapi.dll
* Code review feedback
* Remove newline change
* More code review nits
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f8cdbc8fd91caf804bf58b798bd5bbf1fee2255
Tomáš Rylek [Wed, 11 Sep 2019 18:21:41 +0000 (11:21 -0700)]
Only check out the GIT repo twice and reuse for the entire pipeline (dotnet/coreclr#26480)
The purpose of this change is to increase the throughput and
reliability of CoreCLR CI pipelines by only performing one GIT
checkout for Windows and Unix, zip them up and reuse for all
subsequent phases / jobs in the pipeline.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
17a53cb063b5e63fc1cc832ec36cf8a520111124
Jan Kotas [Wed, 11 Sep 2019 14:02:21 +0000 (07:02 -0700)]
Change Vector<T> to use more compact code using S.R.CS.Unsafe (dotnet/coreclr#26637)
S.R.CS.Unsafe is used in number of places in Vector<T> already. This change modifies more places to use it to make the code more compact.
Updated Vector.tt template to match while I was on it
Commit migrated from https://github.com/dotnet/coreclr/commit/
76c0217439b062f38fdb96c18224cff06f5a7ace
Sergey Andreenko [Wed, 11 Sep 2019 04:35:18 +0000 (21:35 -0700)]
Return a missed field init to `GenTreeILOffset`. (dotnet/coreclr#26646)
That field is used only in dumping logic inside `genCodeForBBlist`, for some reason `gtDispTree` doesn't print it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
92e501f96c1403b7af4a155741a08ccbd0cbc1b4
Marek Safar [Wed, 11 Sep 2019 00:16:06 +0000 (02:16 +0200)]
Remove unused Memcpy methods from shared Buffer implementation (dotnet/coreclr#26586)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7adc7249f71679b6a1727e17cd15df4db5d621b3
David Wrighton [Tue, 10 Sep 2019 23:18:02 +0000 (16:18 -0700)]
Resource writing for crossgen2 (dotnet/coreclr#26639)
- Refactor the win32 resource reading code to use more natural managed data structures
- Build a Win32 resource emitter on top of refactored data structures
- Replace resource section copy logic with new node to generate win32 resources
Commit migrated from https://github.com/dotnet/coreclr/commit/
17e4bdb9dab45240c85815edd6bf656bf36b1e3d
Jeremy Koritzinsky [Tue, 10 Sep 2019 22:33:38 +0000 (15:33 -0700)]
Manually marshal parameters for EventPipeInternal.Enable. (dotnet/coreclr#26496)
* Manually marshal parameters for EventPipeInternal.Enable.
* Update src/System.Private.CoreLib/src/System/Diagnostics/Eventing/EventPipe.cs
Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
db04a9afd990091e2b6b7bbeb938ed731fbcdba5
John Salem [Tue, 10 Sep 2019 22:17:09 +0000 (15:17 -0700)]
[test] Mark EventPipe tests JITStress Incompatible and Partially GC Stress Incompatible (dotnet/coreclr#26606)
* Mark all EventPipe tests as JitOptimizationSensitive
* Mark EventPipe GC tests as GCStressIncompatible
* Reduce number of GCs triggered for EventPipe GC tests to make them more diagnosable in the event of failure
Commit migrated from https://github.com/dotnet/coreclr/commit/
d4e66769a2560ab7737c5c63b3702b245378ea2b
obligaron [Tue, 10 Sep 2019 20:22:53 +0000 (22:22 +0200)]
Improve logging for EventSource.WriteEvent parameter mismatch (dotnet/coreclr#25533)
* improve logging for EventSource.WriteEvent
* Fix IndexOutOfRangeException in SerializeEventArgs when incorrect arguments got passed
* simplify arg-check; remove nullable-todo
* switch from Debugger.Log to ReportOutOfBandMessage
* Remove unused flush-Paramater from ReportOutOfBandMessage
* fix parameter type nullable-check for reference-types
* fix parameter type nullable-check for nullable-types
Commit migrated from https://github.com/dotnet/coreclr/commit/
4eb1526fde7a93a1cf0a3c2eca73fc8182845127
Tomáš Rylek [Tue, 10 Sep 2019 19:52:28 +0000 (12:52 -0700)]
Refactor osGroup / osIdentifier pairs to osGroup / osSubgroup (dotnet/coreclr#26583)
Refactor osGroup / osIdentifier pairs to osGroup / osSubgroup
This simple cleanup removes the duplication between osGroup and
osIdentifier by switching over to use the pair osGroup and osSubgroup
such that the final OS identifier is a plain concatenation of osGroup
and osSubgroup. As the only currently supported OS flavors using
OS subgroups are Linux_musl and Linux_rhel6, this simplifies the
platform-matrix.yml and related scripts overall.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
1a17ea321bb9489d85eb7731d765ae36529cab6d
Tarek Mahmoud Sayed [Tue, 10 Sep 2019 18:42:25 +0000 (11:42 -0700)]
Fix Running .NET Core Under Windows App Compat Shim (dotnet/coreclr#26605)
* Fix Running .NET Core Under Winndows App Compat Shim
.NET Core uses Windows features called sort handles for perf reason to speed up the collation operations (e.g. string comparisons). When enabling Windows app compat shim (e.g. Windows 7 compatibility mode), the calls uses sort handles will fail which cause all collation operations to fail.
The fix here is to detect if the sort handles work before using it to ensure successful run.
* Address the feedback
* More feedback addressing
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f1314bdca91add2b4e9dbc95ec687dab638e1a0
Jan Kotas [Tue, 10 Sep 2019 03:52:10 +0000 (20:52 -0700)]
Delete dead code and fix issues found by static analysis tools (dotnet/coreclr#26604)
Commit migrated from https://github.com/dotnet/coreclr/commit/
961611fb7acb4f08a89011fec5d1d23f94743ce6
Stephen Toub [Tue, 10 Sep 2019 01:10:07 +0000 (21:10 -0400)]
Remove use of WeakReference from corelib (dotnet/coreclr#26597)
Only remaining use is the one place it shows up in public API, in GC.GetGeneration(WeakReference).
Commit migrated from https://github.com/dotnet/coreclr/commit/
778cc84ed4321cb5b3990e6bb683be4ee56bb8a1
Tyler Brinkley [Tue, 10 Sep 2019 01:08:53 +0000 (20:08 -0500)]
Make StringComparer.Create throw ArgumentNullException (dotnet/coreclr#26570)
* Make StringComparer.Create throw ArgumentNullException
Throws proper exception.
* Update CoreFX.issues.rsp
Commit migrated from https://github.com/dotnet/coreclr/commit/
69ff008fde9a23996029c4fa25b6f4fba4d815cf
Stephen Toub [Tue, 10 Sep 2019 01:07:56 +0000 (21:07 -0400)]
Remove remaining ToLower() use from corelib (dotnet/coreclr#26602)
Also happens to save a string allocation, but that's a drop in the bucket in this function.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4432a27c3b221cc0398a3b7be5d372bd4986a980
Stephen Toub [Tue, 10 Sep 2019 01:07:44 +0000 (21:07 -0400)]
Remove sub-array allocation from GetManifestResourceNamesList (dotnet/coreclr#26601)
Also removes dependency on System.Range and RuntimeHelpers.GetSubArray in a simple console app such that they can be trimmed away.
Commit migrated from https://github.com/dotnet/coreclr/commit/
86fadd1f51a8d3a4276cc64ae830161503846a9a
Stephen Toub [Tue, 10 Sep 2019 01:07:33 +0000 (21:07 -0400)]
Remove Lazy/LazyInitializer from mscorlib.h (dotnet/coreclr#26603)
We do not need to special-case these types for reflection invocation, and doing so is currently keeping them from being trimmed when not otherwise used.
Commit migrated from https://github.com/dotnet/coreclr/commit/
70202b04cab861c7f3fd504a08e33153c2739d73
Steve MacLean [Mon, 9 Sep 2019 23:43:27 +0000 (19:43 -0400)]
Abort FuncEval on unaligned SP (dotnet/coreclr#26572)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b177c44a3005cd5733ec4f94b6c1408abbc4290
Sergey Andreenko [Mon, 9 Sep 2019 23:36:06 +0000 (16:36 -0700)]
Fix the loop iterator in `CheckNoTransformableIndirectCallsRemain`. (dotnet/coreclr#26599)
The error was made in 2017 https://github.com/dotnet/coreclr/commit/dotnet/coreclr@
654fed28001085adc162de1ea3207e9a22230235.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eed279f32ae3eeb5e959fc27d54372960382644e
John Salem [Mon, 9 Sep 2019 18:32:48 +0000 (11:32 -0700)]
Add a check to ensure that there are not any zombied Diagnostics IPC sockets on Linux and error in a readable manner if we are unable to clean them up before running the test (dotnet/coreclr#26573)
Commit migrated from https://github.com/dotnet/coreclr/commit/
336662ca1bde4973ce4e2a33f0bee09f1adb5b6e
Jeremy Koritzinsky [Mon, 9 Sep 2019 18:14:48 +0000 (11:14 -0700)]
Remove unused CMake command to build native test assets as par… (dotnet/coreclr#26454)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2af6907b5258ac3e13d7938f2c22db81eb0af5aa
mikedn [Mon, 9 Sep 2019 17:09:17 +0000 (20:09 +0300)]
Stop using LIST nodes for CALL arg lists (dotnet/coreclr#26392)
* Stop using GT_LIST in GenTreeCall
* Clarify optAssertionGenJtrue code
* Cleanup optCreateAssertion
* Cleanup AddHiddenArgument
* Cleanup impInlineIsGuaranteedThisDerefBeforeAnySideEffects
Commit migrated from https://github.com/dotnet/coreclr/commit/
667222e7cee75c0473e2e6b3a9c89dd5043ff176
Marek Safar [Mon, 9 Sep 2019 16:58:25 +0000 (18:58 +0200)]
Move TypedReference::SetTypedReference exception throw to managed (dotnet/coreclr#26596)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c9432c3ee874d8d5c4b1e5f38670ebef43bfb3f
Michal Strehovský [Wed, 4 Sep 2019 16:03:14 +0000 (18:03 +0200)]
Add project files
Commit migrated from https://github.com/dotnet/coreclr/commit/
5dc16c89311f4508ff05ffff15b4437bee3950a5
Michal Strehovský [Fri, 6 Sep 2019 14:48:52 +0000 (16:48 +0200)]
Do not precompile crossgen2
build-test.cmd limits precompilation to things that are directly in CORE_ROOT. We should do the same on Unix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b660fc665a76b490e882d4ec993139b903cda2d
Tomas [Sat, 7 Sep 2019 18:10:33 +0000 (20:10 +0200)]
Exclude crossgen2 from CoreCLR test dependencies
Commit migrated from https://github.com/dotnet/coreclr/commit/
a1c32fc2fbdfb054a1548b861d4cf52075c3bca9
dotnet-bot [Mon, 9 Sep 2019 08:37:58 +0000 (10:37 +0200)]
Initial population of crossgen2 sources from CoreRT repo as of commit dotnet/coreclr@
48b4932a57a8aa3a2be45560ac9cac51003dd8b3
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce1c7ed76cc113396cbbf25329b99089af6cc784
Konstantin Baladurin [Mon, 9 Sep 2019 15:40:14 +0000 (00:40 +0900)]
Linux/x86: fix build (dotnet/coreclr#26594)
Commit migrated from https://github.com/dotnet/coreclr/commit/
82f0870166f8c6a1c34497f5f088cdcebb4a33f7
Stephen Toub [Mon, 9 Sep 2019 13:50:16 +0000 (09:50 -0400)]
Replace HashHelpers.Combine with HashCode.Combine (dotnet/coreclr#26589)
* Replace HashHelpers.Combine with HashCode.Combine
* Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
1894302e7031a4677191dc383b781a89cca9bd2c
Michal Strehovský [Sun, 8 Sep 2019 20:00:18 +0000 (22:00 +0200)]
Mark unsafe intrinsics as reflection blocked
Keeping these reflection enabled pulls in quite a bit of junk (generic dictionaries, standalone method bodies, bookkeeping) that adds up to 1.5% of the size of Hello World...
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
87d194f3ecc0b41e95b43e3132e947feb9e6514b
Stephen Toub [Sat, 7 Sep 2019 14:47:49 +0000 (10:47 -0400)]
Fix race conditions in CultureInfo.GetCultureInfoHelper (dotnet/coreclr#26567)
The implementation reads the current value of the static cache field and then later overwrites that field with the originally read value. If ClearCachedData was called in the interim to clear the cached data, this will end up effectively undoing part of that clearing, as it'll end up restoring the previous cache. The fix is to write back the new reference only when we need to, which we could do when we detect it's null.
There's a secondary race condition this fixes as well. When a name and an altname are used with CultureInfo.GetCurrentCulture(string, string), the implementation was publishig the newly created instance into the dictionary under the lock, but then after the lock was released, it was setting that TextInfo to be read-only. That provides a window where another thread could see it as non-read-only and mutate it. The fix is to ensure it's marked as read-only fully before it's published.
As I was doing this, it struck me that the implementation was overly complicated, trying to merge three different code paths for three different callers, presumably to share code, but most of the code ended up not being shared anyway, which just made the code harder to follow for little gain. So, I split it back out into the three calling functions and removed the helper.
I also changed the locking mechanism. It had been using a single shared lock to protect all state, but the purpose of the lock is really just to synchronize access to an individual dictionary, so we can just lock on the relevant dictionary.
Commit migrated from https://github.com/dotnet/coreclr/commit/
456afea9fbe721e57986a21eb3b4bb1c9c7e4c56
Sergey Andreenko [Sat, 7 Sep 2019 08:35:59 +0000 (01:35 -0700)]
Add a repro for GitHub_26311. (dotnet/coreclr#26553)
* Add a repro for GitHub_26311.
Add an IL test that reproduces GitHub_26311 without using external functions and stress modes.
The test uses tail call opcode to force tail call to VSD over generic class via a slow helper.
* Exclude the test for windows x64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1416a9c8703be562f3f01ed3da5825e3c3a1c286
Stephen Toub [Thu, 5 Sep 2019 21:15:13 +0000 (17:15 -0400)]
Fix IDE0026 (use expression-bodied members for indexers)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bd8e35e41e6a6e626c4fc623845ec40b7704d109
Stephen Toub [Thu, 5 Sep 2019 14:12:31 +0000 (10:12 -0400)]
Use null coalescing assignment operator in more places
There's currently no auto-fix for this, so the fixes were done manually.
Commit migrated from https://github.com/dotnet/coreclr/commit/
208d864733c86e00499b15b310fe661a9aacc7ba
Stephen Toub [Fri, 6 Sep 2019 13:08:45 +0000 (09:08 -0400)]
Remove stale SuppressMessage attributes (dotnet/coreclr#26501)
Commit migrated from https://github.com/dotnet/coreclr/commit/
94f6badbea1eb09104041bba01273b4a39a2d4a2
Vitek Karas [Fri, 6 Sep 2019 10:59:09 +0000 (03:59 -0700)]
Remove unnecessary file handle parameter in PEImageLayout methods (dotnet/coreclr#26530)
The handle is always the owner's PEImage->GetFileHandle, and so the PEImageLayout can call that instead of passing it around through parameters.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af62a24b0452392a461a4402ffad0c6320f41d9d
mikedn [Thu, 5 Sep 2019 19:35:32 +0000 (22:35 +0300)]
Fix broken float compare mapping to VNFunc (dotnet/coreclr#20782)
* Fix broken float compare mapping to VNFunc
The existing code uses GTF_UNSIGNED instead of GTF_RELOP_NAN_UN to select unordered VN funcs.
* Rename relopFuncs
Commit migrated from https://github.com/dotnet/coreclr/commit/
f23c07f692e4ce8cf6385afb7246b7cfbeff28ee
mikedn [Thu, 5 Sep 2019 18:10:30 +0000 (21:10 +0300)]
Pull struct type info out of GenTreeObj (dotnet/coreclr#21705)
* Introduce ClassLayout
* Delete unused getStructGcPtrsFromOp
* Use ClassLayout in GenTreeObj/Blk
* Use ClassLayout in LclVarDsc
* Remove layout info from GenTreePutArgStk
* Always initialze ClassLayout GC layout
* Make ClassLayout::GetGCPtrs private
* Restore genAdjustStackForPutArgStk asserts
* Comments
* Put layout related code in new files
* More comments and small tweaks
Commit migrated from https://github.com/dotnet/coreclr/commit/
9479f67577bbb02ea611777b00308f42252fb2bc
Fadi Hanna [Thu, 5 Sep 2019 17:35:04 +0000 (10:35 -0700)]
Fixes around the GetModuleIfLoaded and related APIs (dotnet/coreclr#26516)
* Enabling precompiled generics to be loaded from the root entrypoint R2R module.
Include R2RDump tool changes that match the CoreRT cross module signatures in the instantiations table
Commit migrated from https://github.com/dotnet/coreclr/commit/
21d651bb4613ca480cd97793fe5d854af36b765c
jiangzeng01 [Thu, 5 Sep 2019 16:29:30 +0000 (00:29 +0800)]
Add 3 EventPipe tests about GC (dotnet/coreclr#26429)
* Add 3 EventPipe tests about GC
* Set eventpipe tests priority to 1
Commit migrated from https://github.com/dotnet/coreclr/commit/
363e42ca38a3846d18c0c07bdb71594fdba235d2
Vladimir Sadov [Thu, 5 Sep 2019 13:17:25 +0000 (06:17 -0700)]
GC long running tests (dotnet/coreclr#26489)
* - add gc-longrunning pipeline to run GC long running tests.
- make GC reliability framework one of GC long running tests.
* Temporarily enable Win10.ARM64 helix queue - for this PR only
* increase timeouts
* fewer inner cycles per one iteration in slower tests.
* Final touches - increase GC reliability Framework timeout to 60min.
remove Windows.10.Arm64.Open from the platform matrix (was added temporarily just to test this PR)
* Disable ARM for now.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6b3b77a181176b9a83c4a8d1bf40ef6b8981da64
Bruce Forstall [Thu, 5 Sep 2019 00:37:13 +0000 (17:37 -0700)]
Add regularly scheduled runs for additional pipelines (dotnet/coreclr#26515)
Pipelines: jitstress-isas-arm, jitstress-isas-x86, jitstressregs-x86.
Only once per week currently, on weekends.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f821e2ac58f096bf5c5a830064345c5b16f1db27
Sung Yoon Whang [Thu, 5 Sep 2019 00:16:06 +0000 (17:16 -0700)]
Improve eventcounter test (dotnet/coreclr#26517)
Commit migrated from https://github.com/dotnet/coreclr/commit/
043549f42cd402d4af3513e185bd0f3fae9fd2fb
Koundinya Veluri [Wed, 4 Sep 2019 18:23:37 +0000 (11:23 -0700)]
Don't use code rejitted at tier 1 when the JIT falls back to min-opts due to method size/complexity (dotnet/coreclr#26503)
Fixes https://github.com/dotnet/coreclr/issues/26419
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0df78cff9e2a1a0bbb669420a120444657913b2
Next Turn [Wed, 4 Sep 2019 18:22:25 +0000 (02:22 +0800)]
Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26512)
Commit migrated from https://github.com/dotnet/coreclr/commit/
823f586da0bbcfba48dd0c456af8fddbb8f780d2
Stephen Toub [Wed, 4 Sep 2019 17:57:13 +0000 (13:57 -0400)]
Fix StyleCop tuple warnings (dotnet/coreclr#26514)
A few PRs crossed such that PR validation passed but master is issuing lots of warnings-as-errors.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a84e2b9260388cce41634476dadf12aef39c8a
Stephen Toub [Wed, 4 Sep 2019 17:16:07 +0000 (13:16 -0400)]
Restore partial Corelib build support in VS (dotnet/coreclr#26511)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bab017e5d036c58dd2694d3130a08d35bb95f97
Austin Wise [Wed, 4 Sep 2019 17:04:23 +0000 (10:04 -0700)]
Fix print when failing to load coredistools. (dotnet/coreclr#26473)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5b4b5883bb788d1dedf2694b9a88fa8137d2895
Jakob Botsch Nielsen [Wed, 4 Sep 2019 16:32:41 +0000 (09:32 -0700)]
Refactor tailcall decisions out of fgMorphCall (dotnet/coreclr#26158)
* Refactor tailcall decisions out of fgMorphCall
Introduce fgMorphPotentialTailCall to simplify the control flow of
tailcall morph.
* Fix formatting
* Some minor fixes including build break fix
* Set tailcalls to void return type again
Missed change during the refactoring
* Fix formatting again
* Fix formatting again again
* Add some helpful comments
* Return new node for finished morph instead
Commit migrated from https://github.com/dotnet/coreclr/commit/
23d2d3dd98aaf9ce098ed12f70ecf0442fa9302f
Stephen Toub [Wed, 4 Sep 2019 03:51:50 +0000 (23:51 -0400)]
Fix several recently added StyleCop tuple rules (dotnet/corefxdotnet/coreclr#40794)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
a43b2abba24c90058b1eeaf12d2241a66619acde
Stephen Toub [Wed, 4 Sep 2019 15:58:36 +0000 (11:58 -0400)]
Remove `readonly` from GCHandle field on Gen2GcCallback (dotnet/coreclr#26509)
GCHandle is mutable, and this type does call Free on the handle, but with it marked as readonly, the mutations performed by Free will be done on a copy rather than on the original.
Commit migrated from https://github.com/dotnet/coreclr/commit/
85bec20cfeed5d364f7298d94fa37ca11f0accff
Stephen Toub [Wed, 4 Sep 2019 15:21:59 +0000 (11:21 -0400)]
Use expression-bodied members in more places (dotnet/coreclr#26500)
* Fix IDE0027 (use expression body for accessors)
* Fix IDE0023 / IDE0024 (use expression body for operators)
* Apply suggestions from code review
Co-Authored-By: Adam Sitnik <adam.sitnik@gmail.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b9509e01b9e1f840b990c56f5b4dfce33002896
Andrew Au [Wed, 4 Sep 2019 14:27:23 +0000 (07:27 -0700)]
ImproveComments - making sure the comment is accurately describing the code (dotnet/coreclr#26442)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e184d3deb448318a645d6bf7d51389e382344c3b
Stephen Toub [Wed, 4 Sep 2019 13:19:57 +0000 (09:19 -0400)]
Update StyleCop.Analyzers to same verison used by corefx (dotnet/coreclr#26499)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9382509c4f36f5681ae62d1fd47a09d2d8282c07
Stephen Toub [Tue, 3 Sep 2019 22:07:33 +0000 (18:07 -0400)]
Update analyzer versions (dotnet/corefxdotnet/coreclr#40778)
In particular to pick up StyleCop fixes related to C# 8 and nullability.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2ecc4dc905b3c7dd49004687e7bb80dda98cbe3
Stephen Toub [Tue, 3 Sep 2019 21:07:30 +0000 (17:07 -0400)]
Avoid some unnecessary initialization in DateTimeParse (dotnet/coreclr#26487)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e1b160523db1c6e7d96aa3c9244a0baf8edb06a
Stephen Toub [Tue, 3 Sep 2019 21:01:52 +0000 (17:01 -0400)]
Remove unnecessary parens from `return (true);` and `return (false);` (dotnet/coreclr#26488)
Just a search and replace.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eccb96a7b78e6c5c35addedd49b1798ef1e2e401
Jan Kotas [Tue, 3 Sep 2019 21:00:45 +0000 (14:00 -0700)]
Refactor BinaryReader.ReadChars using Span (dotnet/coreclr#26325)
Avoids unsafe code and makes the code simpler
Commit migrated from https://github.com/dotnet/coreclr/commit/
98d09ee2bd784d58b2b5f5fab0dc115956f73ae5
Koundinya Veluri [Tue, 3 Sep 2019 17:38:01 +0000 (10:38 -0700)]
Refactor call counting for tiering and some other things (dotnet/coreclr#26393)
Refactor call counting for tiering and some other things
- Moved call counting to after jitting is done, when the tier of the code becomes clear. Passed info back about whether the method should be recorded for call counting through the `PrepareCodeConfig` to avoid some more expensive rechecks.
- Moved checks for aggressive optimization and QuickJit to the point when JIT flags are determined
- Specialized `PublishVersionalbeCodeIfNecessary` for methods versionable with and without a jump stamp
- Added fast paths for cases operating on the default native code version to avoid code versioning overhead during startup
- Methods are not counted on first call, only recorded for counting later. First call to a method is determined by whether the thread generated or loaded code for the method. Threads that wait for jitting to complete don't count calls either. Once the method already has native code and goes through the prestub, its calls are counted.
- Overall, time spent in DoPrestub decreased noticeably when tiering is enabled, almost the same as with tiering disabled typically. Small improvement to startup time, seems to decrease by a few milliseconds.
- Fixed a bug where, when call counting for a method stops due to the tiering delay being activated, it was extending the delay as though it were the first call to the method
- This was noticably increasing time taken to reach steady-state perf by keeping the delay active for longer than necessary. After the fix, steady-state perf is reached sooner without any noticeable overhead in-between.
- A fix creates a potential race between thread A recording a method to be counted later, thread B resetting the method's entry point for counting calls, then thread A setting the tier 0 code as the entry point, and the method would not be tiered up. For now I decided to stop call counting only when a flag that would extend the delay timer is set, with other planned work this code and issue would go away.
- Miscellaneous small changes
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e72575313deeb3a5891324661fcc1287ded3325
Steve MacLean [Tue, 3 Sep 2019 16:31:54 +0000 (12:31 -0400)]
Modify amd64walker to use table based decode (dotnet/coreclr#25958)
* Modify amd64walker to use table based decode
Use tables for NativeWalker::DecodeInstructionForPatchSkip()
Also files used to generate the decode tables in doc folder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f82281f8840d33b2c818885e103b86bae4079f7d
Tomáš Rylek [Mon, 2 Sep 2019 20:35:32 +0000 (22:35 +0200)]
Keep tokenScope consistent during devirtualization (dotnet/coreclr#26453)
Previously, when we were constructing the CORINFO_RESOLVED_TOKEN
to represent a devirtualized method, we reused the previous
tokenScope so that the tokenScope effectively went out of sync
with the token value.
Based on Andy's advice I have changed this logic to update the
tokenScope by calling the JIT interface method getMethodModule
for the resolved virtual method. I have verified locally that
(with a bit of counterpart CPAOT changes) this logic fixes the
bug I was previously hitting due to this inconsistency.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
b18ea9c7a4a7e8e940e77898b11f375879e63faf
dotnet-maestro[bot] [Sun, 1 Sep 2019 10:37:25 +0000 (03:37 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#26446)
* Update dependencies from https://github.com/dotnet/corefx build
20190831.1
- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19431.1
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19431.1
* 3.0 -> 5.0
Commit migrated from https://github.com/dotnet/coreclr/commit/
c26f2eb4bae7a94375756fe7f075c13c4871b003
Bruce Forstall [Sun, 1 Sep 2019 02:34:07 +0000 (19:34 -0700)]
Save corefx test build artifacts to unique folder (dotnet/coreclr#26466)
* Save corefx test build artifacts to unique folder
It would be better to also include the `r2r` and `corefx` tags
in the archive filename, for clarity, but that is a bigger change
and not necessary to fix the current failing jobs due to the
existing name conflict.
* Add -
Commit migrated from https://github.com/dotnet/coreclr/commit/
89db551b36921faa1115c2f55d9eeb3e82cc39a9
Jarret Shook [Fri, 30 Aug 2019 23:56:05 +0000 (16:56 -0700)]
dlopen on Linux seems to not check the current working directory (dotnet/coreclr#26235)
* dlopen on Linux seems to not check the current working directory
Therefore change the path of coredistools to an absolute path and
calculate it based on the path of the current dll.
* Address pr feedback
* Small change to increase ptr
* Fix windows build break
* Correctly fix windows build
Commit migrated from https://github.com/dotnet/coreclr/commit/
d951f5f0ee8862f954c69a4fd9e05184bad15d25
Jeremy Koritzinsky [Fri, 30 Aug 2019 23:08:36 +0000 (16:08 -0700)]
Add ability to only copy native test files to managed tests in build-test scripts (dotnet/coreclr#26451)
* Add MSBuild targets neccesary to copy native test assets to managed projects that need them in a way separate from the managed test build.
* Hook up native test binary copying through build-test scripts.
* Unix script changes/cleanup
* Remove unconditional generatelayout in runtest.sh
* Add new options to usage
Commit migrated from https://github.com/dotnet/coreclr/commit/
05c6400d3614ef15dc76e458ff83e54dc0326c4c
Carol Eidt [Fri, 30 Aug 2019 22:08:14 +0000 (15:08 -0700)]
Cleanup unreachable struct code (dotnet/coreclr#26406)
A `GT_INDEX_ADDR` never has struct type
`GT_MKREFANY` and `GT_RET_EXPR` don't survive beyond morph
A `GT_IND` representing a struct element doesn't require `EncodeElemType`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed3efef2583f793dcf9dbff519cec797ba420f6f
Dong-Heon Jung [Fri, 30 Aug 2019 21:05:53 +0000 (06:05 +0900)]
Mark Relocation Section as NotNeeded (dotnet/coreclr#25715)
- After relocation, relocation section in zap image is not necessary.
- Mark the section as NotNeeded by giving advice(madvise with MADV_DONTNEED)
- It reduces 120~150KB PSS in tizen sample apps.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4036c492d23ec3322b01573aab6190233db1f149
Next Turn [Fri, 30 Aug 2019 21:04:37 +0000 (05:04 +0800)]
Use Span<T> in Encoding (dotnet/coreclr#25860)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6efffaa9aa6d289f0ae1d44b7bc61c87f00f5a37
Jan Vorlicek [Fri, 30 Aug 2019 00:35:21 +0000 (02:35 +0200)]
Update JITEEVersionIdentifier (dotnet/coreclr#26395)
When making a fix for GS cookie check on ARM some time ago, I have not
realized that it changes the JIT to EE interface and thus the
JITEEVersionIdentifier needs to be updated.
This change fixes the problem.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b18bb0b432da925f71c266ed5d17f54c0d202f27
Carol Eidt [Tue, 27 Aug 2019 22:50:24 +0000 (15:50 -0700)]
Cleanup unreachable struct code
A `GT_INDEX_ADDR` never has struct type
`GT_MKREFANY` and `GT_RET_EXPR` don't survive beyond morph
A `GT_IND` representing a struct element doesn't require `EncodeElemType`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab97d0588492a690bf2ee0d4d1d78e077c488eac
Carol Eidt [Thu, 29 Aug 2019 20:53:58 +0000 (13:53 -0700)]
Correctly handle variable argument SIMDScalar (dotnet/coreclr#26421)
* Correctly handle variable argument SIMDScalar
Fix dotnet/coreclr#26286
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6d752133cd91190530ad92024e76aae281de3c4
mikedn [Thu, 29 Aug 2019 17:41:02 +0000 (20:41 +0300)]
PHI_ARG actually has level 0, not 1 (dotnet/coreclr#26428)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b917b164ba9ac2f6398f3e6ecff418c2cc4a66c
Carol Eidt [Thu, 29 Aug 2019 15:14:45 +0000 (08:14 -0700)]
[skip ci] Update first-class-structs doc (dotnet/coreclr#26416)
Update first-class-structs doc
Commit migrated from https://github.com/dotnet/coreclr/commit/
930a7b9ed015aaa1a3f3abb5578c8c63d38cb0d7
Jan Vorlicek [Thu, 29 Aug 2019 13:28:09 +0000 (15:28 +0200)]
Fix JIT_CheckedWriteBarrier for MHR (dotnet/coreclr#26430)
When Mojave hardened runtime support is enabled, the runtime places the
JIT_WriteBarrier copy into a dynamically allocated memory page. But
the JIT_CheckedWriteBarrier has a relative jump to the JIT_WriteBarrier
that I've missed when adding the MHR support and so we end up calling
the original unpatched code of the JIT_WriteBarrier from it.
This repros in release build only and causes problems only rarely,
so it was not detected until the corefx was updated to use the latest
coreclr. Even in the corefx tests, it caused problems when compiling
only one of the corefx tests.
This change fixes it in the same way as we handle jump to JIT_WriteBarrier
in the JIT_Stelem_Ref and its helpers - by using an indirect jump.
We do this for OSX only.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b036452e3ed5d8b60435e3423e4fec245827ce1