Bruce Forstall [Wed, 20 Sep 2017 18:12:14 +0000 (11:12 -0700)]
Improve instructions for installing VS2017 and building for ARM (#14073)
* Improve instructions for installing VS2017 and building for ARM
* Add section on cross-building ARM for Windows
Sergey Andreenko [Wed, 20 Sep 2017 18:04:16 +0000 (11:04 -0700)]
mark argplace node as no_lir (#14044)
mark argplace node as no_lir
Jeff Schwartz [Wed, 20 Sep 2017 17:17:32 +0000 (10:17 -0700)]
When building as standalone GC the free object is initialized with 0 flags. This leads to the free list plugs not having the right size on heap traversal (often leading to a crash). The fix is for the free object to be an array with a compenent size of 1 byte.
Tijoy Tom [Wed, 20 Sep 2017 16:44:37 +0000 (09:44 -0700)]
Merge pull request #14085 from qmfrederik/marshal-utf8-intptr-zero
Fix marshaling IntPtr.Zero to UTF8 strings, add unit tests
Andy Ayers [Wed, 20 Sep 2017 15:15:44 +0000 (08:15 -0700)]
Reset static state per iteration for k-nucleotide-9 (#14081)
Otherwise iterations keep getting slower and slower.
Also bump inner iteration count to 10 to restore the nominal one second
duration per iteration.
Jonghyun Park [Wed, 20 Sep 2017 14:43:05 +0000 (23:43 +0900)]
16-byte Stack Aligned StubDispatchFixupStub (#14078)
Frederik Carlier [Wed, 20 Sep 2017 14:21:59 +0000 (16:21 +0200)]
Test marshaling IntPtr.Zero to UTF8 strings, add unit tests
Bruce Forstall [Wed, 20 Sep 2017 06:03:08 +0000 (23:03 -0700)]
Merge pull request #14075 from BruceForstall/AllowMoreStressModes
Refine ARM64 CI stress modes allowed
Bruce Forstall [Wed, 20 Sep 2017 00:28:32 +0000 (17:28 -0700)]
Refine ARM64 CI stress modes allowed
For JitStressRegs, allow 0x10, 0x80, 0x1000; don't use simple 10 or 80
in names (to match netci.groovy).
Remove "tieredcompilation" from allowed modes; it is not supported in the
CI smarty helper currently.
Joseph Tremoulet [Tue, 19 Sep 2017 23:25:53 +0000 (19:25 -0400)]
Merge pull request #14068 from JosephTremoulet/HelixExclude
Update exclusions for moved tests
Bruce Forstall [Tue, 19 Sep 2017 21:59:46 +0000 (14:59 -0700)]
Merge pull request #14069 from BruceForstall/FixFormatting
Fix jit-format error
Jan Vorlicek [Tue, 19 Sep 2017 21:48:35 +0000 (23:48 +0200)]
Fix rlimit setting of RLIM_NOFILE on OSX (#14054)
This change fixes an issue with rlimit setting of RLIM_NOFILE. The problem
is that the rlim_max that we get from getrlimit is too large and so setting
the rlimit_cur to that value fails. The OSX man page for rlimit has a compat
note about it, stating that the rlimit_cur needs to be limited to
min(OPEN_MAX, rlim_max) if one wants to set it to rlim_max.
Bruce Forstall [Tue, 19 Sep 2017 21:45:25 +0000 (14:45 -0700)]
Fix jit-format error
Bruce Forstall [Tue, 19 Sep 2017 21:42:29 +0000 (14:42 -0700)]
Support PR trigger of ARM JIT stress jobs (#14055)
Add a list of jobs known to the ARM64 CI, and allow those to be triggered.
Also, allow Release triggered jobs to run tests (before, the label said
"Build and Test", but no test was done).
For the newly added jobs, make them weekly triggered, not daily triggered,
for the periodic jobs, to reduce machine usage.
Joseph Tremoulet [Tue, 19 Sep 2017 21:01:52 +0000 (17:01 -0400)]
Update exclusions for moved tests
Change #13994 moved some tests that were excluded from Helix runs, but
failed to update the exclusion list; fix that oversight and exclude the
tests in their new locations.
Fixes #14034.
Bruce Forstall [Tue, 19 Sep 2017 21:03:40 +0000 (14:03 -0700)]
Merge pull request #14059 from hseok-oh/ryujit/fix_13760
[RyuJIT/ARM32] Fix TreeNodeInfoInit for STOREIND with writebarrier
Koundinya Veluri [Tue, 19 Sep 2017 20:54:37 +0000 (13:54 -0700)]
Move initialization of YieldProcessorNormalized to the finalizer thread (#14058)
Move initialization of YieldProcessorNormalized to the finalizer thread
Fixes https://github.com/dotnet/coreclr/issues/13984
- Also moved relevant functions out of the Thread class as requested in the issue
- For some reason, after moving the functions out of the Thread class, YieldProcessorNormalized was not getting inlined anymore. It seems to be important to have it be inlined such that the memory loads are hoisted out of outer loops. To remove the dependency on the compiler to do it (even with forceinline it's not possible to hoist sometimes, for instance InterlockedCompareExchnage loops), changed the signatures to do what is intended.
Stephen Toub [Tue, 19 Sep 2017 20:47:53 +0000 (13:47 -0700)]
Add span-based Guid.{Try}Parse{Exact} methods (#14062)
This commit does two things:
- Changes the existing Guid.{Try}Parse{Exact} methods to work in terms of spans rather than strings.
- Then adds new overloads that accept spans and that uses the same underlying span-based support.
Due to the first change, performance actually improves for several of the guid formats, in particular due to substring allocations that are no longer incurred. For example, this program:
```C#
using System;
using System.Diagnostics;
class Program
{
static void Main()
{
var sw = new Stopwatch();
const int Iters = 1000000;
Console.WriteLine("Pattern\tBytes\tTime");
foreach (string pattern in new[] { "D", "B", "P", "N", "X" })
{
string input = Guid.NewGuid().ToString(pattern);
Guid.Parse(input);
long a = GC.GetAllocatedBytesForCurrentThread();
sw.Restart();
for (int i = 0; i < Iters; i++) Guid.Parse(input);
sw.Stop();
a = GC.GetAllocatedBytesForCurrentThread() - a;
Console.WriteLine($"\"{pattern}\"\t{a / Iters}\t{(int)(sw.Elapsed.TotalMilliseconds / Iters * 1000000)}ns");
}
}
}
```
on my machine previously output:
```
Pattern Bytes Time
"D" 0 218ns
"B" 0 217ns
"P" 0 210ns
"N" 168 388ns
"X" 744 765ns
```
and with this change outputs:
```
Pattern Bytes Time
"D" 0 213ns
"B" 0 192ns
"P" 0 196ns
"N" 0 372ns
"X" 0 577ns
```
Brian Sullivan [Tue, 19 Sep 2017 20:44:47 +0000 (13:44 -0700)]
Merge pull request #14018 from sdmaclea/PR-ARM-Remove-extra-cast
[Arm/Arm64] LowerCast remove small int widen cast
Brian Sullivan [Tue, 19 Sep 2017 20:13:55 +0000 (13:13 -0700)]
Merge pull request #13941 from sdmaclea/PR-ARM64-CMP-EXTENDED
[Arm64] Do not extend within Compare/Test nodes
Joseph Tremoulet [Tue, 19 Sep 2017 20:01:01 +0000 (16:01 -0400)]
Merge pull request #14063 from JosephTremoulet/Fannkuch-5
Fix expected values in fannkuch-redux-5
Joseph Tremoulet [Tue, 19 Sep 2017 18:09:54 +0000 (14:09 -0400)]
Fix expected values in fannkuch-redux-5
The validation logic was testing against `chksum`, which actually can
vary depending on the number of processors (as that is used to determine
the number of threads across which the work is partitioned, and the
checksum is sensitive to the bucketing). Change it to test against
`maxflips` instead, which is stable.
Fixes #14040.
Joseph Tremoulet [Tue, 19 Sep 2017 15:39:51 +0000 (11:39 -0400)]
Merge pull request #14061 from JosephTremoulet/BenchmarkReadme
Update BenchmarksGames README.txt
Carol Eidt [Tue, 19 Sep 2017 15:06:49 +0000 (08:06 -0700)]
Merge pull request #13753 from CarolEidt/FixSpillWeights
Sane spill weights
Stephen Toub [Tue, 19 Sep 2017 14:14:46 +0000 (07:14 -0700)]
Merge pull request #14057 from ahsonkhan/UpdateProperties
Change AsSpan() to property Span and rename AsMemory to Memory
Joseph Tremoulet [Tue, 19 Sep 2017 14:07:39 +0000 (10:07 -0400)]
Update BenchmarksGames README.txt
Reflecting recent updates to the snapshot of these tests.
Stephen Toub [Tue, 19 Sep 2017 14:02:08 +0000 (07:02 -0700)]
Merge pull request #14052 from stephentoub/parsenumbers_managed
Move ParseNumbers to shared partition
Hyeongseok Oh [Tue, 19 Sep 2017 09:32:21 +0000 (18:32 +0900)]
[RyuJIT/ARM32] Fix TreeNodeInfoInit for STOREIND with writebarrier
Set source count for GT_STOREIND with writebarrier.
It's same value with ARM64
Jonghyun Park [Tue, 19 Sep 2017 08:17:10 +0000 (17:17 +0900)]
Disable VSD Stub Kind Prediction on H/W Exception (#14051)
* Disable VSD Stub Kind Prediction on H/W Exception
* Add a comment on a false argument
* Use BOOL (instead of bool) for consistency
* Replace remaining bool/true/false with BOOL/TRUE/FALSE
ahsonkhan [Tue, 19 Sep 2017 02:56:11 +0000 (19:56 -0700)]
Change AsSpan() to property Span and rename AsMemory to Memory
Stephen Toub [Tue, 19 Sep 2017 02:30:24 +0000 (22:30 -0400)]
Address PR feedback
Carol Eidt [Tue, 19 Sep 2017 00:21:03 +0000 (17:21 -0700)]
Merge pull request #14029 from mikedn/cmp-op-swap
Remove useless TODO from genCompareInt
Noah Falk [Mon, 18 Sep 2017 23:59:29 +0000 (16:59 -0700)]
Merge pull request #14003 from noahfalk/fix_commitstack
Fix test StackCommitCommon
Stephen Toub [Mon, 18 Sep 2017 23:55:00 +0000 (19:55 -0400)]
Move ParseNumbers to shared partition
Stephen Toub [Mon, 18 Sep 2017 18:22:19 +0000 (14:22 -0400)]
Remove now dead ParseNumbers code in runtime
Stephen Toub [Mon, 18 Sep 2017 18:22:02 +0000 (14:22 -0400)]
Clean up ParseNumbers and fix perf regressions
- Fix formatting
- Replace char[] allocations with stackalloc
- Replace StringBuilders with FastAllocateString
- Tweak a few comparisons to make them leaner
- Tweak some tight loops to make them a bit leaner
- Help JIT to eliminate bounds checks on target spans
- Walk ptr destinations rather than indexing
Victor "Nate" Graf [Mon, 18 Sep 2017 23:36:50 +0000 (16:36 -0700)]
Use the calculated size (offset) instead of estimated (size) (#14049)
David Mason [Mon, 18 Sep 2017 21:41:48 +0000 (14:41 -0700)]
Change jit notifications so that they pass the native code address. (#14021)
* Change jit notifications so that they pass the native code address. This fixes !bpmd so that it will set the correct breakpoint on tiered jitted methods.
* code review feedback
* don't handle OnCodeGenerated
Bruce Forstall [Mon, 18 Sep 2017 20:16:48 +0000 (13:16 -0700)]
Merge pull request #13664 from BruceForstall/WinRyuArm32CI
First step to enable Windows RyuJIT/arm32 testing
Carol Eidt [Fri, 1 Sep 2017 20:08:57 +0000 (13:08 -0700)]
Sane spill weights
The existing spill weight computation is comparing non-normalized bbWeight to normalized lvRefCntWtd, and is also using the weight of whatever the last block turns out to be (often EH zero-weight block) for the `RefTypeParamDef`s.
The straightforward fix resulted in regressions:
- It turns out that it is useful to give extra weight to tree temps, as all their references are very localized.
- Also, it is helpful to reduce the relative weight of a lclVar if it has already been spilled.
As is often the case, more tuning would be useful, but this is a more sane algorithm.
Fix #13721
Bruce Forstall [Fri, 1 Sep 2017 00:55:58 +0000 (17:55 -0700)]
Disable tests that fail in RyuJIT/arm32 testing
Bruce Forstall [Tue, 29 Aug 2017 22:49:59 +0000 (15:49 -0700)]
First step to enable Windows RyuJIT/arm32 testing
Renames arm legacy backend jobs to "armlb" and keeps "arm"
for RyuJIT/arm32 testing.
Jan Kotas [Mon, 18 Sep 2017 18:01:41 +0000 (11:01 -0700)]
Fix RuntimeTypeHandle underlying type for CoreRT (#14026)
RuntimeTypeHandles on CoreRT are backed by IntPtr today. This fix is not complete. There are likely more places that make assumption about the underlying runtime handle types, but this is enough to fix the immediate problem hit by @sergign60.
Stephen Toub [Mon, 18 Sep 2017 17:33:01 +0000 (13:33 -0400)]
Copy corert's ParseNumbers implementation to coreclr
Carol Eidt [Mon, 18 Sep 2017 15:40:25 +0000 (08:40 -0700)]
Merge pull request #13878 from sdmaclea/PR-ARM64-LowerCompare-Cast-Const
[Arm64] LowerCompare Cast-Bool/UBYTE CMP immediate #0 to TST immediate
Carol Eidt [Mon, 18 Sep 2017 15:38:09 +0000 (08:38 -0700)]
Merge pull request #13926 from sdmaclea/PR-ARM64-BOUND-CHECK
[Arm64] Enable Lowering GT_ARR_BOUNDS_CHECK
Carol Eidt [Mon, 18 Sep 2017 15:34:39 +0000 (08:34 -0700)]
Merge pull request #14025 from mikedn/cmp-dead-code
Remove dead code from TreeNodeInfoInitCmp
Mike Danes [Sun, 17 Sep 2017 13:57:44 +0000 (16:57 +0300)]
Remove useless TODO from genCompareInt
gtSetEvalOrder already does this. And even if it doesn't it's not the job of genCompareInt to swap operands, that should happen in LowerCompare.
Attempting to do this in LowerCompare resulted in 0 diffs.
Joseph Tremoulet [Sat, 16 Sep 2017 12:39:43 +0000 (08:39 -0400)]
Merge pull request #13994 from JosephTremoulet/BenchmarksGame
Update BenchmarksGame benchmarks to latest
Mike Danes [Sat, 16 Sep 2017 08:32:10 +0000 (11:32 +0300)]
Remove dead code from TreeNodeInfoInitCmp
Joseph Tremoulet [Sat, 16 Sep 2017 02:49:14 +0000 (22:49 -0400)]
Mark removed tests EXPECTED_FAIL
The next update to the Tests.lst files will need to include the new
variants of these tests.
Sergey Andreenko [Sat, 16 Sep 2017 00:13:03 +0000 (17:13 -0700)]
[RyuJit] fix the inconsistency between setContained and isContained. (#13991)
* show the problem with contained arg_place
We set contained on PUTARG_REG, but it doesn't pass IsContained check.
* Fix problem with gtControlExpr
* fix problem with ARGPLACE
* additional improvements1
We should never have a contained node that is the last node in the
execution order.
* additional impovement2 for xarch.
It is redundant, do not need to set as contained.
* additional improvement2 for arm
`GenTree* ctrlExpr = call->gtControlExpr;` was unused.
* additional improvement3: unify CheckLir.
Bruce Forstall [Fri, 15 Sep 2017 23:24:20 +0000 (16:24 -0700)]
Merge pull request #14023 from dotnet-bot/from-tfs
Merge changes from TFS
Noah Falk [Fri, 15 Sep 2017 23:21:07 +0000 (16:21 -0700)]
Merge pull request #14004 from noahfalk/fix_tiered_dynamicmethod
Disable tiered compilation for dynamic methods
Steve MacLean [Fri, 8 Sep 2017 19:48:18 +0000 (15:48 -0400)]
[Arm64] LowerCompare enable bool cast removal
Koundinya Veluri [Fri, 15 Sep 2017 21:15:25 +0000 (14:15 -0700)]
Revert two changes to thread requests (#14015)
Reverting
99db31c41d5057e08cc4701c79f11246b9191a9b and
fd91ee1fa23f35130f576c19dfaf35934dc2ce24 to unblock others while trying to figure out what the issues are and how to fix them.
fd91ee1fa23f35130f576c19dfaf35934dc2ce24 is causing @benaadams thread pool perf test (https://github.com/benaadams/ThreadPoolTaskTesting) to hang due to a missed thread request. Somehow wsqActive is ending up at zero while there is a work item in the queue and with no pending thread requests. I don't understand how yet.
99db31c41d5057e08cc4701c79f11246b9191a9b appears to have a potential issue because the order of MarkThreadRequestSatisfied and Dequeue are reversed. For instance, assuming a proc count of 1:
- Initial state: 1 work item enqueued, 1 thread request
- T1 Dispatch: dequeues a work item and requests a thread (0 work items, 1 thread request)
- T1 Dispatch: sees no more work items, returns
- T1 calls Dispatch again due to its own thread request
- T1 Dispatch: After Dequeue (which saw 0 work items) and before MarkThreadRequestSatisfied:
- Current state: 0 work items, 1 thread request
- T2 enqueues a work item, sees 1 thread request and does not request a thread (1 work item, 1 thread request)
- T1 Dispatch: MarkThreadRequestSatisfied decrements thread requests (1 work item, 0 thread requests)
- Now after T1 returns, it won't wake up again but there is still one work item in the queue
Andy Ayers [Fri, 15 Sep 2017 21:09:19 +0000 (14:09 -0700)]
JIT: Fix crossgen failure in gtTryRemoveBoxUpstreamEffects (#14016)
In some R2R expansions the type handle is not an explicit operand to
the newobj helper. So we must bail out of removal attempts when the
type handle is desired and we see such an expansion.
Closes #13942.
Also likely will fix #13930.
Eugene Rozenfeld [Fri, 15 Sep 2017 20:34:21 +0000 (13:34 -0700)]
Fix check for recursive call in the importer. (#13990)
The check for recursive call was incorrect when processing an inlineee.
The change had no diffs with jit-diff --frameworks --tests so I added a test where
this change results in a codegen diff: the call to C is inlined with this change but
is not inlined without it.
noahfalk [Fri, 15 Sep 2017 02:33:29 +0000 (19:33 -0700)]
Fix test StackCommitCommon
This test will hang if run with non-optimized jitted code because it takes a dependency on exactly when locally allocated objects go out of scope. Although I doubt CLI spec guarantees the new code will always work either, it does work with the runtime/JIT as currently implemented.
Jan Kotas [Fri, 15 Sep 2017 17:06:23 +0000 (10:06 -0700)]
Fix build breaks after moving files to shared and misc cleanup
- Delete redundant collection and dictionary debug view implementations
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Steve MacLean [Fri, 15 Sep 2017 16:09:25 +0000 (12:09 -0400)]
[Arm/Arm64] LowerCast remove small int widen cast
dotnet-bot [Fri, 15 Sep 2017 18:17:00 +0000 (11:17 -0700)]
fix ilgen after: "Add the capability to specify JIT options from smpi command line"
[tfs-changeset: 1674327]
Jarret Shook [Fri, 15 Sep 2017 18:06:16 +0000 (11:06 -0700)]
Merge pull request #13923 from sdmaclea/PR-ARM64-LOWER-SHIFT
[Arm64] Enable LowerShift
Bruce Forstall [Fri, 15 Sep 2017 17:50:00 +0000 (10:50 -0700)]
Merge pull request #13852 from hqueue/jit/JitNoInline
Remove COMPlus_JitNoInline from RETAIL
Steve MacLean [Thu, 14 Sep 2017 23:02:29 +0000 (19:02 -0400)]
[Arm64] Do not mov extend in genCodeForCompare
Joseph Tremoulet [Fri, 15 Sep 2017 14:48:39 +0000 (10:48 -0400)]
Manual formatting adjustments
Auto-formatting was leaving some new array expressions oddly indented.
Joseph Tremoulet [Fri, 15 Sep 2017 13:59:05 +0000 (09:59 -0400)]
Add references to source CVS
This will make it easier to track changes in the future.
Joseph Tremoulet [Thu, 14 Sep 2017 19:48:25 +0000 (15:48 -0400)]
Rename BenchmarksGame files
Name each variant after its index on the site, not its comparative
status.
Joseph Tremoulet [Thu, 14 Sep 2017 19:23:20 +0000 (15:23 -0400)]
Remove old versions of BenchmarksGame benchmarks
Joseph Tremoulet [Thu, 14 Sep 2017 19:11:48 +0000 (15:11 -0400)]
Modify benchmarks to run in perf test harness
- Add result validation
- Add [Benchmark] attributes and appropriate iteration counts
- Minor edits here and there to target .NET Standard 1.4
- Exception: pi-digits rewritten to use managed BitInteger instead of
p/invoke out to GMP.
Bruce Forstall [Fri, 15 Sep 2017 17:31:31 +0000 (10:31 -0700)]
Merge pull request #13853 from hqueue/tests/MyStructReturn
Add a test for struct return to JIT/CodeGenBringUpTests
Joseph Tremoulet [Thu, 14 Sep 2017 18:56:50 +0000 (14:56 -0400)]
Apply default VS formatting
Also insert namespace BenchmarksGame.
Joseph Tremoulet [Thu, 31 Aug 2017 18:32:57 +0000 (14:32 -0400)]
Update BenchmarksGame benchmarks to latest
For each benchmark, grab the current best C# .NET entry, and also grab
the current best serial implementation (since these are easier to work
with from the benchmarking perspective).
Bruce Forstall [Fri, 15 Sep 2017 17:25:01 +0000 (10:25 -0700)]
Merge pull request #13944 from ayuckhulk/fix-arm-set-debuggerregdisplay-from-context
[ARM] Fix SetDebuggerREGDISPLAYFromREGDISPLAY() function
Jarret Shook [Fri, 15 Sep 2017 16:16:42 +0000 (09:16 -0700)]
Merge pull request #13998 from jashook/devdiv_491210
Fix devdiv 491210
Jan Kotas [Fri, 15 Sep 2017 15:01:18 +0000 (08:01 -0700)]
Move List to shared partition (#14006)
Ben Adams [Fri, 15 Sep 2017 06:27:39 +0000 (07:27 +0100)]
Delete JitHelpers.UnsafeCast (#14005)
Stephen Toub [Fri, 15 Sep 2017 05:17:45 +0000 (22:17 -0700)]
Merge pull request #13976 from stephentoub/fix_memorystream_delegation
Change delegation in {Unmanaged}MemoryStream.Read/WriteAsync(Memory)
Andy Ayers [Fri, 15 Sep 2017 04:58:11 +0000 (21:58 -0700)]
JIT: Use AllocObj for box allocations (#13988)
Model box object allocations using the AllocObj tree node. Update
the box deconstruction utility to compensate.
Also set the OMF_HAS_NEWOBJ flag when we generate Box IR; this both
fixes an oversight from before and is a necessary step to trigger the
morphing of AllocObj into a helper call.
No diffs.
Closes #13905.
Jan Kotas [Fri, 15 Sep 2017 04:03:52 +0000 (21:03 -0700)]
Update logic in arm CodeGen::genCallInstruction to match xarch version (#13974)
This is makes it work for CoreRT, and faster for everybody (avoids JIT/EE call).
noahfalk [Fri, 15 Sep 2017 02:46:07 +0000 (19:46 -0700)]
Disable tiered compilation for dynamic methods
Fixing an oversight from earlier, tiered compilation isn't designed to handle dynamic methods yet because of their limited lifetime. There may be other issues but a basic one would be having the method get collected while its MethodDesc is in the tiered compilation queue which results in use after free memory issues.
Carol Eidt [Fri, 15 Sep 2017 01:43:49 +0000 (18:43 -0700)]
Merge pull request #13965 from CarolEidt/Fix13568
Allow a RET_EXPR as a BYREF operand for SIMD intrinsics.
jashook [Thu, 14 Sep 2017 22:15:49 +0000 (15:15 -0700)]
Apply format patch
jashook [Thu, 14 Sep 2017 21:55:05 +0000 (14:55 -0700)]
Fix devdiv 491210
Specifically, this insures the GT_LIST nodes of gtCallArgs
and gtCallLateArgs flags are set correctly, based on their
child nodes.
Koundinya Veluri [Thu, 14 Sep 2017 21:48:33 +0000 (14:48 -0700)]
Improve ReaderWriterLockSlim scalability (#13243)
Improve ReaderWriterLockSlim scalability
Fixes #12780
The _myLock spin lock runs into some bad scalability issues. For example:
- 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.
- 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.
Took some suggestions from @vancem and landed on the following after some experiments:
- Introduced some fairness to _myLock acquisition by deprioritizing attempts to acquire _myLock that are not likely to make progress on the RW lock
- Limited spinning in some cases where it is very unlikely that spinning would help
Carol Eidt [Thu, 14 Sep 2017 21:29:44 +0000 (14:29 -0700)]
Update test
Jarret Shook [Thu, 14 Sep 2017 19:25:47 +0000 (12:25 -0700)]
Merge pull request #13916 from pgodeq/PR-ARM64-WINDOWS-STELEM-REF-CORRECTED
[ARM64/Windows] Corrected stack overflow in JIT_Stelem_ref
Jarret Shook [Thu, 14 Sep 2017 19:23:57 +0000 (12:23 -0700)]
Merge pull request #13977 from jashook/add_arm64_user
Add pgodeq to the list of arm64 users
Daniel Podder [Thu, 14 Sep 2017 17:35:42 +0000 (10:35 -0700)]
PGI: Load pgort<ver>.dll from the VS native tools env; do not `install` it (#12581)
On Windows, PGO instrumented builds (build.cmd release <arch>
pgoinstrument) introduce a runtime dependency on pgort<ver>.dll for
instrumented binaries. This DLL is distributed alongside the C++
compiler, and is made available via the native tools environment that
ships with Visual Studio.
Previously, we were using cmake to find and "install" this binary
alongside the product when doing an instrumented build, so that the
resulting bin\Product drop is free of any added external dependencies.
However, this approach is fragile, and despite a best effort to make the
implementation work across multiple VS releases, it already broke with
VS 2017.
To fix support for pgoinstrument on VS 2017, and to harden the
implementation for future releases of VS, I'm removing the custom cmake
install logic for the pgort DLL. Instead, we fall back to the officially
supported method: load the correct (native tools) environment before
invoking any command that uses an instrumented binary. This happens in
one place in the build today--loading the JIT to crossgen
System.Private.CoreLib.dll.
Note that there's still an existing CLI/Setup bug that requires copying
the pgort DLL. We're now doing it from within build.cmd, which is not
nearly as fragile for this as cmake is. The workaround is also isolated,
so when the referenced issue is fixed, the workaround (as documented)
can simply be removed.
Fixes #12347.
Victor "Nate" Graf [Thu, 14 Sep 2017 16:30:07 +0000 (09:30 -0700)]
EventPipeProvider destructor hardening (#13958)
* Take lock before manipulating list in desctructor
* Add NULL checks for provider list
* Remove asserts that duplicate conditional check
jashook [Thu, 14 Sep 2017 16:17:35 +0000 (09:17 -0700)]
Add pgodeq to the list of arm64 users
Stephen Toub [Thu, 14 Sep 2017 15:37:49 +0000 (08:37 -0700)]
Merge pull request #13971 from dotnet-maestro-bot/master-UpdateDependencies
Update PgoData to master-
20170914-0028 (master)
Stephen Toub [Thu, 14 Sep 2017 15:35:23 +0000 (08:35 -0700)]
Change delegation in {Unmanaged}MemoryStream.Read/WriteAsync(Memory)
Read/WriteAsync(Memory) on MemoryStream and UnmanagedMemoryStream need to delegate to one of the existing virtual methods, in case an existing stream has overridden the virtuals in order to change or augment the behavior (e.g. checking on each write to ensure the length doesn't exceed some amount). Currently these delegate to the synchronous Read/Write(Span) methods. The problem with that is, for exactly the case where there is a derived class, Read/Write(Span) themselves need to delegate to Read/Write(byte[]), which means they use ArrayPool and copy. But with a {ReadOnly}Memory, we may already have access to the underlying array, in which case we're going from an array to a span and back to different rented array along with an unnecessary copy. To address that, this commit changes the delegation to prefer Read/Write(byte[],...) if possible, falling back to Read/Write(Span) only if we couldn't get an array from the Memory.
Jan Vorlicek [Thu, 14 Sep 2017 14:43:13 +0000 (16:43 +0200)]
Fix crossgen memory mappings (#13972)
This change removes executable memory mappings from crossgen. Now it
can be run on systems with PAX set to prevent executable mappings
without any marking using the paxctl.
Jarret Shook [Thu, 14 Sep 2017 14:04:34 +0000 (07:04 -0700)]
Merge pull request #13954 from jashook/disable_arm_tests
Disable tests based on 13952
Pankaj Gode [Thu, 14 Sep 2017 14:01:32 +0000 (19:31 +0530)]
[ARM64/Windows] Corrected the address used to push fp,lr in JIT_Stelem_Ref
tvass83 [Thu, 14 Sep 2017 12:05:29 +0000 (14:05 +0200)]
The !heapstat sos command emits difficult to read output as the "Percentage" column is not aligned properly (#13856)
dotnet-maestro-bot [Thu, 14 Sep 2017 07:49:08 +0000 (00:49 -0700)]
Update PgoData to master-
20170914-0028
Andy Ayers [Thu, 14 Sep 2017 06:13:25 +0000 (23:13 -0700)]
JIT: mark part of runtime lookup tree as nonfaulting and invariant (#13953)
An indir in the runtime lookup sequence wasn't marked as nonfaulting
so dead context trees could not be entirely cleaned up.
Also added invariant since this particular lookup sequence will always
return the same result.
Stephen Toub [Thu, 14 Sep 2017 05:24:08 +0000 (22:24 -0700)]
Merge pull request #13934 from dotnet-maestro-bot/master-UpdateDependencies
Update BuildTools, CoreClr, PgoData to prerelease-02014-02, preview1-25714-01, master-
20170913-0045, respectively (master)