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
Brian Robbins [Wed, 28 Aug 2019 23:38:05 +0000 (16:38 -0700)]
Emit RVA Instead of File Offset by Default in Native Image PerfMap Files (dotnet/coreclr#26403)
Commit migrated from https://github.com/dotnet/coreclr/commit/
103152396592b857f5aaa499b57f65a0bbe405b2
Michelle McDaniel [Wed, 28 Aug 2019 22:08:41 +0000 (15:08 -0700)]
Disable signing and publishing on perf builds (dotnet/coreclr#26390)
* Disable signing and publishing on perf builds
* Mark default to false
* Change to signBinaries and publishToBlobFeed
Commit migrated from https://github.com/dotnet/coreclr/commit/
8feac49899d6b86049786f1482576a39bbc522d6
Juan Hoyos [Wed, 28 Aug 2019 20:46:03 +0000 (13:46 -0700)]
Add generated resource source files to sourcelink PDBs (dotnet/coreclr#26394)
* Add generated resource source files as embedded resources to sourcelink-enabled managed PDBs
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a2b8e6de8a62a691a7af986bdd1ce6b53ddf18
Egor Bogatov [Wed, 28 Aug 2019 18:47:38 +0000 (21:47 +0300)]
Move FormatTypeName to Type (dotnet/coreclr#25631)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f07c13cadc378649f10d024bb8a40a3878fa661f
Eric Erhardt [Wed, 28 Aug 2019 03:21:42 +0000 (22:21 -0500)]
Don't validate empty TransitionTimes on deserialization. (dotnet/coreclr#26405)
On Unix, TransitionTimes are not used, so they are left empty. When deserializing an empty TransitionTime, it is throwing an exception because those are not normally valid. Fix deserialization to not validate empty TransitionTimes.
Fix dotnet/corefx 40578
Commit migrated from https://github.com/dotnet/coreclr/commit/
937f2f436425f6c0db8f35bfe3cbde88c966c848
Ivan Diaz Sanchez [Wed, 28 Aug 2019 03:21:10 +0000 (20:21 -0700)]
Moved misplaced assert in StompWriteBarrier for safety. (dotnet/coreclr#26407)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b247316ddd7f4beb7cf8bd21bb49b84702f1883
Aaron Robinson [Wed, 28 Aug 2019 03:20:58 +0000 (20:20 -0700)]
Remove ComputeSuppressUnmanagedCodeAccessAttr() and usage. (dotnet/coreclr#26409)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f8014fc2ba126149a361c9de21e5f9ee1fca7cf
Jeremy Koritzinsky [Wed, 28 Aug 2019 00:39:42 +0000 (17:39 -0700)]
Change test stage to only depend on the build stage (not on servicing stages). (dotnet/coreclr#26402)
Commit migrated from https://github.com/dotnet/coreclr/commit/
814be8042b289b3c765a39430d7b601417b9b8e5
Jan Vorlicek [Wed, 28 Aug 2019 00:01:52 +0000 (02:01 +0200)]
Unify Unix arm compiler optimization options (dotnet/coreclr#26299)
Long time ago, we were using clang 3.8 for building for Unix arm. There
was a codegen bug that forced us to set optimization for release build
to -O1 instead of -O3.
Now the minimum clang version we use for arm is 5.0 and I've verified
that binaries compiled with -O3 pass all the Coreclr pri 1 tests and so
the issue is gone.
So this change unifies the optimization levels for all architectures.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7b43df9208036ebeb56bf0cd6c498aef3692407
Jeremy Koritzinsky [Tue, 27 Aug 2019 22:13:03 +0000 (15:13 -0700)]
Fix marshalling a pinnable multi-dimensional array via a P/Inv… (dotnet/coreclr#26279)
* Use the exact methodtable of the parameter to calculate the offset into a pinned array.
* Fix logic check.
* Update precondition.
* Fix accidental union overlap.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f43185b07889fabb2e07c8fe4c1dfcd74f17747c
mikedn [Tue, 27 Aug 2019 21:28:43 +0000 (00:28 +0300)]
Stop using LIST nodes for PHI operand lists (dotnet/coreclr#20266)
* Stop using LIST nodes for PHI operand lists
* Speed up PHI creation
Calling gtSetStmtInfo/fgSetStmtSeq every time an arg is added is rather expensive and not really needed. Costs are always 0 and the shape of the PHI tree is always the same.
Removal of GT_LIST nodes makes it easier to update the linear order incrementally when a GT_PHI_ARG node is added.
* Cleanup PHI value numbering
This replaces the manual traversal of PHI's list of uses with a range-based for loop and cleans up a bunch of convoluted code.
* Remove redundant AsPhi
* Remove list pointer union
* Update PHI equality check
* Add GenTreePhi comment
* Rename op to node
Commit migrated from https://github.com/dotnet/coreclr/commit/
501c1e3629bbe89cbcec2ee8057ec111a88bdbc8
Stephen Toub [Tue, 27 Aug 2019 21:18:17 +0000 (17:18 -0400)]
Fix pragma warning restore (dotnet/coreclr#26389)
Commit migrated from https://github.com/dotnet/coreclr/commit/
00327a318e55499301d05ba5b98549e3b98ea425
Jarret Shook [Tue, 27 Aug 2019 16:56:26 +0000 (09:56 -0700)]
Ups timeout for build-test-job as we have been seeing timeouts (dotnet/coreclr#26391)
Commit migrated from https://github.com/dotnet/coreclr/commit/
265cb82e96f48d22375faa65b6294b98667246cf
Tomáš Rylek [Tue, 27 Aug 2019 16:51:33 +0000 (18:51 +0200)]
Fix incorrect merge of test build / run split with staged build (dotnet/coreclr#26382)
Commit migrated from https://github.com/dotnet/coreclr/commit/
782c8faa4055dd6faa98c20fbfce4519fa01940a
Jakob Botsch Nielsen [Mon, 26 Aug 2019 18:16:15 +0000 (18:16 +0000)]
Fix SIMD local alignment check for empty rsp-based frames
Fixes dotnet/coreclr#26022
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd9215e39cda8846003210d6ec415211207bebc7
Jakob Botsch Nielsen [Mon, 26 Aug 2019 17:38:31 +0000 (17:38 +0000)]
Some minor ABI stress improvements
Allow specifying max parameters to simplify producing smaller examples
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbecd400575dda16f7a8b99e1480e405d2dcb680
Jan Kotas [Tue, 27 Aug 2019 11:48:53 +0000 (04:48 -0700)]
Delete unused access right checks from PAL (dotnet/coreclr#26383)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b283f8c9833d9c38b4e21640c6aada16fd642bde
Tarek Mahmoud Sayed [Tue, 27 Aug 2019 01:03:40 +0000 (18:03 -0700)]
Fix Abbreviated Genitive Month Names Parsing (dotnet/coreclr#26379)
* Fix Abbreviated Genitive Month Names Parsing
In 3.0 we have fixed the formatting to use the abbreviated genitive month names when having "d" format specifier followed by "MMM". This fix is good as original formatting specs required but we needed to support the parsing when we have such genitive names.
* Addressing the feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6553f380154ff69314eee6f1a28d669d9037f26
John Salem [Mon, 26 Aug 2019 20:30:45 +0000 (13:30 -0700)]
[master] Enhance EventPipe tests (dotnet/coreclr#26322)
* Enhance EventPipe tests with better logging to better understand intermittent test failures that crop up in CI and can't be reproduced locally
* Remove unused field
* increase event count in attempt to give SampleProfiler thread a chance to fire
* Update logger to singleton so it can be used anywhere in the test
* updated logging for all tests
* reduced number of events sent to 100,000 instead of 1,000,000
Commit migrated from https://github.com/dotnet/coreclr/commit/
47cd01e5979943b152d398ddcc319e4ed15ab05b
Michelle McDaniel [Mon, 26 Aug 2019 19:51:32 +0000 (12:51 -0700)]
Fix performance pipeline (dotnet/coreclr#26373)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4519204c19833104451003886b23c39218a48a23
Tomáš Rylek [Mon, 26 Aug 2019 19:41:13 +0000 (21:41 +0200)]
Split test build and run into two jobs (2nd attempt) (dotnet/coreclr#26362)
This change is intended to split the test job in CI runs into two
jobs - one building the tests and another sending the run to Helix.
To facilitate this, I have copied the bulk of the existing
test-job.yml file into two new files, build-test.yml and run-test.yml;
test-job.yml has become a mere wrapper invoking these two new files.
The new build-test file builds the tests, zips the output folder
and publishes it as an Azure artifact (the artifact publishing step
is no longer optional). The subsequent run-test step downloads the
test artifacts and triggers the Helix run for the test set.
The motivation for this change is to mitigate various transient
issues seen in CoreCLR CI runs - when a test execution fails in a
non-deterministic manner, before this change the developer needed to
rerun the lengthy test build step just to retry the tests. This
change should enable rerunning just the test execution step in such
case.
Thanks
Tomas
P.S. This is my 2nd attempt at the merge; Jarret had to roll back my
original Friday merge that broke CoreCLR outerloop testing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ea60e99a30f0ef9116b13546578e55a0113b1f4
Jeremy Koritzinsky [Mon, 26 Aug 2019 19:35:19 +0000 (12:35 -0700)]
Fix typo in calculating path to ILDasm in Microsoft.NET.SDK.IL (dotnet/coreclr#26343)
When I cleaned up the Microsoft.NET.SDK.IL implementation, I missed one typo. This causes the SDK to fail to resolve ILDasm as discovered in https://github.com/dotnet/winforms/pull/1684.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0746a8fb8608cc51e9f8f44deb879e61bbf085e4
Egor Bogatov [Mon, 26 Aug 2019 18:04:47 +0000 (21:04 +0300)]
Move AppContext.CoreCLR.cs to shared, remove static ctor (dotnet/coreclr#26045)
* Remove AppContext.CoreCLR.cs (move to shared)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1945ed33879f07cadf5cb495725c4ba304a71af8
Jarret Shook [Mon, 26 Aug 2019 17:35:18 +0000 (10:35 -0700)]
Disable based on dotnet/coreclr#26335 (dotnet/coreclr#26336)
* Disable based on dotnet/coreclr#26335
* Change to disable for all platforms
Commit migrated from https://github.com/dotnet/coreclr/commit/
3fc30525368908bbff06fa0c2743bb3b4b062c23
blaster7th [Mon, 26 Aug 2019 15:25:26 +0000 (17:25 +0200)]
Corrected typo for X86 (dotnet/coreclr#26361)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b5748e6674bf90be7f1f0985136736ed1f7c41bc
Stephen Toub [Mon, 26 Aug 2019 12:59:21 +0000 (08:59 -0400)]
Fix comment typo in ManualResetValueTaskSourceCore
Commit migrated from https://github.com/dotnet/coreclr/commit/
15daca125fbb15bc3a9b65977957edd936fff752
Matt Warren [Mon, 26 Aug 2019 12:22:10 +0000 (13:22 +0100)]
Remove redundant comment (dotnet/coreclr#26369)
It *seems* that this comment is redundant, there is no longer any code that does the checks it's describing (I assume that the security-related code was removed at some point?)
Also the `_ASSERTE(..)` statement is a duplicate of the one above, so it's also redundant
Commit migrated from https://github.com/dotnet/coreclr/commit/
49b5a0513d73894b2e4fdc5f527546bf674ca37d
Vladimir Sadov [Mon, 26 Aug 2019 02:14:06 +0000 (19:14 -0700)]
Do not use `AllocateUninitializedArray` in private array pools. (dotnet/coreclr#26338)
User may have extra expectations for the privatly owned array pools.
For example there could be an expectation that array never contains negative numbers (since user never puts them there). Uninitialized allocations can break such expectations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c89fd6f88744bfee034e792906700c5a17e1b953
Stephen Toub [Mon, 26 Aug 2019 00:30:39 +0000 (20:30 -0400)]
Disable SA1001 for LocaleData.Unix.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
35d96a6c9e0820fef7f69f4c780c6c04b10628a5
Stephen Toub [Sat, 24 Aug 2019 02:24:14 +0000 (22:24 -0400)]
Contribute to IDE0055 (fix formatting)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7dab7a69df2e864e7ced729ec3d3d2470f02125c
Stephen Toub [Thu, 22 Aug 2019 17:10:47 +0000 (13:10 -0400)]
Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.
Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
63c09bbf88cc6524ea8478fdea430ba45275a933
Stephen Toub [Thu, 22 Aug 2019 15:47:00 +0000 (11:47 -0400)]
Fix StyleCop warning SA1001 (spaces around commas)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
df2e29dae84d1e85763f9dac409d39c48545f9ef
Stephen Toub [Mon, 26 Aug 2019 02:10:37 +0000 (22:10 -0400)]
Separate Async*MethodBuilder types into their own files (dotnet/coreclr#26364)
* Separate async method builder types into their own files
* Minor cleanup of AsyncTaskMethodBuilder types
* Split AsyncValueTaskMethodBuilder types into their own files
Commit migrated from https://github.com/dotnet/coreclr/commit/
def4f696fbfde6ff05c3a4d88f092e21e684ea0f
Jan Kotas [Sat, 24 Aug 2019 17:10:00 +0000 (10:10 -0700)]
Fix BinaryReader.ReadChars for fragmented Streams (dotnet/coreclr#26324)
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks.
Fixes https://github.com/dotnet/corefx/issues/40455
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e8339f0d025146a60b4fe8bba8d65dc787405c2
Aaron Robinson [Sat, 24 Aug 2019 13:32:36 +0000 (06:32 -0700)]
Remove unused test file introduced in dotnet/coreclr#25948 (dotnet/coreclr#26349)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f5383110f0f1672991697cbfbb1d27383a64e88
Next Turn [Sat, 24 Aug 2019 13:32:02 +0000 (21:32 +0800)]
Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26350)
Commit migrated from https://github.com/dotnet/coreclr/commit/
850529a98b32be66bdec5a54a2ef684207d918f2
Anirudh Agnihotry [Sat, 24 Aug 2019 02:56:51 +0000 (19:56 -0700)]
adding ci legs to release 3.1 branch (dotnet/coreclr#26217)
* adding ci legs to release 3.1 branch
* removing regex and adding branches as regex was not working
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3d7d560f9d78053913893d6a88320ef9712cdb1
Fadi Hanna [Sat, 24 Aug 2019 00:16:29 +0000 (17:16 -0700)]
Move testing jobs to a separate stage after the validation/publishing stage (dotnet/coreclr#26334)
* Move testing jobs to a separate stage after the validation/publishing stage
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bbc89c7279a2655e8cfe8466eb69d85899033a8
Michelle McDaniel [Sat, 24 Aug 2019 00:14:41 +0000 (17:14 -0700)]
Fix passing of framework parameter in perf pipeline (dotnet/coreclr#26341)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d8257cbaa08d013704e2a3efc0daf932d7ee87f
Tomáš Rylek [Fri, 23 Aug 2019 23:24:35 +0000 (01:24 +0200)]
Revert "Split test build and run into two jobs (dotnet/coreclr#26191)" (dotnet/coreclr#26348)
This reverts commit dotnet/coreclr@
2c01bb82f77e88e58c777d2e1995bb32dd0d8777.
Commit migrated from https://github.com/dotnet/coreclr/commit/
db9f5bb91455225ab448e263e940c637dfa83c64
Tomáš Rylek [Fri, 23 Aug 2019 22:55:01 +0000 (00:55 +0200)]
Split test build and run into two jobs (dotnet/coreclr#26191)
This change is intended to split the test job in CI runs into two
jobs - one building the tests and another sending the run to Helix.
To facilitate this, I have copied the bulk of the existing
test-job.yml file into two new files, build-test.yml and run-test.yml;
test-job.yml has become a mere wrapper invoking these two new files.
The new build-test file builds the tests, zips the output folder
and publishes it as an Azure artifact (the artifact publishing step
is no longer optional). The subsequent run-test step downloads the
test artifacts and triggers the Helix run for the test set.
The motivation for this change is to mitigate various transient
issues seen in CoreCLR CI runs - when a test execution fails in a
non-deterministic manner, before this change the developer needed to
rerun the lengthy test build step just to retry the tests. This
change should enable rerunning just the test execution step in such
case.
I have added a new job template xplat-test-job.yml where I moved the
test-specific properties I originally put into xplat-job.yml and
Egor didn't like them there.
I have added a new step template "upload-artifact-step.yml" to zip up
and publish a given subtree under a given artifact name. Tried
to design its API so that it should be usable for zipping the entire
GitHub enlistment should we choose to do that. Changed
build-test-job.yml to call the step.
I have added a new step template "download-artifact-step.yml" to download
and unzip a given subtree from a given artifact. Tried to design
its API so that it should be usable for restoring the GitHub
enlistment in the various jobs within a particular pipeline.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
2c01bb82f77e88e58c777d2e1995bb32dd0d8777
Jarret Shook [Fri, 23 Aug 2019 22:52:03 +0000 (15:52 -0700)]
Change gh_25468 to build as an sdk project (dotnet/coreclr#26346)
Fixes dotnet/coreclr#26345
Commit migrated from https://github.com/dotnet/coreclr/commit/
66bea6404e416e017b8c432875321227ed2da4ce
David Mason [Fri, 23 Aug 2019 22:19:44 +0000 (15:19 -0700)]
Add ISOSDacInterface7 implementation (dotnet/coreclr#26227)
Commit migrated from https://github.com/dotnet/coreclr/commit/
14879c9faaa35c8adf4628f68340671e3e038a5e
Fadi Hanna [Fri, 23 Aug 2019 19:43:16 +0000 (12:43 -0700)]
Replace Ubuntu 1404 platforms with 1604 (dotnet/coreclr#26302)
* Replace Ubuntu 1404 platforms with 1604
Commit migrated from https://github.com/dotnet/coreclr/commit/
460b883a45de04b3b77718ae5f945cf541d96023
Carol Eidt [Fri, 23 Aug 2019 18:23:40 +0000 (11:23 -0700)]
Repro for dotnet/coreclr#25468 (dotnet/coreclr#26009)
Also some additional dump & debugging support.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8c5bad0e2f4c94733138e3c7b1f9bdc4acf2d3b7
Jan Vorlicek [Fri, 23 Aug 2019 17:32:07 +0000 (19:32 +0200)]
Remove unused runtime functions and files (dotnet/coreclr#26298)
Commit migrated from https://github.com/dotnet/coreclr/commit/
eab2a618963fc4e193501fb4e1c3fe0809c5de6d
Jan Vorlicek [Fri, 23 Aug 2019 15:03:01 +0000 (17:03 +0200)]
Fix PIE options (dotnet/coreclr#26323)
* Fix PIE options
We were missing passing the -pie linker option. That means that while we
were compiling our code as position independent, the executables
(not shared libraries) were not marked as position independent and
ASLR was not applied to them. They were always loaded to fixed addresses.
This change adds the missing -pie option and also replaces all the individual
settings of -fPIE / -fPIC on the targets we build by a centralized setting
of CMAKE_POSITION_INDEPENDENT_CODE variable that causes cmake to add the
appropriate compiler options everywhere.
* Fix native parts of coreclr tests build
The native parts of the tests are not built using the root CMakeLists.txt
so I am moving enabling the position independent code to configurecompiler.cmake
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7205db2901015b721cb75a4d595441265223c21
Michal Strehovský [Fri, 23 Aug 2019 13:32:23 +0000 (15:32 +0200)]
Do not expand variant isinst check inline (dotnet/coreclr#26314)
This probably cannot be hit with vanilla CoreCLR right now (we seem to be using the slow helper for variant casts) but this got hit in a non-shipping configuration.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d7708262bc557e85ee7a8ef926cc889f7a9c15cb
Sergey Andreenko [Fri, 23 Aug 2019 06:59:41 +0000 (23:59 -0700)]
Small cleaning in JIT32_GCENCODER functions. (dotnet/coreclr#26192)
* Put gcCountForHeader under JIT32_GCENCODER.
* Prepare to extract gcIsVarUntracked.
Move `lvaIsFieldOfDependentlyPromotedStruct` up so we skip struct fields that have struct type (would be a bug if we have recursive struct promotion).
Move `if (varDsc->lvType == TYP_STRUCT`) under else, because the parent `if (varTypeIsGC(varDsc->TypeGet()) )` always skips `TYP_STRUCT`.
Merge other diffs.
That is a good example why you should not copy-paste!
* Extract gcIsUntrackedLocalOrNonEnregisteredArg.
* Update gcCountForHeader.
* Delete if (!varDsc->lvOnFrame) under if (varDsc->lvOnFrame).
I found that after the legacy backend was deleted we ended up with:
```
if (!varDsc->lvOnFrame)
{}
else
{
if (!varDsc->lvOnFrame)
{}
}
```
so i decided to delete that, but then I found that there were 2 such cases, decided to clean that and thats how this PR appeared.
* Delete useless first pass in gcMakeRegPtrTable.
Use gcCountForHeader for checking purposes.
Extract logic for WIN64EXCEPTIONS.
* Update the comment about lvIsRegArg.
* Update the header for the new function.
* Response review.
* Add a comment for the future readers.
* format fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e6641750e99815cfc292aaa7d6ce656021110692
Vladimir Sadov [Fri, 23 Aug 2019 02:57:06 +0000 (19:57 -0700)]
Do not clip CPU count when CPU quota is used. (dotnet/coreclr#26153)
Commit migrated from https://github.com/dotnet/coreclr/commit/
db8fc1b420be60f6a2afb153dd9e645ec231ec82
Koundinya Veluri [Fri, 23 Aug 2019 02:13:24 +0000 (19:13 -0700)]
Remove timeout in a test for GCStress modes (dotnet/coreclr#26258)
Fixes https://github.com/dotnet/coreclr/issues/25510
- Timeout will be handled by the harness
Commit migrated from https://github.com/dotnet/coreclr/commit/
34f545d0ea70ee69af622615189faa787d91d273
John Salem [Thu, 22 Aug 2019 23:46:24 +0000 (16:46 -0700)]
Move TypeSystemLog::OnKeywordsChanged from EtwCallback to EtwCallbackCommon to enable this same behavior in ETW and EventPipe. This unblocks parity for GCHeapDumps between ETW and EventPipe (dotnet/coreclr#26270)
Commit migrated from https://github.com/dotnet/coreclr/commit/
16e83a73cb2df7e2434a7332f7608fc39286ac72
Brian Sullivan [Thu, 22 Aug 2019 22:43:25 +0000 (15:43 -0700)]
Implement ilasm and ildasm support for .param constraint with Custom attributes (dotnet/coreclr#26219)
* Implement ildasm support for .param constraint with Custom attributes
* Implement ilasm support for .param constraint with Custom attributes
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f0c2f35ec943fcc7a360f059af1fc5b2b9ce1f5
Tarek Mahmoud Sayed [Thu, 22 Aug 2019 22:16:46 +0000 (15:16 -0700)]
Cleanup GregorianCalendarHelper leap month checks (dotnet/coreclr#26321)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee9920ac82a2e7452a8e973c80470e738d098f35
mikedn [Thu, 22 Aug 2019 22:13:14 +0000 (01:13 +0300)]
Fix loop hoist ordering (part I - "swap" case) (dotnet/coreclr#20650)
* Change optHoistLoopExprsForTree to use GenTreeVisitor
* Rename ArrayStack::Index to Top
Having Bottom/Top/Index is risky, sooner or later someone will get confused and use Index instead of Bottom.
* optHoistLoopExprsForTree -> optHoistLoopExprsForStmt
Change `optHoistLoopExprsForTree` to handle the entire statement tree so we no longer need the `hoistable` parameter and `optHoistCandidate` is confined to the visitor.
* optHoistLoopExprsForStmt -> optHoistLoopExprsForBlock
Now move block hoisting to optHoistLoopExprsForStmt so the visitor can maintain `firstBlockAndBeforeSideEffect` itself instead of having a bool* passed to it.
* optHoistLoopExprsForBlock -> optHoistLoopBlocks
Put the block hoisting in one place so we can reuse the visitor,
together with it's value stack and whatever memory it has allocated.
optHoistLoopExprsForBlock -> optHoistLoopBlocks
* Fix loop hoist ordering
When a non-hoistable node is encountered it is not sufficient to hoist all its hoistable children, there may be siblings that are also hoistable and since the tree is traversed in execution order they need to be hoisted first.
* Remove optTreeIsValidAtLoopHead
It is redundant. HoistVisitor traverses a tree, decides that it is invariant and attempts to hoist it using optHoistCandidate.
And optHoistCandidate calls optTreeIsValidAtLoopHead that traverses the tree again and rejects hoisting if the tree contains non-SSA variables or SSA variables defined outside the loop.
Well, just check for such cases during the traversal done by HoistVisitor, there's no need to traverse the tree twice.
* Remove bogus conditions from optHoistCandidate
Nobody's calling it with an invalid loop number or with a loop that isn't hoistable.
* Remove bogus block op check
OperIsCopyBlkOp can't be true - the GT_ASG case was already handled and what's left are STORE_BLK/OBJ nodes, but those don't appear until lowering.
* Remove bogus PHI VN check
The "It's not *really* a definition, rather a pass-through of some other VN." case doesn't actually use VNF_PhiDef functions. If it's a pass-through then the VN of the PHI is just that "other VN".
* Remove MAX_CHILDREN define
It was used only by optHoistLoopExprsForTree. It's also incompatible with the elimination of GT_LIST nodes as that makes nodes have an unbounded number of children.
* PR feedback
* Mark local nodes as hoistable/invariant
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0c2c565528ebf71f41e9fa782ac4c2bb121fd7e
Jarret Shook [Thu, 22 Aug 2019 17:10:03 +0000 (10:10 -0700)]
Remove native test build from build.sh (dotnet/coreclr#26176)
* Remove native test build from build.sh
* Remove skiptests from unix documentation and yml
* Add back skiptests for winodws
Commit migrated from https://github.com/dotnet/coreclr/commit/
42e189be4fd1fbb68a13345074d726b4cf86d195
Michal Strehovský [Thu, 22 Aug 2019 17:02:43 +0000 (19:02 +0200)]
Mark methods specially handled in JitInterface Intrinsic (dotnet/coreclr#26209)
* Mark methods specially handled in JitInterface Intrinsic
For CPAOT compiler's sake.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2173d922ece1d267b60c64e19b61b3c8fdb36c04
Fadi Hanna [Thu, 22 Aug 2019 11:31:08 +0000 (04:31 -0700)]
Fix issue with local getting out of scope (dotnet/coreclr#25708)
Commit migrated from https://github.com/dotnet/coreclr/commit/
47a155800eecb965e7f49e19f6109e93f370716c
Stephen Toub [Wed, 21 Aug 2019 17:06:37 +0000 (13:06 -0400)]
Fix IDE0034 (simplify default expression)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4aa65f077778c7c05211825f98684aae9c52caaf
Stephen Toub [Wed, 21 Aug 2019 16:57:38 +0000 (12:57 -0400)]
Fix IDE0054 (use compound assignment)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2070bff3393170e2337eb78d0668fe9daf20c5f
Stephen Toub [Wed, 21 Aug 2019 16:51:58 +0000 (12:51 -0400)]
Fix (mostly) IDE0055 (formatting)
Lots of various spacing issues. I say "mostly" because I explicitly undid some changes that added to rather than reduced inconsistency, e.g. region indents. We can revisit that later.
Commit migrated from https://github.com/dotnet/coreclr/commit/
45715d1250e30823826722cfc3e6f968cec9bf3f
Stephen Toub [Tue, 20 Aug 2019 16:26:05 +0000 (12:26 -0400)]
Fix StyleCop warning SA1114 (parameter list should follow declaration)
Fixed just be removing stale/unnecessary comments.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7afef89433043d1d2e9952ea5f2ec883b6e2e346
Stephen Toub [Tue, 20 Aug 2019 16:22:38 +0000 (12:22 -0400)]
Fix StyleCop warning SA1006 (empty statements)
This is just running the rule and auto-fixing everything. I undid changes that converted e.g. `while (...);` to `while (...) { }`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef147b4841cc97c098d2e9917b2096bdb0ed665c
Stephen Toub [Tue, 20 Aug 2019 15:52:42 +0000 (11:52 -0400)]
Fix StyleCop warning SA1005 (single line comment spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4bd878e0ca61b5654b0e9869f6af7e1b9241966b
Stephen Toub [Tue, 20 Aug 2019 13:29:48 +0000 (09:29 -0400)]
Fix (mostly) StyleCop warning SA1003 (operator symbol spacing)
The "mostly" here is that I undid changes where it was forcing formatting around a `: this` or `: base` call for a ctor, in particular where it was moving one up from the next line to be at the end of the current line.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3ca042455a4a1cfa3063b68eeeb698a1201d6f4
Stephen Toub [Tue, 20 Aug 2019 13:20:57 +0000 (09:20 -0400)]
Fix StyleCop warning SA1024 (colon spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d74d72bc27db5897f85bb28d30a0ef1020606b23
Stephen Toub [Tue, 20 Aug 2019 13:16:19 +0000 (09:16 -0400)]
Fix StyleCop warning SA1015 (closing generic brace spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
40d1c18bdabcd702bb4377a7702d2453391c3dd5
Stephen Toub [Tue, 20 Aug 2019 13:14:01 +0000 (09:14 -0400)]
Fix StyleCop warning SA1013 (closing brace spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f390984ebff217763a8a587d4cff5686adb240bf
Stephen Toub [Tue, 20 Aug 2019 13:11:58 +0000 (09:11 -0400)]
Fix StyleCop warning SA1012 (opening brace spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0290560c5211c31235496c7dd692808dcc71ed4b
Stephen Toub [Tue, 20 Aug 2019 01:27:54 +0000 (21:27 -0400)]
Fix StyleCop warning SA1008 (opening paren spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
604264d025f794d44cdb1a8195aae0017616ec42
Stephen Toub [Tue, 20 Aug 2019 01:25:08 +0000 (21:25 -0400)]
Fix StyleCop warning SA1002 (semicolon spacing)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef4940d1332b929b9d42e7a9390cace58b01b931