platform/upstream/dotnet/runtime.git
6 years agoUpdate BuildTools, CoreFx, CoreSetup to preview1-03309-01, preview1-27009-06, preview...
dotnet-maestro-bot [Tue, 9 Oct 2018 22:05:22 +0000 (15:05 -0700)]
Update BuildTools, CoreFx, CoreSetup to preview1-03309-01, preview1-27009-06, preview1-27009-01, respectively (dotnet/coreclr#20316)

Commit migrated from https://github.com/dotnet/coreclr/commit/f70036bd68b9a21221f642895f993e67affce9c9

6 years agoDo not promote struct field with type mistmatch. (dotnet/coreclr#20085)
Sergey Andreenko [Tue, 9 Oct 2018 22:03:19 +0000 (15:03 -0700)]
Do not promote struct field with type mistmatch. (dotnet/coreclr#20085)

* Add a test that reads int field as double.

It fails in `void CodeGen::genCodeForStoreInd(GenTreeStoreInd* tree)`  on `assert(!varTypeIsFloating(targetType) || (targetType == data->TypeGet()));`.

* Fix for the previous test.

No asm diffs.

* Add a test that reads struct field as another struct type.

It fails with assert `Compiler::StructPromotionHelper::CheckFakedType` `assert(fakedFieldsMap.Lookup(fieldHnd));`.

* Fix the previous test.

Check that we promote with the same class.

* Add a test case for accessing an invalid offset.

It fails in `fgMorphStructField` with `noway_assert(fieldLclIndex != BAD_VAR_NUM);`.

* Fix the previous test.

Reject field promotion if offset is invalid. No asm diffs.

Commit migrated from https://github.com/dotnet/coreclr/commit/13dc153a7718a6d9297b757f5969c403856ef618

6 years agoSimplify next command output for build-test.sh (dotnet/coreclr#19903)
Bruce Forstall [Tue, 9 Oct 2018 22:00:59 +0000 (15:00 -0700)]
Simplify next command output for build-test.sh (dotnet/coreclr#19903)

Simplify next command output for build-test.sh

Commit migrated from https://github.com/dotnet/coreclr/commit/36c9dd8e269a9ca8da203622fccde98ce476ffaa

6 years agoMove ARM64 Windows boxen to be Helix-provisioned (dotnet/coreclr#20204)
Matt Galbraith [Tue, 9 Oct 2018 21:18:50 +0000 (14:18 -0700)]
Move ARM64 Windows boxen to be Helix-provisioned (dotnet/coreclr#20204)

Commit migrated from https://github.com/dotnet/coreclr/commit/8502d4da3f8767eda617bdcc40741cbac089e981

6 years agoUse runtest.cmd for arm(64) windows testing (dotnet/coreclr#20301)
Jarret Shook [Tue, 9 Oct 2018 21:17:49 +0000 (14:17 -0700)]
Use runtest.cmd for arm(64) windows testing (dotnet/coreclr#20301)

* Use runtest.cmd for arm(64) windows testing

* Correct archival

* Address pr feedback

* Correct containsKey to containsValue

* Change to just use contains

Commit migrated from https://github.com/dotnet/coreclr/commit/8965f930a5374aede9922766fb615a3fe2039827

6 years agoMerge pull request dotnet/coreclr#20129 from briansull/vn-add-exception-sets
Brian Sullivan [Tue, 9 Oct 2018 20:32:50 +0000 (13:32 -0700)]
Merge pull request dotnet/coreclr#20129 from briansull/vn-add-exception-sets

Full support for exception sets in value numbering.

Commit migrated from https://github.com/dotnet/coreclr/commit/22a92290ac488ad3187e0ba2c8d4f014f9b22e5c

6 years agoImprove performance of String.ToUpper and friends (dotnet/coreclr#20304)
Levi Broderick [Tue, 9 Oct 2018 19:07:43 +0000 (12:07 -0700)]
Improve performance of String.ToUpper and friends (dotnet/coreclr#20304)

Commit migrated from https://github.com/dotnet/coreclr/commit/f065e47164a707d7c5f314ca0059cd25d46dff43

6 years agoCleanup MSDN URL's (dotnet/corefxdotnet/coreclr#32663)
Sam Neirinck [Tue, 9 Oct 2018 18:59:36 +0000 (20:59 +0200)]
Cleanup MSDN URL's (dotnet/corefxdotnet/coreclr#32663)

* Fix non-https msdn links

* Additional HTTPS treatment

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/baa4f19a7158e31b7012ff2dafebfb5f1b1edee4

6 years agoAvoid building DebugFinalizableAsyncStateMachineBox unless necessary (dotnet/coreclr...
Stephen Toub [Tue, 9 Oct 2018 18:52:34 +0000 (14:52 -0400)]
Avoid building DebugFinalizableAsyncStateMachineBox unless necessary (dotnet/coreclr#20318)

Commit migrated from https://github.com/dotnet/coreclr/commit/efe3c451fbd2a788f51340c28cd36777ef60b49d

6 years ago[arm64] Fix GitHub 20211 Issue (dotnet/coreclr#20240)
Egor Chesakov [Tue, 9 Oct 2018 18:37:02 +0000 (11:37 -0700)]
[arm64] Fix GitHub 20211 Issue (dotnet/coreclr#20240)

Bug with lowering SIMDIntrinsicGetItem on ARM64 when INS_mov (move w/o sign-extension) was used to copy signed value from Vn.b[i] (or Vn.h[i]) to general register Wd (or Xd) instead of INS_smov (move with sign-extension).

Commit migrated from https://github.com/dotnet/coreclr/commit/8aebd79e8cc3820875457471a543a5fc7cbe0cc4

6 years agoClear unnecessary state from completed Tasks (dotnet/coreclr#20294)
Stephen Toub [Tue, 9 Oct 2018 17:44:12 +0000 (13:44 -0400)]
Clear unnecessary state from completed Tasks (dotnet/coreclr#20294)

When Tasks backed by delegates are created, an ExecutionContext is captured.  When the task completes, its delegate is being cleared, but its ExecutionContext is not, which means if the Task is subsequently kept alive (e.g. stored in a cache), so too is its ExecutionContext, which can capture an arbitrary amount of ambient state via async locals.  This commit augments the clearing of the delegate to similarly clear the ExecutionContext.

Related, async methods can also capture ExecutionContext when awaits yield, so this clears out that context as well.  And as long as we're doing that, we may as well also clear the state machine state, so that any hoisted locals in the state machine aren't kept alive if the resulting task is kept alive.  Not doing so previously was a conscious choice, in order to aid in debugging, but as we've heard of at least a couple of cases where it unexpectedly caused a leak, I'm going ahead and changing it.

Commit migrated from https://github.com/dotnet/coreclr/commit/39ab08433d9506a338f7e86e723e4d26b95430a1

6 years agoMerge pull request dotnet/coreclr#20078 from CarolEidt/Fix20063
Carol Eidt [Tue, 9 Oct 2018 16:57:03 +0000 (16:57 +0000)]
Merge pull request dotnet/coreclr#20078 from CarolEidt/Fix20063

Handle partial multireg COPY

Commit migrated from https://github.com/dotnet/coreclr/commit/fe00e42185494bb7f27590909d5013b3fc3bbfa7

6 years agoDisabled outdates corefx test (dotnet/coreclr#20315)
Jan Kotas [Tue, 9 Oct 2018 05:08:35 +0000 (22:08 -0700)]
Disabled outdates corefx test (dotnet/coreclr#20315)

Commit migrated from https://github.com/dotnet/coreclr/commit/20cbebbeb151acf901d686dc6beb3a51435edd3d

6 years agoRemove mentions of Rotor from codebase (dotnet/coreclr#20298)
Austin Wise [Tue, 9 Oct 2018 03:46:27 +0000 (20:46 -0700)]
Remove mentions of Rotor from codebase (dotnet/coreclr#20298)

* Moving parsing from TypeNameParser ctor to a separate method.

It seems a bit odd to have the constructor parsing and then use
a dummy method (MakeRotorHappy) to make it look more normal.

* Remove CorMarkThreadInThreadPool.

It is neither referenced nor exported.

* Remove reference to rotor from securitywrapper.h

* Remove reference to rotor from Strike/vm.cpp.

This file is only built for Windows.

* Remove reference to rotor from debugreturn.h

This is the only file the defines these macros, so there is no need to
undef them first.

* Remove unused code refering to rotor from PAL.

* Remove references to Rotor from PAL.

* Remove references to deleted tests from DisabledTests.txt

I can't find any evidence that this file is actually used.

* Remove unneeded casts.

* Remove dead and misleading code from profilinghelper.cpp.

FEATURE_PROFAPI_EVENT_LOGGING is always defined when PROFILING_SUPPORTED
is defined. And the entire contents of profilinghelper.cpp is surrounded
with "ifdef PROFILING_SUPPORTED". So all sections in
"ifndef FEATURE_PROFAPI_EVENT_LOGGING" are dead.

Furthermore, in coreclr this does not use the eventlog, so the macro name
is misleading.

* Remove dead code in excep.cpp.

This entire function is surrounded with "ifndef FEATURE_PAL".

* Remove refererences to rotor from safemath.h

This does not appear to cause any compile problems, so nobody was using
safemath.h without _ASSERTE defined.

Also S_SIZE_T_WP64BUG is not used anywhere.

* Remove dead code from palclr.h.

I don't know why these check to see if the macro is undefined immediately
after defining them.

Also the comment appears to reference some unions that are no longer in
this file.

* Expose ISymUnmanagedWriter2 from SymWriter as required by COM.

The comment talks about the C# compiler using this, however I cannot see
a way for the C# compiler to get an instance of this. It is only used
internally by AssemblyBuilder and not exposed otherwise.

* Restore check for _ASSERTE in safemath.h.

On Windows sometimes that this file is included without
_ASSERTE being defined. As the existing comment suggests, it appears
that SOS explicitly does not want _ASSERTE to do anything.

Commit migrated from https://github.com/dotnet/coreclr/commit/3f40e5280e376a01cc06f921b01f68319aa10ecc

6 years agoDocument describing upcoming object stack allocation work. (dotnet/coreclr#20251)
Eugene Rozenfeld [Mon, 8 Oct 2018 23:25:44 +0000 (16:25 -0700)]
Document describing upcoming object stack allocation work. (dotnet/coreclr#20251)

Commit migrated from https://github.com/dotnet/coreclr/commit/913428d5915a9729c9405f57a75e7f912f9d29a5

6 years agoMerge pull request dotnet/coreclr#20289 from echesakovMSFT/FixBitOperationsInstructio...
Egor Chesakov [Mon, 8 Oct 2018 22:26:05 +0000 (15:26 -0700)]
Merge pull request dotnet/coreclr#20289 from echesakovMSFT/FixBitOperationsInstructionEncodingFormat

[arm64] Use IF_DR_2G for "Bit Operations" (IF_EN2L)

Commit migrated from https://github.com/dotnet/coreclr/commit/7ba5381b95a88417034e04156da5967ab20b4e02

6 years agoJIT: retrieve element class for arrays of ref types (dotnet/coreclr#20292)
Andy Ayers [Mon, 8 Oct 2018 20:15:36 +0000 (13:15 -0700)]
JIT: retrieve element class for arrays of ref types (dotnet/coreclr#20292)

Allows element-typed based optimizations for some array cases, say
virtual calls through a `string[]`.

Commit migrated from https://github.com/dotnet/coreclr/commit/bcc4cec7646f0df99c5a83e3dd72ec2d39e0ee01

6 years agoUpdate BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-03307...
dotnet-maestro-bot [Mon, 8 Oct 2018 19:02:23 +0000 (12:02 -0700)]
Update BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-03307-03, preview1-27008-04, preview1-27008-04, preview1-27008-01, master-20181008-0042, master-20181008-0040, respectively (dotnet/coreclr#20254)

Commit migrated from https://github.com/dotnet/coreclr/commit/9074e9d781ecaa0e9f58f09fc738fe52e4d7cfb0

6 years agoMerge pull request dotnet/coreclr#20210 from fiigii/lastavx2
Carol Eidt [Mon, 8 Oct 2018 16:38:31 +0000 (16:38 +0000)]
Merge pull request dotnet/coreclr#20210 from fiigii/lastavx2

 Implement the remaining AVX2 intrinsic

Commit migrated from https://github.com/dotnet/coreclr/commit/426b9f89e45993db52e4d1b87111907ad5b78b4a

6 years agoRuntest.py on Windows Arm(64) (dotnet/coreclr#20227)
Jarret Shook [Mon, 8 Oct 2018 16:25:16 +0000 (09:25 -0700)]
Runtest.py on Windows Arm(64) (dotnet/coreclr#20227)

* Initial infrastructure work to get arm(64) runtest.cmd working

* Add excludes and improve runtest.py

1) Adds a build_test_wrappers only to build-test.sh.
2) Adds arm64 windows excludes
3) Adds printlastresults to runtest.cmd
4) corrects runsequential in runtest.sh
5) Corrects SequentialRun in runtest.py
6) Minor improvements to printing test results and copying native test binaries

* Address pr feedback

* Add to issues targets for arm64

* Working Pri 0 testing.

* Remove unecessary common msbuild arguments

* add pri1 excludes

* Remove common msbuild args

* Fix silly python3 issue

Commit migrated from https://github.com/dotnet/coreclr/commit/dbf0bf11d120b2f7837ba767a7836b44474c82a5

6 years agoFix SegmentInitialize for OS_PAGE_SIZE > 4k (dotnet/coreclr#20280)
Jan Vorlicek [Mon, 8 Oct 2018 13:49:40 +0000 (15:49 +0200)]
Fix SegmentInitialize for OS_PAGE_SIZE > 4k (dotnet/coreclr#20280)

The function was incorrectly rounding the dwCommit down instead of up
to OS_PAGE_SIZE. It accidentally works for OSes where page size is 4096
bytes, because the dwCommit is 4096. But for ARM64 Linux distros where
the page size is 64kB, this was committing zero bytes and so the runtime
initialization was crashing a bit later when it tried to access the
memory it was supposed to be commited.

This problem was introduced in dotnet/coreclr#17769.

Commit migrated from https://github.com/dotnet/coreclr/commit/340b5708ce38230f1af66acf832547996aa0b2ff

6 years agoRemove mention of rotor from comments (dotnet/coreclr#20297)
Austin Wise [Mon, 8 Oct 2018 03:16:45 +0000 (20:16 -0700)]
Remove mention of rotor from comments (dotnet/coreclr#20297)

* Remove old reference to Rotor in documentation.

All remaining references relate to rotor's role in CoreCLR history.

* Remove rotor comment from enummem.cpp.

I can find no evidence that the presence of g_pStressLog is conditional
on FEATURE_PAL being defined.

* Remove old todo, DbgDllMain looks for thread detach.

* Update nativepipeline.h comment refernce to rotor.

All unix-like systems except android have FEATURE_DBGIPC_TRANSPORT_DI
defined, hence "most unix-like platforms".

* Update some comments to not refer to Rotor.

* Remove some more references to Rotor from comments.

* Remove old comment.

Though maybe this macro should be removed and everywhere use the & operator.
It appears there are only two places that use this macro.

Commit migrated from https://github.com/dotnet/coreclr/commit/e57c4fb8ff2346d5420247183b9af2b83184516c

6 years agoRemove some dead remoting and context static things (dotnet/coreclr#20277)
Austin Wise [Mon, 8 Oct 2018 01:58:10 +0000 (18:58 -0700)]
Remove some dead remoting and context static things (dotnet/coreclr#20277)

* Remove IsRemotingIntercepted methods that always return false.

* Remove GetOptionalMembersAllocationSize parameters that are always false.

* Remove references to context static.

Remove references in comments and methodnames.

* Remove RemotingVtsInfo.

Commit migrated from https://github.com/dotnet/coreclr/commit/eeef1c1379b9f49261f66093b355ac8c12e47485

6 years agoUpdate buildtools to v3 (dotnet/coreclr#20286)
Viktor Hofer [Sun, 7 Oct 2018 19:21:09 +0000 (21:21 +0200)]
Update buildtools to v3 (dotnet/coreclr#20286)

Commit migrated from https://github.com/dotnet/coreclr/commit/645faa5b24c32741944cad55f58fd66d6c8abfa4

6 years agoTypos (dotnet/corefxdotnet/coreclr#32625)
John Doe [Fri, 5 Oct 2018 00:25:37 +0000 (17:25 -0700)]
Typos (dotnet/corefxdotnet/coreclr#32625)

* Obejct -> Object

* Oberserver -> Observer

* objetcs -> objects

* observeable -> observable

* obsolated -> obsoleted

* occour -> occur

* occurance -> occurrence

* occures -> occurs

* occuring -> occurring

* occurrance -> occurrence

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/6f66b1e068e83b694d92e9c2103fc7292a6e03e7

6 years agoJIT: make sure to use normalized type when retyping box temp (dotnet/coreclr#20285)
Andy Ayers [Sat, 6 Oct 2018 18:05:24 +0000 (11:05 -0700)]
JIT: make sure to use normalized type when retyping box temp (dotnet/coreclr#20285)

Take advantage of the fact that `lvaSetStruct` figures out the right
type to use in the IR.

Fixes first part of dotnet/coreclr#20260.

Commit migrated from https://github.com/dotnet/coreclr/commit/8e880c667e999aa7d9da8d7ea30c2db92e419ba0

6 years agoMove BinaryPrimitives into coreclr shared source (dotnet/coreclr#20288)
Levi Broderick [Sat, 6 Oct 2018 14:58:51 +0000 (07:58 -0700)]
Move BinaryPrimitives into coreclr shared source (dotnet/coreclr#20288)

Commit migrated from https://github.com/dotnet/coreclr/commit/6b412b2eab5c06499c66553beffbd3f3c12d3ed7

6 years agoAdd BSTR xplat PInvoke testcase (dotnet/coreclr#20231)
Luqun Lou [Sat, 6 Oct 2018 02:07:48 +0000 (19:07 -0700)]
Add BSTR xplat PInvoke testcase (dotnet/coreclr#20231)

Commit migrated from https://github.com/dotnet/coreclr/commit/2676f267394392f49611811d488667ea081f2e2c

6 years agoImprove performance of span-based ToUpper and related APIs (dotnet/coreclr#20275)
Levi Broderick [Sat, 6 Oct 2018 02:04:58 +0000 (19:04 -0700)]
Improve performance of span-based ToUpper and related APIs (dotnet/coreclr#20275)

Commit migrated from https://github.com/dotnet/coreclr/commit/e16ff0bb0426ec02ea29a543ce500f197f7dbf2c

6 years agoUpdate the dllmap design doc (6)
annaaniol [Fri, 7 Sep 2018 17:02:21 +0000 (10:02 -0700)]
Update the dllmap design doc (6)

Commit migrated from https://github.com/dotnet/coreclr/commit/675ad93afd67ba03513c7c6cb17e5fbceada5be9

6 years agoUpdate the dllmap design doc (5)
annaaniol [Fri, 7 Sep 2018 00:41:51 +0000 (17:41 -0700)]
Update the dllmap design doc (5)

Commit migrated from https://github.com/dotnet/coreclr/commit/ffd336585f67a90853f802c201e6580661f4df51

6 years agoUpdate the dllmap design doc (4)
annaaniol [Thu, 23 Aug 2018 15:52:34 +0000 (08:52 -0700)]
Update the dllmap design doc (4)

Commit migrated from https://github.com/dotnet/coreclr/commit/683663b8401432a938822a13de0538300aa3e158

6 years agoUpdate the dllmap design doc (3)
annaaniol [Mon, 13 Aug 2018 20:58:06 +0000 (13:58 -0700)]
Update the dllmap design doc (3)

Commit migrated from https://github.com/dotnet/coreclr/commit/cfd39bdb4ddfa9ced1297c21d8be68951398d1f2

6 years agoUpdate the dllmap design doc (2)
annaaniol [Sat, 11 Aug 2018 00:32:38 +0000 (17:32 -0700)]
Update the dllmap design doc (2)

Commit migrated from https://github.com/dotnet/coreclr/commit/0d65fc16b7e379488b4bf8de5051637674d92bcb

6 years agoUpdate the dllmap design doc
annaaniol [Fri, 10 Aug 2018 01:24:02 +0000 (18:24 -0700)]
Update the dllmap design doc

Commit migrated from https://github.com/dotnet/coreclr/commit/71a5d5b8c36995f6c35a688832f5e7a6a379bee8

6 years agoAdd a dllmap design document
annaaniol [Thu, 9 Aug 2018 01:41:12 +0000 (18:41 -0700)]
Add a dllmap design document

Commit migrated from https://github.com/dotnet/coreclr/commit/8aab4f28a6e4f7f566524ac556b7e32c4082e7a1

6 years agoRefactoring of struct promotion code for the future fix. (dotnet/coreclr#20216)
Sergey Andreenko [Sat, 6 Oct 2018 00:07:41 +0000 (17:07 -0700)]
Refactoring of struct promotion code for the future fix. (dotnet/coreclr#20216)

Create StructPromotionHelper.

* Add the check for promoted fields with changed type.

`CanPromoteStructType` can fake a field type if the field type is "structs of a single field of scalar types aligned at their natural boundary.". Add a check in debug that when we morph struct field access we have an expected type in the field handle.

Commit migrated from https://github.com/dotnet/coreclr/commit/768911897f0921ef77ef991088359d248cb99613

6 years agoEnable Config-File Based Control of EventPipe (dotnet/coreclr#20238)
Brian Robbins [Fri, 5 Oct 2018 23:44:15 +0000 (16:44 -0700)]
Enable Config-File Based Control of EventPipe (dotnet/coreclr#20238)

Commit migrated from https://github.com/dotnet/coreclr/commit/457148064c836daa746542f1559b7958d6420c22

6 years agoAdd tests for AVX2 and new intrinsic
Fei Peng [Fri, 5 Oct 2018 22:54:05 +0000 (15:54 -0700)]
Add tests for AVX2 and new intrinsic

Commit migrated from https://github.com/dotnet/coreclr/commit/54af6bd370c1a93f6bc4041f06822a247f4b6f9a

6 years agoUse IF_DR_2G for "Bit Operations" (IF_EN2L) in src/jit/emitarm64.cpp
Egor Chesakov [Fri, 5 Oct 2018 22:38:49 +0000 (15:38 -0700)]
Use IF_DR_2G for "Bit Operations" (IF_EN2L) in src/jit/emitarm64.cpp

Commit migrated from https://github.com/dotnet/coreclr/commit/ddfd8db0d18f916f87feb2b2fe562d5f6b88e6d8

6 years agoAdded method header comments in optcse describing the algorithm
Brian Sullivan [Fri, 5 Oct 2018 22:37:57 +0000 (15:37 -0700)]
Added method header comments in optcse describing the algorithm

Commit migrated from https://github.com/dotnet/coreclr/commit/a552cfef25aaad7685e8b0e1968f8b8293be5314

6 years agoFull support for exception sets in value numbering.
Brian Sullivan [Tue, 25 Sep 2018 20:06:24 +0000 (13:06 -0700)]
Full support for exception sets in value numbering.

New method that add exception sets:
  fgValueNumberAddExceptionSet
  - fgValueNumberAddExceptionSetForIndirection
  - fgValueNumberAddExceptionSetForDivision
  - fgValueNumberAddExceptionSetForOverflow
  - fgValueNumberAddExceptionSetForCkFinite

Refactoring work added methods:
 VNEvalShouldFold - method to decide if constant folding should be performed
 EvalUsingMathIdentity - Uses math identities to simplify value number exoressions
 Renamed fgValueNumberHelperMethVNFunc to fgValueNumberJitHelperMethodVNFunc

Removed the suffixes from the method headers comments

Commit migrated from https://github.com/dotnet/coreclr/commit/4a6f0c8f0c706c3a5ed5e98feeca80de1da57b5d

6 years agoReport instantiation argument in non-virtual interface calls (dotnet/coreclr#20257)
Michal Strehovský [Fri, 5 Oct 2018 10:51:06 +0000 (12:51 +0200)]
Report instantiation argument in non-virtual interface calls (dotnet/coreclr#20257)

The existing code would incorrectly inhibit codegen from generating instantiation argument in non-virtual calls to default interface methods (i.e. those that can happen with the `base` syntax in C#).

Fixes dotnet/coreclr#16775.

Commit migrated from https://github.com/dotnet/coreclr/commit/27c848e37e9998142b60e776cf5b5d08a3543fe1

6 years agoTypos (dotnet/coreclr#20271)
John Doe [Fri, 5 Oct 2018 01:56:04 +0000 (18:56 -0700)]
Typos (dotnet/coreclr#20271)

* oportunistically -> opportunistically

* oppportunity -> opportunity

* Oppporunity -> Opportunity

* optinal -> optional

* optimisitic -> optimistic

* optionaly -> optionally

* origianl -> original

* orignally -> originally

* otheriwse -> otherwise

* otherrwise -> otherwise

Commit migrated from https://github.com/dotnet/coreclr/commit/af0c1f287d31ca3a641151df60baa7371635f508

6 years agoRemove context statics stuff (dotnet/coreclr#20256)
Jan Vorlicek [Fri, 5 Oct 2018 01:08:51 +0000 (03:08 +0200)]
Remove context statics stuff (dotnet/coreclr#20256)

* Remove context statics stuff part 1

This change removes all context statics stuff from the runtime since
context statics are not supported and this code was obsolete.

* Remove context statics stuff from the debugger code

Commit migrated from https://github.com/dotnet/coreclr/commit/da6498e6c1013dd38d33e782bc777bd89aa0f0ee

6 years agoSynchronize access to static variable call_count (dotnet/coreclr#20259)
Jonathan Marler [Fri, 5 Oct 2018 01:08:22 +0000 (19:08 -0600)]
Synchronize access to static variable call_count (dotnet/coreclr#20259)

call_count is a static variable that is being read/modified and written to without any synchronization. Fortunately, a critical section is already available that can be leveraged to synchronize access to it.

Commit migrated from https://github.com/dotnet/coreclr/commit/7f59d17e2741e69bf878b8b168828de3a0a3d12e

6 years agoAdd printing of LoaderAllocator to MethodTable in SOS (dotnet/coreclr#20255)
Jan Vorlicek [Fri, 5 Oct 2018 00:11:35 +0000 (02:11 +0200)]
Add printing of LoaderAllocator to MethodTable in SOS (dotnet/coreclr#20255)

This change adds printing of LoaderAllocator to MethodTable dump in SOS
for collectible types.

Commit migrated from https://github.com/dotnet/coreclr/commit/957eceed83cf635fc3146eadc448bf50efde5431

6 years agoR2RDump fixes for dumping method instance entrypoint table (dotnet/coreclr#20243)
Tomáš Rylek [Thu, 4 Oct 2018 19:29:24 +0000 (21:29 +0200)]
R2RDump fixes for dumping method instance entrypoint table (dotnet/coreclr#20243)

R2RDump fixes for dumping method instance entrypoint table

While investigating Michal's unit test demonstrating a bug in the
CPAOT compiler I found out that R2RDump is broken in multiple
aspects w.r.t. instantiated methods. Parsing of the method
signatures in the instance entrypoint table was just broken
and the R2RMethod was duplicating parts of the signature decoding
and name formatting process.

I created a new flag "normalize" that requests normalization of various R2R
tables in the dump aimed at improving diff quality. I have also
noticed and fixed somewhat weird formatting of method signatures.
As a slight cleanup I have lumped the various dump flags into
a helper class DumpOptions. Last but not least I have renamed "Canon"
to "__Canon".

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/030e0af89bb897554acef575075c69aaf5176268

6 years agoMerge pull request dotnet/coreclr#20252 from steveharter/FixIsAssignableFrom
Steve Harter [Thu, 4 Oct 2018 15:26:11 +0000 (10:26 -0500)]
Merge pull request dotnet/coreclr#20252 from steveharter/FixIsAssignableFrom

Fix compat issue with Type.IsAssignableFrom

Commit migrated from https://github.com/dotnet/coreclr/commit/e43bc521df71513061c7194efc4af4c70a1b9b42

6 years agoEnable thread statics for collectible classes (dotnet/coreclr#19944)
Jan Vorlicek [Thu, 4 Oct 2018 08:26:06 +0000 (10:26 +0200)]
Enable thread statics for collectible classes (dotnet/coreclr#19944)

* Enable thread statics for collectible classes

This change removes checks that were preventing usage of thread statics
in collectible classes and also implements all the necessary changes.
The handles that hold arrays with thread statics are allocated from
LoaderAllocator for collectible classes instead of using the global
strong handle like in the case of non-collectible classes.
The change very much mimics what is done for regular statics.

This change also adds ability to reuse freed handles to the
LoaderAllocator handle table. Freed handle indexes are stored into a
stack and when a new handle allocation is requested, the indices from
this stack are used first.
Due to the code path from which the FreeTLM that in turn frees the
handles is called, I had to modify the critical section flags and also
refactor the handle allocation so that the actual managed array
representing the handle table is allocated out of the critical section.
When I was touching the code, I have also moved the code that was
dealing with handles that are not stored in the LoaderAllocator handle
tables out of the critical section, since there is no point in having it
inside of it.

Commit migrated from https://github.com/dotnet/coreclr/commit/7559844bbe9e4230217a9a9cf4be8a857531c8c8

6 years agoRemove AppDomain unload (dotnet/coreclr#20250)
Jan Vorlicek [Thu, 4 Oct 2018 08:18:23 +0000 (10:18 +0200)]
Remove AppDomain unload (dotnet/coreclr#20250)

* Remove AppDomain unload

This change removes all code in AppDomain that's related to AppDomain
unloading which is obsolete in CoreCLR. It also removes all calls to the
removed methods.
In few places, I have made the change simpler by taking into account the
fact that there is always just one AppDomain.

Commit migrated from https://github.com/dotnet/coreclr/commit/11832401739148f1f1e9419cb51180ba5263a41b

6 years agoMerge pull request dotnet/coreclr#20235 from BruceForstall/Disable19361
Bruce Forstall [Thu, 4 Oct 2018 03:16:28 +0000 (20:16 -0700)]
Merge pull request dotnet/coreclr#20235 from BruceForstall/Disable19361

Disable GitHub_19361 for Linux arm64

Commit migrated from https://github.com/dotnet/coreclr/commit/0068168531e849cbad8388f00f3f23e58d3a01b4

6 years agoUpdate CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-27003-01, preview1...
dotnet-maestro-bot [Thu, 4 Oct 2018 02:38:12 +0000 (19:38 -0700)]
Update CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-27003-01, preview1-27003-02, preview1-27003-01, master-20181003-0045, master-20181003-0040, respectively (master) (dotnet/coreclr#20241)

* Update CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-27003-01, preview1-27003-02, preview1-27003-01, master-20181003-0045, master-20181003-0040, respectively

* Disabled outdated tests

Commit migrated from https://github.com/dotnet/coreclr/commit/209bca9c6caf59bc60bffd16a8da5c67c6d6138b

6 years agoFix compat issue with Type.IsAssignableFrom
Steve Harter [Wed, 3 Oct 2018 22:52:31 +0000 (17:52 -0500)]
Fix compat issue with Type.IsAssignableFrom

Commit migrated from https://github.com/dotnet/coreclr/commit/4d227d6f1d3a6032bde52af47099471c38f22840

6 years agoImplement the remaining AVX2 intrinsic
Fei Peng [Tue, 2 Oct 2018 00:13:02 +0000 (17:13 -0700)]
Implement the remaining AVX2 intrinsic

Commit migrated from https://github.com/dotnet/coreclr/commit/2689806563fb88c342a037c7da3aba72d43d30e6

6 years agoFix AVX2 intrinsic doc
Fei Peng [Tue, 2 Oct 2018 00:08:55 +0000 (17:08 -0700)]
Fix AVX2 intrinsic doc

Commit migrated from https://github.com/dotnet/coreclr/commit/e66c71b5dbc84f016e9ca542690d7853d9bbb1af

6 years agoMerge pull request dotnet/coreclr#20173 from fiigii/retest
Carol Eidt [Wed, 3 Oct 2018 21:18:47 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#20173 from fiigii/retest

Optimize some SSE2 intrinsic importation and re-enable tests

Commit migrated from https://github.com/dotnet/coreclr/commit/bac49ea2198a958f018c8a6b0fb4c1c07561042b

6 years agoreport the entire generation table in EnumWksGlobalMemoryRegions and EnumSvrGlobalMem...
David Mason [Wed, 3 Oct 2018 19:52:32 +0000 (12:52 -0700)]
report the entire generation table in EnumWksGlobalMemoryRegions and EnumSvrGlobalMemoryRegions (dotnet/coreclr#20233)

Commit migrated from https://github.com/dotnet/coreclr/commit/d4b291c10ace6baf35d2c7b45f50f98d6cea4060

6 years agoSupport building cross-architecture components on armel (dotnet/coreclr#20190)
Egor Chesakov [Wed, 3 Oct 2018 17:21:23 +0000 (10:21 -0700)]
Support building cross-architecture components on armel (dotnet/coreclr#20190)

Commit migrated from https://github.com/dotnet/coreclr/commit/48a8c74e355fad5c1a569b131f4038218c98dfee

6 years agoMarshal blittable structs via memcpy even if nested within non-blittable struct ...
Jeremy Koritzinsky [Wed, 3 Oct 2018 16:32:34 +0000 (09:32 -0700)]
Marshal blittable structs via memcpy even if nested within non-blittable struct (dotnet/coreclr#20194)

* Add regression test for dotnet/coreclrdotnet/coreclr#18521.

* Add custom marshaler for fixed buffers that acts as a scalar memory copy of the length of the fixed buffer.

* Remove regression test. Moving it to a unit test in corefx.

* Move attribute class name into classnames.h

* Remove unreachable code left over from debugging.

* Marshal fixed buffers by reusing the field marshaler of the single field to pretend that there are multiple fields consecutively in the structure.

* Remove now-dead code paths.

* Use initializers in FieldMarshaler_NestedValueClass constructor where appropriate.

* Clean up IsFixedBuffer implementation.

* Remove unused GC_PROTECTs.

* Specifically check that the attribute exists, not just that there wasn't an error.

* Fix missing else statement.

* Add asserts so we don't corrupt the heap.

* Add unit test for masked bug (incorrect native size of structure calculated).

* Don't use new behavior on non-blittable fixed buffers.

* Revert "Add unit test for masked bug (incorrect native size of structure calculated)."

This reverts commit dotnet/coreclr@496eef5906638c3c2696ede0d922a5e707447b4e.

* Use memcpy instead of field emulation.

* Remove unused forward-declared class.

* Clean up code. Refactor one GetMethodTable call I missed.

* Remove now-unneeded custom attribute includes. More diff cleanup.

* Remove unneeded FixedBufferAttribute define.

Commit migrated from https://github.com/dotnet/coreclr/commit/302630ed5a3730470e9ffeeebcd38c737c03963d

6 years agoAdd MethodImplOptions.AggressiveOptimization and use it for tiering (dotnet/coreclr...
Koundinya Veluri [Wed, 3 Oct 2018 15:52:40 +0000 (08:52 -0700)]
Add MethodImplOptions.AggressiveOptimization and use it for tiering (dotnet/coreclr#20009)

Add MethodImplOptions.AggressiveOptimization and use it for tiering

Part of fix for https://github.com/dotnet/corefx/issues/32235
Workaround for https://github.com/dotnet/coreclr/issues/19751
- Added and set CORJIT_FLAG_AGGRESSIVE_OPT to indicate that a method is flagged with AggressiveOptimization
- For a method flagged with AggressiveOptimization, tiering uses a foreground tier 1 JIT on first call to the method, skipping the tier 0 JIT and call counting
- When tiering is disabled, a method flagged with AggressiveOptimization does not use r2r-pregenerated code
- R2r crossgen does not generate code for a method flagged with AggressiveOptimization

Commit migrated from https://github.com/dotnet/coreclr/commit/b68296ce2c56188cf2a7bd263903e27c67717702

6 years agoPDF link wasn't working (dotnet/coreclr#20242)
Paresh [Wed, 3 Oct 2018 09:49:27 +0000 (15:19 +0530)]
PDF link wasn't working (dotnet/coreclr#20242)

Correct pdf link

Commit migrated from https://github.com/dotnet/coreclr/commit/50567db6e3851f4c4680771424a354e2258333b4

6 years agoFix X86 disassembly and a bug regarding ExportedTypes in R2RDump (dotnet/coreclr...
Tomáš Rylek [Wed, 3 Oct 2018 00:04:51 +0000 (02:04 +0200)]
Fix X86 disassembly and a bug regarding ExportedTypes in R2RDump (dotnet/coreclr#20230)

1) X86 CoreDisTools disassembler has a bug in decoding absolute
indirections, interpreting them as RIP-relative offsets. I have
reused the logic that's already in place for patching X64
RIP-relative addresses to take care of this additional case.

2) the CoreDisTools disassembly apparently only produces newline
(0A) characters that don't work well in Notepad and other viewers;
I have forcibly replaced them with the platform newline separator.

3) I hit a bug in available type decoding - the logic wasn't
properly checking whether the type is exported or not.

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/31955025defa95915c0532773dbf5cb4a932953a

6 years agoMerge pull request dotnet/coreclr#20237 from BruceForstall/MakeInnerloopArm64DefaultT...
Bruce Forstall [Tue, 2 Oct 2018 23:50:08 +0000 (16:50 -0700)]
Merge pull request dotnet/coreclr#20237 from BruceForstall/MakeInnerloopArm64DefaultTriggered

Change the innerloop arm64 Linux jobs to be default triggered

Commit migrated from https://github.com/dotnet/coreclr/commit/d9ac5ad482510ed944315b847e1a587816553b1c

6 years agoChange the innerloop arm64 Linux jobs to be default triggered
Bruce Forstall [Tue, 2 Oct 2018 22:05:54 +0000 (15:05 -0700)]
Change the innerloop arm64 Linux jobs to be default triggered

The two innerloop jobs had been push triggered, to see how the
jobs behave in the system. They have been pretty stable, so
change to make them default triggered.

Commit migrated from https://github.com/dotnet/coreclr/commit/b31168a4bb56d627792f5f1d85fd5e7ec55a7d0d

6 years agoDisable GitHub_19361 for Linux arm64
Bruce Forstall [Tue, 2 Oct 2018 21:36:46 +0000 (14:36 -0700)]
Disable GitHub_19361 for Linux arm64

Tracking: dotnet/coreclr#20232

Commit migrated from https://github.com/dotnet/coreclr/commit/5e4d050285d1b8fdc93292b482cdf3d07fd7c24b

6 years agoAdd Bionic to sources.list for cross (dotnet/coreclr#20202)
Raul Hidalgo Caballero [Tue, 2 Oct 2018 21:25:18 +0000 (23:25 +0200)]
Add Bionic to sources.list for cross (dotnet/coreclr#20202)

Commit migrated from https://github.com/dotnet/coreclr/commit/d112e78bb863cb22d2f0600fbbb8288ce8fc8ab5

6 years agoMerge pull request dotnet/coreclr#20203 from AndyAyersMS/FixGtIndexAddrTest
Andy Ayers [Tue, 2 Oct 2018 20:01:30 +0000 (13:01 -0700)]
Merge pull request dotnet/coreclr#20203 from AndyAyersMS/FixGtIndexAddrTest

Fix test for GT_INDEX_ADDR to forcibly compile with minopts

Commit migrated from https://github.com/dotnet/coreclr/commit/d9bfde1b88bb4d7d0d1bf024a192b13bf7405f82

6 years agoMerge pull request dotnet/coreclr#20193 from fiigii/addbc
Carol Eidt [Tue, 2 Oct 2018 16:35:39 +0000 (09:35 -0700)]
Merge pull request dotnet/coreclr#20193 from fiigii/addbc

Add pointer overloads for Avx2.BroadcastScalarToVector256

Commit migrated from https://github.com/dotnet/coreclr/commit/3552e51d9faa3bbd032e4dbd7d36d804ec5679f8

6 years agoStop updating gtRsvdRegs before LSRA (dotnet/coreclr#20136)
mikedn [Tue, 2 Oct 2018 02:54:06 +0000 (05:54 +0300)]
Stop updating gtRsvdRegs before LSRA (dotnet/coreclr#20136)

Commit migrated from https://github.com/dotnet/coreclr/commit/080617e1c74c3d498a6013684c939709ecaf5646

6 years agoMerge pull request dotnet/coreclr#20201 from jkotas/update-lst
Bruce Forstall [Mon, 1 Oct 2018 21:41:37 +0000 (14:41 -0700)]
Merge pull request dotnet/coreclr#20201 from jkotas/update-lst

Delete removed tests from Tests.lst

Commit migrated from https://github.com/dotnet/coreclr/commit/232c9e9c8f2e5e341f68ce57adbaaa96edbe5596

6 years agoFix test for GT_INDEX_ADDR to forcibly compile with minopts
Andy Ayers [Mon, 1 Oct 2018 18:53:21 +0000 (11:53 -0700)]
Fix test for GT_INDEX_ADDR to forcibly compile with minopts

Update test introduced in dotnet/coreclr#20047 so that the key method `ReadBytes` is compiled
with minopts by default.

Commit migrated from https://github.com/dotnet/coreclr/commit/80334f6ed542a79aefc61f6f1ca25dc4a5755fb3

6 years agoAdd back ExeFile directory for non-Windows (dotnet/coreclr#20192)
Luqun Lou [Mon, 1 Oct 2018 16:47:14 +0000 (09:47 -0700)]
Add back ExeFile directory for non-Windows (dotnet/coreclr#20192)

Commit migrated from https://github.com/dotnet/coreclr/commit/ffe1cd63154b4681fea7bb4429c8f5b23958017d

6 years agoDelete removed tests from Tests.lst
Jan Kotas [Sun, 30 Sep 2018 15:24:01 +0000 (08:24 -0700)]
Delete removed tests from Tests.lst

Commit migrated from https://github.com/dotnet/coreclr/commit/7f0ffe7b3527cc47fe07875584ed155d423a9748

6 years agoImprove Guid parsing performance (dotnet/coreclr#20183)
Stephen Toub [Sat, 29 Sep 2018 23:12:48 +0000 (19:12 -0400)]
Improve Guid parsing performance (dotnet/coreclr#20183)

* Improve Guid parsing performance

Significantly improves the performance of parsing all Guid number styles, primarily by avoiding using the StringToInt core helper that was used previously to parse each of the consistuent components, as well as avoiding some unnecessary searches of the strings in order to determine which format is employed.

I kept strong compatibility with the existing implementation, down to what exceptions are thrown when (even when they’re a bit strange).  However, there are a few cases where the error messages in those exceptions differ from what they previously were, due to ambiguities, and IMO it not being worth making the implementation slower to try to maintain the exact same choice.  For example, the string “{0xdddddddd, 0xdddd 0xdddd,{0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd}}” isn’t parsable, because it’s missing a comma between the second and third components, and with whitespace removed the parser will try to parse “0xdddd0xdddd” and fail to do so.  Previously that would result in an error message “Additional non-parsable characters are at the end of the string”, and now it’ll result in an error message “Guid string should only contain hexadecimal characters.”  Similarly, “(-ddddddd-dddd-dddd-dddd-dddddddddddd)” would previously fail with “Unrecognized Guid format”, and now it’ll also fail with “Guid string should only contain hexadecimal characters.”

* Undo int->uint / short->ushort field changes

* Address PR feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/c04fee1611a7ad7075bc28d9c4e0546ccdad8b30

6 years agoSimplify SafeBuffer.Initialize implementation (dotnet/coreclr#20198)
Jan Kotas [Sat, 29 Sep 2018 13:37:45 +0000 (06:37 -0700)]
Simplify SafeBuffer.Initialize implementation (dotnet/coreclr#20198)

Commit migrated from https://github.com/dotnet/coreclr/commit/ecbbcf6edab9c4fb723bd59fba04c8177c977840

6 years agoUnify argument verification for Marshal.GetHINSTANCE off-Windows (dotnet/coreclr...
Jeremy Koritzinsky [Sat, 29 Sep 2018 06:37:34 +0000 (23:37 -0700)]
Unify argument verification for Marshal.GetHINSTANCE off-Windows (dotnet/coreclr#20130)

Commit migrated from https://github.com/dotnet/coreclr/commit/87e96eafa84545335dd6ec02cb4e233211456677

6 years agoDelete redundant framework API tests (dotnet/coreclr#20187)
Jan Kotas [Sat, 29 Sep 2018 06:33:00 +0000 (23:33 -0700)]
Delete redundant framework API tests (dotnet/coreclr#20187)

Contributes to dotnet/coreclr#12782

Commit migrated from https://github.com/dotnet/coreclr/commit/21d2d302b3eec9d72493b28028784c39cc531a73

6 years agoMake `structType` optional in jitEEInterface method `getFieldType`. (dotnet/coreclr...
Sergey Andreenko [Sat, 29 Sep 2018 01:57:29 +0000 (18:57 -0700)]
Make `structType` optional in jitEEInterface method `getFieldType`. (dotnet/coreclr#20191)

* Make `structType` optional in `getFieldType`.

The declaration in corinfo.h says: "if 'structType' == 0, then don't bother the structure info". However, `getFieldTypeInternal ` did not check this case.

* Do not bother the structure info when we do not need it from `getFieldType`.

Commit migrated from https://github.com/dotnet/coreclr/commit/f7f0929a468f9a4d115b51da0dc5b9328413352c

6 years agoAvoid allocation in Task.Yield() awaiter (dotnet/coreclr#20186)
Stephen Toub [Sat, 29 Sep 2018 00:05:29 +0000 (20:05 -0400)]
Avoid allocation in Task.Yield() awaiter (dotnet/coreclr#20186)

Now that IAsyncStateMachineBox is an IThreadPoolWorkItem, we can queue it directly in Task.Yield's awaiter.  This makes `await Task.Yield();` allocation-free when the default scheduler is used.

Commit migrated from https://github.com/dotnet/coreclr/commit/7d14e3a60dd9eff95e60b919cf30fd9f306e0e75

6 years agoAdd pointer overloads for Avx2.BroadcastScalarToVector256
Fei Peng [Fri, 28 Sep 2018 22:59:44 +0000 (15:59 -0700)]
Add pointer overloads for Avx2.BroadcastScalarToVector256

Commit migrated from https://github.com/dotnet/coreclr/commit/c3a34c5ce75d3f38495300325a800bda40c55a42

6 years agoSpecify configuration to runtest.sh to make runtest.py use the correct build_type...
Egor Chesakov [Fri, 28 Sep 2018 22:30:26 +0000 (15:30 -0700)]
Specify configuration to runtest.sh to make runtest.py use the correct build_type value (dotnet/coreclr#20188)

Commit migrated from https://github.com/dotnet/coreclr/commit/c6ef88d88fe8c95323247393c04e6b161da3bb0e

6 years agoMerge pull request dotnet/coreclr#20152 from DrewScoggins/UpdateIBCDeps
Drew Scoggins [Fri, 28 Sep 2018 22:17:32 +0000 (15:17 -0700)]
Merge pull request dotnet/coreclr#20152 from DrewScoggins/UpdateIBCDeps

Update ibc deps

Commit migrated from https://github.com/dotnet/coreclr/commit/be944fae4506939e7dbe322148c35826c4bc9dd3

6 years agoEnable delegate marshalling for collectible types (dotnet/coreclr#20158)
Jan Vorlicek [Fri, 28 Sep 2018 20:09:24 +0000 (22:09 +0200)]
Enable delegate marshalling for collectible types (dotnet/coreclr#20158)

* Enable delegate marshalling for collectible types

This change is trivial - it just removes checks preventing the delegate
marshalling for collectible types. The unmanaged to managed thunks are
allocated from a global LoaderAllocator and they are released when the
corresponding managed delegates are collected. So for unloadability, we
don't need to change this behavior in any way.

* Disable CoreFX tests outdated by the change

Commit migrated from https://github.com/dotnet/coreclr/commit/49209e181103006603e2cf4e05dccb564bef537d

6 years agoUpdating NumberToStringFormat to not print the sign if there are no digits being...
Tanner Gooding [Fri, 28 Sep 2018 18:02:55 +0000 (11:02 -0700)]
Updating NumberToStringFormat to not print the sign if there are no digits being returned (dotnet/coreclr#20109)

Commit migrated from https://github.com/dotnet/coreclr/commit/98aff4a23a2ecf8d823ece9b201045f52aa0624a

6 years agoEnable BSTR Marshaling Support for x-plat PInvoke (dotnet/coreclr#19766)
Luqun Lou [Fri, 28 Sep 2018 17:15:12 +0000 (10:15 -0700)]
Enable BSTR Marshaling Support for x-plat PInvoke (dotnet/coreclr#19766)

Commit migrated from https://github.com/dotnet/coreclr/commit/f90b65858d7ca0604e7aa1a1d04e9e5261e7f7af

6 years agoUpdate CoreClr, CoreFx to preview1-26928-03, preview1-26928-03, respectively (dotnet...
dotnet-maestro-bot [Fri, 28 Sep 2018 15:48:15 +0000 (08:48 -0700)]
Update CoreClr, CoreFx to preview1-26928-03, preview1-26928-03, respectively (dotnet/coreclr#20180)

Commit migrated from https://github.com/dotnet/coreclr/commit/a67ce5980d6457f1af91b088fed7b95400aa7def

6 years agoAdded transcript of ARMEnabled. (dotnet/coreclr#20181)
Alexander Soldatov [Fri, 28 Sep 2018 15:16:29 +0000 (18:16 +0300)]
Added transcript of ARMEnabled. (dotnet/coreclr#20181)

Commit migrated from https://github.com/dotnet/coreclr/commit/c4bf09d95011c0b4f86be1001b228b337a11fdd4

6 years agoUpdate CoreClr, CoreFx, CoreSetup to preview1-26928-01, preview1-26928-01, preview1...
dotnet-maestro-bot [Fri, 28 Sep 2018 11:25:33 +0000 (04:25 -0700)]
Update CoreClr, CoreFx, CoreSetup to preview1-26928-01, preview1-26928-01, preview1-26928-01, respectively (dotnet/coreclr#20175)

Commit migrated from https://github.com/dotnet/coreclr/commit/c07b543de35c626db2c2b380fd1f4eeccaa5fce0

6 years agoAvoid AwaitTaskContinuation allocation in some awaits (dotnet/coreclr#20159)
Stephen Toub [Fri, 28 Sep 2018 00:13:27 +0000 (20:13 -0400)]
Avoid AwaitTaskContinuation allocation in some awaits (dotnet/coreclr#20159)

In .NET Core 2.1, I added a bunch of optimizations to async methods that are based on reusing the async state machine object itself for other purposes in order to avoid related allocations.  One of those optimizations was using the boxed state machine itself as the continuation object that could be queued onto a Task, and in the common case where the continuation could be executed synchronously, there would then not be any further allocations.  However, if the continuation needed to be run asynchronously (e.g. because the Task required it via RunContinuationsAsynchronously), the code would allocate a new work item object and queue that to the thread pool to execute.  This then also forced the state machine object to lazily allocate the Action delegate for its MoveNext method. This PR extends the system slightly to also cover that asynchronous execution case, by making the state machine box itself being queueable to the thread pool.  In doing so, it avoids that AwaitTaskContinuation allocation and also avoids forcing the delegate into existence. (As is the case for other optimizations, this one is only employed when ETW logging isn't enabled; if it is enabled, we need to flow more information, and enabling that would penalize the non-logging case.)

Commit migrated from https://github.com/dotnet/coreclr/commit/03ead514a3aa414b26246a4160d0593811fd1044

6 years agoOptimize SSE2 intrinsic importation
Fei Peng [Thu, 27 Sep 2018 23:54:46 +0000 (16:54 -0700)]
Optimize SSE2 intrinsic importation

Commit migrated from https://github.com/dotnet/coreclr/commit/945b636566de8756742de1b3488f8c3db7333ca1

6 years agoRe-enable hardware intrinsic tests
Fei Peng [Thu, 27 Sep 2018 23:54:10 +0000 (16:54 -0700)]
Re-enable hardware intrinsic tests

Commit migrated from https://github.com/dotnet/coreclr/commit/225391f8238914f224f6a67707753e14fe13ae85

6 years agoUpdate CoreClr, CoreFx, CoreSetup, PgoData to preview1-26927-03, preview1-26927-03...
dotnet-maestro-bot [Thu, 27 Sep 2018 20:09:51 +0000 (13:09 -0700)]
Update CoreClr, CoreFx, CoreSetup, PgoData to preview1-26927-03, preview1-26927-03, preview1-26927-01, master-20180926-0038, respectively (dotnet/coreclr#20153)

Commit migrated from https://github.com/dotnet/coreclr/commit/883cc1a1d611727e47332507cbfbac01c36c6dec

6 years agoFix CancellationTokenRegistration.Dispose racing with cancellation (dotnet/coreclr...
Stephen Toub [Thu, 27 Sep 2018 18:58:18 +0000 (14:58 -0400)]
Fix CancellationTokenRegistration.Dispose racing with cancellation (dotnet/coreclr#20145)

CancellationTokenRegistration.Dispose is guaranteed to only return when the associated callback has already finished running or has been successfully removed such that it'll never run.  This is to ensure that code following Dispose can be guaranteed that the callback isn't currently running and won't after that point, as if it did, it could potentially depend on mutable shared state or itself mutate shared state in a non-thread-safe manner.

However, significant optimizations introduced in .NET Core 2.1 impacted a specific case of this guarantee.  It still behaves correctly if cancellation hasn't already been requested, if cancellation has already processed the associated callback, and even if cancellation is currently executing the associated callback.  However, if cancellation is currently processing other callbacks and hasn't yet gotten around to processing the associated one, Dispose() may incorrectly return immediately, such that the callback may still end up getting invoked after Dispose() returns, which can violate assumptions of consuming code in very impactful ways.

This commit modifies how the callbacks are removed from the registration list in order to fix the issue.  Previously, all of the callbacks were swapped out at once, which then left the list empty, which is what caused subsequent disposals to think the callback had already been processed or unregistered.  With this change, we instead just remove each registration as it's being processed, such that a concurrent disposal can still successfully find the registration in the callback list if it's not yet been processed.

This change does have a small perf impact, but only on the case where cancellation is actually invoked, which is the less common case; most usage of CTS doesn't actually result in cancellation, and optimization is focused on registration and unregistration perf.  Rather than taking and releasing the lock once when cancellation is requested, we now take and release the lock per callback when cancellation is requested.

Commit migrated from https://github.com/dotnet/coreclr/commit/552f4bf7addc944d85f4604fd2fe228ac984412d

6 years agoEnable Ubuntu arm Cross Release crossgen_comparison scenario by default (dotnet/corec...
Egor Chesakov [Thu, 27 Sep 2018 18:28:17 +0000 (11:28 -0700)]
Enable Ubuntu arm Cross Release crossgen_comparison scenario by default (dotnet/coreclr#20160)

Commit migrated from https://github.com/dotnet/coreclr/commit/c11f789873e46a53b42bb1c91ce81c3669ca7145

6 years agoMerge pull request dotnet/coreclr#19960 from echesakovMSFT/UseCrossBitnessLinuxCrossG...
Egor Chesakov [Thu, 27 Sep 2018 16:01:39 +0000 (09:01 -0700)]
Merge pull request dotnet/coreclr#19960 from echesakovMSFT/UseCrossBitnessLinuxCrossGenByDefault

Use Hostx64/arm crossgen to crossgen System.Private.CoreLib on Linux

Commit migrated from https://github.com/dotnet/coreclr/commit/9404b663a48979d3dc4b7545077ceb627d539dde

6 years agoReplace Crst* with CrstStatic for IBCLogger (dotnet/coreclr#20148)
Michelle McDaniel [Thu, 27 Sep 2018 14:28:36 +0000 (07:28 -0700)]
Replace Crst* with CrstStatic for IBCLogger (dotnet/coreclr#20148)

Commit migrated from https://github.com/dotnet/coreclr/commit/3d9eed70cfc299906c94e0f2722c7d39f777f27d

6 years agoMaestro dependency update without buildtools (dotnet/coreclr#20143)
Viktor Hofer [Thu, 27 Sep 2018 04:43:48 +0000 (06:43 +0200)]
Maestro dependency update without buildtools (dotnet/coreclr#20143)

* Update BuildTools, CoreClr, CoreFx, CoreSetup, PgoData to preview1-03224-03, preview1-26925-05, preview1-26925-06, preview1-26925-01, master-20180925-0031, respectively

* Enable RestoreOutputPath override

* Disable System.Security.Cryptography.Pkcs.Tests

To help unblock corefx, etc. update.

* Revert buildtools changes

* Disable buildtools auto updates

Commit migrated from https://github.com/dotnet/coreclr/commit/0bc8c62cfb7514b91b4ebd5f073835391e0502a3

6 years agoEnable Ubuntu arm crossgen_comparison Checked in each PR (dotnet/coreclr#20139)
Egor Chesakov [Thu, 27 Sep 2018 02:52:44 +0000 (19:52 -0700)]
Enable Ubuntu arm crossgen_comparison Checked in each PR (dotnet/coreclr#20139)

* Run Ubuntu arm crossgen_comparison (Checked | Release) daily
* Enable Ubuntu arm Checked crossgen_comparison by default

Commit migrated from https://github.com/dotnet/coreclr/commit/6dc2556a685674ecb9c716aa21720f2295ff8df0

6 years agoCross-bitness in VTable Calls (dotnet/coreclr#20137)
Egor Chesakov [Thu, 27 Sep 2018 02:47:18 +0000 (19:47 -0700)]
Cross-bitness in VTable Calls (dotnet/coreclr#20137)

* Use TARGET_POINTER_SIZE in CEEInfo::getMethodVTableOffset in src/vm/jitinterface.cpp
* Use SIZEOF__MethodTable_ in src/vm/methodtable.h

Commit migrated from https://github.com/dotnet/coreclr/commit/be18f2b4a7e0a4f7257df048e92d64a73035ed92