Konstantin Baladurin [Mon, 28 Aug 2017 19:02:12 +0000 (22:02 +0300)]
EventPipe: fix memory leaks (dotnet/coreclr#12476)
Commit migrated from https://github.com/dotnet/coreclr/commit/
cee0eff305d988452c589a5868bbf7dbb618aa40
Justin Van Patten [Mon, 28 Aug 2017 18:01:42 +0000 (11:01 -0700)]
Delete dead PAL functions (dotnet/coreclr#13613)
* Remove duplicate define
* Remove unused wincon.h defines
* Delete unused LockFile/UnlockFile
* Remove unused WszCryptGetDefaultProvider define
* Remove unused defines
* Remove unused defines
* Delete unused GetDiskFreeSpace
* Delete unused RegisterEventSource\DeregisterEventSource\ReportEvent
* Remove unused defines
* Delete unused AreFileApisANSI
* Delete unused MoveFileW
* Delete unused SetFileTime
* Delete unused GetFileTime
* Delete unused FileTimeToDosDateTime
* Delete unused GetFileType
* Delete unused GetConsoleCP
* Delete unused GetExitCodeThread
* Delete unused FlushViewOfFile
* Delete unused RtlZeroMemory
* Delete unused MoveFileA
Commit migrated from https://github.com/dotnet/coreclr/commit/
c440335be80ee0762856d0be6e91ec3ea2f90504
mikedn [Mon, 28 Aug 2017 17:59:02 +0000 (20:59 +0300)]
Fix bad cast morphing (dotnet/coreclr#13429)
fgMorphCast thinks that casting a i1 value to i2 via conv.ovf.i2.un is a widening conversion and removes the overflow check. But this is in fact a narrowing conversion because i1 is implicitly sign extended to i4 and then i4 is treated as u4. Going from i4 to u4 overflows for negative values so we can't treat the source type of the cast as i1, it has to be u4.
Of course, the existing code works fine if the source type is unsigned. Going from u1 to i4 and then to u4 never overflows so it's safe to treat the source type as u1.
Commit migrated from https://github.com/dotnet/coreclr/commit/
68e7669cf9cc6ad64fa0393339dbebafd03612e9
Carol Eidt [Mon, 28 Aug 2017 17:46:34 +0000 (10:46 -0700)]
Merge pull request dotnet/coreclr#13617 from CarolEidt/Fix13603
An unused long needs to have dstCount of 0
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa386c89370cd4ed6811afe48343a51b6fda3a05
Bruce Forstall [Mon, 28 Aug 2017 16:45:08 +0000 (09:45 -0700)]
Merge pull request dotnet/coreclr#13605 from BruceForstall/ScopeEnvSettings
Scope build script environment variable setting
Commit migrated from https://github.com/dotnet/coreclr/commit/
b00ff25327a7ea2d9381aa2741b71a2fdede1afe
Carol Eidt [Mon, 28 Aug 2017 15:11:39 +0000 (08:11 -0700)]
Merge pull request dotnet/coreclr#13624 from alpencolt/ryu-arm-fix-multireg-decl
[RyuJIT/ARM32] Fix MultiRegOp declaration
Commit migrated from https://github.com/dotnet/coreclr/commit/
3758e847988cf8d0e950205657dd0bbdd6818fe6
Jan Kotas [Mon, 28 Aug 2017 06:29:23 +0000 (23:29 -0700)]
Fix WinRT build breaks (dotnet/corertdotnet/coreclr#4398)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
aabfe1617aef41497aa17fe11e4b4f29bd78680f
Alexander Soldatov [Mon, 28 Aug 2017 12:54:47 +0000 (15:54 +0300)]
[RyuJIT/ARM32] Fix MultiRegOp declaration
According to last changes in OperIsMultiRegOp() declaration of MultiRegOp
is needed of some changes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b00aceb16e0201f196a9889989d78f3e0f922f6
Dan Moseley [Mon, 28 Aug 2017 06:51:22 +0000 (23:51 -0700)]
Remove always defined FEATURE_RANDOMIZE_STRING_HASHING define (dotnet/coreclr#13491)
* Remove always defined FEATURE_RANDOMIZE_STRING_HASHING
* Fully remove randomized hashing
* Leftovers
* Remove additionalEntropy from HashSortKey as it was always 0
* Remove additionalEntropy from HashString as it was always 0
* Change to private, as not in fact called by reflection in .NET Core
* Fix build break due to FCDECLn
* Revert removed QCALL
* Remove unused strlen parameter
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c07c5aa98f8a088bf25099f1ab2d38b59ea5478
Dan Moseley [Mon, 28 Aug 2017 06:41:56 +0000 (23:41 -0700)]
Remove dead HResults.cs (dotnet/coreclr#13611)
* Fix old copy paste mistake
* Remove dead HResults.cs
* Rename __HResults to HResults
* Rename other two __HResults classes
* Combine into single HResults class, to match CoreRT
* Make hex consistently uppercase
* Sort HResults
Commit migrated from https://github.com/dotnet/coreclr/commit/
0db6d91ec163eb2ddc005d141fe13ee0df267af0
Carol Eidt [Mon, 28 Aug 2017 03:48:39 +0000 (20:48 -0700)]
Merge pull request dotnet/coreclr#13543 from hseok-oh/ryujit/fix_13451
[RyuJIT/ARM32] Simplify lowering long argument
Commit migrated from https://github.com/dotnet/coreclr/commit/
a07fc39829f32960abee1fdc36b639afda7f2433
Adrian Godong [Mon, 28 Aug 2017 03:24:02 +0000 (20:24 -0700)]
Refactor AsSpan to AsReadOnlySpan (dotnet/coreclr#13608)
* Refactor AsSpan to AsReadOnlySpan
* Updated usages.
* Renamed test methods.
* Bring back AsSpan as obsolete method.
Commit migrated from https://github.com/dotnet/coreclr/commit/
02f0853126d690910fc378a672dd008c69f5bbbe
Hyeongseok Oh [Mon, 28 Aug 2017 01:03:07 +0000 (10:03 +0900)]
Remove SetContained for GT_FIELD_LIST
Remove SetContained for GT_FIELD_LIST: already set when it is generated
Add comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
74bccdaec4699cc4baac3f8f882532c99aa6471c
Carol Eidt [Mon, 28 Aug 2017 00:31:09 +0000 (17:31 -0700)]
Merge pull request dotnet/coreclr#13597 from CarolEidt/InfoLinearScan
Move TreeNodeInfoInit to LinearScan
Commit migrated from https://github.com/dotnet/coreclr/commit/
fbba195bb3ed4f0e52e63abe8fa61181bd6afab7
Carol Eidt [Sun, 27 Aug 2017 23:49:18 +0000 (16:49 -0700)]
An unused long needs to have dstCount of 0
Fix dotnet/coreclr#13603
Commit migrated from https://github.com/dotnet/coreclr/commit/
88210b1891eb96a2ea2aa8e4764800b02baa7b2a
Noah Falk [Sun, 27 Aug 2017 22:46:53 +0000 (15:46 -0700)]
Merge pull request dotnet/coreclr#13581 from noahfalk/fix_corefx_testing
Fix running corefx tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
79825ebc61479687e70b5d1041553d28756d1668
Pat Gavlin [Sat, 26 Aug 2017 17:34:40 +0000 (10:34 -0700)]
Merge pull request dotnet/coreclr#13411 from pgavlin/RepriTests
Reprioritize tests to improve inner-loop throughput.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1596d06b6180a58782cf831b435dbe0046b5be9c
Santiago Fernandez Madero [Sat, 26 Aug 2017 04:39:19 +0000 (23:39 -0500)]
Use CreateFile2 instead of CreateFile2FromApp (dotnet/coreclr#13595) (dotnet/coreclr#13607)
* Use CreateFile2 instead of CreateFile2FromApp
* Feedback fixes
Commit migrated from https://github.com/dotnet/coreclr/commit/
c636e4bd0ea07c01be6d600ababc12103f9ac4c8
Bruce Forstall [Sat, 26 Aug 2017 00:12:07 +0000 (17:12 -0700)]
Scope environment variable setting
The product and test build scripts invoke Visual Studio environment
setting scripts several times during the build process. If doing a full
cross architecture build including test build, it's as many as five times.
These environment changes are cumulative. For the PATH variable, in
particular, they can lead to a failure by exceeding the variable
length limit. This seems to have been exacerbated by VS2017, which
has very long paths, and for which many things are added to the PATH.
Fix this by adding "setlocal" / "endlocal" around various sections
of the scripts, so that the multiple calls to the environment script
are not cumulative.
(There is still some cumulative environment setting, as build.cmd
calls VsDevCmd.bat, then if tests are being built, calls build-test.cmd,
which also calls VsDevCmd.bat, and then possibly in addition calls
vcvarsall.bat.)
In addition, I simplified the code that sets up the msbuild logging
parameters, so it is more readable, regular, and doesn't have so
much repeated text.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc8bc20e453c928e0c2c4f4fb64c8003fcc0647
Carol Eidt [Sat, 26 Aug 2017 00:05:10 +0000 (17:05 -0700)]
Merge pull request dotnet/coreclr#13579 from CarolEidt/RemoveDupLowerBlockStore
Arm Containment Cleanup
Commit migrated from https://github.com/dotnet/coreclr/commit/
18ee973ffcc068e64f31f4c2b3d0c342c661c259
Jan Kotas [Fri, 25 Aug 2017 23:51:45 +0000 (16:51 -0700)]
Delete superfluous check in funceval.cpp (dotnet/coreclr#13598)
Func-eval'ing BCL methods with the DynamicSecurityMethod attribute causes an ArgumentException.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8820701cb4f41744557fa7557606578694cf0262
José Rivero [Fri, 25 Aug 2017 23:26:45 +0000 (16:26 -0700)]
Minor performance infrastructure changes. (dotnet/coreclr#13557)
- IlLink scenario will run on a VM (currently it is only measuring MSIL size)
- Updated the patterns of files to search for on scenario runs
- Updated the JitBench commit hash being used ()
- Disable min_opt from the PR correctness mode.
- String was not being interpolated.
Commit migrated from https://github.com/dotnet/coreclr/commit/
35dc8bbd313d82d56d81e3ffac79b16605c90183
Michal Strehovský [Fri, 25 Aug 2017 23:09:47 +0000 (16:09 -0700)]
Fix generic context passed to resolved constrained method calls (dotnet/coreclr#13577)
If the EE was able to resolve a constrained call, the instantiating
parameter to use is the type by which the call was constrained with. We
embed pConstrainedResolvedToken as the extra argument because
pResolvedToken is an interface method and interface types make a poor
generic context.
The CLR doesn't hit this path because these types of constrained method
calls go through an instantiating stub. We don't do instantiating stubs
in CoreRT.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c539df9eda6e8221c132f003f0266bf18b5a2499
Steve MacLean [Fri, 25 Aug 2017 22:10:50 +0000 (18:10 -0400)]
[Arm64/Unix] Add JIT_Stelem_Ref helper (dotnet/coreclr#13588)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2bbee2ec637c7e2c87d9ab547f3e5ba7d6977e7
Matt Warren [Fri, 25 Aug 2017 21:46:55 +0000 (22:46 +0100)]
Create deep-dive-blog-posts.md (dotnet/coreclr#13336)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff3be834b81ee76736e0ddc1b292b7b2440848ff
Carol Eidt [Fri, 25 Aug 2017 21:33:49 +0000 (14:33 -0700)]
PR Feedback and formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
97a5627d7e6227320dfdb83a745caa1be5bd03b0
Carol Eidt [Fri, 25 Aug 2017 20:36:43 +0000 (13:36 -0700)]
Move TreeNodeInfoInit to LinearScan
In preparation for computing the TreeNodeInfo on the fly, move all the TreeNodeInfoInit and related methods to the LinearScan class.
Commit migrated from https://github.com/dotnet/coreclr/commit/
98e481e86a17b2119a1cec17bd336d47c9fa0be4
Koundinya Veluri [Fri, 25 Aug 2017 20:14:59 +0000 (13:14 -0700)]
Don't multiply YieldProcessor count by proc count (dotnet/coreclr#13556)
Related to issue mentioned in https://github.com/dotnet/coreclr/issues/13388
- Multipying the YieldProcessor count by proc count can cause excessive delays that are not fruitful on machines with a large number of procs. Even on a 12-proc machine (6-core), the heuristics as they are without the multiply seem to perform much better.
- The issue above also mentions that the delay of PAUSE on Intel Skylake+ processors have a significantly larger delay (140 cycles vs 10 cycles). Simulating that by multiplying the YieldProcessor count by 14 shows that in both tests tested, it begins crawling at low thread counts.
- I did most of the testing on ManualResetEventSlim, and since Task is using the same spin heuristics, applied the same change there as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
29d740ebb3cdf4ab301c574ef3fd9b76182c34e3
Carol Eidt [Fri, 25 Aug 2017 18:10:32 +0000 (11:10 -0700)]
PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
22ca4e0c4a662d828bd23314ca8cecc1180072b7
Ahson Ahmed Khan [Fri, 25 Aug 2017 17:29:31 +0000 (10:29 -0700)]
Remove Span(T[], int) ctor (dotnet/coreclr#13575)
* Remove Span(T[], int) ctor - from issue dotnet/coreclr#23471
Commit migrated from https://github.com/dotnet/coreclr/commit/
5371352ac14424f9c0367705e04c637f0ca4058c
Stephen Toub [Fri, 25 Aug 2017 17:28:19 +0000 (13:28 -0400)]
Use Span-based TryParse in several globalization types (dotnet/coreclr#13582)
Commit migrated from https://github.com/dotnet/coreclr/commit/
57e55e3d1aae07500b9d533f4ea14d9cee80cadc
Bruce Forstall [Fri, 25 Aug 2017 17:20:34 +0000 (10:20 -0700)]
Merge pull request dotnet/coreclr#13586 from parjong/fix/ClrStack_full
[ARM/Linux] Enable clrstack -f
Commit migrated from https://github.com/dotnet/coreclr/commit/
568330c4498ea371bb5c8bc2ca1faa36a2cacf6a
Michal Strehovský [Fri, 25 Aug 2017 16:28:21 +0000 (09:28 -0700)]
Do not devirtualize indirect calls (dotnet/coreclr#13561)
I'm seeing the affected code take the `impDevirtualizeCall` code path
with `CT_INDIRECT` calls. `gtCallMethHnd` is a `GenTreePtr` in that case
(it's a union) and passing that as as `CORINFO_METHOD_HANDLE` leads
to bad things.
Commit migrated from https://github.com/dotnet/coreclr/commit/
06fc72a6205ce5c25631782c543a5e2f5e45b809
Pat Gavlin [Fri, 25 Aug 2017 16:18:30 +0000 (09:18 -0700)]
Merge pull request dotnet/coreclr#13245 from pgavlin/NoExpandIndex
Use a smaller expansion of GT_INDEX in MinOpts.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7ffdeca6fed927dbd457293d97b07237db95e82
Carol Eidt [Thu, 24 Aug 2017 20:21:28 +0000 (13:21 -0700)]
Arm Containment Cleanup
- Fix a couple of issues with TreeNodeInfoInit for struct arguments
- Remove duplicate calls to LowerBlockStore from TreeNodeInfoInit for arm and arm64
- Eliminate duplicative isMultiReg method from GenTree and fix condition for OperIsMultiRegOp()
Commit migrated from https://github.com/dotnet/coreclr/commit/
388660ba7feb581d7763c8980dfd8ec3c309ab2b
Carol Eidt [Fri, 25 Aug 2017 14:46:09 +0000 (07:46 -0700)]
Merge pull request dotnet/coreclr#13584 from wateret/fix-armel-treenodeinfoinit
[RyuJIT/armel] Fix ifdef block in TreeNodeInfoInit
Commit migrated from https://github.com/dotnet/coreclr/commit/
f5f622db2a00d7687f256c0d1cdda5e6f6da7ad4
Jonghyun Park [Fri, 25 Aug 2017 07:42:44 +0000 (16:42 +0900)]
Enable clrstack -f in ARM/Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c2d29591e7af20bd96cda9051f6637a5568ea57
Hanjoung Lee [Fri, 25 Aug 2017 06:49:38 +0000 (15:49 +0900)]
[RyuJIT/armel] Fix ifdef block in TreeNodeInfoInit
Commit migrated from https://github.com/dotnet/coreclr/commit/
62a8d935e78109d5ea9e5fb4c8ae8a4126a72e10
Carol Eidt [Fri, 25 Aug 2017 04:54:56 +0000 (21:54 -0700)]
Merge pull request dotnet/coreclr#13506 from mikedn/switch-un
Fix switch unsigned cast
Commit migrated from https://github.com/dotnet/coreclr/commit/
e9e3a69fe00d5e75ed09971b346f3529beba36f6
Ahson Ahmed Khan [Fri, 25 Aug 2017 04:46:45 +0000 (21:46 -0700)]
Remove uses of the {RO}Span ctor that takes an array and offset (dotnet/coreclr#13578)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0af62c1b9c031623b1389079464d59c0f75fef97
noahfalk [Fri, 25 Aug 2017 04:02:41 +0000 (21:02 -0700)]
Fix running corefx tests
Running CoreFX tests was supposed to use a batch file (env_script) to run CoreFX tests under different environment configurations. However due to subtlties in how the command line is parsed none of the environment variables set by this script would actually persist for the execution of the tests. As best I can tell prior to this fix specifying a env_script had no effect whatsoever on windows, and our CI corefx test stress scenarios weren't actually testing the scenario they claimed to be testing.
cmd /c "Set.bat&&Check.bat" will propagate env vars set in Set.bat so that they are visible in Check.bat because both batch files execute within the context of the newly invoked cmd.exe process. However cmd /c Set.bat&&Check.bat (no quotes) will run Set.bat in its own cmd.exe process, then exit that process and run Check.bat in the parent shell process. The parent process does not have any environment variable changes that were made by Set.bat.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f58337cbdc1a890c3ab15d0aae6ba306ad41923
Hyeongseok Oh [Fri, 25 Aug 2017 02:35:53 +0000 (11:35 +0900)]
Remove clearing regnum in LowerArg
Remove clearing regnum in LowerArg
Revert changing in gentree.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
4928bcd4c5632d1d82bb24ef2d011f80f1098c88
Victor "Nate" Graf [Thu, 24 Aug 2017 22:13:49 +0000 (15:13 -0700)]
Remove unnecessary buffer copy from EventPipe::WriteEvent pipeline (dotnet/coreclr#13347)
* [WIP] Eliminate extra buffer copy with new api path
* Copy blobs to a flat buffer is Rundown is on
* Refactor to use payload class and dedupe code
* Add contracts
* Fix many small errors
* Make names unambiguous
* Add EventPipe::WriteEventBlob to ecalllist.h
* Address code review
* Add test and fix a buffer copy bug
* Copy data instead of data pointer
* Add optional output file arg to tests
* Change failure return code
* Renamed variables for clarity
Commit migrated from https://github.com/dotnet/coreclr/commit/
421f9e7c64b05c71db6ef71791998c06249953f6
Noah Falk [Thu, 24 Aug 2017 21:47:18 +0000 (14:47 -0700)]
Merge pull request dotnet/coreclr#13573 from noahfalk/add_ci_logging
Makes sure the CI archiving runs even on failure
Commit migrated from https://github.com/dotnet/coreclr/commit/
970c41b10cca6f0f4bc6c6524c6733ac2c5011ba
noahfalk [Thu, 24 Aug 2017 21:19:45 +0000 (14:19 -0700)]
Makes sure the archiving runs even on failure
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb32b0d7b70665b1734792c4292b568b8f45bf52
Mike Danes [Mon, 21 Aug 2017 20:21:52 +0000 (23:21 +0300)]
Fix switch unsigned cast
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed9dc1f5173fa538de6c9fd9ec8d57399ff24497
Pat Gavlin [Thu, 24 Aug 2017 19:25:08 +0000 (12:25 -0700)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
71b9152b70b0627087bbba679386bcbf880cc8af
Steve MacLean [Thu, 24 Aug 2017 17:54:37 +0000 (13:54 -0400)]
mscorlib cache padding for 128 byte lines (dotnet/coreclr#13102)
* mscorlib ConcurrentQueue pad for 128B cache lines
* Add Padding.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
ad29b87442d8132f5c3a6fd3844e5e00989b2b47
Carol Eidt [Thu, 24 Aug 2017 13:15:45 +0000 (06:15 -0700)]
Merge pull request dotnet/coreclr#11589 from mikedn/gen-am
Fix improper handling of GenTreeAddrMode offset
Commit migrated from https://github.com/dotnet/coreclr/commit/
8e2d570c730419d2f8610a8d01b0a3e0da6cb29f
Hyeongseok Oh [Thu, 24 Aug 2017 01:27:18 +0000 (10:27 +0900)]
Fix regeression with Containment
- SetContained for GT_FIELD_LIST
- OperIsMultiRegOp return true for armel only
- Simplify lowering long argument and fix type
Commit migrated from https://github.com/dotnet/coreclr/commit/
de3b59386e92e94f9246e197c20500f27b0ebf83
Carol Eidt [Thu, 24 Aug 2017 07:28:58 +0000 (00:28 -0700)]
Merge pull request dotnet/coreclr#13470 from CarolEidt/Fix13451
Fix ARM issues with Containment
Commit migrated from https://github.com/dotnet/coreclr/commit/
5bf1eeaac88b05f4f903a0db09b876035024e755
Mike Danes [Sat, 10 Jun 2017 07:39:41 +0000 (10:39 +0300)]
Fix improper handling of GenTreeAddrMode offset
For unknown reasons GenTreeAddrMode::gtOffset is unsigned rather than
int. On 32 bit hosts this doesn't really matter but on 64 bit hosts we
end up zero extending instead of sign extending it, GetTreeIndir::Offset()
does that by casting from unsigned to size_t.
It doesn't appear possible for this to cause correctness issues (because
the address mode displacement is 32 bit anyway) but it's confusing and
hurts CQ because the emitter can't recognize small negative displacements
that can be encoded in a single byte.
It's worth noting that CodeGen::genCreateAddrMode uses ssize_t internally
to represent the offset but then returns it as unsigned the emitter works
with either int or ssize_t displacements (e.g. emitIns_R_ARX & co. have
int disp arguments, emitNewInstrAmd has ssize_t dsp argument).
Change steps:
Access GenTreeAddrMode's gtOffset via Offset() - Offset() returns the correct
type - int instead of unsigned. All non-legacy uses of gtOffset were replaced
with Offset() and casts were added where necessary. gtOffset was made private
in non-legacy builds to ensure it is not used directly.
Rename GenTreeIndir's Offset() to Address() - This function is problematic,
it returns size_t which is suitable for representing addresses but not
offsets. Rename it and then figure out where offsets are needed and where
addresses are needed.
Add back Offset() with the correct return type - All usages of
GenTreeIndir::Address() (e.g. emitNewInstrAmd) expect ssize_t, not size_t.
Fix the bug - GenTreeIndir::Offset() return ssize_t and
GenTreeAddrMode::Offset() returns int. It doesn't make sense to have a
cast to unsigned.
Fix ARM's handling of GenTreeAddrMode offset - Various pieces of code
(e.g. emitIns_valid_imm_for_ldst_offset) already treat the offset as
signed, they use int, INT64, ssize_t. More importantly, emitarm64's
emitInsLoadStoreOp treats the offset as signed while TreeNodeInfoInitIndir
treates it as unsigned. The later is wrong.
Commit migrated from https://github.com/dotnet/coreclr/commit/
518e10bb494530cb1004b9bc44ad4d8da1c07b30
Mike McLaughlin [Thu, 24 Aug 2017 04:13:36 +0000 (21:13 -0700)]
Add unwind info to core dumps. (dotnet/coreclr#13547)
The createdump utility now enumerates all the native stack frames (with
some help from the managed stack walker) for all the threads adding all
the ELF unwind info needed.
On a different machine and without any of the native modules loaded when
the crashdump was generated all the thread stacks can still be unwound
with lldb/gdb.
Change the PAL_VirtualUnwindOutOfProc read memory adapter in DAC
to add the memory to instances manager.
Some misc. cleanup.
Commit migrated from https://github.com/dotnet/coreclr/commit/
94a67752ace5236cb6228c4cbc6e6c2976895f2a
Tijoy Tom [Thu, 24 Aug 2017 03:44:00 +0000 (20:44 -0700)]
Merge pull request dotnet/coreclr#13553 from tijoytom/master
Revert incorrect change from commit 16fc300
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3e884a062607ac296fc3943796627e2209a95ea
Carol Eidt [Fri, 18 Aug 2017 19:12:40 +0000 (12:12 -0700)]
Fix ARM issues with Containment
These are changes that should have been part of PR dotnet/coreclr#13198:
- Correctly contain struct arguments
- Correctly get number of source registers
- Clear register assignments on `GT_FIELD_LIST` nodes (thanks @hseok-oh).
- Remove now-redundant `ContainCheck` methods for armarch targets.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5495b89a1368ecb279f2d1b39e69fdab96b9faa4
Pat Gavlin [Thu, 24 Aug 2017 00:33:19 +0000 (17:33 -0700)]
Merge pull request dotnet/coreclr#13550 from pgavlin/DevDiv482577
Type `lea [this + delegateObject]` as `TYP_BYREF`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90d0a3e00eab850b2bac5e685a6ce2aba96f290f
William Godbe [Thu, 24 Aug 2017 00:16:46 +0000 (17:16 -0700)]
Merge pull request dotnet/coreclr#13529 from wtgodbe/ParameterizeRids
Parameterize RIDs for package restore
Commit migrated from https://github.com/dotnet/coreclr/commit/
c486926a6a85bb61e516f69e900812d3294e69a0
Noah Falk [Thu, 24 Aug 2017 00:15:15 +0000 (17:15 -0700)]
Merge pull request dotnet/coreclr#13559 from noahfalk/add_ci_logging
Add more logging to corefx test CI runs
Commit migrated from https://github.com/dotnet/coreclr/commit/
dac0a16bbc7fa9f3ceb1181c208ca27a9777678d
noahfalk [Thu, 24 Aug 2017 00:08:36 +0000 (17:08 -0700)]
Add more logging to corefx test CI runs
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c5830c5b64e132c136401ade41b8d9748fa3915
Roman Artemev [Thu, 24 Aug 2017 00:01:44 +0000 (17:01 -0700)]
Merge pull request dotnet/coreclr#13548 from rartemev/revert_12469_fix
Revert "Fixed misconception between FP register allocator and RyuJIT's CSE phase"
Commit migrated from https://github.com/dotnet/coreclr/commit/
2cb3585470b973fda3ba950e295cc3e936a71cde
William Godbe [Wed, 23 Aug 2017 23:23:10 +0000 (16:23 -0700)]
Merge pull request dotnet/coreclr#13533 from wtgodbe/buildNumber
Disable default BuildNumberMajor
Commit migrated from https://github.com/dotnet/coreclr/commit/
6aed5a155a60aafa591a7d9bbe9864074469f54a
tijoytk [Wed, 23 Aug 2017 22:40:13 +0000 (15:40 -0700)]
This reverts
https://github.com/dotnet/coreclr/commit/dotnet/coreclr@
16fc3005c085212f6e700a0df8ff7f36c1ea535b
The PR was trying to fix an incorrect test , we should be passing
in !fForWinRT.See https://github.com/dotnet/coreclr/issues/13460#issuecomment-
324456870
for more info.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3d777c6b864dfdbde9db823ccdc27f087725f45c
Jim Ma [Wed, 23 Aug 2017 22:32:15 +0000 (10:32 +1200)]
Fixed Equals/GetHashCode bug for struct. (dotnet/coreclr#13164)
Other than `ContainsPointers` and `IsNotTightlyPacked`, added two new conditions for checking whether a valuetype can go to fast path or not. Following are the details of these 2 conditions:
- Check whether a valuetype contains a Single/Double field. If it does, we cannot go to fast path. Floating point numbers have special `Equals` and `GetHashCode` implementation. We cannot simply compare floating point numbers via bits (e.g. +0.0 should equal to -0.0, but their underlying bits are different).
- Check whether an user-defined valuetype overrides `Equals` or `GetHashCode`. If it does, we cannot go to fast path. Because `Equals` or `GetHashCode` result may be different to bit comparison.
To find Single/Double fields and overridden `Equals`/`GetHashCode`, we start a DFS to go through the whole hierachy of the source valuetype, and cache the result to `MethodTable`.
Fix dotnet/coreclr#11452
Commit migrated from https://github.com/dotnet/coreclr/commit/
495ece4abd2204e1fc79f34cf3ea7fe5ecf90ad3
Pat Gavlin [Wed, 23 Aug 2017 21:45:49 +0000 (14:45 -0700)]
Add "long GC" jobs to the pri1 build set.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ee75ed15ff078034e449a9bb605a9d9f4db8688
Pat Gavlin [Wed, 23 Aug 2017 20:31:39 +0000 (13:31 -0700)]
Type `lea [this + delegateObject]` as `TYP_BYREF`.
This node was incorrectly typed as `TYP_GCREF`, which was causing an
assertion during GC stress in internal testing.
Fixes VSO 482577.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6025fd00f0c86359817d5b09470120c177e4a124
wtgodbe [Tue, 22 Aug 2017 21:20:01 +0000 (14:20 -0700)]
Parameterize RIDs for package restore
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c0e0abf7c7b2ab48671ec2e37ff925fb5ca9c80
Roman Artemev [Wed, 23 Aug 2017 19:49:50 +0000 (12:49 -0700)]
Revert "Fixed misconception between FP register allocator and RyuJIT's CSE phase"
This reverts commit dotnet/coreclr@
3f4ee3bed52291e592d7ab67da1fc0e39ee8a3b7.
Commit migrated from https://github.com/dotnet/coreclr/commit/
81c38cd7272d0cbb70885122b7350fedaf0fd3ba
Brian Sullivan [Wed, 23 Aug 2017 19:37:03 +0000 (12:37 -0700)]
Merge pull request dotnet/coreclr#13534 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
59da8574383d547a20dcae478b67ff458f6d71e6
Koundinya Veluri [Wed, 23 Aug 2017 18:01:31 +0000 (11:01 -0700)]
Improve ReaderWriterLockSlim scalability (dotnet/coreclr#13495)
* Improve ReaderWriterLockSlim scalability
Subset of dotnet/coreclr#13243, fixes dotnet/coreclr#12780
- Prevented waking more than one waiter when only one of them may acquire the lock
- Limited spinning in some cases where it is very unlikely that spinning would help
The _myLock spin lock runs into some bad scalability issues. For example:
1. Readers can starve writers for an unreasonable amount of time. Typically there would be more readers than writers, and it doesn't take many readers to starve a writer. On my machine with 6 cores (12 logical processors with hyperthreading), 6 to 16 reader threads attempting to acquire the spin lock to acquire or release a read lock can starve one writer thread from acquiring the spin lock for several or many seconds. The issue magnifies with more reader threads.
2. Readers and especially writers that hold the RW lock can be starved from even releasing their lock. Releasing an RW lock requires acquiring the spin lock, so releasers are easliy starved by acquirers. How badly they are starved depends on how many acquirers there are, and it doesn't take many to show a very noticeable scalability issue. Often, these acquirers are those that would not be able to acquire the RW lock until one or more releasers release their lock, so the acquirers effectively starve themselves.
This PR does not solve (1), but solves (2) to a degree that could be considered sufficient. dotnet/coreclr#13243 solves (1) and (2) and for (2) it is still better by order-of-magnitude compared with this PR in several cases that I believe are not extreme, but if the complexity of deprioritization is deemed excessive for the goals then of what I tried so far this is the perhaps simplest and most reasonable way to solve (2).
I believe this PR would also be a reasonably low-risk one to port back to .NET Framework.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e000977dc11feb3f7f7920a57f0e53f4749377e0
Jan Vorlicek [Wed, 23 Aug 2017 17:03:16 +0000 (19:03 +0200)]
Enable overriding default stack size on Unix (dotnet/coreclr#13517)
Alpine Linux has a very small default stack size limit, about 80kB.
This is not enough for running coreclr apps.
This change enables overriding the default stack size using the
COMPlus_DefaultStackSize env variable. For Alpine, it also sets
the default stack size to the same value we use for Windows, which
is 1.5MB.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f2d1ec0e50a3aceddcc75172021cea10677b354
Bruce Forstall [Wed, 23 Aug 2017 16:44:48 +0000 (09:44 -0700)]
Merge pull request dotnet/coreclr#13540 from wateret/fix-13423
[RyuJIT/arm32] Fix MultiReg flag setter
Commit migrated from https://github.com/dotnet/coreclr/commit/
8abfe25cbd02e07361301e0a5cadb6716b3c0cde
Andy Ayers [Wed, 23 Aug 2017 16:16:07 +0000 (09:16 -0700)]
JIT: refine types when creating arg temps to improve devirtualization (dotnet/coreclr#13530)
The jit will refine the types of temps used to pass arguments to inlinees
when it creates the assignments to these temps.
Unfortunately this is too late to drive devirtualization in the body of
the inlinee, as thes assignments are created after the inlinee body is
imported.
So, add similar refinement logic to the place where the temps are first
created.
Closes dotnet/coreclr#13520.
Commit migrated from https://github.com/dotnet/coreclr/commit/
85c59f9aa92092e72618df51879a9338ca9d4307
Jonghyun Park [Wed, 23 Aug 2017 15:39:13 +0000 (00:39 +0900)]
Add a regression test for dotnet/coreclr#13160 (dotnet/coreclr#13531)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f46134f56e408fc3e4cd14cd8ed43be90765f7fe
Carol Eidt [Wed, 23 Aug 2017 14:13:45 +0000 (07:13 -0700)]
Merge pull request dotnet/coreclr#13450 from sjsinju/genisvaliddoublereg
[RyuJIT/ARM32] Remove unnecessary genIsValidDoubleReg() assertion
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fe0e8685e81099f5e1cf02504ddfe4ff183c750
Joseph Tremoulet [Wed, 23 Aug 2017 13:49:24 +0000 (09:49 -0400)]
Merge pull request dotnet/coreclr#13528 from JosephTremoulet/Iterate
Add InnerIterationCount to layout benchmarks
Commit migrated from https://github.com/dotnet/coreclr/commit/
c8ede5ad70ffa3bc34a522102b7646cae2bdebfd
Hanjoung Lee [Wed, 23 Aug 2017 08:47:03 +0000 (17:47 +0900)]
[RyuJIT/arm32] Fix MultiReg flag setter
Bitwise operation fix in `SetRegSpillFlagByIdx()`.
Fix dotnet/coreclr#13423
Commit migrated from https://github.com/dotnet/coreclr/commit/
7447d75d3027c4d01171ea46753d371fe7835a61
Stephen Toub [Wed, 23 Aug 2017 07:37:33 +0000 (03:37 -0400)]
Remove empty span check from Stream.Read/Write (dotnet/coreclr#13536)
When I added the base Stream.Read/Write(span) default implementations, I added a special-case check for if the span is empty, in which case it made the operation a nop. But various streams want to impose behavior even in the 0-byte case, e.g. throwing an ObjectDisposedException if the stream has been closed. This commit just removes the check and allows Read/Write to delegate for all sized spans.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9c4c6c6f85a26591c72983ea28eccb581eb9eca
Roman Artemev [Wed, 23 Aug 2017 06:54:26 +0000 (23:54 -0700)]
Merge pull request dotnet/coreclr#13535 from rartemev/issue_12467
Fixed assertion failure in legacy backend
Commit migrated from https://github.com/dotnet/coreclr/commit/
463a67316ef0187373a6d4c501aa913026ab6d88
Stephen Toub [Wed, 23 Aug 2017 03:40:10 +0000 (23:40 -0400)]
Merge pull request dotnet/coreclr#13522 from stephentoub/fsspan
Override Span-based Read/Write on FileStream
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa79179baa11923cba48e2cdd9c9bd723486a136
Roman Artemev [Wed, 23 Aug 2017 00:57:45 +0000 (17:57 -0700)]
Fixed assertion failure in legacy backend
Commit migrated from https://github.com/dotnet/coreclr/commit/
a88ac369ee776acafcaf1a39aeee93520b07b5f0
Andy Ayers [Wed, 23 Aug 2017 00:04:02 +0000 (17:04 -0700)]
JIT: don't self assign to temps (dotnet/coreclr#13484)
Modify gtNewTempAssign to more generally map self-assignment of temps
into nops.
We already were doing something similar over in `impAssignStruct`, and
now we catch non-struct cases too.
Commit migrated from https://github.com/dotnet/coreclr/commit/
637bfeffb0fd0378ff6d04d7bb845938b77bdade
dotnet-bot [Tue, 22 Aug 2017 23:12:08 +0000 (16:12 -0700)]
rollback Changeset 1671419: importCall
[tfs-changeset: 1671421]
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd9dce46c1d441883bb38ca24554ce3f8224276e
dotnet-bot [Tue, 22 Aug 2017 23:05:26 +0000 (16:05 -0700)]
importCall
[tfs-changeset: 1671419]
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f0700214606bb9d922e686d9cca0c489379202d
wtgodbe [Tue, 22 Aug 2017 22:45:26 +0000 (15:45 -0700)]
Disable default BuildNumberMajor
Commit migrated from https://github.com/dotnet/coreclr/commit/
faa15fee64e8b702a4212e8081087ebcaa458fae
Sean Gillespie [Tue, 22 Aug 2017 21:37:53 +0000 (14:37 -0700)]
Remove macro definition checks that aren't useful and cause unnecessary build breaks (dotnet/coreclr#13523)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1eea080a7b3a13110975b92034a22e4fc473df46
Jonghyun Park [Tue, 22 Aug 2017 20:56:01 +0000 (05:56 +0900)]
Fix inconsistency between GetHasCode and Equals (dotnet/coreclr#13513)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b7dcb5900392f9e30a8aaabe11c89d470178322
Joseph Tremoulet [Tue, 22 Aug 2017 20:23:07 +0000 (16:23 -0400)]
Add InnerIterationCount to layout benchmarks
These tests were too short-running to measure effectively. Add an inner
iteration count that makes the running time around 1 second (measured
locally).
Commit migrated from https://github.com/dotnet/coreclr/commit/
ad75eead4d663427381c103246c27c2e20587420
Jonghyun Park [Tue, 22 Aug 2017 19:31:26 +0000 (04:31 +0900)]
Introduce COMPlus_GDBJitEmitDebugFrame (dotnet/coreclr#13515)
* Introduce COMPlus_GDBJitEmitDebugFrame
* Use a proper #ifdef macro
Commit migrated from https://github.com/dotnet/coreclr/commit/
aed0665893b812eadd8be6362116285f59e27288
Stephen Toub [Tue, 22 Aug 2017 17:05:53 +0000 (13:05 -0400)]
Override Span-based Read/Write on FileStream
Adds overrides for the new Span-based Read/Write methods on FileStream.
A few notes:
- As with {Unmanaged}MemoryStream, FileStream isn't sealed, which means a derived type could have overridden all of the existing abstract/virtual methods, including Read(byte[],int,int). If a consumer then switched to using that stream with Read(Span), because we now override Read(Span), the consumer should get the same behavior intended by the stream developer. As such, since we have no good/efficient way to check whether Read(byte[],int,int) is overridden, we check whether the current stream is a concrete FileStream (rather than a derived type), and if it isn't we use the default base behavior, which will call the Read(byte[],int,int) method.
- FileStream is odd in that it has a dual nature around whether it was initialized for sync vs async, a setting that on Windows ends up configuring the native handle to operate in async mode. Sync operations on an async-configured FileStream end up delegating to the async methods and blocking, and async operations on a sync-configured FileStream end up using the synchronous behavior asynchronously. There were some inconsistencies around how this was handled between Windows and Unix, in particular around the ReadByte method, and as part of adding these overloads, I changed that as well, as doing so made the code simpler with the new Span-based support. Technically this is a breaking change on Unix, but it would be very niche, including calling ReadByte on an async stream while other async operations were in progress... in that case, the desktop and Windows core behavior was to allow direct access to any cached data in the buffer, whereas on Unix we would serialize the ReadByte call with other async operations in flight.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1cb3580858f3224f0e0981965a2da1fd61ba9e08
Steve MacLean [Tue, 22 Aug 2017 18:58:30 +0000 (14:58 -0400)]
[Arm64/Unix] Use portable MP optimized new/alloc (dotnet/coreclr#12333)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0e86604cbc2e30889ec354423bb4478924ece29
Steve MacLean [Tue, 22 Aug 2017 18:58:04 +0000 (14:58 -0400)]
[Arm64] Fix RecycledListsWrapper cache guard (dotnet/coreclr#13397)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5136b04cd19f35280949d078b5df19b99f0eb26
William Godbe [Tue, 22 Aug 2017 18:36:09 +0000 (11:36 -0700)]
Merge pull request dotnet/coreclr#12216 from ellismg/fix-warnings
Fix warnings when building SOS.NETCore.csproj
Commit migrated from https://github.com/dotnet/coreclr/commit/
246789d44abf75e6b945e4508ed25b9561d79adc
Sean Gillespie [Tue, 22 Aug 2017 17:20:36 +0000 (10:20 -0700)]
[Local GC] Enable building the GC as a shared library (dotnet/coreclr#13137)
* [Local GC] Build the GC using system headers
* Disable features to get the GC to build
* Get rid of the separate 'GC PAL' build
* Remove unused stuff
* Don't build gcenv.os.cpp when linking in a standalone gc
* Stub out CPUGroupInfo and NumaNodeInfo
* Stub out IsGCThread and friends
* Build the GC as a shared library :tada:
* Build, link, and run! :tada:
* Fix standalone GC build break
* Fixes where the GC's MethodTable and VM's MethodTable classes disagree
* Integrate a standalone GC into the CoreCLR build system (so it gets copied to the output folder). Re-enable some ifdef-ed out includes that are required for a non-standalone build of the GC.
* Bring changes to Unix and fix the Unix build. Implement some compiler intrinsic wrappers and alignment functions expected by the GC.
* Fix the Windows build
* 1. Code review feedback: use standard types for BitScanForward and
BitScanForward64
2. Delete FEATURE_COM stuff from the build system, not needed for this
PR
3. Fix the Unix build
* Fix the Windows x86 build - the _BitScanForward64 intrinsic is not available when targeting 32-bit platforms
* Remove a number of things from gcenv.base.h that are not used
* Remove a linker workaround now that we are not linking a standalone GC into the runtime
* Remove dead code, make the lack of GC_PROFILING for standalone gc not break profiling on the non-standalone build
* Code review feedback - use add_library_clr and other cmake-related fixes
* Fix include indentation
* Remove some extraneous parameters to cmake functions (cmake is remarkably lenient...)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8acf6c9f7e33b1bfe77205cd2e61f2c60e8c00ce
Joseph Tremoulet [Tue, 22 Aug 2017 17:04:42 +0000 (13:04 -0400)]
Merge pull request dotnet/coreclr#13461 from JosephTremoulet/TodoUpdate
Update JitOptimizerTodoAssessment.md
Commit migrated from https://github.com/dotnet/coreclr/commit/
2766385624a9c5b73d32bed85519c044447701ff
Victor "Nate" Graf [Tue, 22 Aug 2017 17:02:51 +0000 (10:02 -0700)]
Follow-up: Add enforce PGO to official builds (dotnet/coreclr#13437)
* Add variables to pipeline to enable enforcepgo for Release
* Address review
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce54898a65f89b95537a943a48bae1c60cd249ed
Joseph Tremoulet [Tue, 22 Aug 2017 16:39:54 +0000 (12:39 -0400)]
Merge pull request dotnet/coreclr#13487 from mikedn/switch-temp-type
Fix incorrect switch temp lcl type
Commit migrated from https://github.com/dotnet/coreclr/commit/
10c89f401b3b7cf4cc095649455ce4d2efd33b18
Justin Van Patten [Tue, 22 Aug 2017 14:09:08 +0000 (07:09 -0700)]
Delete some dead PAL code (dotnet/coreclr#13469)
* Delete some dead PAL code
GetComputerName and GetUserName are not used.
* HAVE_GETPWUID_R can now be deleted
Commit migrated from https://github.com/dotnet/coreclr/commit/
dfd90b728c3bc26c4e038a3dbd6075ce3f257d2b
Dan Moseley [Tue, 22 Aug 2017 05:25:35 +0000 (22:25 -0700)]
Remove empty try's (dotnet/coreclr#13493)
* Remove empty try's
* Remove some dead comments
* more
Commit migrated from https://github.com/dotnet/coreclr/commit/
469940932199d4f281896184c8fd49daffdd1a5d
Joseph Tremoulet [Tue, 22 Aug 2017 04:14:17 +0000 (00:14 -0400)]
Undo a few JIT layout workarounds (dotnet/coreclr#13505)
Remove some `goto`s that were added to work around dotnet/coreclr#9692 (poor code
layout for loop exit paths) -- the JIT's layout decisions were improved
in dotnet/coreclr#13314, and these particular `goto`s are no longer needed; crossgen
of System.Private.CoreLib now produces the same machine code with or
without this change.
Part of dotnet/coreclr#13466.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4bf9209719b4c356416cdeaf3aa57eba54c9206
Steve MacLean [Tue, 22 Aug 2017 03:10:01 +0000 (23:10 -0400)]
ThreadPool minimalistic thread request cap (dotnet/coreclr#13431)
Cap ThreadPool thread requests minimalistically
- Only request an additional thread on dequeue if enqueue request was suppressed, and if there are any work items left in the queues
- ThreadPool pad hot cache line
- Add ideas from dotnet/coreclr#13408
Commit migrated from https://github.com/dotnet/coreclr/commit/
99db31c41d5057e08cc4701c79f11246b9191a9b