platform/upstream/dotnet/runtime.git
5 years agoMove parts of WeakReference to shared partition (dotnet/coreclr#24800)
Marek Safar [Tue, 28 May 2019 20:54:38 +0000 (22:54 +0200)]
Move parts of WeakReference to shared partition (dotnet/coreclr#24800)

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

5 years agoFixing the epilog size decoding
Andrew Au [Sun, 26 May 2019 23:30:39 +0000 (16:30 -0700)]
Fixing the epilog size decoding

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

5 years agoCleanup unnecessary code in exception formatting (dotnet/coreclr#24797)
Jan Kotas [Tue, 28 May 2019 18:18:28 +0000 (11:18 -0700)]
Cleanup unnecessary code in exception formatting (dotnet/coreclr#24797)

* Cleanup unnecessary code in exception formatting

* Delete fNeedFileInfo argument for GetStackTrace

Fixes dotnet/coreclr#8694

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

5 years agoExpose Path.TrimEndingDirectorySeparator (dotnet/coreclr#20805)
Marco Rossignoli [Tue, 28 May 2019 18:14:05 +0000 (20:14 +0200)]
Expose Path.TrimEndingDirectorySeparator (dotnet/coreclr#20805)

* expose TrimEndingDirectorySeparator

* address PR feedback

* updates

* address PR feedback

* fix comment

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

5 years agoMove some CustomAttribute related types to shared (dotnet/coreclr#23651)
Egor Bogatov [Tue, 28 May 2019 18:12:01 +0000 (21:12 +0300)]
Move some CustomAttribute related types to shared (dotnet/coreclr#23651)

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

5 years agoMake sure the layout of coreclr!Module is the same as mscordaccore!Module
Andrew Au [Tue, 28 May 2019 08:02:26 +0000 (01:02 -0700)]
Make sure the layout of coreclr!Module is the same as mscordaccore!Module

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

5 years agoFix initial thread affinity on Linux (dotnet/coreclr#24801)
Jan Vorlicek [Tue, 28 May 2019 16:06:38 +0000 (18:06 +0200)]
Fix initial thread affinity on Linux (dotnet/coreclr#24801)

* Fix initial thread affinity on Linux

On Linux, a new thread inherits the affinity mask of the thread
that created the new thread. This is a problem for background GC
threads that are created by one of the server GC threads that are
affinitized to single core.
This change adds resetting each new thread affinity to match the
current process affinity.
In addition to that, I've also fixed the extraction of the CPU count
that was using PID 0. While the doc says that 0 represents current process,
it in fact means current thread.
And as a small bonus, I've added caching of the value returned by
the PAL_GetLogicalCpuCountFromOS, since it cannot change during runtime.

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

5 years agoUpdate CoreClr to preview6.19277.72 (dotnet/coreclr#24795)
dotnet-maestro-bot [Tue, 28 May 2019 10:07:21 +0000 (03:07 -0700)]
Update CoreClr to preview6.19277.72 (dotnet/coreclr#24795)

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

5 years agoImprove performance of !dumpasync SOS command
Stephen Toub [Sat, 25 May 2019 02:06:37 +0000 (22:06 -0400)]
Improve performance of !dumpasync SOS command

A significant majority of the time spent in dumpasync was in getting the type name of each object in order to compare it to "AsyncStateMachineBox".  This switches to comparing by module and mdTypeDef.  On an ~1GB dump, the time to execute !dumpasync dropped from 43 to 11 seconds on my machine.

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

5 years agoDisplay state machine fields in DumpAsync for -stacks
Stephen Toub [Thu, 23 May 2019 02:56:33 +0000 (22:56 -0400)]
Display state machine fields in DumpAsync for -stacks

Currently the DumpAsync -fields option just impacts whether the state machine fields are output for the top-level state machines.  We received feedback that it would be more expected for -fields to also cause the fields to be output for all state machines listed as part of continuation chains.  This does that.

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

5 years agoAdd and apply nullable attributes (dotnet/coreclr#24679)
Stephen Toub [Tue, 28 May 2019 10:04:13 +0000 (06:04 -0400)]
Add and apply nullable attributes (dotnet/coreclr#24679)

* Add and apply nullable attributes

* Adapt to API review decisions

* Address PR feedback

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

5 years agoCall derived ToString on inner exceptions (dotnet/coreclr#24793)
Dan Moseley [Tue, 28 May 2019 02:34:19 +0000 (19:34 -0700)]
Call derived ToString on inner exceptions (dotnet/coreclr#24793)

* Remove special Appx path and METHOD__EXCEPTION__TO_STRING

* Remove Exception.ToString(bool, bool)

* Remove Exception.InternalToString and callers

* Cache message

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

5 years agoUse PublishBuildArtifacts instead of PublishPipelineArtifact (dotnet/coreclr#24788)
Egor Chesakov [Tue, 28 May 2019 00:23:52 +0000 (17:23 -0700)]
Use PublishBuildArtifacts instead of PublishPipelineArtifact (dotnet/coreclr#24788)

* Use PublishBuildArtifacts instead of PublishPipelineArtifacts

* Use DownloadBuildArtifacts instead of DownloadPipelineArtifact

* Try to specify itemPattern

* Use PublishBuildArtifacts instead of PublishPipelineArtifacts

* Try copy files in a separate step

* Add missing $

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

5 years agoFix module override for recursive generic signatures (dotnet/coreclr#24707)
Jan Vorlicek [Mon, 27 May 2019 16:42:16 +0000 (18:42 +0200)]
Fix module override for recursive generic signatures (dotnet/coreclr#24707)

* Fix module override for recursive generic signatures

When crossgen-ing with large version bubble enabled, generic signatures
that got copied from the source IL were missing module overrides at
deeper levels of the generic signature.
For example, in case of X<Y<A,B>,Z>, the override was applied only to Y
and Z, but not to A and B.

This change fixes that by inserting module override zapsig at all
levels.

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

5 years agoStop nulling out lock object in SemaphoreSlim (dotnet/coreclr#24776)
Stephen Toub [Sun, 26 May 2019 02:13:05 +0000 (22:13 -0400)]
Stop nulling out lock object in SemaphoreSlim (dotnet/coreclr#24776)

SemaphoreSlim.Dispose nulls out its lock object, and that's then used as an indication in other methods whether they should throw ObjectDisposedException.  But nulling out an object used for synchronization in other methods is a bad practice, and while SemaphoreSlim.Dispose is not thread-safe to be used concurrently with other usage of the instance, it's still confusing when such usage leads to NullReferenceExceptions due to trying to lock on a null lock object.  This change just changes the lock to be readonly, always set, and then whether the instance has been disposed is just a value set on that object (such that it's no larger than it used to be).

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

5 years agoMake sure all of the calculations of enregistered return types match correctly. ...
Jeremy Koritzinsky [Sat, 25 May 2019 16:19:03 +0000 (09:19 -0700)]
Make sure all of the calculations of enregistered return types match correctly. (dotnet/coreclr#24771)

* Make sure all of the calculations of enregistered return types match correctly.

* Revert "Disable ARM64 IDispatch tests (dotnet/coreclr#24770)"

This reverts commit dotnet/coreclr@852f40d5f1a3cff4d381c2de2d2a86fe8b1f29b4.

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

5 years agoDelete FEATURE_USE_LCID (dotnet/coreclr#24767)
Jan Kotas [Sat, 25 May 2019 06:10:21 +0000 (23:10 -0700)]
Delete FEATURE_USE_LCID (dotnet/coreclr#24767)

Never defined and obsolete

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

5 years agoAdd more runtime GC counters (dotnet/coreclr#24561)
Sung Yoon Whang [Sat, 25 May 2019 03:16:11 +0000 (20:16 -0700)]
Add more runtime GC counters (dotnet/coreclr#24561)

* Add Series/CounterType to CounterPayload and IncrementingCounterPayload

* merging with master

* Add Generation sizes counter

* Some cleanup

* Add allocation rate counter

* Fix build

* add Allocation Rate runtime counter

* Fix a potential div by zero exception

* Add back in code commented out

* Add LOH size counter

* Fix linux build

* GetTotalAllocated -> GetTotalAllocation

* PR feedback

* More cleanup + renaming per PR feedback

* undo comments

* more pr feedback

* Use existing GC.GetTotalAllocatedBytes API instead

* Remove duplicate GetTotalAllocation

* More PR feedback

* Fix x86 build

* Match type between C++/C#

* remove unused variables'

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

5 years agoDisable ARM64 IDispatch tests (dotnet/coreclr#24770)
Jeremy Koritzinsky [Fri, 24 May 2019 23:39:50 +0000 (16:39 -0700)]
Disable ARM64 IDispatch tests (dotnet/coreclr#24770)

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

5 years agoArm64: Take more bounds checks into consideration when inlining immediates (dotnet...
Tamar Christina [Fri, 24 May 2019 23:26:18 +0000 (00:26 +0100)]
Arm64: Take more bounds checks into consideration when inlining immediates (dotnet/coreclr#24762)

* Arm64: Take GT_ARR_BOUNDS_CHECK to consideration for inlining immediate in cmp

* Arm64: Add SIMD and HW_INTRINSIC to IsContainableImmed

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

5 years agoSet the HasExplicitSize flag when a class size is specified in metadata. (dotnet...
Jeremy Koritzinsky [Fri, 24 May 2019 22:26:14 +0000 (15:26 -0700)]
Set the HasExplicitSize flag when a class size is specified in metadata. (dotnet/coreclr#24763)

* Set the HasExplicitSize flag when a class size is specified in metadata.

* Add test from @mikedn.

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

5 years agoFix nulable annotations build break (dotnet/coreclr#24768)
Jan Kotas [Fri, 24 May 2019 22:24:17 +0000 (15:24 -0700)]
Fix nulable annotations build break (dotnet/coreclr#24768)

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

5 years agoUpdate CoreClr to preview6.19274.71 (dotnet/coreclr#24761)
dotnet-maestro-bot [Fri, 24 May 2019 21:37:04 +0000 (14:37 -0700)]
Update CoreClr to preview6.19274.71 (dotnet/coreclr#24761)

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

5 years ago[master] Update dependencies from dotnet/arcade (dotnet/coreclr#24333)
dotnet-maestro[bot] [Fri, 24 May 2019 21:36:24 +0000 (14:36 -0700)]
[master] Update dependencies from dotnet/arcade (dotnet/coreclr#24333)

* Update dependencies from https://github.com/dotnet/arcade build 20190522.13

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19272.13
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19272.13
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19272.13
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19272.13

* Update Unix permissions

* Set the versions same way as CoreFX repo

* Fix the product branding version

* Delete .NET Framework reference assemblies reference

* Workaround for https://github.com/dotnet/arcade/issues/2673

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

5 years agoMerge pull request dotnet/coreclr#24764 from safern/FixArraySetValueNullable
Santiago Fernandez Madero [Fri, 24 May 2019 21:14:42 +0000 (14:14 -0700)]
Merge pull request dotnet/coreclr#24764 from safern/FixArraySetValueNullable

 Fix some nullable annotations

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

5 years agoFix publishing in official build
Elinor Fung [Fri, 24 May 2019 18:53:42 +0000 (11:53 -0700)]
Fix publishing in official build

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

5 years agoEnable LCID marshalling and clean up our LCID marshalling tests. (dotnet/coreclr...
Jeremy Koritzinsky [Fri, 24 May 2019 20:20:23 +0000 (13:20 -0700)]
Enable LCID marshalling and clean up our LCID marshalling tests. (dotnet/coreclr#24642)

* Enable LCID marshalling and clean up our LCID marshalling tests.

* Fix return type.

* Enable LCID IDispatch reverse marshalling

* Add more tests for LCID marshalling.

* Add testing for reverse-IDispatch. Fix bug in Thread::GetCulture when culture has not been initialized on the managed side.

* PR Feedback.

* Fix install command.

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

5 years agoPR Feedback
Santiago Fernandez Madero [Fri, 24 May 2019 19:00:48 +0000 (12:00 -0700)]
PR Feedback

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

5 years agoFix nullable annotation in String.Join
Santiago Fernandez Madero [Fri, 24 May 2019 18:54:56 +0000 (11:54 -0700)]
Fix nullable annotation in String.Join

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

5 years agoFix nullable annotations in RuntimeTypeHandle operators
Santiago Fernandez Madero [Fri, 24 May 2019 18:45:29 +0000 (11:45 -0700)]
Fix nullable annotations in RuntimeTypeHandle operators

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

5 years agoFix Guid.TryParse nullabel annotation
Santiago Fernandez Madero [Fri, 24 May 2019 18:31:12 +0000 (11:31 -0700)]
Fix Guid.TryParse nullabel annotation

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

5 years agoFix nullable annotation in Array.SetValue
Santiago Fernandez Madero [Fri, 24 May 2019 18:02:44 +0000 (11:02 -0700)]
Fix nullable annotation in Array.SetValue

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

5 years agoMove to 3.0 SDK (dotnet/coreclr#24756)
Elinor Fung [Fri, 24 May 2019 15:52:45 +0000 (08:52 -0700)]
Move to 3.0 SDK (dotnet/coreclr#24756)

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

5 years agoFix FEATURE_PREJIT option setup (dotnet/coreclr#24760)
Gleb Balykov [Fri, 24 May 2019 15:24:55 +0000 (18:24 +0300)]
Fix FEATURE_PREJIT option setup (dotnet/coreclr#24760)

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

5 years agoUpdate BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively...
dotnet-maestro-bot [Fri, 24 May 2019 13:46:47 +0000 (06:46 -0700)]
Update BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively (master) (dotnet/coreclr#24369)

* Update BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively

* Use `Nullable=enable` rather than `NullableContextOptions=enable`

* Resolving new nullability warnings

* PR Feedback

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

5 years agoRemove dependency on IEEMemoryManager (dotnet/coreclr#24755)
Jan Kotas [Fri, 24 May 2019 12:34:44 +0000 (05:34 -0700)]
Remove dependency on IEEMemoryManager (dotnet/coreclr#24755)

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

5 years agoDelete RETURNTYPE and change how we get ReturnKind for gccover. (dotnet/coreclr#24600)
Sergey Andreenko [Fri, 24 May 2019 04:24:44 +0000 (21:24 -0700)]
Delete RETURNTYPE and change how we get ReturnKind for gccover. (dotnet/coreclr#24600)

* Move GetReturnKindFromMethodTable to method.hpp.

We would need this in other places in the next commits.

* Delete unnecessary checks from callhelpers.

* Do not check return types in CanDeduplicateCode.

GC info v.2 has this information and it is checked in another place.

* Change ComPlusMethodFrame to use the new function.

* Change gccover.cpp to use GetReturnKindFromMethodTable.

* Delete RETURNTYPE.

* Add check to ComPlusMethodFrame.

* Delete check from threadsuspend.

codeInfo->GetCodeManager()->GetReturnKind(gcInfoToken) must always return a valid kind nowdays (it could return an invalid lind only when GC Info v2 was not available).

* Rename functions/arguments.

* Add check for IsValidReturnKind.

* delete unused var.

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

5 years agoDiagnostics IPC (dotnet/coreclr#24582)
John Salem [Fri, 24 May 2019 03:18:33 +0000 (20:18 -0700)]
Diagnostics IPC (dotnet/coreclr#24582)

* Initial draft of structs and classes for Diagnostic Server IPC Protocol

* Fix some syntax/name issues that weren't getting caught by intellisense in vscode for mac

* * Add member checkers for Flatten and GetSize
* Split Flatten impl to have a default version for simple, fixed-size structs

* * Remove unnecessary abstract class
* Add documentation about templates

* * Change templating for IpcMessage class to be more limited (only on message creation and payload parsing)
* flesh out parse and tryparse
* add requirement for non-fixed-size payloads to implement a static TryParse(buffer, bufferlen)
* refactor namespace to bottom of file

* * moved DiagnosticsIpc namespace into diagnosticprotocol.h to avoid being referenced by debug-pal project
* converted diagnostic server to use DiagnosticsIpc code
* converted EventPipeProtocolHelper to use DiagnosticsIpc code
* made EventPipe end to end use DiagnosticsIpc code

* * Add ASSERTs where relevant
* Refactor stream ownershpi back to previous way for collect tracing response

* * Add contracts where applicable

* * Updating GenerateCoreDump code to use new IPC work after rebase

* * modify contract in DiagnosticProtocolHelper to be more restrictive
* remove comments
* Add comment documentation of SFINAE pattern above usage
* simplify Has* checks
* Fix function resolution for static member check
* Add Constructor for rvalue references to IpcMessage
* avoid code path that would result in a blocking read on 0 bytes
* Fix silly strcmp bug
* fix contractin EventPipeProtocolHelper

* * Modify header declaration to make static initialization easier
* fix type in template code

* * Make all messages use Initialize instead of constructor for hydrating themselves, to make error paths easier

* * Expand and streamline error model to match spec
* Simplify writing error messages to a static function
* memory management

* *modify function signatures for SFINAE to remove clang warning

* * add braces to static initialization to remove clang warnings

* * modify IpcMessage::TryParseImpl, to reset the internal data pointer when passing back a reinterpret_cast to prevent double frees on destruction
* Add notes on requirement that user free the memory for a payload

* * fix bug in TryParse for generateCoreDump
* change INT to uint32_t in GenerateCoreDump payloads

* Remove unused error code

* * rename Miscellaneous command set to Diagnostic
* Remove unnecessary command ids in EventPipe

* Rename Diagnostic command set to Dump

* * Move payload into Holder to simplify cleanup
* Add buffer holder to payloads to ensure the buffers are being cleaned up after use
* updated Profiler attach to use IPC work after rebase

* * Fix typos
* Fix placement of ifdefs for profiler helpers

* * Fix accidental char hidden in ifdef...

* * Add ASSERT to signify we shouldn't be re-using IpcMessages

* * fix another typo hidden behind inactive ifdef...

* * Change errors to use HRESULTS to increase transparency
* fix bug in profiler attach for checking if entire client data is in buffer

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

5 years agoRe-enable queryperformancecounter PAL test (dotnet/coreclr#11291)
Jan Vorlicek [Fri, 24 May 2019 02:33:51 +0000 (19:33 -0700)]
Re-enable queryperformancecounter PAL test (dotnet/coreclr#11291)

The test seems to work in the lab again, so the failures seem to be related to the version
of OSX we were using in the past when the test started to fail.

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

5 years agoCreate THIRD-PARTY-NOTICES.TXT (dotnet/coreclr#24752)
Rich Lander [Fri, 24 May 2019 00:40:45 +0000 (17:40 -0700)]
Create THIRD-PARTY-NOTICES.TXT (dotnet/coreclr#24752)

TPN for https://github.com/dotnet/coreclr/blob/dotnet/coreclr@a9074bce5e3814db67dbec1c56f477202164d162/tests/src/sizeondisk/sodbench/SoDBench.cs#L738

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

5 years agoMake AppDomain.GetThreadPrincipal() internal (dotnet/coreclr#24747)
Santiago Fernandez Madero [Fri, 24 May 2019 00:39:30 +0000 (17:39 -0700)]
Make AppDomain.GetThreadPrincipal() internal (dotnet/coreclr#24747)

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

5 years agoDelete FEATURE_TESTHOOK (dotnet/coreclr#24746)
Jan Kotas [Fri, 24 May 2019 00:38:52 +0000 (17:38 -0700)]
Delete FEATURE_TESTHOOK (dotnet/coreclr#24746)

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

5 years agoDelete unused file (dotnet/coreclr#24745)
Jan Kotas [Fri, 24 May 2019 00:38:42 +0000 (17:38 -0700)]
Delete unused file (dotnet/coreclr#24745)

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

5 years agoDelete unused PredefinedTlsSlots (dotnet/coreclr#24744)
Jan Kotas [Fri, 24 May 2019 00:38:28 +0000 (17:38 -0700)]
Delete unused PredefinedTlsSlots (dotnet/coreclr#24744)

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

5 years agoFix restoring internal tools (dotnet/coreclr#24750)
Elinor Fung [Thu, 23 May 2019 23:42:08 +0000 (16:42 -0700)]
Fix restoring internal tools (dotnet/coreclr#24750)

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

5 years agoFewer ilstubs in corelib from reflection apis (dotnet/coreclr#24708)
David Wrighton [Thu, 23 May 2019 23:18:07 +0000 (16:18 -0700)]
Fewer ilstubs in corelib from reflection apis (dotnet/coreclr#24708)

Rework use of marshalling for RuntimeTypeHandle, RuntimeModule, RuntimeAssembly, and IRuntimeMethodInfo as used by QCalls
- Remove special QCall only used marshallers for RuntimeAssembly, RuntimeModule and IRuntimeMethodInfo
- Following the pattern of ObjectHandleOnStack, implement QCall handle types for RuntimeAssembly/Module/TypeHandle. Use these in all QCalls that once passed the types directly.
- For uses of IRuntimeMethodInfo, follow the existing RuntimeMethodHandleInternal pattern

Also perform some replacement of bool marshalling with use of Interop.BOOL, and a few cases of using pointers instead of byref arguments.

Fix delivers a relatively small win on startup, and small throughput gains around reflection as IL stubs are no longer necessary for many functions in reflection that once needed them.

Reduces methods jitted on powershell startup from 422 to 399, (About 5%) but performance win is only about 5ms on ~400ms as the methods removed are simple.

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

5 years agoFix CoreRT build breaks (dotnet/coreclr#24743)
Dotnet-GitSync-Bot [Thu, 23 May 2019 20:55:21 +0000 (13:55 -0700)]
Fix CoreRT build breaks (dotnet/coreclr#24743)

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

5 years ago[master] Update dependencies from dotnet/corefx (dotnet/coreclr#24604)
dotnet-maestro[bot] [Thu, 23 May 2019 19:18:30 +0000 (12:18 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#24604)

* Update dependencies from https://github.com/dotnet/corefx build 20190522.8

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview6.19272.8
- Microsoft.NETCore.Platforms - 3.0.0-preview6.19272.8
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview6.19272.8

* Disable failing test

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

5 years agoFix the checkboxes in superpmi.md (dotnet/coreclr#24496)
Akihisa Yagi [Thu, 23 May 2019 19:11:38 +0000 (04:11 +0900)]
Fix the checkboxes in superpmi.md (dotnet/coreclr#24496)

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

5 years agoFix missing version numbers in packaged files and getting IBC merge version in offici...
Elinor Fung [Thu, 23 May 2019 17:51:19 +0000 (10:51 -0700)]
Fix missing version numbers in packaged files and getting IBC merge version in official build (dotnet/coreclr#24735)

* Fix missing version numbers in packaged files in official build
* Fix build script for getting IBC merge version

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

5 years agoAdd some perf events/data for tiered compilation (dotnet/coreclr#24607)
Koundinya Veluri [Thu, 23 May 2019 17:49:10 +0000 (10:49 -0700)]
Add some perf events/data for tiered compilation (dotnet/coreclr#24607)

Add some perf events/data for tiered compilation

New events:
- `Settings` - Sent when TC is enabled
  - `Flags` - Currently indicates whether QuickJit and QuickJitForLoops are enabled
- `Pause` - Sent when TC is paused (due to a new method being called for the first time)
- `Resume` - Sent when TC resumes
  - `NewMethodCount` - Number of methods called for the first time while tiering was paused
- `BackgroundJitStart` - Sent when starting to JIT methods in the background
  - `PendingMethodCount` - Number of methods currently scheduled for background JIT
- `BackgroundJitStop` - Sent when background jitting stops
  - `PendingMethodCount` - Same as above. When 0, background jitting has completed.
  - `JittedMethodCount` - Number of methods jitted in the background since the previous BackgroundJitStart event on the same thread

Miscellaneous:
- Updated method JIT events to include the optimization tier
- Added a couple more cases where tiered compilation is disabled for methods that have JIT optimization disabled for some reason
- Renamed `Duration` field of the new version of the `ContentionEnd` to `DurationNs` to indicate the units of time
- Added `OptimizationTierOptimized` to `NativeCodeVersion::OptimizationTier` to distinguish it from `OptimizationTier1`. `OptimizationTierOptimized` is now used for methods that QuickJit is disabled for, and does not send the tier 1 flag.
  - For info about the code being generated by the JIT, added info to `PrepareCodeConfig` and stored a pointer to it on the thread object for the current JIT invocation. Info is updated in `PrepareCodeConfig` and used for updating the tier on the code version and for sending the ETL event.
  - If the JIT decides to use MinOpt when `MethodDesc::IsJitOptimizationDisabled()` is false, the info is not stored. The runtime method event will reflect the JIT's choice, the rundown event will not.
- Updated to show optimization tiers in SOS similarly to PerfView

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

5 years agoAdd missing pin to two tests and re-enable for GC stress (dotnet/coreclr#24738)
Andy Ayers [Thu, 23 May 2019 17:35:15 +0000 (10:35 -0700)]
Add missing pin to two tests and re-enable for GC stress (dotnet/coreclr#24738)

Test was evidently assuming that because an object that referred to an array
was pinned, so was the array. Failure was intermittent, GC is not guaranteed
to move objects or to render their former contents inaccessible.

Fixes dotnet/coreclr#24173.
Fixes dotnet/coreclr#24464.

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

5 years agoUse auxiliary vector to obtain the executable path name (dotnet/coreclr#24696)
Leandro A. F. Pereira [Thu, 23 May 2019 16:59:17 +0000 (09:59 -0700)]
Use auxiliary vector to obtain the executable path name (dotnet/coreclr#24696)

This vector is populated by the kernel while loading an ELF, and is
available to user land without requiring any system calls.  This is
specially interesting if programs are executed under a chroot where
/proc isn't available (and thus realpath("/proc/self/exe"), the current
method of obtaining the full path name for the executable).

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

5 years agoReenable all CoreFX tests (dotnet/coreclr#24740)
Jan Kotas [Thu, 23 May 2019 15:14:39 +0000 (08:14 -0700)]
Reenable all CoreFX tests (dotnet/coreclr#24740)

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

5 years agoPrevent duplicate class addition when a profiler adds a type (dotnet/coreclr#24737)
David Mason [Thu, 23 May 2019 07:28:09 +0000 (00:28 -0700)]
Prevent duplicate class addition when a profiler adds a type (dotnet/coreclr#24737)

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

5 years agoProfiler attach over the diagnostics pipe (dotnet/coreclr#24670)
David Mason [Thu, 23 May 2019 07:19:41 +0000 (00:19 -0700)]
Profiler attach over the diagnostics pipe (dotnet/coreclr#24670)

Remove the old windows only profiler attach mechanism and replace it with a cross plat implementation over the diagnostics pipe

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

5 years agoStop compiling fragile NGen support into the runtime (dotnet/coreclr#24625)
Jan Kotas [Thu, 23 May 2019 06:42:31 +0000 (23:42 -0700)]
Stop compiling fragile NGen support into the runtime (dotnet/coreclr#24625)

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

5 years agoUse Microsoft.Build.Traversal instead of dir.traversal.targets for packaging .builds...
Elinor Fung [Thu, 23 May 2019 06:33:59 +0000 (23:33 -0700)]
Use Microsoft.Build.Traversal instead of dir.traversal.targets for packaging .builds projects (dotnet/coreclr#24723)

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

5 years agoUse -c when trying to find Python (dotnet/coreclr#24722)
Steve Dower [Thu, 23 May 2019 06:24:00 +0000 (23:24 -0700)]
Use -c when trying to find Python (dotnet/coreclr#24722)

Piping code into Python is indistinguishable from interactive execution, but since we never want interactive execution here it's better to use `-c <CODE>`.

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

5 years agoMerge pull request dotnet/coreclr#24734 from mikem8361/sosincs2
Mike McLaughlin [Thu, 23 May 2019 04:28:49 +0000 (21:28 -0700)]
Merge pull request dotnet/coreclr#24734 from mikem8361/sosincs2

Add warning banner and sos threads -special fix

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

5 years agoAdd EnumerateRefs API and remove GetObjectReferences (dotnet/coreclr#24542)
Mukul Sabharwal [Thu, 23 May 2019 03:47:48 +0000 (20:47 -0700)]
Add EnumerateRefs API and remove GetObjectReferences (dotnet/coreclr#24542)

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

5 years agoChange timeouts for outerloop job and move one test to longRunningGc. (dotnet/coreclr...
Sergey Andreenko [Thu, 23 May 2019 01:19:20 +0000 (18:19 -0700)]
Change timeouts for outerloop job and move one test to longRunningGc. (dotnet/coreclr#24731)

* Change outerloop timeout per collection.

We have different test collections timeouts on Alpine.38.Amd64, examples:
https://mc.dot.net/#/user/coreclr-ci/ci~2Fdotnet~2Fcoreclr~2Frefs~2Fheads~2Fmaster/test~2Ffunctional~2Fcli~2F/20190521.780/workItem/JIT.jit64.hfa/wilogs
https://mc.dot.net/#/user/coreclr-ci/ci~2Fdotnet~2Fcoreclr~2Frefs~2Fheads~2Fmaster/test~2Ffunctional~2Fcli~2F/20190521.779/workItem/PayloadGroup0/wilogs
https://mc.dot.net/#/user/coreclr-ci/ci~2Fdotnet~2Fcoreclr~2Frefs~2Fheads~2Fmaster/test~2Ffunctional~2Fr2r~2Fcli~2F/20190521.783/workItem/Loader.classloader.TypeGeneratorTests.TypeGeneratorTest0-299/wilogs

* Move _il_relthread-race to pri1 and mark as long running GC test.

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

5 years agoComponentActivator GetType must throwOnError (dotnet/coreclr#24732)
Steve MacLean [Thu, 23 May 2019 00:51:00 +0000 (20:51 -0400)]
ComponentActivator GetType must throwOnError (dotnet/coreclr#24732)

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

5 years agoAdd warning banner and sos threads -special fix
Mike McLaughlin [Wed, 22 May 2019 23:59:02 +0000 (16:59 -0700)]
Add warning banner and sos threads -special fix

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

5 years agoFix x86 synchronized method (dotnet/coreclr#24703)
Carol Eidt [Wed, 22 May 2019 23:44:36 +0000 (16:44 -0700)]
Fix x86 synchronized method (dotnet/coreclr#24703)

For the JIT32_GCENCODER the this pointer must be either kept in a single register or on the stack.

Fix dotnet/coreclr#24166

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

5 years agoAllow CORINFO_BOX_THIS for primitives and enums (dotnet/coreclr#24644)
Michal Strehovský [Wed, 22 May 2019 22:59:43 +0000 (15:59 -0700)]
Allow CORINFO_BOX_THIS for primitives and enums (dotnet/coreclr#24644)

We abort R2R compiling methods with `thisTransform == CORINFO_BOX_THIS`. This means we don't R2R compile some methods that do virtual calls on valuetypes (e.g. calling `ToString` on a struct that doesn't itself provide a `ToString` method).

We can't allow this in general, but enums and primitives should be fine.

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

5 years agoRemove filter for Exception type during registry inquiry. (dotnet/coreclr#24725)
Aaron Robinson [Wed, 22 May 2019 22:18:44 +0000 (15:18 -0700)]
Remove filter for Exception type during registry inquiry. (dotnet/coreclr#24725)

Update Console output with more details.

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

5 years agoput lttng probe check under FEATURE_EVENT_TRACE (dotnet/coreclr#24729)
Sung Yoon Whang [Wed, 22 May 2019 22:13:23 +0000 (15:13 -0700)]
put lttng probe check under FEATURE_EVENT_TRACE (dotnet/coreclr#24729)

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

5 years agoRelax the assertion for FieldDesc::GetBase
Andrew Au [Wed, 22 May 2019 17:51:30 +0000 (10:51 -0700)]
Relax the assertion for FieldDesc::GetBase

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

5 years agoMerge pull request dotnet/coreclr#24636 from echesakovMSFT/MoreOuterloopQueues
Egor Chesakov [Wed, 22 May 2019 18:49:43 +0000 (11:49 -0700)]
Merge pull request dotnet/coreclr#24636 from echesakovMSFT/MoreOuterloopQueues

Enable OSX.1012.Amd64.Open and Windows.10.Arm64.Open (only Windows_NT/arm) in outerloop jobs

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

5 years agoDelete FEATURE_WINDOWSPHONE (dotnet/coreclr#24718)
Jan Kotas [Wed, 22 May 2019 18:21:47 +0000 (11:21 -0700)]
Delete FEATURE_WINDOWSPHONE (dotnet/coreclr#24718)

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

5 years agoTest case for dotnet/coreclr#24657 (dotnet/coreclr#24721)
Carol Eidt [Wed, 22 May 2019 17:56:54 +0000 (10:56 -0700)]
Test case for dotnet/coreclr#24657 (dotnet/coreclr#24721)

This bug is a duplicate of dotnet/coreclr#18522. Adding the additional repro.

Close dotnet/coreclr#24657

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

5 years agoFix Path.Join argument nullable annotation (dotnet/coreclr#24719)
Stephen Toub [Wed, 22 May 2019 17:28:26 +0000 (13:28 -0400)]
Fix Path.Join argument nullable annotation (dotnet/coreclr#24719)

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

5 years agoCache current thread ID in TLS (dotnet/coreclr#24699)
Leandro A. F. Pereira [Wed, 22 May 2019 15:17:26 +0000 (08:17 -0700)]
Cache current thread ID in TLS (dotnet/coreclr#24699)

While looking at the strace of `corerun` built with logging and
debugging information, I was amazed at the number of gettid() calls it
was making.  While system calls are cheap, they're still not free;
cache this number in the thread local storage area.  Adds a branch, but
it's just a comparison with 0, so it's fine in comparison.

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

5 years agoFixed ARM single stepper: added "ADD Rn, PC" command emulation (dotnet/coreclr#24271)
Kirill Frolov [Wed, 22 May 2019 14:05:06 +0000 (17:05 +0300)]
Fixed ARM single stepper: added "ADD Rn, PC" command emulation (dotnet/coreclr#24271)

This change fixes bug dotnet/coreclr#24164: pull request dotnet/coreclr#11366 adds generation of
commands which use PC-relative addressing. But ArmSingleStepper doesn't
implements support for "ADD Rn, PC" command, so when we try to debug
managed code, generated JIT can't be single stepped correctly.

Detailed changes description:

1) added "ADD Rn, PC" command emulation to ArmSingleStepper;
2) asserts added to JIT code generator, which prevents using of CPU
instructions, which address PC (R15) register with except of only "ADD
Rn, PC" instruction (asserts generated only in Debug builds).

Normally PC register shouldn't be used in arithmetic commands almost in
all cases.

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

5 years agoCommit dotnet/coreclr@29810a78e5b93d8da9fb921d096226d249fc75a5 added unconditional...
Marek Safar [Wed, 22 May 2019 13:30:59 +0000 (15:30 +0200)]
Commit dotnet/coreclr@29810a78e5b93d8da9fb921d096226d249fc75a5 added unconditional dependency on GetCpuUtilization (dotnet/coreclr#24715)

Update projitems file inclusion

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

5 years agoDelete dead strongname-related code (dotnet/coreclr#24709)
Jan Kotas [Wed, 22 May 2019 12:18:30 +0000 (05:18 -0700)]
Delete dead strongname-related code (dotnet/coreclr#24709)

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

5 years agoGC Moved Objects Profiler API fix (dotnet/coreclr#24541)
Mukul Sabharwal [Wed, 22 May 2019 09:56:05 +0000 (02:56 -0700)]
GC Moved Objects Profiler API fix (dotnet/coreclr#24541)

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

5 years agoTrack debug info for DynamicMethods for Profiler API (dotnet/coreclr#24139)
Mukul Sabharwal [Wed, 22 May 2019 08:52:38 +0000 (01:52 -0700)]
Track debug info for DynamicMethods for Profiler API (dotnet/coreclr#24139)

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

5 years agoAdd runtime counter for current assemblies loaded (dotnet/coreclr#24698)
Sung Yoon Whang [Wed, 22 May 2019 06:06:17 +0000 (23:06 -0700)]
Add runtime counter for current assemblies loaded (dotnet/coreclr#24698)

* Consume # of assemblies loaded

* Fix names

* Fix build

* Add ifdef in assemblynative.hpp

* fix merge error

* fix build break

* Address PR feedback

* Fix linux build

* Remove ifdef

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

5 years agoFix loading libcoreclrtraceptprovider.so (dotnet/coreclr#24702)
Mike McLaughlin [Wed, 22 May 2019 04:52:37 +0000 (21:52 -0700)]
Fix loading libcoreclrtraceptprovider.so (dotnet/coreclr#24702)

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

5 years agoFix profiler crash on shutdown (dotnet/coreclr#22712)
Noah Falk [Wed, 22 May 2019 04:52:18 +0000 (21:52 -0700)]
Fix profiler crash on shutdown (dotnet/coreclr#22712)

Fixes issue dotnet/coreclr#22176. Use the profiler evacuation counters to ensure that we
don't callback into the profiler when it has already been released.
Previously we only did this as part of the attach/detach feature, but this
is required for correctness during standard shutdown given that managed
threads are still running concurrently.

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

5 years agoImplement AppDomain.Monitoring*MemorySize (dotnet/coreclr#24610)
Stephen Toub [Wed, 22 May 2019 04:27:00 +0000 (00:27 -0400)]
Implement AppDomain.Monitoring*MemorySize (dotnet/coreclr#24610)

* Implement AppDomain.MonitoringTotalAllocatedMemorySize

* Change precise:true back to precise:false in GetTotalAllocatedBytes

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

5 years agoDelete Unsafe redefinitions of Windows APIs (dotnet/coreclr#24688)
Jan Kotas [Wed, 22 May 2019 04:15:32 +0000 (21:15 -0700)]
Delete Unsafe redefinitions of Windows APIs (dotnet/coreclr#24688)

Leftover from SQL hosting infrastructure

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

5 years agoUpdate build docker images to enable NUMA support (dotnet/coreclr#24593)
Jan Vorlicek [Wed, 22 May 2019 03:34:01 +0000 (20:34 -0700)]
Update build docker images to enable NUMA  support (dotnet/coreclr#24593)

* Update build docker images to enable NUMA  support

So far, the NUMA support for Linux was disabled due to the fact that the
build docker images didn't have libnuma development package installed.
This change updates the images to ones that have the libnuma added that
were created recently.

* Update build job to use Clang5.0 for arm64 everywhere

Our new images for linux-arm64 build have only Clang 5.0 and this change
also aligns the build with linux-musl-arm64.

* Update the clang version used for test builds

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

5 years agoFix GCToOSInterface::SetCurrentThreadIdealAffinity on Unix (dotnet/coreclr#24706)
Jan Vorlicek [Wed, 22 May 2019 03:33:05 +0000 (20:33 -0700)]
Fix GCToOSInterface::SetCurrentThreadIdealAffinity on Unix (dotnet/coreclr#24706)

The code was using GCToOSInterface::SetThreadAffinity, which
effectively pinned the current thread to a specific processor. On
Windows, it calls SetThreadIdealProcessor which is basically just a
scheduler hint, but the thread can stil run on other threads.

Since there is no way to set ideal affinity on Unix, the fix is to do
nothing in the GCToOSInterface::SetCurrentThreadIdealAffinity.

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

5 years agoAdd Microsoft.DotNet.Build.Tasks.Packaging to Version.Details.xml (dotnet/coreclr...
Elinor Fung [Wed, 22 May 2019 03:19:33 +0000 (20:19 -0700)]
Add Microsoft.DotNet.Build.Tasks.Packaging to Version.Details.xml (dotnet/coreclr#24700)

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

5 years agoModified format logic so that braces are not allowed in custom format specifiers...
Mike Marynowski [Wed, 22 May 2019 02:58:49 +0000 (22:58 -0400)]
Modified format logic so that braces are not allowed in custom format specifiers (dotnet/coreclr#23062)

* Modified format logic so that braces are not allowed in custom format specifiers.

* Disabled failing test temporarily and fixed code style issue.

PR needed to pass test: https://github.com/dotnet/corefx/pull/35820

* Slight changes to logic to better align the diff.

* Fixed counting error.

* Fix nullable

* Move exclusion near related test

* Add skip to new issue file

* Delete CoreFX.issues.json

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

5 years agoSet ContinuousIntegrationBuild=true for product build in build-job.yml (dotnet/corecl...
Elinor Fung [Wed, 22 May 2019 01:52:30 +0000 (18:52 -0700)]
Set ContinuousIntegrationBuild=true for product build in build-job.yml (dotnet/coreclr#24693)

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

5 years agoAdd clarifying comment why Windows.10.Arn64.Open only used in Windows_NT/arm and...
Egor Chesakov [Tue, 21 May 2019 23:48:22 +0000 (16:48 -0700)]
Add clarifying comment why Windows.10.Arn64.Open only used in Windows_NT/arm and only for CI builds

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

5 years agoAdd null check in VoidFreeNativeLibrary (dotnet/coreclr#24685)
Jan Kotas [Tue, 21 May 2019 23:24:19 +0000 (16:24 -0700)]
Add null check in VoidFreeNativeLibrary (dotnet/coreclr#24685)

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

5 years agoFix loading libcoreclrtraceptprovider.so
Mike McLaughlin [Tue, 21 May 2019 22:57:33 +0000 (15:57 -0700)]
Fix loading libcoreclrtraceptprovider.so

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

5 years agoFixing EnableSSE3_4=0 and EnableHWIntrinsic=0 to control the right things (dotnet...
Tanner Gooding [Tue, 21 May 2019 22:53:19 +0000 (15:53 -0700)]
Fixing EnableSSE3_4=0 and EnableHWIntrinsic=0 to control the right things (dotnet/coreclr#24649)

* Ensure we check JitConfig.EnableSSE3_4 when determining the max supported vector size

* Ensure that EnableHWIntrinsic=0 doesn't impact the supported ISAs

* Applying formatting patch

* Moving jitstress-isas-x86 to the 600m timeout group

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

5 years agoReduce overhead of SemaphoreSlim.WaitAsync (dotnet/coreclr#24687)
Stephen Toub [Tue, 21 May 2019 22:00:53 +0000 (18:00 -0400)]
Reduce overhead of SemaphoreSlim.WaitAsync (dotnet/coreclr#24687)

This affects the case where SemaphoreSlim.WaitAsync is invoked, the operation completes asynchronously because there's no count available in the semaphore, and where a timeout and/or a cancellation token is passed to WaitAsync.  In that case, we need to wait for the underlying wait task to complete, for cancellation to be requested, or for the timeout to elapse.

There's currently one code path that handles this.  This change improves that slightly by avoiding a defensive array copy.  However, we can do much better when we get a cancelable token but no timeout, in which case we can avoid operations like Task.Delay, can register with the original cancellation token rather than a new one (which means we avoid forcing a new CancellationTokenSource's lazily-allocated partitions into existence), etc.

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

5 years agoAdd CreateNativeDelegate flags check (dotnet/coreclr#24695)
Steve MacLean [Tue, 21 May 2019 21:07:24 +0000 (17:07 -0400)]
Add CreateNativeDelegate flags check (dotnet/coreclr#24695)

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

5 years agoDelete infrastructure files that are no longer used (dotnet/coreclr#24684)
Jan Kotas [Tue, 21 May 2019 20:28:49 +0000 (13:28 -0700)]
Delete infrastructure files that are no longer used (dotnet/coreclr#24684)

* Delete Jenkins scripts

* Delete support files for the old CoreFX test infrastructure

* Delete CoreFX test file setup utility

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

5 years agoUpdate CreateNativeDelegate calling convention (dotnet/coreclr#24690)
Steve MacLean [Tue, 21 May 2019 20:04:13 +0000 (16:04 -0400)]
Update CreateNativeDelegate calling convention (dotnet/coreclr#24690)

Pass strings as UTF16 on Windows

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

5 years agoSwitch NuGet package build to use Arcade instead of BuildTools (dotnet/coreclr#24619)
Elinor Fung [Tue, 21 May 2019 19:05:49 +0000 (12:05 -0700)]
Switch NuGet package build to use Arcade instead of BuildTools (dotnet/coreclr#24619)

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

5 years agoMerge pull request dotnet/coreclr#24675 from sandreenko/excludeSuperPmiCollect
Sergey Andreenko [Tue, 21 May 2019 18:14:24 +0000 (11:14 -0700)]
Merge pull request dotnet/coreclr#24675 from sandreenko/excludeSuperPmiCollect

Exclude superpmicollect with JitStress on arm.

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

5 years agoAdd CreateNativeDelegate flags argument (dotnet/coreclr#24671)
Steve MacLean [Tue, 21 May 2019 16:14:57 +0000 (12:14 -0400)]
Add CreateNativeDelegate flags argument (dotnet/coreclr#24671)

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