platform/upstream/coreclr.git
7 years agoMerge pull request #12991 from hseok-oh/ryujit/fix_11783_2
Bruce Forstall [Mon, 24 Jul 2017 23:31:48 +0000 (16:31 -0700)]
Merge pull request #12991 from hseok-oh/ryujit/fix_11783_2

[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion

7 years agoMerge pull request #12996 from hseok-oh/ryujit/fix_12626
Bruce Forstall [Mon, 24 Jul 2017 22:53:41 +0000 (15:53 -0700)]
Merge pull request #12996 from hseok-oh/ryujit/fix_12626

[RyuJIT/ARM32] Fix stack overflow on codegen phase

7 years agoSimplify SHM-allocator (#12815)
gbalykov [Mon, 24 Jul 2017 22:37:38 +0000 (01:37 +0300)]
Simplify SHM-allocator (#12815)

* Simplify SHM-allocator

* Remove SHMNULL and NULLSharedID

7 years agoCreate Windows PDBs from Portable PDBs during symbol archive (#12796)
Davis Goodin [Mon, 24 Jul 2017 22:06:44 +0000 (17:06 -0500)]
Create Windows PDBs from Portable PDBs during symbol archive (#12796)

* Update BuildTools to 2.0.0-prerelease-01812-02

* Use "GetAllSymbolFilesToPublish" target

"UnzipSymbolPackagesForPublish" only unzips. "GetAllSymbolFilesToPublish" is a new target that unzips then generates Windows PDBs. This allows us to index Windows PDBs on symweb even when not archiving.

7 years agoDon't call AssemblyResolve event for CoreLib resources (#12999)
Koundinya Veluri [Mon, 24 Jul 2017 20:17:16 +0000 (13:17 -0700)]
Don't call AssemblyResolve event for CoreLib resources (#12999)

* Don't call AssemblyResolve event for CoreLib resources

Part of fix for #12668:
- CoreLib resource lookup should not raise the AssemblyResolve event because a misbehaving handler could cause an infinite recursion check and fail-fast to be triggered when the resource is not found, as the issue would repeat when reporting that error
- A handler could misbehave by returning an assembly that does not match the requested identity or by throwing

* Address feedback

7 years agoMerge pull request #12943 from jashook/fix_8093
Jarret Shook [Mon, 24 Jul 2017 17:17:57 +0000 (10:17 -0700)]
Merge pull request #12943 from jashook/fix_8093

For LEGACY_BACKEND ARM32 do not overwrite 1 element HFA type

7 years agoMerge pull request #13004 from stephentoub/move_valuetask
Stephen Toub [Mon, 24 Jul 2017 16:44:05 +0000 (12:44 -0400)]
Merge pull request #13004 from stephentoub/move_valuetask

Move ValueTask and friends to corelib

7 years agoMerge pull request #12995 from 303248153/170724_fix_comment
Bruce Forstall [Mon, 24 Jul 2017 16:17:10 +0000 (09:17 -0700)]
Merge pull request #12995 from 303248153/170724_fix_comment

[JIT] Fix comment in optimizer.cpp:optOptimizeBools

7 years agoMerge pull request #12975 from alpencolt/ryu-arm-casts-nyi
Bruce Forstall [Mon, 24 Jul 2017 16:15:20 +0000 (09:15 -0700)]
Merge pull request #12975 from alpencolt/ryu-arm-casts-nyi

[RyuJIT/ARM32] Removed int <-> float casts related NYIs.

7 years agoMerge pull request #12963 from BruceForstall/Fix12904
Bruce Forstall [Mon, 24 Jul 2017 16:14:07 +0000 (09:14 -0700)]
Merge pull request #12963 from BruceForstall/Fix12904

Fix a case where a reg is spilled before being freed, leading to assert

7 years agoMerge pull request #12998 from github-john-doe/master
Bruce Forstall [Mon, 24 Jul 2017 16:11:22 +0000 (09:11 -0700)]
Merge pull request #12998 from github-john-doe/master

typo

7 years agoA few minor perf tweaks
Stephen Toub [Mon, 24 Jul 2017 14:16:26 +0000 (10:16 -0400)]
A few minor perf tweaks

- Update ValueTask to use IsCompletedSynchronously: IsCompletedSynchronously is faster/slimmer than Status == RanToCompletion.
- Remove a few readonly's causing unnecessary struct copies

7 years agotypo
John Doe [Mon, 24 Jul 2017 14:15:39 +0000 (07:15 -0700)]
typo

7 years agoAdd ValueTask and friends to corelib
Stephen Toub [Mon, 24 Jul 2017 14:08:38 +0000 (10:08 -0400)]
Add ValueTask and friends to corelib

Files are copied without modification from corefx.

We will subsequently add these to the System.Runtime contract and specialize the System.Threading.Tasks.Extensions package to forward to System.Runtime on netcoreapp.

7 years ago[RyuJIT/ARM32] Fix stack overflow on codegen phase
Hyeongseok Oh [Mon, 24 Jul 2017 09:31:45 +0000 (18:31 +0900)]
[RyuJIT/ARM32] Fix stack overflow on codegen phase

Fix stack overflow on codegen phase
Array size problem for reference map in genPutArgStk()

7 years agofix comment in optimizer.cpp:optOptimizeBools
dudes-come [Mon, 24 Jul 2017 08:04:16 +0000 (16:04 +0800)]
fix comment in optimizer.cpp:optOptimizeBools

7 years ago[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion
Hyeongseok Oh [Mon, 24 Jul 2017 04:51:13 +0000 (13:51 +0900)]
[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion

- Morphing 1-field HFA struct argument as local field
- Fix assertion on legacy JIT

7 years agoUpdate android build script with correct package versions (#12985)
Cyd Haselton [Sun, 23 Jul 2017 13:06:45 +0000 (08:06 -0500)]
Update android build script with correct package versions (#12985)

7 years agoMerge pull request #12979 from pgavlin/GitHub12935
Pat Gavlin [Sun, 23 Jul 2017 00:27:05 +0000 (17:27 -0700)]
Merge pull request #12979 from pgavlin/GitHub12935

Lock the the dest reg in `inst_RV_TT` if necessary.

7 years agoMerge pull request #12984 from dotnet/revert-12951-ryujit/fix_11783
Pat Gavlin [Sat, 22 Jul 2017 20:47:26 +0000 (13:47 -0700)]
Merge pull request #12984 from dotnet/revert-12951-ryujit/fix_11783

Revert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"

7 years agoRevert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"
Pat Gavlin [Sat, 22 Jul 2017 18:05:32 +0000 (11:05 -0700)]
Revert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"

7 years ago[RyuJIT/ARM32] Removed int <-> float casts related NYIs.
Alexander Soldatov [Fri, 21 Jul 2017 17:06:20 +0000 (20:06 +0300)]
[RyuJIT/ARM32] Removed int <-> float casts related NYIs.

7 years agoMerge pull request dotnet/corert#4207 from dotnet/nmirror
Jan Kotas [Fri, 21 Jul 2017 14:26:56 +0000 (16:26 +0200)]
Merge pull request dotnet/corert#4207 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoLock the the dest reg in `inst_RV_TT` if necessary.
Pat Gavlin [Fri, 21 Jul 2017 23:43:25 +0000 (16:43 -0700)]
Lock the the dest reg in `inst_RV_TT` if necessary.

For ARM32, `inst_RV_TT` may need to load the referenced lclVar into a
temporary register before emitting the requested instruction. The
chosen register *must not* be the instruction's destination register.
The existing code attempted to ensure this by masking the dest register
from the set of pickable registers, but this is not sufficient:
`rsPickReg` must return a valid register and will happily attempt to
spill and return the destination register even if it is not in the
recommended set. To prevent this, this change locks and unlocks the
destination register if necessary (i.e. if it was not locked upon
entry).

Fixes #12935.

7 years agoMerge pull request #12951 from hseok-oh/ryujit/fix_11783
Bruce Forstall [Fri, 21 Jul 2017 22:56:40 +0000 (15:56 -0700)]
Merge pull request #12951 from hseok-oh/ryujit/fix_11783

[RyuJIT/ARM32] Morphing 1-field HFA struct argument

7 years agoUpdated the path to built test binaries in examples
Brian Sullivan [Fri, 21 Jul 2017 19:49:18 +0000 (12:49 -0700)]
Updated the path to built test binaries in examples

7 years agoMerge pull request #12974 from pgavlin/GitHub12909
Pat Gavlin [Fri, 21 Jul 2017 19:20:59 +0000 (12:20 -0700)]
Merge pull request #12974 from pgavlin/GitHub12909

Disable promotion of custom-layout structs for legacy backend.

7 years agoMerge pull request #12946 from BruceForstall/FixArmTempEstimation
Bruce Forstall [Fri, 21 Jul 2017 19:16:21 +0000 (12:16 -0700)]
Merge pull request #12946 from BruceForstall/FixArmTempEstimation

Fix ARM32 spill temp allocation

7 years agoAdded IsPathFullyQualified() method to Path class (#12965)
Stephanie Niu [Fri, 21 Jul 2017 18:11:43 +0000 (11:11 -0700)]
Added IsPathFullyQualified() method to Path class (#12965)

7 years agoDisable promotion of custom-layout structs for legacy backend.
Pat Gavlin [Fri, 21 Jul 2017 16:37:59 +0000 (09:37 -0700)]
Disable promotion of custom-layout structs for legacy backend.

These kinds of structs--particularly structs with holes--are not handled
correctly by argument morphing on ARM.

Promotion of these kinds of structs was already disabled for the x86
legacy backend; this change disables the optimization  for all legacy
backend targets.

Fixes #12909.

7 years agoAssociate last 2 RVAStatics tests with known issue
Russ Keldorph [Thu, 20 Jul 2017 22:48:01 +0000 (15:48 -0700)]
Associate last 2 RVAStatics tests with known issue

7 years agoMerge pull request #12852 from jyoungyun/ryujit/rewrite_the_struct_args_to_be_passed_...
Carol Eidt [Fri, 21 Jul 2017 15:56:43 +0000 (08:56 -0700)]
Merge pull request #12852 from jyoungyun/ryujit/rewrite_the_struct_args_to_be_passed_by_value_on_stack

[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack

7 years agoMerge pull request #12968 from wateret/fix-gentree-creation
Carol Eidt [Fri, 21 Jul 2017 15:55:33 +0000 (08:55 -0700)]
Merge pull request #12968 from wateret/fix-gentree-creation

[RyuJIT/armel] Fix incorrect GenTree creation

7 years agoAdd CGroup CFS CPU limit support (#12797)
Guillaume B [Fri, 21 Jul 2017 12:08:11 +0000 (14:08 +0200)]
Add CGroup CFS CPU limit support (#12797)

7 years ago[RyuJIT/armel] Fix incorrect GenTree creation
Hanjoung Lee [Fri, 21 Jul 2017 06:03:29 +0000 (15:03 +0900)]
[RyuJIT/armel] Fix incorrect GenTree creation

When we generate a node for GT_PUTARG_REG, it should call gtNewPutArgReg().

7 years agoMoving 'System.Single' and 'System.Double' to the 'System.Private.CoreLib.Shared...
Tanner Gooding [Fri, 21 Jul 2017 05:01:39 +0000 (22:01 -0700)]
Moving 'System.Single' and 'System.Double' to the 'System.Private.CoreLib.Shared' project. (#12967)

7 years ago[Local GC] Refactor usage of GC-internal functions in the DAC (#12458)
Sean Gillespie [Fri, 21 Jul 2017 04:53:46 +0000 (21:53 -0700)]
[Local GC] Refactor usage of GC-internal functions in the DAC (#12458)

* Refactor usage of GC-internal functions in the DAC

* Fix one debugger test failure, one to go

7 years ago[RyuJIT/ARM32] Morphing 1-field HFA struct argument
Hyeongseok Oh [Fri, 21 Jul 2017 03:09:18 +0000 (12:09 +0900)]
[RyuJIT/ARM32] Morphing 1-field HFA struct argument

Morphing 1-field HFA struct argument as local field

7 years ago[RyuJIT/ARM32] Remove unnecessary GT_ADDR and GT_LCL_VAR_ADDR related code
Jiyoung Yun [Fri, 21 Jul 2017 01:43:14 +0000 (10:43 +0900)]
[RyuJIT/ARM32] Remove unnecessary GT_ADDR and GT_LCL_VAR_ADDR related code

7 years agoFix resources lookup to use satellite assembly resouce lookup inside AppX when the...
Santiago Fernandez Madero [Thu, 20 Jul 2017 23:36:15 +0000 (16:36 -0700)]
Fix resources lookup to use satellite assembly resouce lookup inside AppX when the assembly is Private.Corelib (#12954)

7 years agoMerge pull request #12866 from erozenfeld/12761ILRegressionTest
Eugene Rozenfeld [Thu, 20 Jul 2017 22:08:47 +0000 (15:08 -0700)]
Merge pull request #12866 from erozenfeld/12761ILRegressionTest

Add regression tests for #12761.

7 years agoFix a case where a reg is spilled before being freed, leading to an assert
Bruce Forstall [Thu, 20 Jul 2017 22:07:46 +0000 (15:07 -0700)]
Fix a case where a reg is spilled before being freed, leading to an assert

In genRangeCheck(), under stress, the call to the range check helper
might spill the index register. This leads to an assert in rsMarkRegFree():
`rsIsTreeInReg(reg, tree)`. So, instead of calling rsMarkRegFree,
call genReleaseReg(), which handles this case.

This unfortunately reloads the spilled tree, which seems unnecessary, but it
otherwise frees the register fine.

One subtlety that is not obvious to me: the current code calls
`rsMarkRegFree(node->gtRegNum, node)` but `genRangeCheck()`
calls `rsMarkRegFree(genRegMask(node->gtRegNum))`. I'm not 100% sure
these are equivalent.

Fixes #12904.

7 years agoMerge pull request #12961 from jashook/up_arm64_arm_timeouts
Jarret Shook [Thu, 20 Jul 2017 22:02:47 +0000 (15:02 -0700)]
Merge pull request #12961 from jashook/up_arm64_arm_timeouts

Up arm timeout to arm64 timeout

7 years agoUp arm timeout to arm64 timeout
jashook [Thu, 20 Jul 2017 20:55:20 +0000 (13:55 -0700)]
Up arm timeout to arm64 timeout

7 years agoMerge pull request #12960 from jashook/stop_arm64_default_jobs
Jarret Shook [Thu, 20 Jul 2017 20:46:38 +0000 (13:46 -0700)]
Merge pull request #12960 from jashook/stop_arm64_default_jobs

Add the correct job name and regex to arm64 ubuntu flow jobs

7 years agoMerge pull request #12955 from stephentoub/tryderegister
Stephen Toub [Thu, 20 Jul 2017 20:35:36 +0000 (16:35 -0400)]
Merge pull request #12955 from stephentoub/tryderegister

Fix corefx break due to missing internal method

7 years agoMerge pull request #10496 from sergign60/jitdrop
Noah Falk [Thu, 20 Jul 2017 20:30:31 +0000 (13:30 -0700)]
Merge pull request #10496 from sergign60/jitdrop

Jitted Code Pitching Feature implemented

7 years agoAdd the correct job name and regex to arm64 ubuntu flow jobs
jashook [Thu, 20 Jul 2017 18:59:18 +0000 (11:59 -0700)]
Add the correct job name and regex to arm64 ubuntu flow jobs

This will keep the arm64 ubuntu jobs from being default auto triggered.

7 years agoFor lb arm do not overwrite 1 element hfa type
jashoo [Wed, 19 Jul 2017 23:32:16 +0000 (16:32 -0700)]
For lb arm do not overwrite 1 element hfa type

On arm64 we will treat 1 element HFA types as the primitive
type that is contained. On Legacy Backend codegenlegacy will
incorrectly assign these two types. Instead keep the struct
type through the IR correctly to do a blockop.

7 years agoFix IndexOutOfRangeException in PayloadNames property (#12932)
Vance Morrison [Thu, 20 Jul 2017 18:28:25 +0000 (11:28 -0700)]
Fix IndexOutOfRangeException in PayloadNames property (#12932)

If you pass an null payload using Write<T>, and in the EventListener then call PayloadNames, it
will throw an IndexOutOfRangeException.   It should just return null.   This fixes this.

7 years agoMerge pull request #12945 from pgavlin/FixLstFile
Jarret Shook [Thu, 20 Jul 2017 18:15:24 +0000 (11:15 -0700)]
Merge pull request #12945 from pgavlin/FixLstFile

Fix a couple errors in the ARM32 lst file.

7 years agoFix corefx break due to missing internal method
Stephen Toub [Thu, 20 Jul 2017 17:19:46 +0000 (13:19 -0400)]
Fix corefx break due to missing internal method

System.Runtime.WindowsRuntime uses CancellationTokenRegistration.TryDeregister instead of Dispose to avoid a potential deadlock due to blocking waiting for an in-progress cancellation to complete.  Putting back TryDeregister to unblock corefx until a corresponding public API is exposed for this.

7 years agoMerge pull request #12901 from jashook/arm64_ubuntu_changes
Jarret Shook [Thu, 20 Jul 2017 14:07:36 +0000 (07:07 -0700)]
Merge pull request #12901 from jashook/arm64_ubuntu_changes

Fix auto starting arm64 ubuntu jobs

7 years ago[RyuJIT/ARM32] Remove unnecessary isHfaRegArg check routine
Jiyoung Yun [Thu, 20 Jul 2017 09:01:09 +0000 (18:01 +0900)]
[RyuJIT/ARM32] Remove unnecessary isHfaRegArg check routine

7 years ago[RyuJIT/ARM32] Add a case wrapping GT_OBJ on struct arguments
Jiyoung Yun [Thu, 20 Jul 2017 07:13:24 +0000 (16:13 +0900)]
[RyuJIT/ARM32] Add a case wrapping GT_OBJ on struct arguments

If the struct arguments pass by value on the stack, it should be wrapped in GT_OBJ.

7 years ago[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack
Jiyoung Yun [Mon, 17 Jul 2017 06:48:56 +0000 (15:48 +0900)]
[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack

7 years agoFix auto starting arm64 ubuntu jobs
jashook [Wed, 19 Jul 2017 16:48:35 +0000 (09:48 -0700)]
Fix auto starting arm64 ubuntu jobs

7 years agoRemove section headers writing to createdump (#12887)
Mike McLaughlin [Thu, 20 Jul 2017 00:53:05 +0000 (17:53 -0700)]
Remove section headers writing to createdump (#12887)

Issue #12853

7 years agoFix a couple errors in the ARM32 lst file.
Pat Gavlin [Thu, 20 Jul 2017 00:42:10 +0000 (17:42 -0700)]
Fix a couple errors in the ARM32 lst file.

- Remove an entry for a test that has been deleted
- Disable ForeignThreadExceptions against its active bug

7 years agoFix ARM32 spill temp allocation
Bruce Forstall [Thu, 20 Jul 2017 00:30:15 +0000 (17:30 -0700)]
Fix ARM32 spill temp allocation

For ARM32 only, lvaAssignVirtualFrameOffsetsToLocals() forced temps
to be allocated high in the frame, with the comment:

```
// On ARM, SP based offsets use smaller encoding. Since temps are relatively
// rarer than lcl usage, allocate them farther from SP.
```

However, lvaFrameAddress(), when estimating the maximum frame offset for a
temp before final frame layout, did not consider this: it always assumed
temps were low on the frame. In addition, lvaTempsHaveLargerOffsetThanVars()
always returns `false` for ARM.

This caused an asserts with JitStress when we had an SP frame with large
locals, and estimated a small offset to a TEMP before final frame layout
but required a very large offset after final frame layout -- an offset that
could not be encoded by the chosen instruction. (These very large non-FP
frames might also exist only because of stress, such as GS stress.)

To fix this, simply remove the optimization, for both RyuJIT and LEGACY_BACKEND.

There is a very small code size regression (242 bytes over 42M) in asm diffs on internal
framework assemblies.

Fixes #12903

7 years agoFix Platform reporting parameters for build pipeline (#12900)
Karthik Rajasekaran [Wed, 19 Jul 2017 22:34:27 +0000 (15:34 -0700)]
Fix Platform reporting parameters for build pipeline (#12900)

7 years agoMerge pull request #12938 from pgavlin/TagGCTests
Pat Gavlin [Wed, 19 Jul 2017 22:04:33 +0000 (15:04 -0700)]
Merge pull request #12938 from pgavlin/TagGCTests

Disable some unreliable GC tests under JIT stress.

7 years agoDisable some unreliable GC tests under JIT stress.
Pat Gavlin [Wed, 19 Jul 2017 21:45:24 +0000 (14:45 -0700)]
Disable some unreliable GC tests under JIT stress.

These tests depend on the JIT not extending lifetimes. This dependency
is frequently unsatisfied when running under JIT stress modes (e.g.
JITStress=1/2 or JITStressRegs=1).

Contributes to #12920, #12923, #12922, and #12921.

7 years agoFix CultureInfo.Parent to avoid throwing and catching (#12916)
Tarek Mahmoud Sayed [Wed, 19 Jul 2017 20:30:36 +0000 (13:30 -0700)]
Fix CultureInfo.Parent to avoid throwing and catching (#12916)

7 years agoMerge pull request #12930 from pgavlin/TagGH11408_ARM32
Pat Gavlin [Wed, 19 Jul 2017 20:23:05 +0000 (13:23 -0700)]
Merge pull request #12930 from pgavlin/TagGH11408_ARM32

Tag the GitHub_11408 test with its bug number.

7 years agoMerge pull request #12928 from pgavlin/TagVerify01Small
Pat Gavlin [Wed, 19 Jul 2017 20:22:48 +0000 (13:22 -0700)]
Merge pull request #12928 from pgavlin/TagVerify01Small

Tag the verify01_small test with its bug number.

7 years agoMerge pull request #12925 from pgavlin/FixScenarioReturnCode
Pat Gavlin [Wed, 19 Jul 2017 20:22:26 +0000 (13:22 -0700)]
Merge pull request #12925 from pgavlin/FixScenarioReturnCode

Fix the SustainedLowLatency/scenario test.

7 years agoMerge pull request #12934 from pgavlin/TagVarargTests
Pat Gavlin [Wed, 19 Jul 2017 20:20:09 +0000 (13:20 -0700)]
Merge pull request #12934 from pgavlin/TagVarargTests

Tag two vararg-related tests with their bug number for ARM.

7 years agoMerge pull request #12931 from jashook/fix_machine_arm32_checked
Jarret Shook [Wed, 19 Jul 2017 20:14:57 +0000 (13:14 -0700)]
Merge pull request #12931 from jashook/fix_machine_arm32_checked

Use the correct machine for arm32 checked jobs

7 years agoTag two vararg-related tests with their bug number for ARM.
Pat Gavlin [Wed, 19 Jul 2017 19:58:49 +0000 (12:58 -0700)]
Tag two vararg-related tests with their bug number for ARM.

These tests are not supported.

Contributes to #12914.

7 years agoUse the correct machine for arm32 checked jobs
jashook [Wed, 19 Jul 2017 19:32:00 +0000 (12:32 -0700)]
Use the correct machine for arm32 checked jobs

7 years agoTag the GitHub_11408 test with its bug number.
Pat Gavlin [Wed, 19 Jul 2017 18:59:09 +0000 (11:59 -0700)]
Tag the GitHub_11408 test with its bug number.

This tests sets `COMPlus_TailCallStress` to `1` before running, which is
not compatible with the ARM32 legacy backend. Tag it with its bug number
for tracking.

Contributes to #12918.

7 years agoTag the verify01_small test with its bug number.
Pat Gavlin [Wed, 19 Jul 2017 18:25:51 +0000 (11:25 -0700)]
Tag the verify01_small test with its bug number.

This test is known to fail on .NET Core due to #4851.

Contributes to #12918.

7 years agoFix the SustainedLowLatency/scenario test.
Pat Gavlin [Wed, 19 Jul 2017 18:03:41 +0000 (11:03 -0700)]
Fix the SustainedLowLatency/scenario test.

This test needs to return 100 to indicate success.

Contributes to #12918 et. al.

7 years agoMerge pull request #12819 from stephentoub/cts_perf
Stephen Toub [Wed, 19 Jul 2017 17:24:47 +0000 (13:24 -0400)]
Merge pull request #12819 from stephentoub/cts_perf

Improve performance of CancellationToken.Register / CancellationTokenRegistration.Dispose

7 years agoMerge pull request #12755 from tannergooding/classify
Eric Mellino [Wed, 19 Jul 2017 17:17:04 +0000 (10:17 -0700)]
Merge pull request #12755 from tannergooding/classify

Floating-Point Classification APIs

7 years agoMerge pull request #12896 from YongseopKim/ryujit/arm32/block_copy_3bytes_struct
Bruce Forstall [Wed, 19 Jul 2017 16:23:15 +0000 (09:23 -0700)]
Merge pull request #12896 from YongseopKim/ryujit/arm32/block_copy_3bytes_struct

[RyuJIT/ARM32] Add block copy for 3bytes struct

7 years agoMerge pull request #12807 from jashook/add_arm32_windows_ci_testing
Jarret Shook [Wed, 19 Jul 2017 16:20:15 +0000 (09:20 -0700)]
Merge pull request #12807 from jashook/add_arm32_windows_ci_testing

Add arm32 ci testing.

7 years agoAdd arm32 ci testing.
jashook [Thu, 13 Jul 2017 22:41:31 +0000 (15:41 -0700)]
Add arm32 ci testing.

Note this will add a new lst file and leverage the old existing arm64
infrastructure.

7 years agoFix errors in MSBuild prperties initialization in System.Private.CoreLib.csproj ...
Jacek Blaszczynski [Wed, 19 Jul 2017 15:36:41 +0000 (17:36 +0200)]
Fix errors in MSBuild prperties initialization in System.Private.CoreLib.csproj (#12356)

Fixes issue #12355

Project System.Private.CoreLib.csproj imports directly Microsoft.Net.Compilers.props
at line# 4 before including dir.props from repo root. $(RepoRoot)/dir.props imports
Microsoft.Net.Compilers.props at line# 186. As a result of this sequence of duplicated
project imports and lack of safeguards against importing the same .props file twice
MSBuild reports that Microsoft.Net.Compilers.props file is included twice with warning
that second import will be ignored - in this case not evaluated. This results
in initialization of Microsoft.Net.Compilers.props values to defaults because MSBuild
evaluates Microsoft.Net.Compilers.props only once before $(RepoRoot)/dir.props are included.
Removing import of Microsoft.Net.Compilers.props from System.Private.CoreLib.csproj
and moving $(RepoRoot)/dir.props file import to top of System.Private.CoreLib.csproj
solves these problems by ensuring expected order of evaluation of Microsoft.Net.Compilers.props
file by MSBuild after all project wide values are initialized in $(RepoRoot)/dir.props.

7 years agoImprove the performance of CancellationToken.Register / CancellationTokenRegistration...
Stephen Toub [Mon, 10 Jul 2017 01:52:29 +0000 (21:52 -0400)]
Improve the performance of CancellationToken.Register / CancellationTokenRegistration.Dispose

CancellationToken.Register currently allocates an object per call.  This PR makes it allocation-free (amortized).

The current implementation was optimized for scalability, using a lock-free algorithm to minimize contention when lots of threads are registering with a token concurrently.  Each registration allocates an object which is then stored into a lock-free sparse array data structure.  But the level of scalability enabled is unnecessary for the vast majority of CancellationToken usage, adds non-trivial complexity to the implementation, and adds costs to the most common usage scenarios, e.g. a single CancellationToken that registered with and the unregistered with repeatedly.

The new implementation strikes a (IMO) better balance between performance and scalability, retaining most of the latter while doing much better for the former in the most interesting use cases.  CancellationTokenSource now maintains an array of partition objects, each of which is lazily-initialized, contains a lock that protects that partition, and contains a linked list of registration objects.  The striped locking helps maintain most of the scalability and also enables node reuse due to not suffering from ABA problems.

(All numbers that follow are 64-bit.)

The size of CancellationTokenSource itself doesn't change (64 bytes), so allocating a CancellationTokenSource and then never registering with its token remains the same in both speed and space.

The size overhead associated with the first registration on a CancellationTokenSource improves.  With the old implementation, the first registration would result in 272 bytes allocated, whereas with the new implementation that shrinks to 218.

Each additional registration at the same time in the CancellationToken is now larger than in the old implementation, 80 bytes instead of ~56 bytes (it varies in the old implementation due to the details of the lock-free algorithm and when new segments are created), but these new node allocations are reusable.  So if you register 100 registrations with the same CancellationToken and don't unregister any of them, you'll incur ~8000 bytes of allocation instead of ~5600, but if you instead register and unregister them 100 times, you'll only incur ~80 bytes of allocation instead of ~5600, with objects reused for the former case but not the latter case.

Speed is also significantly improved.  A single thread registering and unregistering repeatedly from a token is now ~2x the old implementation in throughput.  Similarly with eight threads on eight logical cores all registering/unregistering concurrently.

Finally, the size of CancellationTokenRegistration also shrinks.  This struct is often contained in other classes that have registered with the token, and so will end up shrinking the size of those allocations as well.

7 years agofix issue 12725 (#12728)
Xiangyang (Mark) Guo [Wed, 19 Jul 2017 09:25:54 +0000 (02:25 -0700)]
fix issue 12725 (#12728)

7 years ago[RyuJIT/ARM32] Add block copy for 3bytes struct
Yongseop Kim [Wed, 19 Jul 2017 07:47:29 +0000 (16:47 +0900)]
[RyuJIT/ARM32] Add block copy for 3bytes struct

- Block copy for 3bytes struct(byte,byte,byte)
- Similar to x64's one

7 years agoFix build break - delete unused local
Jan Kotas [Tue, 18 Jul 2017 05:15:39 +0000 (22:15 -0700)]
Fix build break - delete unused local

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMerge pull request #12888 from gsfreema/BotR-fixes
Aditya Mandaleeka [Tue, 18 Jul 2017 23:39:55 +0000 (16:39 -0700)]
Merge pull request #12888 from gsfreema/BotR-fixes

Fixing various typos and links in BotR chapters

7 years agoMerge pull request #12881 from pgavlin/IsUnusedValueHelpers
Pat Gavlin [Tue, 18 Jul 2017 23:03:04 +0000 (16:03 -0700)]
Merge pull request #12881 from pgavlin/IsUnusedValueHelpers

Add helpers to set, clear, and check IsUnusedValue.

7 years agoMissed one empty case in GetPathRoot (#12883)
Jeremy Kuhne [Tue, 18 Jul 2017 22:51:21 +0000 (15:51 -0700)]
Missed one empty case in GetPathRoot (#12883)

This matches our new behavior with whitespace paths

7 years agoFixing various typos and links in BotR chapters
Scott Freeman [Tue, 18 Jul 2017 22:49:02 +0000 (18:49 -0400)]
Fixing various typos and links in BotR chapters

- The fixes are for the Intro to CLR, Garbage Collection, and Threading chapters
- Many links were updated to use relative paths so that users in a different fork/branch are kept within the same fork/branch changes that would break a link will not affect the current branch

7 years agoMerge pull request #12878 from hseok-oh/ryujit/struct_promote1
Bruce Forstall [Tue, 18 Jul 2017 21:50:04 +0000 (14:50 -0700)]
Merge pull request #12878 from hseok-oh/ryujit/struct_promote1

[RyuJIT/ARM32] Block copy for promoted struct argument assign

7 years agoUpdate minidump and debugging doc (#12884)
Mike McLaughlin [Tue, 18 Jul 2017 21:33:53 +0000 (14:33 -0700)]
Update minidump and debugging doc (#12884)

Update debugging doc on loading sos on Windows.

7 years agoAdd helpers to set, clear, and check IsUnusedValue.
Pat Gavlin [Tue, 18 Jul 2017 16:24:26 +0000 (09:24 -0700)]
Add helpers to set, clear, and check IsUnusedValue.

Just what it says on the tin.

7 years agoEncoding code clean up (#12864)
Tarek Mahmoud Sayed [Tue, 18 Jul 2017 20:51:57 +0000 (13:51 -0700)]
Encoding code clean up (#12864)

* Encoding code clean up

This change to clean all the serialization code from the encoding and move the files to the shared folder

* delete DecoderNLS

* re-add DecoderNls with the right casing

* remove bIsMicrosoftBestFitFallback

* Misc fixes per review comments

7 years agoImplementing the floating-point classification APIs for System.Single and System...
Tanner Gooding [Tue, 11 Jul 2017 23:05:57 +0000 (16:05 -0700)]
Implementing the floating-point classification APIs for System.Single and System.Double.

7 years agoMerge pull request #12748 from helloguo/NUMASupportInitialize
Aditya Mandaleeka [Tue, 18 Jul 2017 20:09:07 +0000 (13:09 -0700)]
Merge pull request #12748 from helloguo/NUMASupportInitialize

Fix NUMASupportInitialize

7 years agoMerge pull request #12879 from dotnet-maestro-bot/master-UpdateDependencies
Wes Haggard [Tue, 18 Jul 2017 18:51:59 +0000 (11:51 -0700)]
Merge pull request #12879 from dotnet-maestro-bot/master-UpdateDependencies

Update CoreClr, CoreFx to preview2-25518-01, preview2-25518-02, respectively (master)

7 years agoMerge pull request #12843 from pgavlin/FixEarlyMultiRegCallDumps
Pat Gavlin [Tue, 18 Jul 2017 14:25:29 +0000 (07:25 -0700)]
Merge pull request #12843 from pgavlin/FixEarlyMultiRegCallDumps

Fix issues with early dumps of multi-reg-returning calls.

7 years agoMerge pull request #12635 from hseok-oh/ryujit/remove_split_nyi
Bruce Forstall [Tue, 18 Jul 2017 14:21:51 +0000 (07:21 -0700)]
Merge pull request #12635 from hseok-oh/ryujit/remove_split_nyi

[ARM32] Remove useless code: struct split using float registers

7 years agoPR feedback.
Pat Gavlin [Tue, 18 Jul 2017 13:59:53 +0000 (06:59 -0700)]
PR feedback.

7 years agoUpdate CoreClr, CoreFx to preview2-25518-01, preview2-25518-02, respectively
dotnet-maestro-bot [Tue, 18 Jul 2017 13:17:55 +0000 (13:17 +0000)]
Update CoreClr, CoreFx to preview2-25518-01, preview2-25518-02, respectively

7 years agoMove BitConverter to shared CoreLib partition (#12876)
Jan Kotas [Tue, 18 Jul 2017 12:45:23 +0000 (14:45 +0200)]
Move BitConverter to shared CoreLib partition (#12876)