John Salem [Tue, 23 Jul 2019 17:00:17 +0000 (10:00 -0700)]
Delay Diagnostics IPC response till after EventPipe::Enable has completed (dotnet/coreclr#25760)
* Refactor IPC response to after EventPipe::Enable is finished
* Refactor EventPipeFile initialization and EventPipeBufferManager flushing to be manually started after the IPC response has been sent
* Change EventPipeSession::Enable to EventPipeSession::StartStreaming
Commit migrated from https://github.com/dotnet/coreclr/commit/
1898c0f4e99a476bb6d14f7b05f06560c349465f
Michal Strehovský [Tue, 23 Jul 2019 12:14:16 +0000 (14:14 +0200)]
Allow creating typehandles to `TypedReference*` (dotnet/coreclr#25817)
It's unclear why this was disallowed - we allow them in method signatures and there's a comment a couple lines below the code I'm touching saying we thought about blocking this for byref-like types, but there's no reason to do that.
`TypedReference` is the original byref-like type.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2354d0b92f703b79f184a07557f9221dc11224d9
Konstantin Baladurin [Tue, 23 Jul 2019 04:01:22 +0000 (07:01 +0300)]
corbbtprof: set byte alignment for CORBBTPROF structures (dotnet/coreclr#25816)
Fix patch fixes SIGBUG that occurs due to unaligned read/write
Commit migrated from https://github.com/dotnet/coreclr/commit/
53b1a71d230851f32a2bf904ed030f2755bcf253
Stephen Toub [Tue, 23 Jul 2019 01:26:12 +0000 (21:26 -0400)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25807)
* Update dependencies from https://github.com/dotnet/corefx build
20190719.9
- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19369.9
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19369.9
* Update dependencies from https://github.com/dotnet/corefx build
20190720.5
- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19370.5
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19370.5
* Update dependencies from https://github.com/dotnet/corefx build
20190721.2
- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19371.2
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19371.2
Commit migrated from https://github.com/dotnet/coreclr/commit/
fadee1275f3722a11bd37b8c03d80fd748bd025d
Egor Chesakov [Tue, 23 Jul 2019 00:57:35 +0000 (17:57 -0700)]
Unconditionally capture output of xUnit tests (dotnet/coreclr#25207)
* Unconditionally capture output of xUnit tests
* Remove all Unicode control characters before outputting them into an xUnit test result file
Commit migrated from https://github.com/dotnet/coreclr/commit/
8d7ebc3b7b965cdde0ee5d8051e9de1cec39fc64
mikedn [Mon, 22 Jul 2019 21:32:45 +0000 (00:32 +0300)]
Remove GTF_REVERSE_OPS checks from LSRA (dotnet/coreclr#22489)
GTF_REVERSE_OPS is cleared during rationalization.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a8529c6130f6c70488e8bace26404b319eed00f
Ivan [Mon, 22 Jul 2019 04:24:37 +0000 (23:24 -0500)]
Updated Build Instructions (dotnet/coreclr#25796)
Instructions were updated and validated to reflect latest releases of components that are needed to build coreclr.
Fix dotnet/coreclr#25723
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f93d3b1c48ba6916d5f31d79cb7c17d564eecef
Bruce Forstall [Sat, 20 Jul 2019 15:58:18 +0000 (08:58 -0700)]
Fix Linux compilation flags (dotnet/coreclr#25801)
`configureoptimization.cmake` was being included before `CLR_CMAKE_PLATFORM_UNIX`
was set, though it depends on that variable to set Linux optimization
flags. Move the include lower, after `CLR_CMAKE_PLATFORM_UNIX` is set.
This leads to Debug builds being built with `-O0` and Checked builds built
with `-O2`, instead of the default due to no `-O` flag being passed. Release
is still built `-O3`; somehow, it was being built that way already.
Fixes dotnet/coreclr#25273 (Although Alpine will still see a stack overflow in the failing
test case with Debug builds, it won't affect Checked build CI runs, which is
the primary flavor tested in coreclr CI.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
500430f40b3420615b67998f003fbf57ad8f5234
Steve MacLean [Sat, 20 Jul 2019 15:49:29 +0000 (11:49 -0400)]
Arm64 define FEATURE_DATATARGET4 (dotnet/coreclr#25804)
FEATURE_DATATARGET4 enables the portable out of
process stack unwind
Commit migrated from https://github.com/dotnet/coreclr/commit/
0b8c84535b267ee6a99ba5059146ba5b93dd6c0a
Jan Vorlicek [Sat, 20 Jul 2019 03:16:44 +0000 (05:16 +0200)]
Revert "Enable MHR support on OSX (dotnet/coreclr#25716)" (dotnet/coreclr#25803)
This reverts commit dotnet/coreclr@
7a970842ebd88686851af53edee689a3149737bf.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1991a9ac761e8684ada594bc5a9fef0817c98602
Steve MacLean [Sat, 20 Jul 2019 02:22:53 +0000 (22:22 -0400)]
Remove dead ContextTransitionFrame (dotnet/coreclr#25800)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b091f2e31de8aff003e1f0cbe14790b1f1632456
Jan Kotas [Fri, 19 Jul 2019 22:23:12 +0000 (15:23 -0700)]
Delete old test .lst files (dotnet/coreclr#25797)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff1d0bd18840ea189f41a5ae87e987551cb5d886
Sung Yoon Whang [Fri, 19 Jul 2019 21:04:58 +0000 (14:04 -0700)]
Fix first value of counter payload being skewed (dotnet/coreclr#25739)
* Fix issue 25709
* rename
* Fix regression test
* cleanup
* Code review feedback
* set maxincrement to 3
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf5b3df91453f4fc3071ab320be64352fba110ca
Jeremy Koritzinsky [Fri, 19 Jul 2019 17:09:27 +0000 (10:09 -0700)]
Rewrite SafeHandle interop tests (dotnet/coreclr#25784)
* Completely rewrite the SafeHandle tests to not only be readable but easily understandable with nicer naming.
* Add useful portion of abstract-derived test back. Enable SafeHandle test off-Windows.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e42331e1943c91d288d8f5ee623926306e66f590
José Rivero [Fri, 19 Jul 2019 16:43:25 +0000 (09:43 -0700)]
Remove assertion from Shutdown path (dotnet/coreclr#25786)
The diagnostics server is doing nothing to handle potential errors in this path.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4aa63bfd94304547e6722d9dce2b0d5f6de5e173
Jan Kotas [Thu, 18 Jul 2019 21:19:17 +0000 (14:19 -0700)]
Fixes towards making the standalone GC PAL to be in sync with the built-in PAL
Commit migrated from https://github.com/dotnet/coreclr/commit/
0463767cd7362a0044c4c7af0feda5bd9ad94804
Andy Hanson [Fri, 19 Jul 2019 07:36:19 +0000 (00:36 -0700)]
Fix typo: `_TARGET_X86` -> `_TARGET_X86_` (dotnet/coreclr#25788)
This typo was in dotnet/coreclr#24989 so would be a new regression in 3.0.
In an x86 build, it causes us to not get the cache size correct,
leading us to use a smaller default cache size and do more GCs.
Tested with GCPerfSim and this PR reduces TotalNumberGCs by 33% using an x86 build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ba39a155d59b139b7a15f50d3b80b531d9359f84
Dong-Heon Jung [Fri, 19 Jul 2019 14:52:35 +0000 (23:52 +0900)]
Remove a redundant #ifdef directive (dotnet/coreclr#25768)
Commit migrated from https://github.com/dotnet/coreclr/commit/
59df10dd6a70f5096e67971969e73ad13aa82efc
Vitek Karas [Fri, 19 Jul 2019 14:52:16 +0000 (07:52 -0700)]
Random cleanup of binder code (dotnet/coreclr#25773)
Commit migrated from https://github.com/dotnet/coreclr/commit/
007c6bc5d749c6cbd5fd106a2053ef5563d12c1d
Mukul Sabharwal [Fri, 19 Jul 2019 08:12:33 +0000 (01:12 -0700)]
Move GetRawData and GetRawSzArrayData to RuntimeHelpers instead of JitHelpers (dotnet/coreclr#25765)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5d265a8b85f6118b1ddcee39f84c680bb652fc4e
Vitek Karas [Fri, 19 Jul 2019 07:20:05 +0000 (00:20 -0700)]
Fix PInvoke primitive test to actually test the desired method (dotnet/coreclr#25608)
The test didn't really call the Marshal_Out native method. Fixed it (probably a copy/paste error). Also fixed some of the error messages.
Commit migrated from https://github.com/dotnet/coreclr/commit/
20d8e5c7c0959406d23909318ac73b2b4e13ecf2
Steve MacLean [Fri, 19 Jul 2019 04:30:09 +0000 (00:30 -0400)]
Arm32 support VFP registers context to/from native context (dotnet/coreclr#25775)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2edc1ca3a66cd4e9a9c665f3bfcfbec8a93497a
Jarret Shook [Fri, 19 Jul 2019 04:07:08 +0000 (21:07 -0700)]
Fail to explicitly tail call on x86 unix. (dotnet/coreclr#25032)
* Fail to explicitly tail call on x86 unix.
* Correctly return 100
* Correct return value
* Add noway assert in morphTailCall to avoid morphing slow tail calls on unix.
* Address feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
f84cd98148ca1ae5f31f9ff2130c705b726c1997
Andrew Au [Fri, 19 Jul 2019 02:33:42 +0000 (19:33 -0700)]
A simple disassembler fix (dotnet/coreclr#25780)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f9e70b0f476750e846dc8b37128d76eed26a9e0
Andrew Au [Thu, 18 Jul 2019 23:55:39 +0000 (16:55 -0700)]
Make sure we use a 64 bit number to represent memory limit (even in 32 bit architectures) (dotnet/coreclr#25724)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a1e1fa349e09471c88e884f80172f23780f8cf3f
Tanner Gooding [Thu, 18 Jul 2019 22:15:00 +0000 (15:15 -0700)]
Fixing Buffer::BlockCopy, JIT_MemCpy, and JIT_MemSet to just call the appropriate CRT functions for x64 Windows, as is already done for all other platforms/targets (dotnet/coreclr#25750)
* Fixing Buffer::BlockCopy to just call the CRT memmove for x64 Windows, as is already done for all other platforms/targets
* Fixing up the x64 CrtHelpers.asm to just forward to the CRT implementations for JIT_MemSet and JIT_MemCpy
* Keep unix using memcpy and clarify that Windows uses memmove for full framework compat.
Commit migrated from https://github.com/dotnet/coreclr/commit/
54d9d9b2698c9628f43494e46f855996b31838bd
Steve MacLean [Thu, 18 Jul 2019 20:12:06 +0000 (16:12 -0400)]
Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25777)
Commit migrated from https://github.com/dotnet/coreclr/commit/
da2c5c544006ba068a702e026cf0a6b2ee0fe144
Koundinya Veluri [Thu, 18 Jul 2019 17:46:52 +0000 (10:46 -0700)]
Fix and remove/move some threading tests (dotnet/coreclr#25496)
Fixes https://github.com/dotnet/coreclr/issues/23442
Fixes https://github.com/dotnet/coreclr/issues/23992
- Removed many abandoned mutex tests that will be replaced with improved tests in CoreFX with fixed timing issues and reduced redundancy
- Some WaitAny tests would also be replaced but were not removed due to pending failures with issues filed, cause not yet known
Fixes https://github.com/dotnet/coreclr/issues/24179
- Fixed torn read of double on 32-bit platforms
Fixes https://github.com/dotnet/coreclr/issues/25372
- The test only allowed one second for all registered waits to be processed, fixed to allow more time and succeed faster
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e9364251f70f0d059c5284f0fa46cd0b65f690c
Steve MacLean [Thu, 18 Jul 2019 16:59:01 +0000 (12:59 -0400)]
Revert "Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25766)" (dotnet/coreclr#25776)
This reverts commit dotnet/coreclr@
1d47f41f3d3d1e391818323df4378e82b95292f8.
Commit migrated from https://github.com/dotnet/coreclr/commit/
88a206498a6f6a0d3e2e4fcdd40ff8fceacbfc8c
Steve MacLean [Thu, 18 Jul 2019 15:39:01 +0000 (11:39 -0400)]
Arm64 : Fix ldr Dt/St emulation (dotnet/coreclr#25729)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b6e658d36135ff871f24a8530855e3f94d9e447
Steve MacLean [Thu, 18 Jul 2019 15:37:37 +0000 (11:37 -0400)]
Arm64 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25743)
Commit migrated from https://github.com/dotnet/coreclr/commit/
acb5ac69bf84f4c36a6ceb759bfafc4e24825ca4
Steve MacLean [Thu, 18 Jul 2019 08:15:53 +0000 (04:15 -0400)]
Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25766)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d47f41f3d3d1e391818323df4378e82b95292f8
Steve MacLean [Thu, 18 Jul 2019 08:14:40 +0000 (04:14 -0400)]
Arm64 support SIMD registers context to/from native context (dotnet/coreclr#25757)
Commit migrated from https://github.com/dotnet/coreclr/commit/
813b9cb98f6f10c732e28d28c9ca892d91347d0e
Steve MacLean [Wed, 17 Jul 2019 22:26:37 +0000 (18:26 -0400)]
Add a few #if... FEATURE_EMULATE_SINGLESTEP (dotnet/coreclr#25637)
When the feature flag was added a few places were missed
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec253c38768bdbac40e07c1de3e43a91ff6f226c
Koundinya Veluri [Wed, 17 Jul 2019 21:12:49 +0000 (14:12 -0700)]
Temporarily make a default interface method test incompatible for GCStress (dotnet/coreclr#25746)
Related to https://github.com/dotnet/coreclr/issues/25690
Commit migrated from https://github.com/dotnet/coreclr/commit/
83587b68cb3d93119eb50c50fdf79fe6f04c3305
Stephen Toub [Wed, 17 Jul 2019 20:38:09 +0000 (16:38 -0400)]
Make all event types nullable (dotnet/coreclr#25752)
Late-breaking design change: all events should be declared with nullable delegate types.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ba2e15201361402acd0ae9710bd37d50785cdfa
Steve MacLean [Wed, 17 Jul 2019 17:28:11 +0000 (13:28 -0400)]
Arm64 Fix Rtl*Context (dotnet/coreclr#25745)
Fix issues related to save restore of FPCR/FPSR/V0/V31
There were several bugs in the assembly causing FPCR/FPSR
to overwrite V0 on RtlCaptureContext. Then restore from V0 on
RtlRestoreContext
Commit migrated from https://github.com/dotnet/coreclr/commit/
76b7cd16c746333dffe763a037baeff9f3b73ee2
Stephen Toub [Wed, 17 Jul 2019 17:01:37 +0000 (13:01 -0400)]
Remove now unnecessary !s / TODO-NULLABLE comments (dotnet/coreclr#25749)
* Remove !s and TODO-NULLABLE comments for [DoesNotReturn]
* Remove !s and TODO-NULLABLE comments for [NotNullIfNotNull]
* Remove !s and TODO-NULLABLE comments for writes via Interlocked.CompareExchange
* Remove !s and TODO-NULLABLE comments for Debug.Assert on fields
* Update/add several TODO-NULLABLE comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
45e48343c7abc064c829d53028f9e581a87ee027
José Rivero [Wed, 17 Jul 2019 16:20:09 +0000 (09:20 -0700)]
Fix: Diagnostics Server IPC thread causes 20-40ms shutdown delays on Windows (dotnet/coreclr#25602)
Now, the diagnostics server attempts to do appropriate cleanup of its resources during shutdown.
```log
1. Closes the IPC channel
2. if Windows:
- Cancel sync IO operations on the running server thread
3. Closes the running server thread handle
```
This change alleviates the issue because it manually cancel the blocking `ConnectNamedPipe` sync call in order to allow the server thread exit gracefully (instead of waiting for the OS to tear it down).
Fixes: https://github.com/dotnet/coreclr/issues/25463
Commit migrated from https://github.com/dotnet/coreclr/commit/
dedef281de99a2c2c4777f27166c166b08024b6f
Omair Majid [Wed, 17 Jul 2019 15:49:31 +0000 (11:49 -0400)]
Change [:space:] to [[:space:]] in awk scripts (dotnet/coreclr#25670)
During coreclr build on RHEL 7, awk prints out some warnings:
awk: /builddir/build/BUILD/dotnet-v2.2.6/src/coreclr/generateredefinesfile.awk:10:
warning: regexp component `[:space:]' should probably be `[[:space:]]'
The awk man page says:
A character class is only valid in a regular expression inside the
brackets of a character list.
So fix the '[:space:]' notation by replacing with the valid
'[[:space:]]'.
Fixing this warning doesn't actually result in a change in the generated
files (dbgshim.exports, mscordbi.exports, libredefines.inc,
palredefines.inc, clrjit.exports, mscordac.exports, coreclr.exports,
dlltest1.exports and dlltest2.exports) on my system.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90de19f0c55615982f8a787cf4acecf2debe6e17
Santiago Fernandez Madero [Wed, 17 Jul 2019 00:22:54 +0000 (17:22 -0700)]
Fix nullability warnings from compiler update
Commit migrated from https://github.com/dotnet/coreclr/commit/
dbc0e19e87e1ac6e2be33a1ddeea95f21ba2bc39
Michal Strehovský [Wed, 17 Jul 2019 12:51:33 +0000 (14:51 +0200)]
R2RDump: Add support for partially interruptible regions (dotnet/coreclr#25626)
We were basically missing this block:
https://github.com/dotnet/coreclr/blob/dotnet/coreclr@
030a3ea9b8dbeae89c90d34441d4d9a1cf4a7de6/src/vm/gcinfodecoder.cpp#L726-L810
Commit migrated from https://github.com/dotnet/coreclr/commit/
4294348f888f4cb503a7dd43a7463451654f0bd9
Jan Vorlicek [Wed, 17 Jul 2019 10:14:42 +0000 (12:14 +0200)]
Enable MHR support on OSX (dotnet/coreclr#25716)
* Enable MHR support on OSX
* Move JIT_WriteBarrier that is modified at runtime to a dynamically
allocated memory instead of making a page in libcoreclr.dylib RWX.
* Update PAL to add MEM_JIT flag for allocations and reservations of
executable memory.
* Update native runtime in EH and stack unwinding areas so that it can
unwind from the write barrier copy. That code has no unwind info, so
without special handling, runtime would not be able to unwind from
it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7a970842ebd88686851af53edee689a3149737bf
Dong-Heon Jung [Wed, 17 Jul 2019 03:09:40 +0000 (12:09 +0900)]
Fix a build error when IBCLOGGER_ENABLED is not defined (dotnet/coreclr#25691)
- Even if DACCESS_COMPILE or CROSSGEN_COMPILE is defined,
coreclr can be built without IBCLOGGER_ENABLED definition.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e416e30a06feef0fc9814d86a7b6493e7f99043
Jan Kotas [Wed, 17 Jul 2019 02:54:54 +0000 (19:54 -0700)]
Delete PAL tests for GetDateFormat and GetCalendarInfo (dotnet/coreclr#25675)
These APIs do not exist in the CoreCLR PAL anymore.
Commit migrated from https://github.com/dotnet/coreclr/commit/
208f92b807e5fa1c267d02f9070a0b589da2ac4f
Jan Kotas [Wed, 17 Jul 2019 02:54:40 +0000 (19:54 -0700)]
Rename GC's config.h to avoid name collisions (dotnet/coreclr#25665)
* Rename GC's config.h to avoid name collisions
Port https://github.com/dotnet/corert/pull/7596 to CoreCLR
* Fix build break
Commit migrated from https://github.com/dotnet/coreclr/commit/
e24361b804067a2e931e5064bbaba0f31fb64946
Swift Kim [Wed, 17 Jul 2019 02:54:03 +0000 (11:54 +0900)]
Build error fix on FEATURE_PREJIT=true (dotnet/coreclr#25660)
This fix is to update usages of SetupGcCoverage() under
FEATURE_PREJIT aligned to the signature change in dotnet/coreclr#25261.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6116c57190dc8332b4ff30e90e4aab936a7078cb
Jan Kotas [Wed, 17 Jul 2019 02:53:40 +0000 (19:53 -0700)]
Delete unnecessary method (dotnet/coreclr#25661)
Commit migrated from https://github.com/dotnet/coreclr/commit/
cfb9a3584a4e8b6cea3a656a3793e177a583fd09
William Godbe [Tue, 16 Jul 2019 22:48:30 +0000 (15:48 -0700)]
Update branding to 5.0 (dotnet/coreclr#25704)
* Update branding to 5.0
* Update Prerelease to alpha1
Commit migrated from https://github.com/dotnet/coreclr/commit/
0cc81b60eb184c92b8526348d4bb056ed563e9d6
Stephen Toub [Tue, 16 Jul 2019 19:28:53 +0000 (15:28 -0400)]
Disable debugger evaluation of ValueTask<T>.Result (dotnet/coreclr#25727)
If the debugger evaluates a `ValueTask<T>`'s `Result`, that counts as the "you should only consume a `ValueTask<T>`" once, and ends up breaking / hanging / throwing exceptions and other bad stuff while stepping through code in the debugger.
This commit addresses that in two ways:
1. Adds `[DebuggerBrowsable(Never)]` to `Result` to prevent it from showing up in debugger views.
2. Adds a NotifyOfCrossThreadDependency call to its ToString. This prevents the debugger from using ToString to show an implicit representation of the instance, and it forces the developer explicitly trying to access ToString (e.g. in the watch window) to click a button acknowleding the impact.
(Post 3.0, we should consider removing the `ValueTask<T>.ToString()` override altogether.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f713f7067ffb6adaa1549f626f6bd04128f0de6
Michal Strehovský [Tue, 16 Jul 2019 14:36:01 +0000 (16:36 +0200)]
Update the execution strategy doc (dotnet/coreclr#25717)
Addressing post-merge feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
760ac265a16bb855496351ad975cbdca748e7a4b
Steve MacLean [Tue, 16 Jul 2019 14:06:52 +0000 (10:06 -0400)]
Add missing Arm64 specific diagnostic code (dotnet/coreclr#25695)
* Arm64 ICorDebugRegisterSet float support
* Arm64 ICorDebugRegisterSet2 implementation
* Add arm64 VLT_REG_FP case
* Arm64 add funceval GetRegister SetRegister support
Commit migrated from https://github.com/dotnet/coreclr/commit/
f5b1b889a0480eecf7068db4a17e8dd35a7ed878
John Salem [Tue, 16 Jul 2019 00:28:57 +0000 (17:28 -0700)]
Add EventPipe/DiagnosticsIpc tests (dotnet/coreclr#25457)
* Add Microsoft.Diagnostics.Tools.RuntimeClient to dependencies.props
* add EventPipe tests for provider coherence, buffer size resilience, and rundown event presence
Commit migrated from https://github.com/dotnet/coreclr/commit/
8fa6bd4aaa949bbfd3dd263e7327996ab8fa7966
Michal Strehovský [Mon, 6 May 2019 11:16:10 +0000 (13:16 +0200)]
Merge pull request dotnet/corertdotnet/coreclr#7397 from dotnet-bot/from-tfs
Merge changes from TFS
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7fe3cc73d1ee4bbe81b2a5e8a62667b78a02f7ae
Michal Strehovský [Mon, 15 Jul 2019 15:56:43 +0000 (17:56 +0200)]
Add doc about code generation in CoreCLR (dotnet/coreclr#25693)
Something to serve as an entry point to the various code generation and execution technologies in CoreCLR - R2R, tiered compilation, how they fit in.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c6b6ef9be15b5faadc0013fd2e9c816404c7867
Jan Kotas [Sat, 13 Jul 2019 22:15:17 +0000 (15:15 -0700)]
Fix use of uninitialized variables in managed decimal implementation (dotnet/coreclr#25674)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a98680a4f0ddb1739703ef7815157670f0e4f8c9
Stephen Toub [Thu, 30 May 2019 05:05:11 +0000 (01:05 -0400)]
Handle nullable attributes on platforms that lack them
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
98dadb9b9a9727343c96efa0c30b239aa23459e0
Andy Hanson [Fri, 12 Jul 2019 23:20:52 +0000 (16:20 -0700)]
Fixes when accessing fgn_maxgen_percent (dotnet/coreclr#25650)
* Fixes when accessing fgn_maxgen_percent
PR dotnet/coreclr#25350 changed `fgn_maxgen_percent` to be a per-heap property when
`MULTIPLE_HEAPS` is set. A few uses need to be updated.
* In `full_gc_wait`, must re-read `fgn_maxgen_percent` before the
second test of `maxgen_percent == 0`.
(Otherwise the second test is statically unreachable.)
* In RegisterForFullGCNotification, must set `fgn_maxgen_percent` when
`MULTIPLE_HEAPS` is not set
* In CancelFullGCNotification, must set `fgn_maxgen_percent` for each
heap separately when `MULTIPLE_HEAPS` is set.
Fix dotnet/corefxdotnet/coreclr#39374
* Avoid duplicate code when getting fgn_maxgen_percent twice in full_gc_wait
Commit migrated from https://github.com/dotnet/coreclr/commit/
4b5ae70e341bad3c9f25d33cfee58d2bb93d3db7
Sinan Kaya [Fri, 12 Jul 2019 19:45:28 +0000 (15:45 -0400)]
Frkaya/gccfix07102019 (dotnet/coreclr#25624)
* Remove duplicate definition
* Fix conversion error
* 1ui64 doesn't exist on GCC
Commit migrated from https://github.com/dotnet/coreclr/commit/
41d0619707a29b910b7d8056a3b5d4423fc928d2
Andrew Au [Thu, 11 Jul 2019 21:37:46 +0000 (14:37 -0700)]
PerfMap should output file offset instead of RVAs (dotnet/coreclr#25638)
Commit migrated from https://github.com/dotnet/coreclr/commit/
140e74c7a350a1dfab3d5cd13d13f430265f7446
Jan Vorlicek [Thu, 11 Jul 2019 21:26:14 +0000 (23:26 +0200)]
Fix GS cookie check on ARM in functions with stackalloc (dotnet/coreclr#25628)
* Fix GS cookie check on ARM in functions with stackalloc
The GC cookie check was failing during GC stack walking on ARM for frames
of functions using stackalloc and pinvoke. The InlinedCallFrame stores
only the SP after the stackalloc adjustment and unwinder needs R9
that contains SP before the stackalloc to be able to unwind the frame
to get caller SP. The caller SP is used as a base for getting the GS
cookie address. We were incorrectly setting the R9 in the CONTEXT
to the same value as SP and so the unwinding was getting an incorrect
caller SP.
The fix is to store R9 in the InlinedCallFrame for ARM.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2290c1f10e58feef8636679788eb060705dae9b3
Andy Hanson [Thu, 11 Jul 2019 20:14:34 +0000 (13:14 -0700)]
System.GC.HeapHardLimit and .HeapHardLimitPercent in runtimeconfig.json (dotnet/coreclr#25574)
* System.GC.HeapHardLimit and .HeapHardLimitPercent in runtimeconfig.json
This adds two new configuration options, "System.GC.HeapHardLimit" and
"System.GC.HeapHardLimitPercent" to runtimeconfig.json. These behave the
same as COMPlus_GCHeapHardLimit and COMPlus_GCHeapHardLimitPercent.
* Add cast
* Dummy change to trigger tests rerun
Commit migrated from https://github.com/dotnet/coreclr/commit/
9227bd5385484f4c652d209f6403e8fb78abd25f
Jan Vorlicek [Thu, 11 Jul 2019 18:11:12 +0000 (20:11 +0200)]
Fix handling of NullReferenceException in VSD on ARM (dotnet/coreclr#25627)
* Fix handling of NullReferenceException in VSD on ARM
There was a problem with handling NullReferenceExceptionHandling stemming
from virtual dispatch stub on ARM Linux. While the primary exception was
handled correctly, if the exception was rethrown or another exception
was thrown from the catch handler, it was reported as unhandled even
though there was a proper handler.
The issue was caused by exception unwinding that was unable to unwind past
the frame of the virtual dispatch stub in this case. Such stub is generated
at runtime and there is no unwind info for it.
The fix is to explicitly check for the stub frame and skip it during first
and second pass of exception handling.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9c9fd0cc3623efdface3af63beb829339a5da3f1
Jan Kotas [Thu, 11 Jul 2019 00:03:03 +0000 (17:03 -0700)]
Fix build break in TimerQueue.Portable.cs
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
f9e9c7fe11d0a8f7e33da697ccd5844c5d8d6dfd
Stephen Toub [Thu, 11 Jul 2019 17:05:51 +0000 (13:05 -0400)]
Remove stale nullable !s and pragmas (dotnet/coreclr#25640)
Also update TODO-NULLABLE comments to be more specific where appropriate.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eff4feaa164ea7b6644fa7fb37f8238184de4cbc
Steve MacLean [Thu, 11 Jul 2019 16:50:01 +0000 (12:50 -0400)]
Arm64 debug issues (dotnet/coreclr#25636)
* Fix arm64 dbgipcevents inconsistency
* Fix arm64 register names
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d344b3df28dee8339ec3a77f26400e27e266de6
Vladimir Sadov [Thu, 11 Jul 2019 03:33:58 +0000 (20:33 -0700)]
refresh GC reliability tests (dotnet/coreclr#25622)
* refresh GC reliability tests
* Update stress instructions (PR feedback)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed6d0ee3237fe6ddc8fe44e76442b58b48c4e904
Stephen Toub [Wed, 10 Jul 2019 23:12:38 +0000 (19:12 -0400)]
Add AggressiveInlining to Single.GetHashCode (dotnet/coreclr#25633)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef2f9f41555c453451a5003f1be4bb9888ab078d
David Mason [Wed, 10 Jul 2019 05:33:24 +0000 (22:33 -0700)]
Let EventPipe threads sleep when no events are available (dotnet/coreclr#25601)
Don't spin forever in EventListener when listening for EventPipe data
Commit migrated from https://github.com/dotnet/coreclr/commit/
d61a380bbfde580986f416d8bf3e687104cd5701
Stephen Toub [Wed, 10 Jul 2019 00:18:11 +0000 (20:18 -0400)]
Fix Timer argument exception parameter names (dotnet/coreclr#25617)
Commit migrated from https://github.com/dotnet/coreclr/commit/
27790ab2dbee25d2e9c6fc41863aa7e983552a3f
Stephen Toub [Tue, 9 Jul 2019 13:26:38 +0000 (09:26 -0400)]
Fix regression in Timers with long timeouts (dotnet/coreclr#25604)
* Fix regression in Timers with long timeouts
Early in .NET Core 3.0, we added an important optimization to significantly reduce lock contention and CPU overheads in situations where lots of timers were firing. The optimization worked by splitting the set of timers into those expected to fire in the very near future and then everything else. However, for really long timers (e.g. > 24 days), due to integer overflows we can accidentally put a long timer onto the short list and cause a timer that shouldn’t fire for days to instead fire in milliseconds. This is not the first such bug we’ve had in Timer, and there is a fair amount of complicated casting (that we sometimes get wrong, obviously) in order to keep the tick count usage within the Int32 domain. This PR addresses the problem (and hopefully others in the future) by switching over to using Int64. We’re already paying to get 64-bit tick counts on both Windows and Unix, so this just removes truncation that was being performed, does a little more addition/comparison with 64-bit values instead of with 32-bit, and stores an Int64 instead of Int32 in each TimerQueueTimer. On 64-bit, this has a 0 increase in memory consumption, as it simply ends up utilizing padding space that was previously in TimerQueueTimer. On 32-bit, it increases memory allocation when creating a Timer by 4 bytes from 80 to 84 (still 3 allocations), but I believe it’s the right trade-off for reduced complexity and bug likelihood.
* Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
48ff0937552e540f21835391b693daf47ffabece
Sung Yoon Whang [Mon, 8 Jul 2019 23:32:44 +0000 (16:32 -0700)]
Adding DisplayUnits property to all the runtime counters (dotnet/coreclr#25598)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dbc5b56c48ce30635ee8192c9814c7de998043d5
Andy Hanson [Mon, 8 Jul 2019 23:12:06 +0000 (16:12 -0700)]
Return HardLimitBytes from GCMemoryInfo.TotalAvailableMemoryBytes (dotnet/coreclr#25437)
* Add property HardLimitBytes to GCMemoryInfo
This adds a new property HardLimitBytes.
Unlike TotalAvailableMemoryBytes,
this will reflect an explicitly set COMPLUS_GCHeapHardLimit.
It will also reflect the fraction of a container's size that we use,
where TotalAvailableMemoryBytes is the total container size.
Normally, though, it is equal to TotalAvailableMemoryBytes.
Fix dotnet/coreclr#38821
* Remove HardLimitBytes; have TotalAvailableMemoryBytes take on its behavior
* Fix typos
* Separate total_physical_mem and heap_hard_limit
so we can compute highMemoryLoadThresholdBytes and memoryLoadBytes
* Do more work in gc.cpp instead of Gc.cs
* Consistently end names in "Bytes"
Commit migrated from https://github.com/dotnet/coreclr/commit/
11137fbe46f524dfd6c2f7bb2a77035aa225524c
Steve MacLean [Mon, 8 Jul 2019 21:36:31 +0000 (17:36 -0400)]
Add arm64 floatconversion.S (dotnet/coreclr#25597)
* Add arm64 floatconversion.S
* Update comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
8749c016e520bcaa23c56a862fe5f57eba1b879b
Matt Galbraith [Sun, 7 Jul 2019 15:09:02 +0000 (08:09 -0700)]
Fixes spelling
Commit migrated from https://github.com/dotnet/coreclr/commit/
085398b5c6913b03180c855f56b967e2a7d6edde
Maoni Stephens [Sat, 6 Jul 2019 07:09:32 +0000 (00:09 -0700)]
fix merge error (dotnet/coreclr#25573)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d78ed88ff9078febdbb5c37173b313da5c023a3
dotnet-maestro[bot] [Fri, 5 Jul 2019 23:12:43 +0000 (16:12 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25564)
- Microsoft.NETCore.Platforms - 3.0.0-preview8.19354.4
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview8.19354.4
* Disable failing test
Commit migrated from https://github.com/dotnet/coreclr/commit/
09d454011f5b302ef526036266993f8b0e92f1fd
Sergiy Kuryata [Fri, 5 Jul 2019 20:03:34 +0000 (13:03 -0700)]
Re-enable Microsoft.VisualBasic tests (dotnet/coreclr#25572)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce2ff9d543a06f4ff43f5a5f3230243b0af5f156
Maoni Stephens [Fri, 5 Jul 2019 19:48:34 +0000 (12:48 -0700)]
many core (dotnet/coreclr#25350)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7d12d2b91f79802a12484d4d56c41ba355b7058
Fadi Hanna [Fri, 5 Jul 2019 04:48:48 +0000 (21:48 -0700)]
Fix instantiation stub maker for case where no register is used by function parameters (dotnet/coreclr#25558)
* Fix instantiation stub maker for case where no register is used by function parameters
Commit migrated from https://github.com/dotnet/coreclr/commit/
b7ba5fac2058f6c59acb6a34b699ad2e069f3d6c
Mike McLaughlin [Thu, 4 Jul 2019 14:07:51 +0000 (07:07 -0700)]
Fix dotnet-dump/createdump launch failure (dotnet/coreclr#25562)
On CentOS or OpenSUSE dotnet-dump collect fails but a
valid coredump is generated. The "prctl()" call is failing
that gives the child createdump process permission to ptrace
to the runtime process. On CentOS/OpenSUSE the PR_SET_PTRACER
option isn't supported and not needed.
Issue: https://github.com/dotnet/diagnostics/issues/334
Commit migrated from https://github.com/dotnet/coreclr/commit/
036e426e7fffa6b10c2347c61a030d3ed8eb428e
Aaron Robinson [Thu, 4 Jul 2019 04:38:04 +0000 (21:38 -0700)]
Remove legacy resource value (PrivateBuild) in binaries. (dotnet/coreclr#25560)
* Remove legacy resource value (PrivateBuild) in binaries.
* Never set the private file flag on the binary
Commit migrated from https://github.com/dotnet/coreclr/commit/
a985dda162403ec995c4752e194bc5a062f444a5
José Rivero [Thu, 4 Jul 2019 03:05:22 +0000 (20:05 -0700)]
Fix getting rundown events during EventPipe::Shutdown (dotnet/coreclr#25450)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4312aeb47447039574e9e905cdcb2bae6388e101
Steve MacLean [Thu, 4 Jul 2019 02:29:07 +0000 (22:29 -0400)]
arm64singlestepper (dotnet/coreclr#25512)
Add single step emulation for arm64 Linux
Add a copy and rework armsinglestepper to arm64singlestepper
Add arm64 emulation of all armv8 user space instructions which read or write PC.
- ADR, ADRP
- Branch instructions: B, BL, B.cond, BR, BLR, RET
- LDR (literal)
* Add FEATURE_EMULATE_SINGLESTEP
* Enable for ARM64 linux
* Debugging fixes
Fix IsSSFlagEnabled bug
Fix opcode type
Fix code buffer asserts
Fix CBZ typo
Fix BitExtract
Fix m_targetPc
Minimize written instructions
Fix comments
Fix Bypass address truncation
Fix false assert
Add additional logging
Use %lx to log addresses
Remove stray LOG
Remove stray assert
Commit migrated from https://github.com/dotnet/coreclr/commit/
613f9f233abde4159a85aa8130b7fcb57dc7a4ef
John Salem [Thu, 4 Jul 2019 00:52:53 +0000 (17:52 -0700)]
Prevent EventPipe rundown from blocking on write (dotnet/coreclr#25523)
* Write all rundown events to the buffer manager to prevent the write from blocking while holding the CodeManager lock
* * Incorporate PR feedback
* changed to one suspend rather than suspend->resume->suspend
* added some comments
* update comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae3430d8ce50c9e954192e89871aff783da375e2
David Mason [Thu, 4 Jul 2019 00:15:47 +0000 (17:15 -0700)]
Add check to prevent attaching a profiler when one is already present (dotnet/coreclr#25520)
* Don't load multiple profilers
* add comment
* Move check to LoadProfiler, and eliminate race condition between attach profiler and startup profiled
Commit migrated from https://github.com/dotnet/coreclr/commit/
1893a9c21d21a860094155b330efca9e598581d0
Jarret Shook [Wed, 3 Jul 2019 23:23:22 +0000 (16:23 -0700)]
Enable coredumps on unix (dotnet/coreclr#25551)
* Enable coredumps on unix
* Remove morph change
Commit migrated from https://github.com/dotnet/coreclr/commit/
16b6f2c9c2196bfc32020dcd12cda4c4f34279df
Koundinya Veluri [Wed, 3 Jul 2019 23:22:31 +0000 (16:22 -0700)]
Fix GCStress modes that do code instrumentation to work with code versioning (dotnet/coreclr#25261)
- SOS changes are in https://github.com/dotnet/diagnostics/pull/369
- Fixes https://github.com/dotnet/coreclr/issues/17646
Commit migrated from https://github.com/dotnet/coreclr/commit/
01da3bdd734c887856f89037cd4a3f2b5a072967
Sung Yoon Whang [Wed, 3 Jul 2019 22:50:46 +0000 (15:50 -0700)]
Add test for eventcounter (dotnet/coreclr#25555)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f36453660859bb88875b655922b4c3e8d28da4c0
Jan Kotas [Wed, 3 Jul 2019 15:59:25 +0000 (08:59 -0700)]
Cleanup IL linker heuristic usage (dotnet/coreclr#25547)
Prep-work for using mainstream IL linker
Commit migrated from https://github.com/dotnet/coreclr/commit/
60f1e6265bd1039f023a82e0643b524d6aaf7845
Jan Kotas [Wed, 3 Jul 2019 07:34:50 +0000 (00:34 -0700)]
Delete some dead code (dotnet/coreclr#25546)
Commit migrated from https://github.com/dotnet/coreclr/commit/
87f4eff9188456c26ffab6efbcc725110630a3dd
Brian Robbins [Wed, 3 Jul 2019 05:50:26 +0000 (22:50 -0700)]
Add a new CompilationDiagnostic ETW Keyword (dotnet/coreclr#25544)
Commit migrated from https://github.com/dotnet/coreclr/commit/
19c6c5d05c666ed6a15f8149a5de6d75085bb1aa
David Mason [Wed, 3 Jul 2019 01:30:43 +0000 (18:30 -0700)]
Merge ReadyToRunInfo::GenericMethodIterator in to ReadyToRunInfo::MethodIterator (dotnet/coreclr#25518)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f46ffbf40cd9896a3bf2f6a2a4568b4dc8492c7
Andrew Au [Tue, 2 Jul 2019 23:35:40 +0000 (16:35 -0700)]
Ensure YIELD_WHILE() in EventPipeBufferManager::SuspendWriteEvent() always terminates (dotnet/coreclr#25491)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf3dce315eb9fe8da4491b711fecddb4116e2314
Matt Galbraith [Tue, 2 Jul 2019 22:13:35 +0000 (15:13 -0700)]
Merge pull request dotnet/coreclr#25540 from MattGal/update-more-docker-images
Fix all remaining Python 2 Helix Docker images
Commit migrated from https://github.com/dotnet/coreclr/commit/
d98efbef7016d38036f69ed69dc041c5876755b6
Egor Chesakov [Tue, 2 Jul 2019 18:24:57 +0000 (11:24 -0700)]
Remove test method exclusions addressed in https://github.com/dotnet/corefx/pull/38856 (dotnet/coreclr#25389)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9651b3ddf5b04777288d107f025c8d5a789cf083
Matt Galbraith [Tue, 2 Jul 2019 17:12:01 +0000 (10:12 -0700)]
This should finish off updating all of CoreCLR's images to versions supporting python 3 from https://github.com/dotnet/dotnet-buildtools-prereqs-docker (also saves some time by preinstalling virtualenv stuff)
Commit migrated from https://github.com/dotnet/coreclr/commit/
712350ef64653f90a273d0281c8fd3673b7f6d77
Michal Strehovský [Tue, 2 Jul 2019 13:33:16 +0000 (15:33 +0200)]
Use Array.MaxArrayLength in ArrayList (dotnet/coreclr#25530)
Now that `ArrayList` is in CoreLib, we don't need the copy.
Commit migrated from https://github.com/dotnet/coreclr/commit/
948e0f2713c78fac5278826ee724a3f1503f2e2e
Ilya [Tue, 2 Jul 2019 12:54:03 +0000 (17:54 +0500)]
Reduce allocations in GetLocale() (dotnet/coreclr#25531)
Commit migrated from https://github.com/dotnet/coreclr/commit/
db90a795f5280ead19d5cc1780e9e25aad29fb8d
Sung Yoon Whang [Tue, 2 Jul 2019 07:08:30 +0000 (00:08 -0700)]
Add RundownRequested switch to EventPipe IPC protocol (dotnet/coreclr#25495)
* Add RundownRequested switch to EventPipe IPC protocol
* Fix linux build
* make the rundownRequested field a bool
* some renaming
* Make a new command that has an option for disabling rundown instead of breaking change
* code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb13fb092778db9fa8a0dea755393494959b71a6