Koundinya Veluri [Tue, 11 Jun 2019 06:27:02 +0000 (23:27 -0700)]
Add optimization tiers to the Linux perf maps for perfcollect (dotnet/coreclr#24967)
Add optimization tiers to the Linux perf maps for perfcollect
Fixes https://github.com/dotnet/coreclr/issues/23222:
- It looks like module unloads are currently not taken into account. Once they would be taken into account, Although we have method JIT events from `lttng` with the code address and optimization tier, samples can only be associated with method JIT events by associating the time range when the module is loaded with times of samples, and the event times from `lttng` would not necessarily correspond with times from samples taken by `perf`.
- Updated to include the optimization tier in the perf map for each jitted or R2R method code address
- Refactored common code between eventtrace and perfmap for getting jit tiers
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5906ecce405c8ff9476a1ea3d9a297bf5d9991c
Jeremy Koritzinsky [Tue, 11 Jun 2019 04:33:00 +0000 (21:33 -0700)]
Switch P/Invokes into libcoreclr for the PAL to QCalls (dotnet/coreclr#25055)
* Switch PInvokes into libcoreclr to QCalls
* Register QCalls in runtime. Remove pal exports from libcoreclr
* Alphabetize new ecalllist.h entries
* Remove W suffixes from native side of QCall
* Interop signatures are in nested classes (which doesn't show up here) in the root namespace. So we don't want to pass a namespace in here
* Convert the interop test in R2R to use a local native library instead of calling into the CoreCLR PAL via DllImport.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6292a6573e1f7d6e218293773e443280683cd83
Avi Avni [Tue, 11 Jun 2019 00:22:34 +0000 (03:22 +0300)]
fix generic attribute bug when generic attribute has parameters and the parameters (dotnet/coreclr#25054)
* fix generic attribute bug
* add missing test cases
Commit migrated from https://github.com/dotnet/coreclr/commit/
5cea50c794753b65a25c17b9b88a84eb7e432ba5
Jan Vorlicek [Tue, 11 Jun 2019 00:22:13 +0000 (02:22 +0200)]
Fix inline tracking (dotnet/coreclr#25062)
Inline tracking didn't correctly place the right key into the
inline tracking map for generics. The logic places the instantiated
methoddesc into the tracking map, and then attempts to find it by
looking up the uninstantiated form. This would generally be a silent
failure, but in unloadable assembly testing we have an assert that the
CrossLoaderAllocatorHash holds as keys items from a matching
LoaderAllocator.
This issue also results in an assert `key->GetLoaderAllocator() ==
m_pLoaderAllocator` in CrossLoaderAllocatorHash when the code is
running inside of a collectible AssemblyLoadContext.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7b7af37dd9e56f94016aed9d9eaf5f857a6d722
Leandro A. F. Pereira [Mon, 10 Jun 2019 22:44:29 +0000 (15:44 -0700)]
Use pread() to read DOS/NT headers when mapping PE files (dotnet/coreclr#25059)
Shaves off two syscalls per managed assembly load.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90372481b01781243cd86f4eea93b8f976fba397
Jarret Shook [Mon, 10 Jun 2019 21:13:27 +0000 (14:13 -0700)]
Add source-build hook for dotnet install (dotnet/coreclr#24929)
* Add source-build hook for dotnet install
* Fix batch syntax
* Address feedback
* Use the correct returned variables:
unix: _InitializeDotNetCli
windows: DOTNET_TOOL_DIR
* Remove changes to dotnet.cmd
* Do not export, just use _InitializeDotNetCli
Commit migrated from https://github.com/dotnet/coreclr/commit/
730c3c5c66183418adbbc63acd40d261c9ce23ed
Maryam Ariyan [Mon, 10 Jun 2019 21:09:07 +0000 (14:09 -0700)]
Make Debug.Print(string) behavior consistent with .NET Framework (dotnet/coreclr#25036)
* Debug.Print should call Debug.WriteLine
- to behave similar to .NET Framework
* temporarily disable tests
- Waiting for coreclr/fx changes to propagate
Commit migrated from https://github.com/dotnet/coreclr/commit/
64855db283bf84e8d47cfd6d5cde4248df3e0f50
noahfalk [Mon, 10 Jun 2019 20:48:50 +0000 (13:48 -0700)]
Add support for the NetTrace EventPipe file format
Right now the new format is not on by default, but it can be enabled using COMPlus_EventPipeNetTraceFormat = 1 for testing purposes. The plan to have a follow up PR that will add shipping configuration mechanisms and change the default setting.
See the documentation in the PerfView repo for more details about the format. At a glance the goal is to create a format that is more efficient to produce, has a smaller on disk size, and offers enhanced functionality in a few areas:
a) 64 bit thread id support
b) Detection of dropped events via sequence numbers
c) Better support for extracting subsets of the file
Together with the change there was also some refactoring of the EventPipeBufferManager and EventPipeThread.
This change addresses (at least in part) the following issues:
dotnet/coreclr#19688, dotnet/coreclr#23414, dotnet/coreclr#24188, dotnet/coreclr#20751, dotnet/coreclr#20555, dotnet/coreclr#21827, dotnet/coreclr#24852, dotnet/coreclr#25046
Commit migrated from https://github.com/dotnet/coreclr/commit/
835836c9d34409af0f31529201dfd57cb2bd053c
Mukul Sabharwal [Mon, 10 Jun 2019 15:09:12 +0000 (08:09 -0700)]
Use SIZE_T for SectionSize in RegisterFrozenSegment (dotnet/coreclr#25044)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dd9e417dc0f11d7ec3bed54de75853ecf87e70e5
Jan Vorlicek [Mon, 10 Jun 2019 14:33:42 +0000 (16:33 +0200)]
Fix field offset computation for large version bubble (dotnet/coreclr#25029)
There was a discrepancy in field offset calculations at crossgen time
and at runtime in some rare cases due to the alignment of a derived
class offset.
The issue happened due to MethodTableBuilder::NeedsAlignedBaseOffset not
taking into account the fact that the module of the parent and child
class can both be in large version bubble.
We also had a bug in the PEDecoder::GetNativeManifestMetadata. When it
was called for regular crossgened image without large version bubble, it
left the pDir uninitialized due to the fact that there was no
READYTORUN_SECTION_MANIFEST_METADATA. And then it tried to dereference
that.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f3aa314cc9c03f9bff54661d6607087bc3d4030
José Rivero [Sun, 9 Jun 2019 15:49:31 +0000 (08:49 -0700)]
Fix `EventPipe::Disable` threading issues. (dotnet/coreclr#24896)
`EventPipe::WriteEvent*` does not use the `EventPipe::Crst` which created race conditions with other methods such as EventPipe::Disable.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9cda53dd8c3309f25f1b489774fa80d32c439821
Adam Sitnik [Sun, 9 Jun 2019 11:39:29 +0000 (13:39 +0200)]
don't acquire lock if the collator has been already created (dotnet/coreclr#24973)
* don't acquire lock if the collator has been already created
* use atomic_compare_exchange_strong instead of __sync_bool_compare_and_swap
* don't try to workaround clang 5.0 bug, just use __atomic_compare_exchange_n
Commit migrated from https://github.com/dotnet/coreclr/commit/
563d5c4570575b25bd86cb14be2bad5f23238f95
Michal Strehovský [Sat, 8 Jun 2019 14:11:46 +0000 (16:11 +0200)]
Move Marshal class to S.P.CoreLib (dotnet/corertdotnet/coreclr#7502)
After this change, CoreRT only uses S.P.Interop to host the interop hashtable readers. Those can't move to CoreLib because they call into the type loader.
I didn't touch ProjectN's version of Marshal and I left the `PInvokeMarshal` class in place to help with that. I guess we'll need to make a call at some point on what to do with S.P.Interop since without MCG the code in it is kind of useless.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1a841249bd23d94a5c88684d57a0dbdd92cac86
Carlos Sanchez Lopez [Fri, 7 Jun 2019 19:35:43 +0000 (12:35 -0700)]
Fix issue in NamedPipeServerStream.GetImpersonationUserName() (dotnet/coreclr#37676)
Fix for issue where NamedPipeServerStream.GetImpersonationUserName() throws unexpected InvalidationOperationException("The operation completed successfully") when impersonation is not allowed, when in fact it should simply return an empty string.
The fix will call GetNamedPipeHandleStateW once. If it fails, it will try to load sspicli.dll if it was not loaded, and will reattempt the call to GetNamedPipeHandleStateW.
This fix is only for Win32: UAP does not allow calling LoadLibraryEx, and Windows Nano says denies access to GetNamedPipeHandleStateW even after attempting to load sspicli.dll.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
f684a3d9e31391731f4f6f9c4d3ae014b8576505
Andrew Au [Sat, 8 Jun 2019 04:10:24 +0000 (21:10 -0700)]
Fix a race condition in EventPipe (dotnet/coreclr#25025)
Commit migrated from https://github.com/dotnet/coreclr/commit/
730603a09c3f66214cf46c1a429d326e1083fbf3
Jeremy Kuhne [Fri, 31 May 2019 17:31:39 +0000 (10:31 -0700)]
Fix redist
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
439ed829b516b78084ad21b548c8b2ee974d4569
Steve MacLean [Sat, 8 Jun 2019 00:25:35 +0000 (20:25 -0400)]
Fix AppDomain issues (dotnet/coreclr#25019)
Populate AppDomain.CurrentDomain when invoking events
Make AppDomain method implemented in AssemblyLoadContext internal
Commit migrated from https://github.com/dotnet/coreclr/commit/
5d94217eaf0b066c9208480942121dc601d17e51
Carol Eidt [Fri, 7 Jun 2019 22:12:31 +0000 (15:12 -0700)]
Mention `COMPlus_AltJitNgen=*` for crossgen
Commit migrated from https://github.com/dotnet/coreclr/commit/
c957c3040c121ec86b88207d87453b6284192a74
Sergey Andreenko [Fri, 7 Jun 2019 22:04:51 +0000 (15:04 -0700)]
Merge pull request dotnet/coreclr#24007 from mikedn/enable-w4
Compile JIT sources with /W4
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee62ba30b18f58e460fae2fa8d88572621bf8aff
Sung Yoon Whang [Fri, 7 Jun 2019 21:17:17 +0000 (14:17 -0700)]
Explicitly set permission on the socket file created by DiagnosticServer (dotnet/coreclr#24988)
* Explicitly set permission on the socket file created by DiagnosticServer
* Add an asserte and remove execute permission
* Use umask to set permission instead of fchmod
* use fchmod for linux, ifdef out osx specific permission sets
* Set correct permission bit in call to umask
* Forgot to recover umask on one of the error paths
Commit migrated from https://github.com/dotnet/coreclr/commit/
77c1832cf25f43f9e8e6d272f955819d7c35c11b
Omair Majid [Fri, 7 Jun 2019 20:49:52 +0000 (16:49 -0400)]
Do not delete polymorphic objects without a virtual destructor (dotnet/coreclr#23705)
SEI CERT C++ Coding Standard says:
> Do not delete an object of derived class type through a pointer to its
> base class type that has a non-virtual destructor. Instead, the base
> class should be defined with a virtual destructor. Deleting an object
> through a pointer to a type without a virtual destructor results in
> undefined behavior.
See https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP52-CPP.+Do+not+delete+a+polymorphic+object+without+a+virtual+destructor
Clang generally warns about this, but we disabled the warning via
-Wno-delete-non-virtual-dtor. This commit re-enables the warning and
fixes up all the code that hits the warning.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3fcaf0373369ed4b17bd1ed068592c2e0cec3997
David Mason [Fri, 7 Jun 2019 20:49:15 +0000 (13:49 -0700)]
Add docs for rejit on attach and the new profiler attach mechanism (dotnet/coreclr#24868)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b314ed86b11756834b0936e56c3d841e7407f81d
David Wrighton [Fri, 7 Jun 2019 18:38:49 +0000 (11:38 -0700)]
Reduce indirect function calls (dotnet/coreclr#24980)
* Reduce indirect dispatch in hot paths in metadata
* Remove allocation indirections in utilcode for coreclr
- we no longer have a multi-dll distribution of code that needs to share heaps
* Remove unused code in GetCLRFunction
* Remove virtual dispatch around impl/decl methodtable access in MethodData
Commit migrated from https://github.com/dotnet/coreclr/commit/
b614f4f5529296cac834e54f2fa4bc540a61a04d
Santiago Fernandez Madero [Fri, 7 Jun 2019 16:01:51 +0000 (11:01 -0500)]
Address nullable feedback for System.Runtime and System.Runtime.Extensions (dotnet/coreclr#25017)
* Address last nullable feedback from System.Runtime
* Address nullable feedback for System.Runtime.Extensions
* PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b51993933c5f2f29b20d229cdb32bbcb41e76dd6
Carol Eidt [Fri, 7 Jun 2019 13:59:55 +0000 (06:59 -0700)]
Fix blr printing (dotnet/coreclr#24979)
A blr instruction may have a result that is not a pointer size, but its target register is always EA_PTRSIZE.
Fix dotnet/coreclr#24940
Commit migrated from https://github.com/dotnet/coreclr/commit/
1fa758fbb4c6278cbf3ba72f1f98ba52d10b8265
Stephen Toub [Fri, 7 Jun 2019 01:54:29 +0000 (21:54 -0400)]
Add [NotNull] to syncLock parameter of EnsureInitialized (dotnet/coreclr#25012)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c5be4641640b7dd873ff013ae16bd9dca19e5af
Sung Yoon Whang [Fri, 7 Jun 2019 00:18:27 +0000 (17:18 -0700)]
Add DisplayUnits property to DiagnosticCounter (dotnet/coreclr#24981)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ae52c542fefea83e01e29ba592b163b0faf8321
Tanner Gooding [Thu, 6 Jun 2019 23:06:22 +0000 (16:06 -0700)]
Marking Vector128<T>.Count and Vector256<T>.Count as [Intrinsic] (dotnet/coreclr#24991)
* Marking Vector128<T>.Count and Vector256<T>.Count as [Intrinsic]
* Fixing NI_Vector128_Count and NI_Vector256_Count to use clsHnd when getting the simdSize and baseType
* Applying the formatting patch.
* Changing some comments to just be "vector element count".
* Fixing impBaseIntrinsic to set the baseType so Vector128_Count and Vector256_Count don't return nullptr
Commit migrated from https://github.com/dotnet/coreclr/commit/
93216920549a0f574694e383d67d6d0ea5a4fed3
Jeremy Koritzinsky [Thu, 6 Jun 2019 21:43:54 +0000 (14:43 -0700)]
Use CMake's C# support to build DacTableGen instead of manually invoking csc.exe ourselves. (dotnet/coreclr#24342)
* Use CMake's C# support to build DacTableGen instead of manually invoking csc.exe ourselves.
* Fix x86 failures.
* Disable DAC generation when building with NMake Makefiles and issue an error since the CMake C# support is VS-only. We don't actually support building with NMake (only configure) so this is ok.
* Clean up rest of the macro=1's
PR Feedback.
* Fix Visual Studio generator matching.
* Explicitly specify anycpu32bitpreferred for DacTableGen so the ARM64 build doesn't accidentally make it 64-bit
* Fix bad merge
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c82068adb046eee3573984392a0d1e774062ae0
Jeremy Koritzinsky [Thu, 6 Jun 2019 21:39:42 +0000 (14:39 -0700)]
Move COM object lifetime control tests to CoreCLR. (dotnet/coreclr#24990)
* Add COM object lifetime control tests to CoreCLR.
* Combine cleanup control test into NETClientPrimitives.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e9cd827b0db60ad42f7df1f34ee1fada1951e5f
Elinor Fung [Thu, 6 Jun 2019 21:03:18 +0000 (14:03 -0700)]
Fix initializing BuildTools when the Platform environment variable is set (dotnet/coreclr#24998)
* Make build-test.cmd exit if init-tools.cmd fails
* Clear Platform variable before initializing BuildTools
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0486f5970ed63a7e7fb987f9a22fc8349574505
Sergey Andreenko [Thu, 6 Jun 2019 20:52:48 +0000 (13:52 -0700)]
Merge pull request dotnet/coreclr#25011 from dotnet/revert-24987-ReenableStackTraceTest
Revert "Reenable StackTracePreserveTests."
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca0dfce733ed41503b70a0dec4358bf110255b9f
Sergey Andreenko [Thu, 6 Jun 2019 20:49:04 +0000 (13:49 -0700)]
Revert "Reenable StackTracePreserveTests."
Commit migrated from https://github.com/dotnet/coreclr/commit/
33a55e45b98ce13d0240a8086d1c5d2e8a7313e6
Vladimir Sadov [Thu, 6 Jun 2019 19:12:55 +0000 (12:12 -0700)]
Clear syncblock early when `VERIFY_HEAP && DEBUG` to prevent verification asserts. (dotnet/coreclr#24992)
Fixes:dotnet/coreclr#24879
Commit migrated from https://github.com/dotnet/coreclr/commit/
476dc1cb88a0dcedd891a0ef7a2e05d5c2f94f68
Sergey Andreenko [Thu, 6 Jun 2019 17:23:36 +0000 (10:23 -0700)]
Reenable StackTracePreserveTests. (dotnet/coreclr#24987)
I was not able to repro any failures, maybe they were fixed already. Lets see what ci thinks.
Commit migrated from https://github.com/dotnet/coreclr/commit/
926230b2a14f1e6c9b02334ef5114b837c094a6e
Sergey Andreenko [Thu, 6 Jun 2019 17:22:47 +0000 (10:22 -0700)]
Exclude tests that do not work without tailcalls on arm32 Unix. (dotnet/coreclr#24995)
Commit migrated from https://github.com/dotnet/coreclr/commit/
76c6aa2c376dfdbda603c924abde7e3018e6c82c
Jan Kotas [Thu, 6 Jun 2019 17:09:05 +0000 (10:09 -0700)]
Delete unnecessary security transparency attributes (dotnet/coreclr#25007)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a826373dd4453c6a0f8f51622fa29ce71064cbec
Fadi Hanna [Thu, 6 Jun 2019 17:05:09 +0000 (10:05 -0700)]
Shortenning /Platform_Assemblies_Paths to just /p for convenience. Leaving the original switch name for compatibility reasons. (dotnet/coreclr#24986)
Commit migrated from https://github.com/dotnet/coreclr/commit/
53fc9518b7f1231888e2559b6f612181b4e1b697
Fadi Hanna [Thu, 6 Jun 2019 17:04:36 +0000 (10:04 -0700)]
Add R2R outerloop test mode without any stress modes (dotnet/coreclr#24961)
* Add R2R outerloop test mode without any stress modes
Commit migrated from https://github.com/dotnet/coreclr/commit/
fddc4012790b52d60b4bef5ea247e496d032f149
Fadi Hanna [Thu, 6 Jun 2019 17:03:52 +0000 (10:03 -0700)]
PInvoke stubs for Unix platforms (dotnet/coreclr#24834)
Enable pinvoke stub inlining on Unix
Exclude x86 Unix platforms from inlining pinvoke stubs (limited support)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f76c18356785ac8de21388998bc0e99425c454a
Jan Vorlicek [Thu, 6 Jun 2019 13:47:53 +0000 (15:47 +0200)]
Fix tmp dir in configure.cmake (dotnet/coreclr#25003)
The ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS check was using a temp
path that had some non-existent components. While this works fine on Linux,
it fails to create the temp file on OSX.
The fix is to use temp dir in the CMake's output dir.
Commit migrated from https://github.com/dotnet/coreclr/commit/
14a90253a34f49fd2bf1f17dd84ee6faa1db3af7
Sergey Andreenko [Thu, 6 Jun 2019 04:38:08 +0000 (21:38 -0700)]
Delete TwoKeywords test. (dotnet/coreclr#24982)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1a495118c005b9a5409c81fea1813bd2b3044cbd
Sergey Andreenko [Thu, 6 Jun 2019 04:37:23 +0000 (21:37 -0700)]
Merge two equal exclusion groups for arm32 All OS. (dotnet/coreclr#24984)
There were two:
<!-- Arm32 All OS -->
<ItemGroup Condition="'$(XunitTestBinBase)' != '' and ('$(BuildArch)' == 'arm' or '$(AltJitArch)' == 'arm')">
and
<!-- arm32 All OS specific excludes -->
<ItemGroup Condition="'$(XunitTestBinBase)' != '' and ('$(BuildArch)' == 'arm' or '$(AltJitArch)' == 'arm')">
Commit migrated from https://github.com/dotnet/coreclr/commit/
986f3598235c3a7f4140297d1eebddb88225597b
Ben Adams [Thu, 6 Jun 2019 00:36:16 +0000 (01:36 +0100)]
Less work for OptimalMaxSpinWaitsPerSpinIteration fast-path (dotnet/coreclr#21702)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8a569cfde41c0fdcf8c9013bdb30197c0fb19bd8
David Mason [Thu, 6 Jun 2019 00:30:46 +0000 (17:30 -0700)]
APIs to allow profilers to use DoStackSnapShot on Linux (dotnet/coreclr#24968)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8cb41af71ecff4e53fd02242b2710fcf6a4102ac
Sergey Andreenko [Thu, 6 Jun 2019 00:25:24 +0000 (17:25 -0700)]
Fix GCStress coverage for multi reg returns. (dotnet/coreclr#24826)
* Extract ReplaceInstrAfterCall.
* Avoid GCStress when return multireg with pointers.
Determinate when we need to protect the second register and do not cause GCStress in such cases.
* Add a repro test.
* Reenable MethodImplOptionsTests.
* Extract IsGcCoveregeInterruptInstruction.
That changes how we do checks for arm32 in `IsGcCoverageInterrupt`.
* Tolerate direct call to JIT_RareDisableHelper.
x86 ILStubClass:IL_STUB_PInvoke(byref,ref,int,byref):int generates it like:
Generating: N119 ( 4, 7) [000118] ------------ * RETURNTRAP int REG NA
IN0021: cmp dword ptr [0F9BF9F8H], 0
New Basic Block BB10 [0009] created.
IN0022: je L_M6496_BB10
Call: GCvars=
00000001 {V01}, gcrefRegs=
00000000 {}, byrefRegs=
00000000 {}
IN0023: call CORINFO_HELP_STOP_FOR_GC
* Support GC stress protect return 1/2/both Unix x64.
* Fix arm64.
Do not insert GC Stress instrucitons when we can't determinate the exact return kind.
* Fix review1.
* Fix review2.
* Change the test as Andy suggested.
* Fix some typos.
* Replace all SLOT with PBYTE.
* Disable assert that can fail because of multithreading.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3dd303f0004ed4771bc29167df30efda07e4cf7e
Sergey Andreenko [Thu, 6 Jun 2019 00:12:26 +0000 (17:12 -0700)]
Reenable StackTracePreserveTests.
I was not able to repro any failures, maybe they were fixed already. Lets see what ci thinks.
Commit migrated from https://github.com/dotnet/coreclr/commit/
13c180d668dd445f86d0e13b47e2a272c01e6223
Andy Hanson [Wed, 5 Jun 2019 23:58:56 +0000 (16:58 -0700)]
Fix PAL_GetLogicalProcessorCacheSizeFromOS on mac (dotnet/coreclr#24777)
* Fix PAL_GetLogicalProcessorCacheSizeFromOS on mac
In a previous PR
(https://github.com/dotnet/coreclr/commit/dotnet/coreclr@
ed52a006c01a582d4d34add40c318d6f324b99ba#diff-8447e54277bb962d167a77bb260760d7R1879),
GetCacheSizePerLogicalCpu was changed to no longer rely on cpuid on
amd64 systems; instead it uses GetLogicalProcessorCacheSizeFromOS().
Unfortunately that function consisted of a number of `#if`s, none of
which were active on macs, and we just returned 0. This caused us to
default to a gen0size of only 0.25MB, causing many GCs.
Fixed by adding a new case that uses `sysctlbyname`.
Fix dotnet/coreclr#24658
* Fixes from code review
* Check for function sysctlbyname instead of header
Commit migrated from https://github.com/dotnet/coreclr/commit/
5d4ff2f11a87d7d434d05e72744946f48e017b11
fadimounir [Wed, 5 Jun 2019 23:50:14 +0000 (16:50 -0700)]
Shortenning /Platform_Assemblies_Paths to just /p for convenience. Leaving the original switch name for compatibility reasons.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fea52867fd66e02018af79e761a813cdf07e6364
Egor Chesakov [Wed, 5 Jun 2019 23:24:12 +0000 (16:24 -0700)]
Zero initReg in genSetGSSecurityCookie (dotnet/coreclr#24371)
Fix an issue that is reproduced when
1) a register is used in the prolog for initializing GSSecurityCookie (i.e. the register contains a random non-zero value) and
2) the same register holds a must-init GC variable in the next basic block and
3) the variable is live at the beginning of this basic block.
The register was not zeroed at the end of the prolog and this was causing segmentation fault during GC.Collect().
Commit migrated from https://github.com/dotnet/coreclr/commit/
10df20ed3ff0208b3f16f79d5062662a8827f579
Santiago Fernandez Madero [Wed, 5 Jun 2019 22:55:52 +0000 (15:55 -0700)]
Merge pull request dotnet/coreclr#24937 from safern/FixNullableAnnotationsApiReview
Fix some nullable annotations from API Review
Commit migrated from https://github.com/dotnet/coreclr/commit/
a64cb0a41a4ebeb4a61b8b0f1f2eeeff8dd539c9
Carol Eidt [Wed, 5 Jun 2019 21:51:04 +0000 (14:51 -0700)]
Cleanup block stores and test for 24846 (dotnet/coreclr#24950)
* Cleanup block stores and test for 24846
Fix zero-length assert/bad codegen for initblk.
Remove redundant assertions in codegen and those that don't directly relate to codegen requirements.
Eliminate redundant LEA that was being generated by `genCodeForCpBlk`.
Rename `genCodeFor[Cp|Init]Blk` to `genCodeFor[Cp|Init]BlkHelper` to parallel the other forms.
Fix the test case for dotnet/coreclr#24846.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3809a06b68ac70148a19a37cd3cec650ba4f27c7
Jeremy Koritzinsky [Wed, 5 Jun 2019 21:49:17 +0000 (14:49 -0700)]
Add test verifying reliable SafeHandle unmarshalling (dotnet/coreclr#24959)
* Add test ensuring we correctly unmarshal a SafeHandle even when the stub throws an exception.
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2db030f1b9f1a5184ea3fd27ccbefb4588d4451
Jeremy Koritzinsky [Wed, 5 Jun 2019 21:48:55 +0000 (14:48 -0700)]
Use Modern CMake features instead of CMAKE_CXX_FLAGS (dotnet/coreclr#24861)
* Convert C++ standard settings and warning options from CMAKE_<LANG>_FLAGS to Modern CMake isms.
* More $<COMPILE_LANGUAGE> generator expressions instead of CMAKE_CXX_FLAGS.
* Use $<COMPILE_LANGUAGE:CXX> for all -fpermissive usage
* Fix generator expression that generates multiple flags
* Fix invalid use of CMAKE_CXX_FLAGS instead of CMAKE_C_FLAGS.
* Treat AppleClang as though it is Clang (match pre-3.0 behavior).
* Update our build system to understand that AppleClang is distinct from Clang and remove CMP0025 policy setting.
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90dd13ee1bd497d7724c2b1d0fd833d42f7001ad
Santiago Fernandez Madero [Wed, 5 Jun 2019 19:04:05 +0000 (12:04 -0700)]
Disable corefx tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
93d65bec7056bd753e044a7146598dc2f0458349
Sergey Andreenko [Wed, 5 Jun 2019 18:52:47 +0000 (11:52 -0700)]
Small fixes around AST nodes. (dotnet/coreclr#24957)
* Fix MEASURE_NODE_SIZE and naming mistakes.
* The additional fields were deleted in dotnet/coreclr#14582 (~1.5 years ago).
* Fix GT_INDEX_ADDR def.
We created them as `new (this, GT_INDEX_ADDR) GenTreeIndexAddr` but used smaller `GenTreeIndex` as nessecary size.
* Use LargeOpOpcode instead of GT_CALL.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d7e49efa6b41afb2b7a9ee3adc8f0850b968562a
Jeremy Koritzinsky [Wed, 5 Jun 2019 16:58:04 +0000 (09:58 -0700)]
Resolve Windows 10 Kits dir via the environment variable. (dotnet/coreclr#24960)
* Resolve Windows 10 Kits dir via environment variable.
Commit migrated from https://github.com/dotnet/coreclr/commit/
19d9503af320d24a44f125e7c6d5fda08f4a5e6e
Sinan Kaya [Wed, 5 Jun 2019 01:33:50 +0000 (21:33 -0400)]
signedness (dotnet/coreclr#24878)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac70d9bbbe058730d9da0d7f346515090098726d
Santiago Fernandez Madero [Wed, 5 Jun 2019 00:09:30 +0000 (17:09 -0700)]
Remove stale Task async extension methods from TaskExtensions (dotnet/coreclr#24958)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3366b328bb5fc15451b605074b2efd9177b985f1
Santiago Fernandez Madero [Tue, 4 Jun 2019 23:27:55 +0000 (16:27 -0700)]
Remove Collection<T> range APIs (dotnet/coreclr#24938)
Commit migrated from https://github.com/dotnet/coreclr/commit/
89df4b9d928c7f21550d487328f5db000a498bdf
Jan Kotas [Tue, 4 Jun 2019 22:38:47 +0000 (15:38 -0700)]
Synchronize managed and unmanaged Variant fields (dotnet/coreclr#24951)
* Synchronize managed and unmanaged Variant fields
Fixes dotnet/coreclr#24948
Commit migrated from https://github.com/dotnet/coreclr/commit/
c57822327a17408c44853ae1ce22d581b5047ab6
Santiago Fernandez Madero [Tue, 4 Jun 2019 22:26:31 +0000 (15:26 -0700)]
More PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9e65b9ae77fa06a51d6e51ee92426beddd61e58
Andrew Au [Tue, 4 Jun 2019 21:48:13 +0000 (14:48 -0700)]
Make sure we can enable auto-trace when the root level define is added (dotnet/coreclr#24955)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e7ca330168c7e74f6ab77ae33ea536bfe3ffba15
Santiago Fernandez Madero [Tue, 4 Jun 2019 21:09:50 +0000 (14:09 -0700)]
PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
30402ab51681ee7d256a69acff6c0529d7eb4c6c
Andrew Au [Tue, 4 Jun 2019 20:17:51 +0000 (13:17 -0700)]
EventPipe fixes (dotnet/coreclr#24952)
Commit migrated from https://github.com/dotnet/coreclr/commit/
902c6b772e9132389cbfea8c759315620e7c0e57
Jeremy Koritzinsky [Tue, 4 Jun 2019 18:49:51 +0000 (11:49 -0700)]
Fix PGO on Windows (dotnet/coreclr#24949)
* Add warning disables around InitJITHelpers1 for C4731
* Move configureoptimization up in configurecompiler.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed882b151fc20ddaddaabd96bd67b034c6069211
dotnet-maestro[bot] [Tue, 4 Jun 2019 16:20:49 +0000 (09:20 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#24883)
* Update dependencies from https://github.com/dotnet/corefx build
20190603.11
- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview7.19303.11
- Microsoft.NETCore.Platforms - 3.0.0-preview7.19303.11
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview7.19303.11
* Add Microsoft.Diagnostics.Runtime to CoreFx.depproj
* Remove removed commands from RunTests.cmd/sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
3c01e17de0c6651d4049c5ed5e4ac2d8ee5ae8c9
John Salem [Tue, 4 Jun 2019 16:09:59 +0000 (09:09 -0700)]
Update to AutoTrace (dotnet/coreclr#24936)
* * Add license headers to autotrace.h|cpp
* use W() macro for getting correct string literal type
* formalize env vars to be COMPlus_* style
* add documentation
* modify cmake files to have the flag and set default value to 0
* Fix typo
Commit migrated from https://github.com/dotnet/coreclr/commit/
b3ff5135ecba8d47cca9c02550d04e592b2e2310
Youssef1313 [Tue, 4 Jun 2019 15:30:26 +0000 (17:30 +0200)]
Being consistent (dotnet/coreclr#24927)
Being consistent using all if statement with curly braces.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8368b69bea1e70933f24a42cf626e90c1266cbfd
Adam Sitnik [Tue, 4 Jun 2019 13:20:28 +0000 (15:20 +0200)]
follow the ICU User Guide recommendation to optimize the perf of InvariantCultureIgnoreCase on Linux (dotnet/coreclr#24889)
* follow the ICU User Guide recommendation to optimize the perf of InvariantCultureIgnoreCase on Linux:
1. try to guess the max size and call ucol_getSortKey just once
2. if the buffer is not big enough, call the method again providing the actual sort key length
* handle 0 case
* handle integer overflow
* shorten the time the buffers are pinned
* use the cheapest pinning
* code review fixes: don't use variable length stackalloc, don't copy text from docs (licensing) + don't try to go with the fast path when it would require allocating more managed memory for big strings
* simplify the condition
Commit migrated from https://github.com/dotnet/coreclr/commit/
efa78b16e71d05a5f0c061abc559f09ee6f68dbb
Santiago Fernandez Madero [Tue, 4 Jun 2019 06:37:44 +0000 (23:37 -0700)]
PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d98b4875ae456d3f58cae75c009afabf19d0d15
Santiago Fernandez Madero [Tue, 4 Jun 2019 00:17:26 +0000 (17:17 -0700)]
Fix some nullable annotations from API Review
Commit migrated from https://github.com/dotnet/coreclr/commit/
4adb4abf3dbeff4fb3070315368f49d66c732862
Maoni Stephens [Tue, 4 Jun 2019 04:28:01 +0000 (21:28 -0700)]
fix doc for stress run instructions (dotnet/coreclr#24941)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ab8b90ca9f8748776b00cc21cd5740b53dec67b
Stephen Toub [Tue, 4 Jun 2019 03:56:17 +0000 (23:56 -0400)]
Specify TaskScheduler.Default in EventPipeEventDispatcher (dotnet/coreclr#24930)
Just in case there's a non-default TaskScheduler in play, explicitly specify TaskScheduler.Default so that we don't accidentally schedule this task to another scheduler, in which case it's up to that scheduler if and how to respect the LongRunning request.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4bbbd6ea114eda756fe7f99e29ca8d908160521
Vladimir Sadov [Tue, 4 Jun 2019 03:55:42 +0000 (20:55 -0700)]
Added scenario to test that CallGetTotalAllocatedBytes is monotonic in imprecise mode. (dotnet/coreclr#24935)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d4beb59887e94d3b6368cdc23e65c24fa0838fa
Andrew Au [Sat, 1 Jun 2019 06:58:38 +0000 (23:58 -0700)]
Avoid moving the bitOffset twice when enumerating safepoints
Commit migrated from https://github.com/dotnet/coreclr/commit/
a053e826dcb1ce3f58f7b368638b0ef03cf9f270
Jan Kotas [Tue, 4 Jun 2019 02:38:02 +0000 (19:38 -0700)]
Fix signature mismatch between managed and unmanaged GetCodeInfo signatures (dotnet/coreclr#24932)
Fixes dotnet/coreclr#24925
Commit migrated from https://github.com/dotnet/coreclr/commit/
f49eb0db686c4d647dd9e27b44946c5505bb72f4
Koundinya Veluri [Tue, 4 Jun 2019 02:07:06 +0000 (19:07 -0700)]
Remove some event trace asserts that can fail if tracing is stopped at a particular point (dotnet/coreclr#24897)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ebf3370498ddee49d921227c038418ae84dc351e
Stephen Toub [Tue, 4 Jun 2019 01:00:04 +0000 (21:00 -0400)]
Remove unnecessary Shared<T> class from Task (dotnet/coreclr#24931)
It's just StrongBox<T>.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4638845251f0ea0a6d222b645e2d04a406dc4ab6
Stephen Toub [Mon, 3 Jun 2019 20:26:24 +0000 (16:26 -0400)]
Adjust several `where T : class?` constraints (dotnet/coreclr#24894)
* Adjust several `where T : class?` constraints
* Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
70850eae561ad9dd887ce6f9cb3f2bac251de0b5
Tanner Gooding [Mon, 3 Jun 2019 19:15:32 +0000 (12:15 -0700)]
Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class (dotnet/coreclr#24886)
* Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class
* Removing JIT support for the SSE41_TestAllOnes, SSE41_TestAllZeros, and SSE41_TestMixOnesZeros intrinsics
* Removing tests for the Sse41.TestAllOnes, Sse41.TestAllZeros, and Sse41.TestMixOnesZeros methods
Commit migrated from https://github.com/dotnet/coreclr/commit/
7fa9581750aca0d959c334a9767e306251611d82
Mike Danes [Mon, 3 Jun 2019 18:45:24 +0000 (21:45 +0300)]
Remove unnecesesary ifdef comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
49e0d43397b801253ce152485c6629070283f841
John Salem [Mon, 3 Jun 2019 17:16:38 +0000 (10:16 -0700)]
Fix initialize methods to set m_Header correctly (dotnet/coreclr#24892)
* put check in to ensure incoming message header has reasonable size
Commit migrated from https://github.com/dotnet/coreclr/commit/
6631a7a0f9b6268f5e6c0f609a2d0d2a730a2118
Gleb Balykov [Mon, 3 Jun 2019 16:29:39 +0000 (19:29 +0300)]
Fix armel tests build (dotnet/coreclr#24678)
* Fix build-tests script for cross build and fix tests for armel
* Handle case of -skipcrossgen for cross builds
* Fix build error in case of cross builds when ROOTFS_DIR is not passed explicitly
* Fix portable build parameter setup for armel tests build
* Move force of non-portable build for armel from build.sh/build-test.sh to init-distro-rid.sh
* Fix priority1 tests build for armel
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e28c8114d58870ebc1ae8aac51b4539d2314452
Juan Hoyos [Fri, 31 May 2019 19:40:44 +0000 (12:40 -0700)]
Reenable tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
faf97a0305fda484180877a256478012b1dda269
Juan Hoyos [Fri, 31 May 2019 19:33:04 +0000 (12:33 -0700)]
Fix logic for deletion
Commit migrated from https://github.com/dotnet/coreclr/commit/
0faf9d6188fb18c08d864dc2f5c480c0d60f4b7a
Juan Hoyos [Fri, 31 May 2019 17:44:00 +0000 (10:44 -0700)]
Disable event pipe tests for investigation
Commit migrated from https://github.com/dotnet/coreclr/commit/
befcd2ec983fcbdcf5df2f418749876b098cef07
Juan Sebastian Hoyos Ayala [Thu, 30 May 2019 18:16:00 +0000 (18:16 +0000)]
Reenable tests turned off in dotnet/coreclr#24772
Commit migrated from https://github.com/dotnet/coreclr/commit/
bfe34f5b7820452d00b1ec30d803a280decd5cb3
Juan Sebastian Hoyos Ayala [Thu, 30 May 2019 18:12:41 +0000 (18:12 +0000)]
Fix event pipe session provider list clear
Commit migrated from https://github.com/dotnet/coreclr/commit/
b71003fecff4821800cda022ef0d93f15db67329
Carol Eidt [Mon, 3 Jun 2019 13:48:47 +0000 (06:48 -0700)]
JIT HW Intrinsic implementation doc (dotnet/coreclr#23622)
* JIT HW Intrinsic implementation doc
Commit migrated from https://github.com/dotnet/coreclr/commit/
074ef022ab9cd69837d6b760f02762115568b777
Andrew Au [Fri, 31 May 2019 22:28:16 +0000 (15:28 -0700)]
Final touch
Commit migrated from https://github.com/dotnet/coreclr/commit/
5af77fa0dcc99abb3c9610f1a062493ddc2e0584
John Salem [Sat, 25 May 2019 00:13:06 +0000 (17:13 -0700)]
Productize auto_trace
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf1385c9867fa6a9a5dd1d2d3bfa5c7015f2acd7
Andrew Au [Fri, 3 May 2019 22:43:43 +0000 (15:43 -0700)]
AutoTrace - launch dotnet trace to capture trace as soon as the runtime is available to trace
Commit migrated from https://github.com/dotnet/coreclr/commit/
360d41f4ff93b6507863cb324a247fd7380b4f79
Dan Moseley [Sun, 2 Jun 2019 13:53:55 +0000 (06:53 -0700)]
Improve fatal err msg (dotnet/coreclr#24390)
* Improve fatal err msg
* Match SO format
* a
* Remove dead define
* More adjustments to ex msg
* And PAL
* Remove special case for SOE
* Remove excess Debug.Assert newline
* Remove excess newline
* typo
* New format
* Remove DebugProvider redundancy
* Adjustments
* Remove preceding newline
* Make other SOE and OOM consistent
* Tidy up assertion msg
* Fix missing newline after inner exception divider
* CR when no inner exception
* ToString never CR terminated
* disable corefx tests temporarily
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0381d7bf05cc4a342eb1f7fa33d17885f47d999
Sung Yoon Whang [Sat, 1 Jun 2019 00:17:12 +0000 (17:17 -0700)]
Move EventPipeEventSource deletion to a better place (dotnet/coreclr#24901)
* Move EventPipeEventSource deletion to a better place
* typo
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d783b29087b5f260c9a64f347867bf6f6391bfe
Stephen Toub [Fri, 31 May 2019 23:41:59 +0000 (19:41 -0400)]
Fix FileStream.FlushAsync() to behave like Flush() (dotnet/coreclr#24902)
Flush() behaves like Flush(false) and writes out any buffered data but doesn't P/Invoke to FlushFileBuffers/FSync to flush the OS buffers.
But whereas FlushAsync() is supposed to just be an async equivalent of Flush(), it's actually behaving like Flush(true). This makes FlushAsync() inconsistent and much more expensive. (This is separate from FlushAsync not actually being async, which is an impactful problem to be solved separately.)
This changes FlushAsync to behave like Flush()/Flush(false) rather than Flush(true). If someone wants the FlushFileBuffers/FSync behavior, they can call Flush(true).
Commit migrated from https://github.com/dotnet/coreclr/commit/
436debb93c390e144f9c25b5d1922ac7780745f4
William Godbe [Fri, 31 May 2019 19:48:54 +0000 (12:48 -0700)]
Update branding to preview7 in master (dotnet/coreclr#24895)
Commit migrated from https://github.com/dotnet/coreclr/commit/
525623770c07d83d637fb3f8c7856c85077ffea1
Carol Eidt [Fri, 31 May 2019 18:02:02 +0000 (11:02 -0700)]
Handle a zero byte cpblk (dotnet/coreclr#24871)
Fix dotnet/coreclr#24846
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d21b57657f8135622797f0db29460c975dd2339
Jan Vorlicek [Fri, 31 May 2019 16:46:12 +0000 (18:46 +0200)]
Fix overlooked moduleIndex initial value (dotnet/coreclr#24881)
When adding the signature copying some time ago, I have overlooked one
place where the moduleIndex was set to -1 instead of MODULE_INDEX_NONE.
I was using the -1 during the development and replaced it by creating
MODULE_INDEX_NONE during final cleanup at all but one places.
This caused issues during crossgen even without large version bubble
enabled. Methods requiring generic constraint were not crossgen-ed due
to this.
Commit migrated from https://github.com/dotnet/coreclr/commit/
795f2fd2a67047519b477cd1776626368c88e73c
Vladimir Sadov [Fri, 31 May 2019 14:45:03 +0000 (07:45 -0700)]
Makes GetTotalAllocatedBytes monotonic in nonprecise case. (dotnet/coreclr#24875)
* Makes GetTotalAllocatedBytes monotonic in nonprecise case.
Fixes:dotnet/coreclr#24615
* read `dead_threads_non_alloc_bytes` atomically on 32bit platforms
* Update src/vm/comutilnative.cpp
Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bbac00d8344195da3c9ee60dad31d0036b7dec0