Andy Ayers [Tue, 25 Jul 2017 15:41:01 +0000 (08:41 -0700)]
Merge pull request #13005 from AndyAyersMS/FixPDepSimd12Issue
Don't map P-DEP SIMD12 local vars to SIMD16 on x64
Cyd Haselton [Tue, 25 Jul 2017 13:01:07 +0000 (08:01 -0500)]
Fixes for issue 12982 Android cross-build fails when compiling cee_wks (#12986)
* Fixes for issue 12982 Android cross-build fails when compiling cee_wks
Added conditional (__ANDROID__) to volatile.h
Added compile option to android/arm64/toolchain.cmake
* Changed ANDROID conditional to compiler and __atomic_load
Changed conditional to exclude volatile to __CLANG__ and __has_builtin(__atomic_load)
* Fixed Clang conditional
* Recommended changes to volatile.h and toolchain.cmake
* Added separate conditional for detecting builtin __atomic_load
Tanner Gooding [Fri, 21 Jul 2017 05:45:40 +0000 (22:45 -0700)]
Deleting the non-shared implementation of `System.Single` and `System.Double`.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Noah Falk [Tue, 25 Jul 2017 05:59:47 +0000 (22:59 -0700)]
Merge pull request #12193 from noahfalk/tiered_jitting_m2
Pat Gavlin [Tue, 25 Jul 2017 02:15:48 +0000 (19:15 -0700)]
Merge pull request #13012 from pgavlin/VSO468726
Fix `fgOrderBlockOps`.
noahfalk [Tue, 25 Jul 2017 00:38:30 +0000 (17:38 -0700)]
Add the runtime code versioning feature
This makes tiered compilation work properly with profiler ReJIT, and positions the runtime to integrate other versioning related features together in the future. See the newly added code-versioning design-doc in this commit for more information.
Breaking changes for profilers: See code-versioning-profiler-breaking-changes.md for more details.
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
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
Pat Gavlin [Mon, 24 Jul 2017 22:49:34 +0000 (15:49 -0700)]
Fix `fgOrderBlockOps`.
This function was incorrect when the target was a `DYN_BLK` with
`gtEvalSizeFirst` set to `true`.
Fixes VSO 468726.
gbalykov [Mon, 24 Jul 2017 22:37:38 +0000 (01:37 +0300)]
Simplify SHM-allocator (#12815)
* Simplify SHM-allocator
* Remove SHMNULL and NULLSharedID
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.
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
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
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
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
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.
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
Bruce Forstall [Mon, 24 Jul 2017 16:11:22 +0000 (09:11 -0700)]
Merge pull request #12998 from github-john-doe/master
typo
Andy Ayers [Mon, 24 Jul 2017 14:54:44 +0000 (07:54 -0700)]
Don't map P-DEP SIMD12 local vars to SIMD16 on x64
P-DEP local vars are logically independent locals, but physically embeded
in some structure with fixed layout. So they cannot be made larger.
We already had safeguards for ths in place for x86 so extend these to kick
in for x64 too.
Also update Lowering's checker to account for the fact that some SIMD12s
can persist in x64.
Fixes #12950.
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
John Doe [Mon, 24 Jul 2017 14:15:39 +0000 (07:15 -0700)]
typo
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.
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()
dudes-come [Mon, 24 Jul 2017 08:04:16 +0000 (16:04 +0800)]
fix comment in optimizer.cpp:optOptimizeBools
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
Cyd Haselton [Sun, 23 Jul 2017 13:06:45 +0000 (08:06 -0500)]
Update android build script with correct package versions (#12985)
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.
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"
Pat Gavlin [Sat, 22 Jul 2017 18:05:32 +0000 (11:05 -0700)]
Revert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"
Alexander Soldatov [Fri, 21 Jul 2017 17:06:20 +0000 (20:06 +0300)]
[RyuJIT/ARM32] Removed int <-> float casts related NYIs.
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>
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.
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
Brian Sullivan [Fri, 21 Jul 2017 19:49:18 +0000 (12:49 -0700)]
Updated the path to built test binaries in examples
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.
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
Stephanie Niu [Fri, 21 Jul 2017 18:11:43 +0000 (11:11 -0700)]
Added IsPathFullyQualified() method to Path class (#12965)
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.
Russ Keldorph [Thu, 20 Jul 2017 22:48:01 +0000 (15:48 -0700)]
Associate last 2 RVAStatics tests with known issue
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
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
Guillaume B [Fri, 21 Jul 2017 12:08:11 +0000 (14:08 +0200)]
Add CGroup CFS CPU limit support (#12797)
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().
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)
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
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
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
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)
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.
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.
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
jashook [Thu, 20 Jul 2017 20:55:20 +0000 (13:55 -0700)]
Up arm timeout to arm64 timeout
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
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
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
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.
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.
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.
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.
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.
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
Jiyoung Yun [Thu, 20 Jul 2017 09:01:09 +0000 (18:01 +0900)]
[RyuJIT/ARM32] Remove unnecessary isHfaRegArg check routine
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.
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
jashook [Wed, 19 Jul 2017 16:48:35 +0000 (09:48 -0700)]
Fix auto starting arm64 ubuntu jobs
Mike McLaughlin [Thu, 20 Jul 2017 00:53:05 +0000 (17:53 -0700)]
Remove section headers writing to createdump (#12887)
Issue #12853
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
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
Karthik Rajasekaran [Wed, 19 Jul 2017 22:34:27 +0000 (15:34 -0700)]
Fix Platform reporting parameters for build pipeline (#12900)
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.
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.
Tarek Mahmoud Sayed [Wed, 19 Jul 2017 20:30:36 +0000 (13:30 -0700)]
Fix CultureInfo.Parent to avoid throwing and catching (#12916)
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.
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.
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.
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.
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
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.
jashook [Wed, 19 Jul 2017 19:32:00 +0000 (12:32 -0700)]
Use the correct machine for arm32 checked jobs
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.
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.
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.
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
Eric Mellino [Wed, 19 Jul 2017 17:17:04 +0000 (10:17 -0700)]
Merge pull request #12755 from tannergooding/classify
Floating-Point Classification APIs
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
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.
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.
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.
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.
Xiangyang (Mark) Guo [Wed, 19 Jul 2017 09:25:54 +0000 (02:25 -0700)]
fix issue 12725 (#12728)
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
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>
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
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.
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
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
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
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.
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.
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