platform/upstream/coreclr.git
5 years agoUpdate CoreClr to preview6.19279.1 (#24829)
dotnet-maestro-bot [Wed, 29 May 2019 22:57:42 +0000 (15:57 -0700)]
Update CoreClr to preview6.19279.1 (#24829)

5 years agoRefactor native build to remove the compiler-override files (#23897)
Jeremy Koritzinsky [Wed, 29 May 2019 21:40:31 +0000 (14:40 -0700)]
Refactor native build to remove the compiler-override files (#23897)

* On systems that have both cmake 2 and cmake 3, use cmake 3.

Move CMAKE_EXPORT_COMPILE_COMMANDS to top level instead of in gen-buildsys-*. Define the CMake install prefix in gen-buildsys-* instead of pulling from an environment variable.

Define C++ standard as CMake property instead of as flag.

Move CLR_DEFINES_*_INIT out of overrides and into configurecompiler.cmake

Move flags that generate debug info into configurecompiler.cmake

Remove the CMAKE_USER_RULES_OVERRIDE files.

Add cmake version output for determining what cmake versions each CI system has.

Fix syntax in gen-buildsys-clang.

Change add_compile_definitions back to add_definitions

Add -D prefix for adding definitions via add_definitions

Remove extraneous double-quote

Change default config definition adding to the syntax in master

Switch back to old CMAKE_<LANG>_FLAGS way of setting the language standards and try to go back to 2.8.12 minimum

Switch back setting compile definitions for non-Windows branch too.

Use SET with CMAKE_<LANG>_FLAGS. Convert some usages of appending to CMAKE_<LANG>_FLAGS to add_compile_options where possible.

Set CMAKE_<LANG>_FLAGS_INIT instead of CMAKE_<LANG>_FLAGS

Make sure configureopimitzation.cmake is included correctly in test build.

Try to add brackets to get the Linux ARM compilation working correctly.

Define standard language version in configurecompiler.cmake instead of root CMakeLists (so tests get it)

Try to move langauge standard check to configure.cmake

define language standard in each root CMakeLists.txt

Fix off-Windows test build.

Set CMAKE_EXPORT_COMPILE_COMMANDS after the project() call

* Set CMAKE_USER_MAKE_RULES_OVERRIDE to "" to not break incremental builds after building on a branch that had it set to a path.

* Remove CMake version output.

* Move comment outside of multiline command.

* Retry setting CMAKE_USER_MAKE_RULES_OVERRIDE

* Remove unnecessary variable wrappers.

* Simplify cmake 3 resolution.

* Explicitly use CMAKE_CXX_FLAGS for C++-only flags that GCC complains about on C files.

* Set -Wall via CMAKE_<LANG>_FLAGS until we can move all flag settings to add_compile_options

* Fix typos

* Another temporary precedence issue.

* include configureoptimization.cmake in configurecompiler.cmake

* Move setting CMAKE_EXPORT_COMPILE_COMMANDS to configurecompiler.cmake.

* Rename configure.cmake -> verify_lto.cmake.

* Fix path to verify-lto

* Try using CMAKE_<LANG>_FLAGS instead of CMAKE_<LANG>_FLAGS_INIT.

* Revert name change to configure.camek

5 years agoUse Ubuntu 14.04-on-16.04 Docker image for arm cross builds. (#23999)
Jeremy Koritzinsky [Wed, 29 May 2019 20:47:52 +0000 (13:47 -0700)]
Use Ubuntu 14.04-on-16.04 Docker image for arm cross builds. (#23999)

5 years agoStop specifying cdecl for ComponentEntryPoint (default to stdcall) (#24833)
Elinor Fung [Wed, 29 May 2019 20:32:07 +0000 (13:32 -0700)]
Stop specifying cdecl for ComponentEntryPoint (default to stdcall) (#24833)

5 years ago[master] Update dependencies from dotnet/corefx (#24781)
dotnet-maestro[bot] [Wed, 29 May 2019 18:14:05 +0000 (11:14 -0700)]
[master] Update dependencies from dotnet/corefx (#24781)

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

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

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

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

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

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

5 years agoChange binary op tree display (#20045)
mikedn [Wed, 29 May 2019 17:37:25 +0000 (20:37 +0300)]
Change binary op tree display (#20045)

5 years agoAdd back AssemblyDescription attribute (#24819)
Sven Boemer [Wed, 29 May 2019 16:06:55 +0000 (09:06 -0700)]
Add back AssemblyDescription attribute (#24819)

This was present in System.Private.CoreLib previously, but removed in recent versions (I compared 3.0.0-preview5-27610-03 and 3.0.0-preview6-27715-05 on macos). It's unclear to me what used to be adding the attribute  - https://github.com/dotnet/coreclr/commit/099177b0899156a4e8a352083a273805240c0ccd touched the SPC logic, but even in that change I see no mention of it. Maybe it used to be autogenerated by the old project files. In any case, I believe it should be added back.
Its value used to be System.Private.CoreLib:
```diff
-  .custom instance void System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 16 53 79 73 74 65 6D 2E 50 72 69 76 61 74   // ...System.Privat
-                                                                                          65 2E 43 6F 72 65 4C 69 62 00 00 )                // e.CoreLib..
```

5 years agoUpdate MicrosoftDotNetXUnitConsoleRunnerVersion to reflect changes in Arcade (#24822)
Egor Chesakov [Wed, 29 May 2019 14:42:55 +0000 (07:42 -0700)]
Update MicrosoftDotNetXUnitConsoleRunnerVersion to reflect changes in Arcade (#24822)

* Update tf to netcoreapp2.1

* Bump up version of xunit.console package to 2.5.1-beta.19278.1

* Fix type in the version

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190528.04 ...
dotnet-maestro[bot] [Wed, 29 May 2019 14:42:25 +0000 (10:42 -0400)]
Update dependencies from https://github.com/dotnet/core-setup build 20190528.04 (#24827)

- Microsoft.NETCore.App - 3.0.0-preview6-27728-04

5 years agoSpecify restore sources in optdata.csproj (#24825)
Elinor Fung [Wed, 29 May 2019 07:40:39 +0000 (00:40 -0700)]
Specify restore sources in optdata.csproj (#24825)

5 years agoCreate the Concept of Multiple EventPipe Sessions (#24417)
José Rivero [Wed, 29 May 2019 06:17:02 +0000 (23:17 -0700)]
Create the Concept of Multiple EventPipe Sessions (#24417)

This is the initial work to enable https://github.com/dotnet/coreclr/issues/15377

## What's here?

- A lot of code move/split. Some important moves:
  - `EventPipe` has a colection of `EventPipeSessions` instead of a single session.
  - `EventPipeSession` now owns a `EventPipeBufferManager` and a `EventPipeFile`
  - `EventPipeThread` now owns a collection of { EventPipeBufferManager, EventPipeBuffer }, and a collection of { EventPipeBufferManager, EventPipeBufferList }
  - There is a cap on the max number of `EventPipeSession` (64 sessions)
  - `EventPipeProvider` and `EventPipeEvent` use a 64-bit mask to keep track of the sessions that are listening to provider/events.

## What's pending?

https://github.com/dotnet/coreclr/issues/24753

5 years agoChange DllImportPath policy to create unicode-named test library immediately before...
Jeremy Koritzinsky [Wed, 29 May 2019 03:55:52 +0000 (20:55 -0700)]
Change DllImportPath policy to create unicode-named test library immediately before use (#24812)

* Change DllImportPath_Unicode to use valid unicode characters. Create DllImportPath_Unicode via copying in a MSBuild property (copying in the test script doesn't work with batch).

* Have the test create the unicode native library right before use.

* Get first Dllimportpath_local that has the correct extension (check instead of assuming that the first one is the correct one).

5 years agoUse Arcade for native versioning (#24785)
Elinor Fung [Wed, 29 May 2019 01:46:08 +0000 (18:46 -0700)]
Use Arcade for native versioning (#24785)

5 years agoFix nullable annotation
Jan Kotas [Tue, 28 May 2019 22:48:40 +0000 (15:48 -0700)]
Fix nullable annotation

5 years agoFix superfluous delegate allocations in Unix WaitSubsystem (#7454)
Jan Kotas [Tue, 28 May 2019 20:55:06 +0000 (13:55 -0700)]
Fix superfluous delegate allocations in Unix WaitSubsystem (#7454)

Fixes #7452

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoAdd null checks before calling ClassLoader::EnsureLoaded (#24818)
Jan Kotas [Wed, 29 May 2019 01:38:42 +0000 (18:38 -0700)]
Add null checks before calling ClassLoader::EnsureLoaded (#24818)

Fixes #24816

5 years agoStop adding 7 before the build revision number (#24805)
Elinor Fung [Wed, 29 May 2019 00:37:52 +0000 (17:37 -0700)]
Stop adding 7 before the build revision number (#24805)

5 years agoChange StreamReader.ReadBufferAsync to return ValueTask<int> (#24810)
Stephen Toub [Wed, 29 May 2019 00:36:52 +0000 (20:36 -0400)]
Change StreamReader.ReadBufferAsync to return ValueTask<int> (#24810)

It's a private helper that's always directly awaited.  No need to allocate a task each time it's called and data is synchronously available.

5 years agoFix IBC data collection (#24814)
Jan Kotas [Tue, 28 May 2019 23:37:49 +0000 (16:37 -0700)]
Fix IBC data collection (#24814)

5 years agoStop using BuildTools for signing (#24808)
Elinor Fung [Tue, 28 May 2019 23:09:46 +0000 (16:09 -0700)]
Stop using BuildTools for signing (#24808)

5 years agoRename CreateNativeDelegate -> LoadAssemblyAndGetFunctionPointer (#24804)
Elinor Fung [Tue, 28 May 2019 23:05:28 +0000 (16:05 -0700)]
Rename CreateNativeDelegate -> LoadAssemblyAndGetFunctionPointer (#24804)

Change extensibility parameter to void *

5 years agoUsing AllocateUninitializedArray in array pool (#24504)
Vladimir Sadov [Tue, 28 May 2019 21:28:56 +0000 (14:28 -0700)]
Using AllocateUninitializedArray in array pool (#24504)

* Just use `new T[]` when elements are not pointer-free

* reduce zeroing out when not necessary.

* use AllocateUninitializedArray in ArrayPool

5 years agoMove parts of WeakReference to shared partition (#24800)
Marek Safar [Tue, 28 May 2019 20:54:38 +0000 (22:54 +0200)]
Move parts of WeakReference to shared partition (#24800)

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

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

* Cleanup unnecessary code in exception formatting

* Delete fNeedFileInfo argument for GetStackTrace

Fixes #8694

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

* expose TrimEndingDirectorySeparator

* address PR feedback

* updates

* address PR feedback

* fix comment

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

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

5 years agoFix initial thread affinity on Linux (#24801)
Jan Vorlicek [Tue, 28 May 2019 16:06:38 +0000 (18:06 +0200)]
Fix initial thread affinity on Linux (#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.

5 years ago[master] Update dependencies from dotnet/core-setup (#24782)
dotnet-maestro[bot] [Tue, 28 May 2019 15:49:34 +0000 (08:49 -0700)]
[master] Update dependencies from dotnet/core-setup (#24782)

- Microsoft.NETCore.App - 3.0.0-preview6-27727-02

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

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.

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.

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

* Add and apply nullable attributes

* Adapt to API review decisions

* Address PR feedback

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

* Remove special Appx path and METHOD__EXCEPTION__TO_STRING

* Remove Exception.ToString(bool, bool)

* Remove Exception.InternalToString and callers

* Cache message

5 years agoUse PublishBuildArtifacts instead of PublishPipelineArtifact (#24788)
Egor Chesakov [Tue, 28 May 2019 00:23:52 +0000 (17:23 -0700)]
Use PublishBuildArtifacts instead of PublishPipelineArtifact (#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 $

5 years agoFix module override for recursive generic signatures (#24707)
Jan Vorlicek [Mon, 27 May 2019 16:42:16 +0000 (18:42 +0200)]
Fix module override for recursive generic signatures (#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.

5 years agoStop nulling out lock object in SemaphoreSlim (#24776)
Stephen Toub [Sun, 26 May 2019 02:13:05 +0000 (22:13 -0400)]
Stop nulling out lock object in SemaphoreSlim (#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).

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. (#24771)

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

* Revert "Disable ARM64 IDispatch tests (#24770)"

This reverts commit 852f40d5f1a3cff4d381c2de2d2a86fe8b1f29b4.

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

Never defined and obsolete

5 years agoAdd more runtime GC counters (#24561)
Sung Yoon Whang [Sat, 25 May 2019 03:16:11 +0000 (20:16 -0700)]
Add more runtime GC counters (#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'

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

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

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

* Arm64: Add SIMD and HW_INTRINSIC to IsContainableImmed

5 years agoSet the HasExplicitSize flag when a class size is specified in metadata. (#24763)
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. (#24763)

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

* Add test from @mikedn.

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

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

5 years ago[master] Update dependencies from dotnet/arcade (#24333)
dotnet-maestro[bot] [Fri, 24 May 2019 21:36:24 +0000 (14:36 -0700)]
[master] Update dependencies from dotnet/arcade (#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

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

 Fix some nullable annotations

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

5 years agoEnable LCID marshalling and clean up our LCID marshalling tests. (#24642)
Jeremy Koritzinsky [Fri, 24 May 2019 20:20:23 +0000 (13:20 -0700)]
Enable LCID marshalling and clean up our LCID marshalling tests. (#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.

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

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

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

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

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

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

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

5 years agoUpdate dependencies from https://github.com/dotnet/corefx build 20190523.8 (#24758)
dotnet-maestro[bot] [Fri, 24 May 2019 15:24:09 +0000 (08:24 -0700)]
Update dependencies from https://github.com/dotnet/corefx build 20190523.8 (#24758)

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

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190523.08 ...
dotnet-maestro[bot] [Fri, 24 May 2019 15:23:58 +0000 (08:23 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190523.08 (#24759)

- Microsoft.NETCore.App - 3.0.0-preview6-27723-08

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) (#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

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

5 years agoDelete RETURNTYPE and change how we get ReturnKind for gccover. (#24600)
Sergey Andreenko [Fri, 24 May 2019 04:24:44 +0000 (21:24 -0700)]
Delete RETURNTYPE and change how we get ReturnKind for gccover. (#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.

5 years agoDiagnostics IPC (#24582)
John Salem [Fri, 24 May 2019 03:18:33 +0000 (20:18 -0700)]
Diagnostics IPC (#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

5 years agoRe-enable queryperformancecounter PAL test (#11291)
Jan Vorlicek [Fri, 24 May 2019 02:33:51 +0000 (19:33 -0700)]
Re-enable queryperformancecounter PAL test (#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.

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

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

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

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

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

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

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

5 years agoFewer ilstubs in corelib from reflection apis (#24708)
David Wrighton [Thu, 23 May 2019 23:18:07 +0000 (16:18 -0700)]
Fewer ilstubs in corelib from reflection apis (#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.

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

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years ago[master] Update dependencies from dotnet/corefx (#24604)
dotnet-maestro[bot] [Thu, 23 May 2019 19:18:30 +0000 (12:18 -0700)]
[master] Update dependencies from dotnet/corefx (#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

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

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190522.02 ...
dotnet-maestro[bot] [Thu, 23 May 2019 18:24:11 +0000 (11:24 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190522.02 (#24741)

- Microsoft.NETCore.App - 3.0.0-preview6-27722-02

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 (#24735)

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

5 years agoAdd some perf events/data for tiered compilation (#24607)
Koundinya Veluri [Thu, 23 May 2019 17:49:10 +0000 (10:49 -0700)]
Add some perf events/data for tiered compilation (#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

5 years agoAdd missing pin to two tests and re-enable for GC stress (#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 (#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 #24173.
Fixes #24464.

5 years agoUse auxiliary vector to obtain the executable path name (#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 (#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).

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

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

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

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

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

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 (#24723)

5 years agoUse -c when trying to find Python (#24722)
Steve Dower [Thu, 23 May 2019 06:24:00 +0000 (23:24 -0700)]
Use -c when trying to find Python (#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>`.

5 years agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Thu, 23 May 2019 04:45:43 +0000 (21:45 -0700)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190521.3 (#24717)

- optimization.IBC.CoreCLR - 99.99.99-master-20190521.3
- optimization.PGO.CoreCLR - 99.99.99-master-20190521.3

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

Add warning banner and sos threads -special fix

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

5 years agoChange timeouts for outerloop job and move one test to longRunningGc. (#24731)
Sergey Andreenko [Thu, 23 May 2019 01:19:20 +0000 (18:19 -0700)]
Change timeouts for outerloop job and move one test to longRunningGc. (#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.

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

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

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

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

Fix #24166

5 years agoAllow CORINFO_BOX_THIS for primitives and enums (#24644)
Michal Strehovský [Wed, 22 May 2019 22:59:43 +0000 (15:59 -0700)]
Allow CORINFO_BOX_THIS for primitives and enums (#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.

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

Update Console output with more details.

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

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

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

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

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

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

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

Close #24657

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