Michelle McDaniel [Mon, 12 Dec 2016 21:26:02 +0000 (13:26 -0800)]
Merge pull request dotnet/coreclr#8598 from adiaaida/disableGetGeneration
Disable GetGenerationWR2 for GCStress on x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
d18d199ae7cfd7b3377712bfa30bf7baca12bf0f
Brian Sullivan [Mon, 12 Dec 2016 19:43:10 +0000 (11:43 -0800)]
Merge pull request dotnet/coreclr#8541 from briansull/vso-287671
Fix missing flags on GT_DYN_BLK node
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6a21ae6768700fac36e52fd2900e4aa4019c64f
Michelle McDaniel [Mon, 12 Dec 2016 19:01:47 +0000 (11:01 -0800)]
Disable GetGenerationWR2 for GCStress on x86
Disable this test for GCStress on x86 until the cause for its failure
can be investigated.
Commit migrated from https://github.com/dotnet/coreclr/commit/
058e476f0b4b9209904e8f5be460be619b270e40
Gaurav Khanna [Mon, 12 Dec 2016 18:54:13 +0000 (10:54 -0800)]
Merge pull request dotnet/coreclr#8421 from hseok-oh/enable_arm_linux_nupkg
First step to create nuget packages for ARM32/Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
e7d19194fa99aa97514d5e920e84afbc9721af0e
Matt Warren [Mon, 12 Dec 2016 17:30:58 +0000 (17:30 +0000)]
Span<T> api update (dotnet/coreclr#8583)
* Changing method/property order to match CoreFX impl
To make diffing the files easier
* Added other missing methods to match CoreFX impl
Added:
- public void CopyTo(Span<T> destination)
- public static bool operator ==(Span<T> left, Span<T> right)
- public static bool operator !=(Span<T> left, Span<T> right)
- public override bool Equals(object obj)
- public override int GetHashCode()
Also removed 'public void Set(ReadOnlySpan<T> values)' and it's no
longer part of the Span<T> public API, see
https://github.com/dotnet/apireviews/tree/master/2016/11-04-SpanOfT#spantset
Commit migrated from https://github.com/dotnet/coreclr/commit/
98798b78e2e3284409289c7253bac7b999c0ad88
Evgeny Pavlov [Mon, 12 Dec 2016 12:27:49 +0000 (15:27 +0300)]
[x86/Linux][SOS] Don't include utilcode.h in gcdumpx86.cpp and gcdump.cpp (dotnet/coreclr#8475)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5dbaa3cb2e2e11d98924afe9de472469b5136885
Evgeny Pavlov [Mon, 12 Dec 2016 10:55:15 +0000 (13:55 +0300)]
[x86/Linux][SOS] Add CALLBACK (aka stdcall) to function declarations (dotnet/coreclr#8476)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3b17672b9bbcaea91f1da73b9ed318a1ff7e451
Sean Gillespie [Sun, 11 Dec 2016 01:50:06 +0000 (17:50 -0800)]
Local GC: Decouple write barrier operations between the GC and EE (dotnet/coreclr#8568)
* Decouple write barrier operations between the GC and EE
* Address code review feedback
* Address code review feedback
* Repair the standalone GC build
Commit migrated from https://github.com/dotnet/coreclr/commit/
04d6bd105ade5f6189a15a6dbb59b082613429a1
Andy Ayers [Sat, 10 Dec 2016 18:11:04 +0000 (10:11 -0800)]
Fix typo in clang-format directive and reformat end of flowgraph.cpp (dotnet/coreclr#8573)
Last 4K or so lines of flowgraph.cpp were not being formatted because
the clang-format on directive had a typo.
Fix the typo and reformat the latter part of the file.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d42b3935eaa056712e09a0f83b38e211bdb451d9
Stephen Toub [Sat, 10 Dec 2016 16:03:19 +0000 (11:03 -0500)]
Merge pull request dotnet/coreclr#8581 from stephentoub/cwt_unsafecast
Use JitHelpers.UnsafeCast in ConditionalWeakTable
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c174f804c783eaec65796ca2669c2780a82473a
Stephen Toub [Sat, 10 Dec 2016 14:54:15 +0000 (09:54 -0500)]
Use JitHelpers.UnsafeCast in ConditionalWeakTable
We know the types and can use UnsafeCast when reading out the objects as TKey and TValue. This improves reading speed by ~30%.
Commit migrated from https://github.com/dotnet/coreclr/commit/
381199e5e1e834e7130c31ff6a51adb4f2aafbc6
Stephen Toub [Sat, 10 Dec 2016 13:35:29 +0000 (08:35 -0500)]
Merge pull request dotnet/coreclr#8420 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3ae9e1b57028ad6b6274ebe3bae1733b2aa887c
Jan Kotas [Sat, 10 Dec 2016 08:31:20 +0000 (00:31 -0800)]
Improve ConditionalWeakTable.Remove (dotnet/coreclr#8580)
Clear the key of the deleted entry to allow GC collect objects pointed to by it
Fixes dotnet/coreclr#8577
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ef31918fce2a9790e01f863e06575a9ca2ec77a
Justin Van Patten [Sat, 10 Dec 2016 06:27:54 +0000 (22:27 -0800)]
TimeZoneInfo: Avoid cloning privately-created ArgumentRule[] arrays (dotnet/coreclr#8575)
TimeZoneInfo currently always creates a defensive copy of the specified
ArgumentRule[] array when created. This makes sense for the public
static factory methods. However, there's no need to create a defensive
copy of arrays created privately as part of its implementation (e.g.
reading the rules from the registry/disk). This change avoids the
unnecessary cloning.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cfea8830397384c54152b6e54e783d76b2738dc3
Justin Van Patten [Sat, 10 Dec 2016 06:15:56 +0000 (22:15 -0800)]
Fix misguided lock in CurrentTimeZone (dotnet/coreclr#8569)
CurrentTimeZone locks against a static lock object when modifying a
non-static Hashtable. Instead, use the Hashtable instance itself as the
lock object.
Commit migrated from https://github.com/dotnet/coreclr/commit/
526a81a8e764738f79c38528f638122cee0e3ead
Jeremy Kuhne [Sat, 10 Dec 2016 05:11:20 +0000 (21:11 -0800)]
Removes final FEATURE_CORECLR defines (dotnet/coreclr#8555)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e2d70ff4c0a30c947d572c0604f7cd1a44f258b7
Santiago Fernandez Madero [Sat, 10 Dec 2016 05:11:05 +0000 (21:11 -0800)]
Adding API ConditionalWeakTable.AddOrUpdate (dotnet/coreclr#8490)
* Added ConditionalWeakTable.AddOrUpdate
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ba12d06181511619ee338124e7df45bdbf6d76f
dotnet-bot [Sat, 10 Dec 2016 04:00:24 +0000 (04:00 +0000)]
Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
80bad94413d6cdd470f04ab2f9a31cdd14def6cb
Stephen Toub [Sat, 10 Dec 2016 01:41:08 +0000 (20:41 -0500)]
Merge pull request dotnet/coreclr#8576 from stephentoub/cwt_clear
Change ConditionalWeakTable.Clear
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6a0b9a37625173ffce643855850e0bb69246bbd
Stephen Toub [Sat, 10 Dec 2016 00:00:50 +0000 (19:00 -0500)]
Change ConditionalWeakTable.Clear
The original CoreRT implementation just dropped the current table and replaced it with a new one. In the process of porting the CoreRT implementation to CoreCLR, I'd changed it to instead remove each item from the table (by setting its hashcode to -1, as does Remove), in order to work around some code in the finalizer that would null out te parent's reference to the container, and that would cause problems with dropping this table... but that code in the finalizer changed before it got merged, and in its current form, the old CoreRT clear implementation was fine. It's also likely better, as it'll let the handles be cleaned up earlier, and it's simple. So reverting back to it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f084f1c71cf15a8dc918630bd95912f9bd720098
Stephen Toub [Fri, 9 Dec 2016 23:42:10 +0000 (18:42 -0500)]
Merge pull request dotnet/coreclr#8572 from stephentoub/cwt_gpas
Change CWT use of GetPrimaryAndSecondary to GetPrimary
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff34a07ec32dd125f093be07c7f0a02778a3c86c
Jeremy Kuhne [Fri, 9 Dec 2016 21:42:16 +0000 (13:42 -0800)]
Strip some security related attributes (dotnet/coreclr#8571)
Strips SecurityCritical, SecuritySafeCritical, SecurityPermission,
EnvironmentPermission, and PermissionSet attributes.
Also removes empty defines these left behind.
Patterns used:
^.*\[(System\.Security\.)?SecurityCritical\](\s*//.*|\s*)$[\r\n]*
^.*#if FEATURE_CORECLR[\s\r\n]*(#else)?[\s\r\n]*#endif.*[\r\n]*
^.*\[(System\.Security\.Permissions\.)?SecurityPermission(Attribute)?\([^)]*\)\](\s*//.*|\s*)$[\r\n]*
Commit migrated from https://github.com/dotnet/coreclr/commit/
345e201f027eb35a7a01e1714afe36b831b6f1e3
Stephen Toub [Fri, 9 Dec 2016 21:09:26 +0000 (16:09 -0500)]
Change CWT use of GetPrimaryAndSecondary to GetPrimary
This snuck in as part of my previous ConditionalWeakTable changes. We don't need the secondary here, and it's more expensive to get than just the primary.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4a5647ee5c5e04484c7211bcac7249d35e290977
John Chen [Fri, 9 Dec 2016 17:20:39 +0000 (09:20 -0800)]
Fix path separator in CrossGen help on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
d034981c78112c8703d3528e8ef8efdb36d68584
Alexander Radchenko [Fri, 9 Dec 2016 19:33:44 +0000 (02:33 +0700)]
Make it easier to iterate through an ArraySegment (dotnet/coreclr#8559)
* Make it easier to iterate through an ArraySegment. See Make it easier to iterate through an ArraySegment
Commit migrated from https://github.com/dotnet/coreclr/commit/
2813ef44942022911261601f458a8e2f044d220e
Sivarv [Fri, 9 Dec 2016 19:30:30 +0000 (11:30 -0800)]
Merge pull request dotnet/coreclr#8544 from sivarv/moveRegFix
Fix to issue 8287.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc8a09288df831a4ad02b645c4d078261d1ceb70
Stephen Toub [Fri, 9 Dec 2016 18:04:01 +0000 (13:04 -0500)]
Merge pull request dotnet/coreclr#8507 from stephentoub/portcorert_cwt
Make ConditionalWeakTable reads lock-free
Commit migrated from https://github.com/dotnet/coreclr/commit/
7adcc81a8adc10e3fbd47a1dcf2d1218cedaf58c
Alexander Radchenko [Fri, 9 Dec 2016 17:37:23 +0000 (00:37 +0700)]
StringBuilder.AppendJoin (appending lists to StringBuilder) (dotnet/coreclr#8350)
Adding StringBuilder.AppendJoin
Commit migrated from https://github.com/dotnet/coreclr/commit/
37b9f18d22d45be7d3d3c6651a4cef819dfe0fdf
Gaurav Khanna [Fri, 9 Dec 2016 16:24:31 +0000 (08:24 -0800)]
Merge pull request dotnet/coreclr#8563 from xoofx/TPA_glossary
Add TPA/Trusted Platform Assemblies description to the glossary
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e099325a7c9e853f1d71f7fa54f734648c6893a
Alexandre Mutel [Fri, 9 Dec 2016 16:17:46 +0000 (17:17 +0100)]
Add TPA/Trusted Platform Assemblies description to the glossary (From https://github.com/dotnet/coreclr/issues/6470#issuecomment-
235161459 )
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e04d1356246fbc653630ee8d4b9ce36d4e4063f
Jonghyun Park [Fri, 9 Dec 2016 12:27:03 +0000 (21:27 +0900)]
[x86/Linux] Port ResolveWorkerAsmStub (dotnet/coreclr#8557)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7d17af2deeca2af47bec4fab01f8c7e23ae3f5a8
Jonghyun Park [Fri, 9 Dec 2016 12:22:06 +0000 (21:22 +0900)]
[x86/Linux] Use Portable FastGetDomain (dotnet/coreclr#8556)
FastGetDomain function (with __declspec(naked)) causes segmentation
fault.
Commit migrated from https://github.com/dotnet/coreclr/commit/
13a829ee49a95f2b8f3137d5cf33dd8ff92d0eff
Jan Vorlicek [Fri, 9 Dec 2016 09:50:01 +0000 (10:50 +0100)]
Fix incremental build when dummy version.cpp is generated (dotnet/coreclr#8547)
This change fixes a problem with incremental build on Unix. When the
version.cpp is generated by the build.sh as a dummy one with no real
version stamp in it, it is recreated every time the build.sh is run.
That means that build needs to rebuild that file and also re-link
all the components that include it.
This change tests the file presence and contents before actually
regenerating it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
101168c7a41058436f592bd9cb0a1a70f0f1b0ad
SaeHie Park [Fri, 9 Dec 2016 09:29:16 +0000 (18:29 +0900)]
[x86/Linux] Fix getcpuid calling convention (dotnet/coreclr#8552)
Fix getcpuid(), getextcpuid() with STDCALL
Fix xmmYmmStateSupport() with STDCALL
Commit migrated from https://github.com/dotnet/coreclr/commit/
685de9132d453e08bc4ddb0c66f30d59fb4603b3
Jeremy Kuhne [Fri, 9 Dec 2016 05:39:00 +0000 (21:39 -0800)]
Strip more defines from CoreLib (dotnet/coreclr#8545)
* Strip more defines from CoreLib
Removes the rest of
FEATURE_CAS_POLICY
FEATURE_REMOTING
FEATURE_MACL
And another significant chunk of
!FEATURE_CORECLR
* Address feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
76c62b72ef2642c3ad91209acf02db6c8b42aff7
Stephen Toub [Wed, 7 Dec 2016 21:35:03 +0000 (16:35 -0500)]
Fix perf regression with lots of objects in a ConditionalWeakTable
The CoreRT implementation of ConditionalWeakTable that was ported back to CoreCLR uses a special scheme to make reads lock-free. When the container needs to grow, it allocates new arrays and duplicates all of the dependency handles from the previous array, rather than just copying them. This avoids issues stemming from a thread getting a dependency handle in an operation on the container, then having that handle destroyed, and then trying to use it; the handle won't be destroyed as long as the container is referenced.
However, this also leads to a significant cost in a certain situation. Every time the container grows, it allocates another N dependency handles where N is the current size of the container. So, for example, with an initial size of 8, if 64 objects are added to the container, it'll allocate 8 dependency handles, then another 16, then another 32, and then another 64, resulting in significantly more handles than in the old implementation, which would only allocate 64 handles total.
This commit fixes that by changing the scheme slightly. A container still frees its handles in its finalizer. However, rather than duplicating all handles, that responsibility for freeing is transferred from one container to the next. Then to avoid issues where, for example, the second container is released while the first is still in use, a reference is maintained from the first to the second, so that the second can't be finalized while the first is still in use.
The commit also fixes a race condition with resurrection and finalization, whereby dependency handles could be used while or after they're being freed by the finalizer. It's addressed by only freeing handles in a second finalization after clearing out state in the first finalization to guarantee no possible usage during the second.
Commit migrated from https://github.com/dotnet/coreclr/commit/
03525a46e5d9b33e13a992d89dda3fbf36f43888
Stephen Toub [Wed, 7 Dec 2016 20:43:05 +0000 (15:43 -0500)]
Port ConditionalWeakTable from CoreRT
The CoreRT ConditionalWeakTable was modified to support lock-free reads. This ports the implementation back to coreclr.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e475a35ac695e34a433e108c766d2200865aa13
sivarv [Thu, 8 Dec 2016 23:40:20 +0000 (15:40 -0800)]
Fix to issue 8287.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1d06e7241ce9e27067bf6f57d280ad67ca03a74
sandreenko [Fri, 9 Dec 2016 01:56:58 +0000 (17:56 -0800)]
Merge pull request dotnet/coreclr#8539 from sandreenko/fix-unix-unwind-info
Fix unix unwind info
Commit migrated from https://github.com/dotnet/coreclr/commit/
71f0a531679506311b5accab3bd13f4b717029a2
SaeHie Park [Fri, 9 Dec 2016 01:09:48 +0000 (10:09 +0900)]
[x86/Linux] Fix PAL unit test paltest_pal_sxs_test1 (dotnet/coreclr#8522)
Fix unit test error for x86/Linux
- fix fail of exception_handling/pal_sxs/test1/paltest_pal_sxs_test1
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2a083a09692e405e5dca17fa0ab04a886a2ce27
Jonghyun Park [Fri, 9 Dec 2016 01:03:07 +0000 (10:03 +0900)]
[x86/Linux] Revise asmhelper.S using macro (dotnet/coreclr#8523)
* [x86/Linux] Revise asmhelper.S using macro
This commit revises asmhelper.S using macros that inserts CFI
directives.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eae81ba831eb020d84194f46a41b3a685820b2d4
Pat Gavlin [Fri, 9 Dec 2016 01:02:11 +0000 (17:02 -0800)]
Merge pull request dotnet/coreclr#8537 from pgavlin/VSO299202
Disable special put args for LIMIT_CALLER on x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4902abf71f70678044fbd326f4be32df88ea8bfc
Pat Gavlin [Fri, 9 Dec 2016 00:57:14 +0000 (16:57 -0800)]
Merge pull request dotnet/coreclr#8543 from pgavlin/VSO299207
Correct an assertion in LSRA.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d8fb4130efd3a3c9d5a2f13f748a53381e20f9c
Justin Van Patten [Fri, 9 Dec 2016 00:46:23 +0000 (16:46 -0800)]
Make TimeZoneInfo fields readonly (dotnet/coreclr#8526)
TimeZoneInfo is immutable. Help enforce this by making its fields
readonly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
37c632e9628278e5e04d1c51b955df1eeee35084
Justin Van Patten [Fri, 9 Dec 2016 00:44:20 +0000 (16:44 -0800)]
TimeZoneInfo: Use string.Concat instead of string.Format (dotnet/coreclr#8540)
It's more efficient to concatenate the strings.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d56f76c0a7a44e194104e54e5e9c66feba3e931
Justin Van Patten [Fri, 9 Dec 2016 00:43:45 +0000 (16:43 -0800)]
Make TimeZoneInfo.TransitionTime fields readonly (dotnet/coreclr#8529)
TransitionTime is immutable. Help enforce this by making its fields
readonly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
14ae4a85d2886bc094f7fc28a7cb79f72e6f66de
Jonghyun Park [Fri, 9 Dec 2016 00:43:00 +0000 (09:43 +0900)]
[x86/Linux] Port Several Stubs as NYI (dotnet/coreclr#8515)
This commit adds SinglecastDelegateInvokeStub and VSD-related Stubs as NYI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9a59075419f497addc9061428ef0d8537ce301f
Justin Van Patten [Fri, 9 Dec 2016 00:39:28 +0000 (16:39 -0800)]
Make TimeZoneInfo.AdjustmentRule fields readonly (dotnet/coreclr#8528)
AdjustmentRule is immutable. Help enforce this by making its fields
readonly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d8cd756f2dd5027f2df69ad62cca3c6aec6340ad
Justin Van Patten [Fri, 9 Dec 2016 00:32:56 +0000 (16:32 -0800)]
Preallocate the TimeZoneInfo.Utc instance (dotnet/coreclr#8530)
There doesn't appear to be a good reason why the TimeZoneInfo.Utc
instance needs to be cleared when TimeZoneInfo.ClearCachedData() is
called. Instead, we can pre-allocate and reuse a singleton instance,
obviating the need for the lazy-initialization/locking mechanics.
Commit migrated from https://github.com/dotnet/coreclr/commit/
23422d6ca734445094eef27326d86e4845f0b220
Justin Van Patten [Fri, 9 Dec 2016 00:30:44 +0000 (16:30 -0800)]
Simplify TimeZoneInfo.AdjustmentRule.Equals (dotnet/coreclr#8527)
Commit migrated from https://github.com/dotnet/coreclr/commit/
78fc761711a2886d75ab14aa26b2fb3e5838aee6
Justin Van Patten [Fri, 9 Dec 2016 00:28:08 +0000 (16:28 -0800)]
Remove private TimeZoneInfoComparer (dotnet/coreclr#8512)
Use Comparison<T> instead of IComparer<T> to sort the list of
TimeZoneInfos, which moves the comparison code to the sole place where
it is used, and now that Array.Sort is implemented in terms of
Comparison<T> instead of IComparer<T>, avoids some unnecessary
intermediate allocations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ff4bd7b39629f6e681d7211dade57369ea586b3
Sergey Andreenko [Thu, 8 Dec 2016 22:42:56 +0000 (14:42 -0800)]
Fix unix unwind info
Windows uses offset from stack pointer, when unix has to use offset from
caninical frame address,
Commit migrated from https://github.com/dotnet/coreclr/commit/
26880afb0a4d8aaa7dd40d864b77b98602b6c981
Jan Vorlicek [Thu, 8 Dec 2016 23:51:19 +0000 (00:51 +0100)]
Remove sscanf and sprintf usage (dotnet/coreclr#8508)
* Remove sscanf
* Remove sprintf
Commit migrated from https://github.com/dotnet/coreclr/commit/
e58e3c5e0a527802bd5286c537dc3ed603317c1d
Pat Gavlin [Thu, 8 Dec 2016 23:18:42 +0000 (15:18 -0800)]
Correct an assertion in LSRA.
`verifyFinalAllocation` asserts that if a non-BB interval RefPosition
that is either spilled or is the interval's last use does not have a
register, then that ref position must be marked `AllocateIfProfitable`.
However, this situation can also arise in at least one other situation:
an unused parameter will have at least one ref position that may not be
allocated to a register. This change corrects the assertion to check
`RefPosition::RequiresRegister` rather than
`RefPosition::AllocateIfProfitable`.
Fixes VSO 299207.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b65d160640b0f9a761ca905610409fa5bc35372
Brian Sullivan [Thu, 8 Dec 2016 22:55:23 +0000 (14:55 -0800)]
The fix is to set the GTF_EXCEPT and GTF_GLOB_REF for every GT_DYN_BLK node that we create.
We typically don't have any information about the address supplied to a GT_DYN_BLK so we should
conservatively allow that it can either be a null pointer or could point into the GC heap.
Commit migrated from https://github.com/dotnet/coreclr/commit/
61b8887fbdb63df52d240a29bfbe68688df801a0
Pat Gavlin [Thu, 8 Dec 2016 22:14:38 +0000 (14:14 -0800)]
Disable special put args for LIMIT_CALLER on x86.
On x86, `LSRA_LIMIT_CALLER` is too restrictive to allow the use of special
put args: this stress mode leaves only three registers allocatable--eax,
ecx, and edx--of which the latter two are also used for the first two
integral arguments to a call. This can leave us with too few registers to
succesfully allocate in situations like the following:
t1026 = lclVar ref V52 tmp35 u:3 REG NA <l:$3a1, c:$98d>
/--* t1026 ref
t1352 = * putarg_reg ref REG NA
t342 = lclVar int V14 loc6 u:4 REG NA $50c
t343 = const int 1 REG NA $41
/--* t342 int
+--* t343 int
t344 = * + int REG NA $495
t345 = lclVar int V04 arg4 u:2 REG NA $100
/--* t344 int
+--* t345 int
t346 = * % int REG NA $496
/--* t346 int
t1353 = * putarg_reg int REG NA
t1354 = lclVar ref V52 tmp35 (last use) REG NA
/--* t1354 ref
t1355 = * lea(b+0) byref REG NA
Here, the first `putarg_reg` would normally be considered a special put arg,
which would remove `ecx` from the set of allocatable registers, leaving
only `eax` and `edx`. The allocator will then fail to allocate a register
for the def of `t345` if arg4 is not a register candidate: the corresponding
ref position will be constrained to { `ecx`, `ebx`, `esi`, `edi` }, which
`LSRA_LIMIT_CALLER` will further constrain to `ecx`, which will not be
available due to the special put arg.
Commit migrated from https://github.com/dotnet/coreclr/commit/
53f78db5a1a12666f40b1648dbeb4d0c34a99415
Justin Van Patten [Thu, 8 Dec 2016 21:21:43 +0000 (13:21 -0800)]
Avoid allocating in TimeZoneInfo.GetHashCode() (dotnet/coreclr#8513)
Avoid the intermediate ToUpper string allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e
Justin Van Patten [Thu, 8 Dec 2016 21:21:28 +0000 (13:21 -0800)]
Simplify TimeZoneInfo.Equals(object) (dotnet/coreclr#8514)
Equals(TimeZoneInfo) already handles null.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d657999abeef7e5410af28c1273feb133ca6c7d
Jeremy Kuhne [Thu, 8 Dec 2016 21:10:38 +0000 (13:10 -0800)]
Move native search paths forward (dotnet/coreclr#8531)
Set native search paths in AppDomain.Setup before doing the rest
of the setup steps to get ahead of potential P/Invoke calls.
Commit migrated from https://github.com/dotnet/coreclr/commit/
96740b835f1faa1e2d6abfeec27f719abf20a234
Karel Zikmund [Thu, 8 Dec 2016 16:40:00 +0000 (08:40 -0800)]
Update glossary.md
Commit migrated from https://github.com/dotnet/coreclr/commit/
c28e5e8ff02744dc1e1cc1fa9b2563d24e643f9b
Russ Keldorph [Thu, 8 Dec 2016 14:40:39 +0000 (06:40 -0800)]
Merge pull request dotnet/coreclr#8524 from hqueue/xarch/lowercast
Remove an unused local variable
Commit migrated from https://github.com/dotnet/coreclr/commit/
56ff7744d3a8ffe0c9f9b8380b551bfefd2659e3
Hyeongseok Oh [Thu, 8 Dec 2016 09:19:25 +0000 (18:19 +0900)]
fix parentheses
Commit migrated from https://github.com/dotnet/coreclr/commit/
da8cc3ac210f16bdf04aa04c94f50b7abd673fa4
Hyung-Kyu Choi [Thu, 8 Dec 2016 08:05:54 +0000 (17:05 +0900)]
Remove an unused local variable
In lowerxarch.cpp, local variable srcUns is defined but not used
at Lowering::LowerCast(GenTree* tree).
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
05ace853150240cfd423a3636a7ee0ac59701a0b
Jeremy Kuhne [Thu, 8 Dec 2016 01:29:31 +0000 (17:29 -0800)]
Strip some conditional compilation in SPCL (dotnet/coreclr#8511)
Removed:
FEATURE_FUSION
FEATURE_PATHCOMPAT
FEATURE_APPDOMAINMANAGER_INITOPTIONS
FEATURE_APTCA
FEATURE_CLICKONCE
FEATURE_IMPERSONATION
FEATURE_MULTIMODULE_ASSEMBLIES
Removed some:
FEATURE_CAS_POLICY
!FEATURE_CORECLR
FEATURE_REMOTING
Commit migrated from https://github.com/dotnet/coreclr/commit/
957b6d9f317c12462c377342a132708494b6f34c
Jonghyun Park [Thu, 8 Dec 2016 01:25:38 +0000 (10:25 +0900)]
[x86/Linux] Fix inconsistent GetCLRFunction definitions (dotnet/coreclr#8472)
* [x86/Linux] Fix inconsistency in GetCLRFunction definitions
GetCLRFunction is treated as pfnGetCLRFunction_t which has __stdcall
convention, but is implemented without __stdcall.
This inconsistency causes segmentaion fault while initializing CoreCLR
for x86/Linux.
This commit fixes such inconsistency via adding __stdcall to
GetCLRFunction implementation.
In addition, this commit declares GetCLRFuntion in 'utilcode.h' and
and revises .cpp files to include 'utilcode.h' instead of declaring
'GetCLRFunction'.
* Remove unnecessary includes
* Remove another unnecessay include
Commit migrated from https://github.com/dotnet/coreclr/commit/
6665345c5a6e6e7fcc5b2fcb36c0f536e773648e
Brian Sullivan [Thu, 8 Dec 2016 00:12:57 +0000 (16:12 -0800)]
Merge pull request dotnet/coreclr#8509 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
79f22fd6b8a0c4f884421a63cfa9054ced1b2cfd
Jan Kotas [Wed, 7 Dec 2016 23:16:57 +0000 (15:16 -0800)]
Refactor Span<T> to ease implementation of JIT intrinsics (dotnet/coreclr#8497)
- Introduce internal ByReference<T> type for byref fields and change Span to use it
- Generalize handling of byref-like types in the type loader
- Make DangerousGetPinnableReference public while I was on it
Commit migrated from https://github.com/dotnet/coreclr/commit/
64c2ad17351ac5bc0bb042216bfcbf1c5136d7cf
Pat Gavlin [Wed, 7 Dec 2016 23:16:09 +0000 (15:16 -0800)]
Merge pull request dotnet/coreclr#8505 from pgavlin/VSO297215
Use a left-leaning comma tree when morphing a stelem.ref helper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bea2a8cf3d1ffe90683c47758f27f7cc83850982
Brian Sullivan [Wed, 7 Dec 2016 22:54:55 +0000 (14:54 -0800)]
Enable POGO build and link for CodegenMirror
[tfs-changeset: 1640669]
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e7a3ece5f580834921703438e8b68724d681c78
Jan Kotas [Wed, 7 Dec 2016 21:13:35 +0000 (13:13 -0800)]
Merge pull request dotnet/coreclr#8504 from mikedn/sort-comparison
Change ArraySortHelper to use Comparison<T>
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d888b52df39e32e5f1c3e92ace9824deb0c8a82
Carol Eidt [Wed, 7 Dec 2016 19:28:30 +0000 (11:28 -0800)]
Merge pull request dotnet/coreclr#8482 from CarolEidt/Fix8220
Use only lower floats for Vector3 dot and equality
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d35a3a3dba0a4d2fc17e7b31dab87d8ac9b81dc
Sivarv [Wed, 7 Dec 2016 18:39:06 +0000 (10:39 -0800)]
Merge pull request dotnet/coreclr#8488 from sivarv/upperSave
Fix to issue 8356.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d926c5949d4fbf541e9cefbcf627967f318d67b
Pat Gavlin [Wed, 7 Dec 2016 18:19:40 +0000 (10:19 -0800)]
Use a left-leaning comma tree when morphing a stelem.ref helper.
fgMorphCall may change a call to the stelem.ref helper that is storing a
null value into a simple store. This transformation needs to construct a
comma tree to hold the argument setup nodes present on the call if any
exist. Originally this tree was constructed in right-leaning fashion
(i.e. the first comma node was the root of the tree and each successive
comma node was the RHS of its parent). Unfortunately, this construction
did not automatically propagate the flags of a comma node's children to
the comma node, since not all of each comma node's actual children were
available at the time it was constructed. Constructing the tree in
left-leaning fashion (i.e. the first comma node is the left-most child
and the final comma node is the root of the tree) allows the flag
propagation to be performed correctly by constrution.
Fixes VSO 297215.
Commit migrated from https://github.com/dotnet/coreclr/commit/
83a0f89cc1f0fcbe96a16299f5acc6b88c1a9f56
Pat Gavlin [Wed, 7 Dec 2016 18:17:44 +0000 (10:17 -0800)]
Merge pull request dotnet/coreclr#8503 from pgavlin/VSO289704
Remove a use of `gtGetOp` in earlyprop.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3895a36ed7387041ebb6dd677c7aa266e44e02f
Mike Danes [Wed, 7 Dec 2016 18:04:38 +0000 (20:04 +0200)]
Remove unused DepthLimitedQuickSort methods
These are never used in CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
e8946fbb3463b598a3f55e968d26cc7c2be6b98b
Mike Danes [Wed, 7 Dec 2016 17:38:02 +0000 (19:38 +0200)]
Change ArraySortHelper to use Comparison<T>
The Array/List.Sort overloads that take a Comparison<T> have worse performance than the ones that take a IComparer<T>. That's because sorting is implemented around IComparer<T> and a Comparison<T> needs to be wrapped in a comparer object to be used.
At the same time, interface calls are slower than delegate calls so the existing implementation doesn't offer the best performance even when the IComparer<T> based overloads are used.
By changing the implementation to use Comparison<T> we avoid interface calls in both cases.
When IComparer<T> overloads are used a Comparison<T> delegate is created from IComparer<T>.Compare, that's an extra object allocation but sorting is faster and we avoid having two separate sorting implementations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1cf86165849ffb0ab909078ef09f124f898f0461
Pat Gavlin [Wed, 7 Dec 2016 17:02:02 +0000 (09:02 -0800)]
Remove a use of `gtGetOp` in earlyprop.
Instead, use `GenTreeIndir::Addr`, as some indirections are not simple
operators.
Fixes VSO 289704.
Commit migrated from https://github.com/dotnet/coreclr/commit/
95de3a09c7adca51e1f56eb295cfb1b6e26801db
Evgeny Pavlov [Wed, 7 Dec 2016 16:48:30 +0000 (19:48 +0300)]
[x86/Linux][SOS] Get correct stack pointer from DT_CONTEXT (dotnet/coreclr#8500)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae3df538d3e36ee9d51a47ce6eb8d9c5c08a1008
Carol Eidt [Thu, 1 Dec 2016 03:31:58 +0000 (19:31 -0800)]
Use only lower floats for Vector3 dot and equality
For both dot product and comparisons that produce a boolean result, we need to use only the lower 3 floats. The bug was exposed by a case where the result of a call was being used in one of these operations without being stored to a local (which would have caused the upper bits to be cleared).
Fix dotnet/coreclr#8220
Commit migrated from https://github.com/dotnet/coreclr/commit/
0403e4d81f67a9abe61bf8637deff85b971381b7
Evgeny Pavlov [Wed, 7 Dec 2016 10:07:20 +0000 (13:07 +0300)]
[x86/Linux][SOS] Add definitions for CLR_CMAKE_PLATFORM_ARCH_I386 in CMakeLists.txt file of lldbplugin (dotnet/coreclr#8499)
Commit migrated from https://github.com/dotnet/coreclr/commit/
aa6cbc6e994298697900877636c34095bceeebc9
Jonghyun Park [Wed, 7 Dec 2016 09:54:54 +0000 (18:54 +0900)]
Move JIT_EndCatch from asmhelpers.asm into jithelp.asm (dotnet/coreclr#8492)
* Move JIT_EndCatch from asmhelpers.asm into jithelp.asm
The name of JIT_EndCatch suggests that it is a JIT helper, but its
implementation is inside asmhelpers.asm (not in jithelp.asm).
This commit moves its implementation into jithelp.asm.
* Move COMPlusEndCatch declaration
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb582352acec56cc9744cae32a34900d6de987ea
Jonghyun Park [Wed, 7 Dec 2016 06:37:07 +0000 (15:37 +0900)]
[x86/Linux] Port StubLinkerCPU::EmitSetup (dotnet/coreclr#8494)
This commit ports StubLinkerCPU::EmitSetup to x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
375948e39cf1a946b3d8048ca51cd4e548f94648
Brian Robbins [Wed, 7 Dec 2016 05:14:38 +0000 (21:14 -0800)]
Merge pull request dotnet/coreclr#8470 from brianrob/fix_lttng_header_detection
Fix building against liblttng-ust-dev 2.8+
Commit migrated from https://github.com/dotnet/coreclr/commit/
805363de5e8cdfa407a7fafcd4d53bb8733db887
Jonghyun Park [Wed, 7 Dec 2016 03:46:17 +0000 (12:46 +0900)]
[x86/Linux] Port asmhelpers.asm (dotnet/coreclr#8489)
This commit ports asmhelpers.asm to x86/Linux.
(CallRtlUnwind is currently marked as NYI)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c28ec8cd8b5ea4755f471f2e0d9836520735ffab
Jonghyun Park [Wed, 7 Dec 2016 03:41:44 +0000 (12:41 +0900)]
[x86/Linux] Port PATCH_LABEL macro (dotnet/coreclr#8483)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b490ed0122670c0764a8e5aa529a4a50e074090e
Swaroop Sridhar [Wed, 7 Dec 2016 01:17:21 +0000 (17:17 -0800)]
GcInfoEncoder: Initialize the BitArrays tracking liveness (dotnet/coreclr#8485)
The non-X86 GcInfoEncoder library uses two bit-arrays to keep track
of pointer-liveness. The BitArrays are allocated using the arena allocator
which doesn't zero-initialize them. This was causing non-deterministic
redundant allocation of unused slots. This change fixes the problem.
Commit migrated from https://github.com/dotnet/coreclr/commit/
12c3a063686c0c4f718a45c42480c4db04abeba7
Pat Gavlin [Wed, 7 Dec 2016 01:01:50 +0000 (17:01 -0800)]
Merge pull request dotnet/coreclr#8484 from pgavlin/VSO297113
Fix use edge iterator for DYN_BLK nodes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
41a92a370ef131be63ecb55105945ced0546fd83
Hyeongseok Oh [Wed, 7 Dec 2016 00:50:24 +0000 (09:50 +0900)]
fix comparison
Commit migrated from https://github.com/dotnet/coreclr/commit/
779bee20f98b35b3ac30b86b499d3375f6c13a8b
sivarv [Wed, 7 Dec 2016 00:19:55 +0000 (16:19 -0800)]
Fix to issue 8356.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdfe0ed89115ab8b52e7450c607701f5d6e31e75
Brian Robbins [Mon, 5 Dec 2016 04:16:29 +0000 (20:16 -0800)]
Fix building against liblttng-ust-dev 2.8+
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb2b31a94d817cadac14c421bc90739bd66e1bb2
Pat Gavlin [Tue, 6 Dec 2016 23:37:08 +0000 (15:37 -0800)]
Fix use edge iterator for DYN_BLK nodes.
Dynamic block nodes (i.e. DYN_BLK and STORE_DYN_BLK) are not standard
nodes. As such, the use order of their operands may be reordered in ways
that are not visible via the usual mechanisms. The use edge iterator was
not taking these mechanisms into account, which caused mismatches
between the use order observed by LSRA and the order observed by code
generation. This in turn caused SBCG under circumstances in which one
operand needed to be copied from e.g. esi to edi before another operand
was unspilled into esi.
Fixes VSO 297113.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdcf7fbde9aa473799b02c1ae4d61a463e67f7b8
Carol Eidt [Tue, 6 Dec 2016 22:31:09 +0000 (14:31 -0800)]
Merge pull request dotnet/coreclr#8466 from CarolEidt/Fix297074
Create Blk node for struct vararg
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc4bbf63fe9ffe21237eb7c44f354911df90edf3
Brian Sullivan [Tue, 6 Dec 2016 21:30:32 +0000 (13:30 -0800)]
Merge pull request dotnet/coreclr#8467 from briansull/vso-287663
Don't change a GT_DYN_BLK into a GT_BLK when the size is zero
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e0d836504e73f3d39701c0287893de9affe668b
Andy Ayers [Tue, 6 Dec 2016 19:12:30 +0000 (11:12 -0800)]
Merge pull request dotnet/coreclr#8263 from AndyAyersMS/InlineInlinePinvoke
JIT: enable inline pinvoke in more cases
Commit migrated from https://github.com/dotnet/coreclr/commit/
3de39408dc7f98c55c8ec0a9e4e79f6228642853
Brian Sullivan [Tue, 6 Dec 2016 01:06:40 +0000 (17:06 -0800)]
We should not transform a GT_DYN_BLK with a constant zero size into a GT_BLK as we do not support a GT_BLK of size zero.
Fixes VSO 287663
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e046fe3f79d4f352a36706cdb9a32a62af2339d
Pat Gavlin [Tue, 6 Dec 2016 17:14:06 +0000 (09:14 -0800)]
Merge pull request dotnet/coreclr#8464 from pgavlin/VSO297109
x86: Deactivate P/Invoke frames after a native call.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b19ac36f62620eac435e50993f36a8713a0aaf44
Pat Gavlin [Tue, 6 Dec 2016 17:01:36 +0000 (09:01 -0800)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
344da95319273c239162a0ac9c0d6ab590be7e77
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:44 +0000 (17:42 +0300)]
[x86/Linux][SOS] Fix DataTarget::GetPointerSize for x86 (dotnet/coreclr#8473)
Commit migrated from https://github.com/dotnet/coreclr/commit/
061fba83ca43a5f10b91380582c07b9a5d3af26c
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:15 +0000 (17:42 +0300)]
[x86/Linux][SOS] Disable ARM target support for xplat (dotnet/coreclr#8471)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e938d038c8afd856825944378301350cb261a795
Hyeongseok Oh [Tue, 6 Dec 2016 09:33:52 +0000 (18:33 +0900)]
fix semicolon
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee20b696b34118a55fad92d095e74f6e629efe18