Sinan Kaya [Sat, 26 Oct 2019 06:24:51 +0000 (02:24 -0400)]
Remove class declarator (dotnet/coreclr#27456)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fe16376353a4cd7912f81a70163dac3c74bcfb4
Vladimir Sadov [Sat, 26 Oct 2019 01:45:06 +0000 (18:45 -0700)]
Faster conversions (dotnet/coreclr#23548)
Improved performance of complex casts by caching results of cast analysis.
* Easy out for same types.
* Introduce cast cache
* Use managed heap for the cache
* Fixes. Get rid of a fake array typedesc.
* TypeDesc conversions caching
* Removed NoGC helpers
* Cache typedesc conversions
* Renamed remaining trivial NoGC casting helpers
* Some cleanups. Comments, redundant code.
* PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a55a7eb68951ca47b0241ef6cb79287f9fd554e1
Tomáš Rylek [Fri, 25 Oct 2019 22:45:19 +0000 (15:45 -0700)]
Switch R2RDump over to the new command line parser (dotnet/coreclr#27440)
This change modifies R2RDump to use the new
System.CommandLine.Experimental module instead of the obsoleted
System.CommandLine parser we were using before. Apart from general
hygiene w.r.t. using up-to-date components one practical reason
for this switch-over is that the old parser is only available on
the unreliable myget.org nuget feed we plan to drop as part of
our planned repo consolidation.
During debugging of the change I noticed a bug in the implementation
of the "--verbose" option - it shouldn't be setting EntryPoints,
otherwise we actually end up with a super-terse output including
just the entry points. I have anecdotally verified that, after fixing
this in both the "new" and "old" R2RDump both produce identical output.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0d03272dbe691005d74edff73a36c012d38fa1b
Ilia [Fri, 25 Oct 2019 22:28:05 +0000 (01:28 +0300)]
Profiler API to modify environment variables (dotnet/coreclr#23383) (dotnet/coreclr#27157)
Commit migrated from https://github.com/dotnet/coreclr/commit/
457449f412b4b1fa1f8248cb1632de7d528e09db
Andrew Au [Fri, 25 Oct 2019 22:17:04 +0000 (15:17 -0700)]
[crossgen2] Avoid ambiguous devirtualization (dotnet/coreclr#27424)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d374f8c99e7092470366a88ea2abc1001d05864f
Fadi Hanna [Fri, 25 Oct 2019 21:58:58 +0000 (14:58 -0700)]
Packaging for crossgen2 as a framework dependent application. (dotnet/coreclr#27296)
* Packaging for crossgen2 as a framework dependent application.
This requires us to manually emit a runtimeconfig json for now, since the build produces a self-contained version of crossgen2.
Also includes some minor cleanups to the way we build crossgen2:
- Removed from build.proj since we explicitly build it as a self-contained application from build.cmd/build.sh
- Removed the output path property from the csproj files. We use an explicit -o argument when publishing to specify the output folder
Commit migrated from https://github.com/dotnet/coreclr/commit/
02169dec1324f712dc0d102d1147008e1992a46b
Jeremy Koritzinsky [Fri, 25 Oct 2019 21:45:33 +0000 (14:45 -0700)]
Use Unsafe.IsNullRef instead of manual IL in HandleMarshaler.C… (dotnet/coreclr#27443)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a8c9959a96507a745923bb548e8946bd94ffbbf2
Jeremy Koritzinsky [Fri, 25 Oct 2019 21:10:10 +0000 (14:10 -0700)]
Use global packages cache for local builds by default in CoreC… (dotnet/coreclr#27373)
* Get the product build to use the global package cache only.
* Move external.csproj out to the tests folder. Fix restore location so external.csproj correctly resolves its nuget-generated props/targets files.
* Fix typo.
* Fix expected failure case on platforms that don't support PGO/IBC.
* Don't error out if optimization data is not supported for the current platform.
* Fix casing that was causing the Linux x64 build to fail to find the pgo/ibc packages.
* Fix condition.
* Pass OS-Arch-Config to external test package restore.
* The platform-specific version of Microsoft.NETCore.CoreDisTools is an older version for non-Windows, so hardcode that version in stress_dependencies.csproj
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0887c4aea35f503dd212f0dab997f79d9f96f85
Michal Strehovský [Fri, 25 Oct 2019 19:46:08 +0000 (21:46 +0200)]
Match HasLayoutMetadata to CoreCLR (dotnet/coreclr#27438)
This caught my attention because I was messing with `IsBlittableType`.
The condition `type.BaseType.IsValueType` is never true because one can never have a type whose base type is a valuetype.
I was trying to find out where this code is coming from so I can fix it only to realize it was silently deleted in dotnet/coreclr#23015.
Commit migrated from https://github.com/dotnet/coreclr/commit/
510dd30127777d85ea8831bdc474397a0b2070a8
mikedn [Fri, 25 Oct 2019 17:56:34 +0000 (20:56 +0300)]
Fix block store local address containment on ARM (dotnet/coreclr#27338)
When the source/destination address was local, genCodeForCpBlkUnroll was folding the local offset into the address mode of the generated load/store instructions as if the local address was contained. But lowering didn't actually contain the address so useless ADD instructions were still being generated.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d6fae3c42789f139e5a7c05207554bd76983780
Vladimir Sadov [Fri, 25 Oct 2019 17:14:45 +0000 (10:14 -0700)]
Use half-fences for volatile loads/stores on Windows ARM64 (dotnet/coreclr#27384)
* Use half-fences for volatile load/stores on Windows ARM64
* Updated Volatile.h in gc/env as well.
unified on type names and warning suppression.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c128dbacaac207364b01c2d16890031e5aab47a4
Stephen Toub [Fri, 25 Oct 2019 17:13:27 +0000 (13:13 -0400)]
Share completed Task between Task and AsyncTaskMethodBuilder (dotnet/coreclr#27437)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed525baf3af93ccbd1fc564126eb404173600a90
Jan Vorlicek [Fri, 25 Oct 2019 16:11:10 +0000 (09:11 -0700)]
Fix race in SuperILC logger cleanup (dotnet/coreclr#27414)
The StandardOutputEventHandler and StandardErrorEventHandler can race
with the CleanupLogWriter, resulting in an exception due to an attempt
to write to a disposed TextWriter.
This change fixes it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ef3510dc8de2c45afd48f8ba55b606d8e6d0c0a
Ilia [Fri, 25 Oct 2019 14:49:14 +0000 (17:49 +0300)]
Fix macro-redefined warnings caused by limits.h & float.h (dotnet/coreclr#23522)
* Do not use ULONG_MAX in favor of UINT32_MAX
* Do not use LONG_MAX in favor of INT32_MAX
Fixed size 32-bit LONG_MAX conflicts with standard macros
in limits.h on LP64 systems.
* Do not use FLT_MAX, and DBL_MAX macros when STDCPP_COMPAT is defined
* Do not define LONG_MIN, LONG_MAX, ULONG_MAX in pal/inc/pal.h
* Remove duplicated *_MAX macros in pal/inc/rt/intsafe.h
Fixes dotnet/coreclr#20784
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa4a86b1dc5aa021981df70ffd628d68e100beb5
Ilia [Fri, 25 Oct 2019 14:41:20 +0000 (17:41 +0300)]
Remove LOCK_WRITE enum value (in pal/inc/rt/objidl.h) because it conflicts with fcntl.h on Linux (dotnet/coreclr#27426)
It also completely removes LOCKTYPE enum.
Fixes dotnet/coreclr#27386
Commit migrated from https://github.com/dotnet/coreclr/commit/
1cb29bdd266a8624601003fb8ea2ebd2534aab8f
Austin Wise [Fri, 25 Oct 2019 14:40:55 +0000 (07:40 -0700)]
Cleanup some code and comments leftover from BlockCopy refactor (dotnet/coreclr#27432)
* Remove orphaned FCall GetRawArrayData.
* Update some comments relating to arrays.
Commit migrated from https://github.com/dotnet/coreclr/commit/
797dbc65d8fa30a95523f0e355538d9b7dcd8a32
Vladimir Sadov [Fri, 25 Oct 2019 02:39:23 +0000 (19:39 -0700)]
Switch to VS2019 BuildPool (dotnet/coreclr#27427)
Commit migrated from https://github.com/dotnet/coreclr/commit/
cea2bba3c295c5280d01900f7ae5492951ad8995
Vladimir Sadov [Fri, 25 Oct 2019 00:55:33 +0000 (17:55 -0700)]
Update Corelib to include Stopwatch (dotnet/coreclr#27417)
* Update Corelib to include Stopwatch
* Delete HighPerformanceCounter
Commit migrated from https://github.com/dotnet/coreclr/commit/
168a79e33fbe4ee16b87e297bd02fa8fb5c47104
Aaron Robinson [Thu, 24 Oct 2019 23:43:34 +0000 (16:43 -0700)]
Retarget SuppressGCTransitionAttribute to System.Runtime instead of SPCL. (dotnet/coreclr#27419)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c88b29d1bf3b33359ff5f7248e02a8109cbaba3
Jan Kotas [Thu, 24 Oct 2019 15:32:23 +0000 (08:32 -0700)]
Fix build break
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbe4a98371c29a4245418af70dfef5e4e6bd636c
Michal Strehovský [Thu, 24 Oct 2019 19:33:34 +0000 (21:33 +0200)]
Add test coverage for unsupported marshal scenarios (dotnet/coreclr#27393)
* Pointers to non-blittable structs are not supported
* SizeParamIndex could be bogus
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1a900df6554a682b2816b64958f80055407e955
Jeremy Koritzinsky [Thu, 24 Oct 2019 18:29:38 +0000 (11:29 -0700)]
Implement struct marshalling via IL Stubs instead of via Field… (dotnet/coreclr#26340)
* First pass on adding support for byref field homes to il marshalers.
Remove dead code for calculating managed field size.
Add field IL marshal infra up to MarshalInfo::GenerateFieldIL.
Add preliminary changes for MarshalInfo ctor to have the logic handle field marshalling logic. Still need to handle WinRT struct field logic correctly.
First shot at handling fields of WinRT structs.
Cleanup
Clean up entrypoints
Fix cleanup marshal emit.
Disable specific paths on struct marshal stubs.
Implement emitting full struct marshalling stub.
Add StructMarshalInteropStub method name.
Add NDirect::CreateMarshalILStub
Get byvalue StructMarshalling/PInvoke tests passing excluding missing ILMarshalers (ByValArray and ByValTStr).
Correctly classify struct marshal stubs as struct marshal stubs instead of PInvoke stubs.
Implement UnmanagedType.ByValArray IL marshaler.
Implement ILMarshaler equivalent for ansi-char fixed arrays.
Fix parameter mismatch in Native->CLR direction for struct marshalling.
Implement ByValTStr marshalling. Support unaligned fields in IL stubs.
Load CleanupWorkList from param list if in a struct marshalling stub
Implement SafeHandle and CriticalHandle field marshalling in IL struct stubs
Fix handle field marshalers. Add error reporting in struct field IL marshalers consistent with old FieldMarshaler error reporting.
Convert Array-of-nonblittable-struct marshalling to use IL stubs.
Convert LayoutClass marshalling to use IL stubs.
Fix marshalling of LayoutClass fields in structs.
Add non-blittable fixed buffer assert in the struct IL stub path.
Implement Marshal APIs via the IL stubs.
Fix default char marshaler selection.
Move hidden-length-array marshalling over to struct marshalling stubs.
Convert struct marshal IL stub users to use helper that will automatically cleanup on failure to marshal.
Match MarshalInfo::MarshalInfo behavior to ParseNativeType for fields.
Remove old FieldMarshaler-based marshalling.
Fix signed/unsigned mismatch.
Fix IsFieldScenario on non-COMINTEROP plaforms
Fix off-Windows build.
Handle automatic partial cleanup of struct marshaling entirely within the struct stub.
Remove now-unused ValueClassMarshaler. Move DateMarshaler to managed since it doesn't need to be an FCall.
Error out on recursive struct definitions in the IL stub generation as we did in the field marshalling.
Remove FieldMarshalers and replace with a significantly simpler structure (NativeFieldDescriptor) that stores only the needed info for determining validity in WinRT, blittability, and calling convention classification.
This will save 4/8 bytes for every field in a non-auto-layout structure or class loaded into the runtime.
Add explicit test for recursive native layout.
Allow marshalling as UnmanagedType.Error on all platforms (on non-Windows the behavior matches UnmanagedType.I4).
Collapse common primitive marshalling cases together.
Disable WinRT parameter/retval-only marshalers in field scenarios.
Revert "Collapse common primitive marshalling cases together."
This reverts commit dotnet/coreclr@
e73b78a5bca80009fb541f5119301329599a16ad.
Fix error marshalling off Windows for uint.
Disable LPStruct marshalling in structs.
Disable copy-constructor marshaler in the field scenario.
Match error messages between MarshalInfo::MarshalInfo and ParseNativeType in the field scenario.
Refactor managed-sequential check out of ParseNativeType.
Remove invalid MARSHAL_TYPE_GENERIC_U8 references.
Add override specifier.
Change ParseNativeType to use MarshalInfo::MarshalInfo to calculate field marshalling info instead of maintaining two native field classification functions.
Clean up native field categories. Remove nsenums.h since it is now unused.
Move CheckIfDisqualifiedFromManagedSequential to class.cpp.
Encapsulate stub flags for struct stubs. Read the BestFitAttribute once for the type instead of per field.
Fix perf regression in by-val arrays of non-blittable structures by caching the MethodDesc* to the struct stub in the "managed marshaler" structure. Now we have a perf improvement!
Fix memory leak in sig creation.
Keep compile-time information for struct stubs around as long as the owning loader allocator (instead of leaking).
Allocate the signature on the same heap as the IL stubs so it shares the same lifetime.
Fix build with fragile NGen support enabled so as to not break partners.
Add missing native field descriptors.
Fix clang build.
Only assert if we're emitting IL (so we don't assert during type-load).
Determine desciptor for pointer-sized fields based on target not host pointer size.
Don't emit IL stubs that call struct stubs into R2R images since there's not a good way for us to emit the token.
Fix tracing test failures.
Force field marshaling to not stackalloc.
Cache Sytem.RuntimeMethodInfoStub instances created in the VM in the MethodDesc's owning LoaderAllocator.
Struct marshal stubs don't have an MethodDesc context arg.
Copy FieldDesc on NFD assignment.
Fix initialization of stubMethodInfoCache lock owner.
Fix alignment calculation of decimal fields and decimal array fields in NFDs.
Fix Crst leveling.
Enable handling decimal-as-currency fields accurately off-Windows.
Fix deadlock where two threads are both trying to generate an IL stub for the same P/Invoke and one of the parameters needs a struct stub generated.
Fix incorrect check for if we need a struct marshal stub in some of the variant/array cases.
We never need to promote a field value to 8 bytes.
Fix issue with recursive pointer fields.
Shortcut blittable types in stubhelpers.
Use LDFTN + PREPARE_NONVIRUTAL_CALLSITE_USING_CODE instead of LDTOKEN + GetInternalToken.
Revert "Fix Crst leveling."
This reverts commit dotnet/coreclr@
1d8e56e077bc9863b71fe5f9e948308849aa3a14.
Revert "Fix initialization of stubMethodInfoCache lock owner."
This reverts commit dotnet/coreclr@
a095390646d234fdd13f97f620c0af03ffb71d6a.
Revert "Cache Sytem.RuntimeMethodInfoStub instances created in the VM in the MethodDesc's owning LoaderAllocator."
This reverts commit dotnet/coreclr@
726653835b6ee0e3ce03d70600732021f3ea2a53.
Fix case where struct marshal stub is unused in native-only mashalling paths.
PR Feedback.
Clean up terenary statement in dispatchinfo.cpp
Cleanup ILStubResolver::AllocGeneratedIL a little bit.
* Cleanup LayoutClass test.
* Encapsulate getting the entrypoint of a struct marshal stub.
* VTHACK_NONBLITTABLERECORD is only used for hidden-length array marshalling, and VT_RECORD is not used in hidden-length array marshalling.
* Align new entries in mtypes.h
* Whitespace and field ordering changes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
549d53289620fdd19fd71b4fb18f9889d1fbbb0d
Mike McLaughlin [Thu, 24 Oct 2019 17:44:59 +0000 (10:44 -0700)]
Fix minidumps not loading in VS issue (dotnet/coreclr#27406)
Fix a function that was ifdef'ed needed for the metadata locator callbacks to work.
Fix some not properly DAC'ized code in the type desc and server GC code. Caused an exception during dump generation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a048b8e88764abb9056ae1e0d2a5c946b120b45
Adam Sitnik [Thu, 24 Oct 2019 16:45:57 +0000 (18:45 +0200)]
Optimize GC.AllocateUninitializedArray and use it in StringBuilder (dotnet/coreclr#27364)
* use GC.AllocateUninitializedArray for allocating internal char buffers
* force inlining of AllocateUninitializedArray to have no perf hit on the small buffers hot path
* insrease the threshold from 256 to 2048 bytes
* use Unsafe.As instead of a cast
* remove the size precondition from AllocateNewArray method, the called AllocateSzArray is responsible for handling negative size
Commit migrated from https://github.com/dotnet/coreclr/commit/
c382edf50b2aadfc4f39d16fc53ea65ed35331e3
Michal Strehovský [Thu, 24 Oct 2019 16:11:01 +0000 (18:11 +0200)]
Add doc on p/invoke marshalling pregeneration in ReadyToRun (dotnet/coreclr#27413)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bc2158ff0a26ca639503b327ba79bd21183fd58
Tanner Gooding [Thu, 24 Oct 2019 16:01:00 +0000 (09:01 -0700)]
Move down S.N.Vector APIs and expose new conversion support (dotnet/coreclr#27401)
* Updating S.P.Corelib to start building Vector2/3/4 and supporting types
* Removing HAS_INTRINSICS usages from Matrix4x4
Commit migrated from https://github.com/dotnet/coreclr/commit/
72338012f64849a996bf171c9c1b66cc20c64728
Vladimir Sadov [Thu, 24 Oct 2019 12:23:17 +0000 (05:23 -0700)]
Moving StopWatch to `src\Common\src\Corelib` (dotnet/corefxdotnet/coreclr#42072)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6195fac6c93af4db8caf0cc66b57a90bb82676a
Egor Chesakov [Thu, 24 Oct 2019 05:07:37 +0000 (22:07 -0700)]
Add AdvSimd (LeadingZeroCount, LeadingSignCount, PopCount) (dotnet/coreclr#27382)
* AdvSimd.LeadingSignCount
* AdvSimd.LeadingZeroCount
* AdvSimd.PopCount
Commit migrated from https://github.com/dotnet/coreclr/commit/
310f71592b1373297a98ae268f795ca6dedd62e6
Jan Kotas [Thu, 24 Oct 2019 03:01:34 +0000 (20:01 -0700)]
Delete FEATURE_LAZY_COW_PAGES (dotnet/coreclr#27359)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c86a446744f533998cb1e2f81971837a46d20184
Stephen Toub [Thu, 24 Oct 2019 00:39:19 +0000 (20:39 -0400)]
Enable pooling for `async ValueTask/ValueTask<T>` methods (dotnet/coreclr#26310)
Today `async ValueTask/ValueTask<T>` methods use builders that special-case the synchronously completing case (to just return a `default(ValueTask)` or `new ValueTask<T>(result))` but defer to the equivalent of `async Task/Task<T>` for when the operation completes asynchronously. This, however, doesn't take advantage of the fact that value tasks can wrap arbitrary `IValueTaskSource/IValueTaskSource<T>` implementations.
This commit gives `AsyncValueTaskMethodBuilder` and `AsyncValueTaskMethodBuilder<T>` the ability to use pooled `IValueTaskSource/IValueTaskSource<T>` instances, such that calls to an `async ValueTask/ValueTask<T>` method incur 0 allocations (ammortized) as long as there's a cached object available.
Currently the pooling is behind a feature flag, requiring opt-in via the DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKS environment variable (setting it to "true" or "1"). This is done for a few reasons:
- There's a breaking change here, in that while we say/document that `ValueTask/ValueTask<T>`s are more limited in what they can be used for, nothing in the implementation actually stops a `ValueTask` that was wrapping a `Task` from being used as permissively as `Task`, e.g. if you were to `await` such a `ValueTask` multiple times, it would happen to work, even though we say "never do that". This change means that anyone who was relying on such undocumented behaviors will now be broken. I think this is a reasonable thing to do in a major release, but I also want feedback and a lot of runway on it.
- Policy around pooling. Pooling is always a difficult thing to tune. Right now I've chosen a policy that limits the number of pooled objects per state machine type to an arbitrary multiple of the processor count, and that tries to strike a balance between contention and garbage by using a spin lock and if there's any contention while trying to get or return a pooled object, the cache is ignored. We will need to think hard about what policy to use here. It's also possible it could be tuned per state machine, e.g. by having an attribute that's looked up via reflection when creating the cache for a state machine, but that'll add a lot of first-access overhead to any `async ValueTask/ValueTask<T>` method. For now, it's tunable via the `DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKSLIMIT` environment variable, which may be set to the maximum number of pooled objects desired per state machine.
- Performance validation. Preliminary numbers show that this accomplishes its goal, having on-par throughput with the current implementation but with significantly less allocation. That needs to be validated at scale and across a variety of workloads.
- Diagnostics. There are several diagnostics-related abilities available for `async Task/Task<T>` methods that are not included here when using `async ValueTask/ValueTask<T>` when pooling. We need to evaluate these (e.g. tracing) and determine which pieces need to be enabled and which we're fine omitting.
Before shipping .NET 5, we could choose to flip the polarity of the switch (making it opt-out rather than opt-in), remove the fallback altogether and just have it be always on, or revert this change, all based on experimentation and data we receive between now and then.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bbbcb8b19a7a8338d87b8f097a4a4143eb3e2427
Drew Scoggins [Wed, 23 Oct 2019 23:52:09 +0000 (16:52 -0700)]
Update build pools for perf runs (dotnet/coreclr#27378)
Commit migrated from https://github.com/dotnet/coreclr/commit/
30711d1631d2c283a64ab636df8cc0114ce228d8
Tom Deseyn [Wed, 23 Oct 2019 13:50:26 +0000 (15:50 +0200)]
Remove Socket.InnerSafeCloseSocket (dotnet/corefxdotnet/coreclr#41888)
* Remove Socket.InnerSafeCloseSocket
* Move IsInvalid checks in SetHandle function
* PR feedback
* Remove unnecessary 'SocketPal.'
* Remove SafeSocketHandle.SetHandle
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
5cf947c106756a5bbc078e36a7195b79cee459af
Tanner Gooding [Wed, 23 Oct 2019 12:44:26 +0000 (05:44 -0700)]
Move Matrix3x2/4x4, Plan, and Quaternion to the shared CoreLib partition (dotnet/coreclr#42021)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d6d53f10fbc76f8a82c0649403b982f9a8333d3
Stephen Toub [Wed, 23 Oct 2019 21:54:40 +0000 (17:54 -0400)]
Remove stale entries from corefx.issues.rsp (dotnet/coreclr#27391)
I believe these have all been fixed and just not removed from the .rsp file. It's possible some of the fixes haven't flown back to coreclr; using CI to see.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6091321b2e05961023a81c03736aea600bae91a1
Tanner Gooding [Wed, 23 Oct 2019 20:11:21 +0000 (13:11 -0700)]
Ensure that `GenTreeIndir load` is used in a scope where it can't be optimized away. (dotnet/coreclr#27390)
Commit migrated from https://github.com/dotnet/coreclr/commit/
03710d0733755bcc121c7a2f1ea7e323a9442848
Sergey Andreenko [Wed, 23 Oct 2019 19:23:08 +0000 (12:23 -0700)]
Expression 'sigType == TYP_STRUCT' is always false. importer.cpp 18806 (dotnet/coreclr#27292)
`sigType` could be only `TYP_BYREF` or `TYP_REF`, so delete the other cases.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a35ac8b2feec4865ee3c05fbcdfbcaeb56cc558c
Tanner Gooding [Wed, 23 Oct 2019 13:51:59 +0000 (06:51 -0700)]
Ensure that `GenTreeIndir load` is declared in a scope where it can't be optimized away.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c5829369f5dccd76825b42d89a846f6bf54463f
Marek Safar [Wed, 23 Oct 2019 18:15:37 +0000 (14:15 -0400)]
Remove unused methods (dotnet/coreclr#27370)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e835c93e8647cff436221c9e0aaa91e33f45e496
Jan Kotas [Wed, 23 Oct 2019 12:30:23 +0000 (05:30 -0700)]
Delete stale test exclusion files (dotnet/coreclr#27375)
Commit migrated from https://github.com/dotnet/coreclr/commit/
233be1b28b1bdfffa52cbedc1fc172a91dbe5860
Peter Sollich [Wed, 23 Oct 2019 11:56:43 +0000 (13:56 +0200)]
Card mark steal (dotnet/coreclr#25986)
Implement card marking stealing for better work balance in Server GC.
One of the last stages in the mark_phase is to mark objects referenced from older generations. This stage is often slow compared to the other stages, and it is also often somewhat unbalanced, i.e. some GC threads finish their work significantly sooner than others. The change also applies to the relocate_phase, but that phase usually takes significantly less time.
This change implements thread-safe enumeration of older generations by dividing them into chunks (2 MB in 64-bits, 1 MB in 32-bits), and arranges it so threads finishing work early will help on other heaps. Each thread grabs a chunk and then looks through the card table section corresponding to this chunk. When it's done with a chunk, it grabs the next one and so on.
There are changes at multiple levels:
- at the top level, mark_phase and relocate_phase contain changes to check for work already done for both the heap associated with the thread and other heaps.
- these routines call mark_through_cards_for_segments and mark_through_cards_for_large_objects which contain code to walk through the older generations in chunks.
- ultimately card_marking_enumerator::move_next implements the thread safe enumeration, supplying chunks, and gc_heap::find_next_chunk supplies a chunk where all card bits are set.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5ca444ce55137d60f2fb033d8a110ce8b3e70df3
Aaron Robinson [Wed, 23 Oct 2019 05:37:24 +0000 (22:37 -0700)]
Apply SuppressGCAttribute to some SPCL functions. (dotnet/coreclr#27369)
Apply SuppressGCAttribute to some SPCL functions.
Only insert GC_POLL in first morph call.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bc7fab14d78030914e98b33c70b370d513021f6
Tanner Gooding [Wed, 23 Oct 2019 03:23:12 +0000 (20:23 -0700)]
Adding SkipInit to Internal.Runtime.CompilerServices.Unsafe (dotnet/coreclr#27377)
* Adding SkipInit to Internal.Runtime.CompilerServices.Unsafe
* Updating the runtime to handle Unsafe.SkipInit
* Updating Decimal.DecCalc to use Unsafe.SkipInit
* Removing 'workaround for CS0165' comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bc350f2e7a0b21f1c7d71ffda5ae1797fb5caff
Tanner Gooding [Tue, 22 Oct 2019 22:53:10 +0000 (15:53 -0700)]
Move Vector2/3/4 to the shared CoreLib partition (dotnet/corefxdotnet/coreclr#42005)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f936bc087359c94fb187971e024d7c39176ebda
Eugene Rozenfeld [Wed, 23 Oct 2019 01:57:11 +0000 (18:57 -0700)]
Disable STRESS_MIN_OPTS for ObjectStackAllocationTests. (dotnet/coreclr#27344)
ObjectStackAllocationTests rely on the object stack allocation
optimization to be running. STRESS_MIN_OPTS prevents that.
Commit migrated from https://github.com/dotnet/coreclr/commit/
43ea88222cc458b05292b8a219728fba83203249
Andy Ayers [Wed, 23 Oct 2019 01:03:29 +0000 (18:03 -0700)]
JIT: fix assertion prop issues with subtypes (dotnet/coreclr#27337)
* don't use late args to destructure helper call
* create proper subtype constant kind when jitting
Commit migrated from https://github.com/dotnet/coreclr/commit/
77be4f2d950aa5f630cadc19c31a8121d7e8770f
Maoni Stephens [Wed, 23 Oct 2019 01:03:03 +0000 (18:03 -0700)]
BGC tuning using the free list with PI loops (dotnet/coreclr#26695)
This is the 1st part of BGC tuning using FL (free list) with a PID loop. Historically the most significant factor for triggering a BGC is based on the allocation budget. This experimental feature triggers based on the FL in gen2/3 with a PID loop (by default we only use PI, no D) so we use the allocation calculated based on the FL to determine when to trigger the next BGC.
The goal of the PI feedback loop
The end goal of the tuning is keep a const physical ML (memory load). The ML goal is specified as a percentage (meaning the percent of physical memory in use). And we aim to do as few BGCs as possible to achieve this memory load.
This is most useful for the case where you are seeing that a large percent of free space in gen2 isn't getting used when a BGC is triggered; or you have plenty of memory but the GC heap size only takes up a small percentage and you want to delay BGCs to reduce the CPU consumed by BGC.
Enable the FL tuning PI loop
Since this is an experimental feature, by default it's disabled. To enable set this env var:
set COMPlus_BGCFLTuningEnabled=1
When the FL tuning is enabled, by default we set the ML load to 75%. You can change it with this env var:
set COMPlus_BGCMemGoal=X
Note as with any COMPlus var, the value is interpreted as a hex number, not dec.
Perf consideration of the current PI loop
Of course there’s always perturbation. From BGC’s POV there are 2 categories of perturbation –
1) from GC’s own perf characteristics changes, for example, suddenly we see a lot of pins from gen1 that get promoted into gen2.
2) non GC factors – this could be due to sudden increase of native memory usage in the process; or other processes on the same machine simply increase/decrease their memory usage.
And generally we don’t want to do something very high like 90% ‘cause it’s hard to react when the memory is tight – GC would need to compact and currently BGC does not compact. So for now we have to assume that “retracting the heap is difficult” which means we want our PI loop to be fairly conservative.
So we actually have another PI loop (the inner loop) to make sure the “sweep flr” is at a reasonable value. “Sweep flr” is the FLR (Free List Ratio) before BGC rebuilds the free list – so you can think of this as the smallest flr during a BGC. So the inner loop has a “sweep flr” goal of 20% by default which is pretty conservative. And when we can incrementally compact I would expect to reduce this by a fair amount. Another possibility is we do not set this as a fixed number and rather calculate a reasonable one dynamically based on what we observe how the free list is used.
Of course just because BGC does not compact it doesn’t mean that the total gen2 size cannot get smaller. It could get smaller just by objects at the end of gen2 naturally dying.
+ Initialization of the PI loops
We have to have some way to get this whole thing started so I usually do a few BGCs to reach 2/3 mem load goal then start using PI loops to decide when to trigger the next BGC.
+ Panic mode
I use a very simple rule to see if I should panic, ie, do an NGC2. If we observe the memory load is (goal + N%) where N is just a number we determine, we do an NGC2. This actually turned out to give decent results because we give it ample opportunity to allow some oscillation around goal (instead of panicking prematurely).
+ Implementation notes
When FL tuning is not enabled there should be no effect.
Record things when BGC starts, BGC sweep ends and BGC end.
I have other mechanisms like the D term, FF (feed forward) and smoothing. I have experimented with them in the past. Currently they are not enabled by default but can be enabled with COMPlus env vars.
Currently this doesn't work great with LOH because we have a fundamental limitation which is if we give free space to gen2 it's difficult to give it to LOH. One thing the user could do is to adjust the LOH threshold so most of the large object allocations happen in gen2.
Commit migrated from https://github.com/dotnet/coreclr/commit/
30bb5b54c83bde9ef6fee5373a713b1328849980
Sergey Andreenko [Tue, 22 Oct 2019 23:53:03 +0000 (16:53 -0700)]
Priority of the '&&' operation is higher than that of the '||' operation (dotnet/coreclr#27367)
It is a noway assert that was added before 2010, so that is hard to say what was the idea here.
However, the code before and the examples after show that there is no difference between `GT_EQ` and `GT_NE` and in both cases `c(omparand)` must be the first child of the compare node `t`.
Exisiting comments that confirm that it should be ((a &&b ) || c).
/* t1:c1==0 t2:c2==0 ==> Branch to BX if either value is 0
/* t1:c1!=0 t2:c2!=0 ==> Branch to BX if either value is non-0
Commit migrated from https://github.com/dotnet/coreclr/commit/
71fe5c4796cd01fa62e202aab2ebc180d0e4a799
Andrew Au [Tue, 22 Oct 2019 22:15:36 +0000 (15:15 -0700)]
[crossgen2] Make sure hardware intrinsic are generated for CoreLib only (dotnet/coreclr#27347)
Commit migrated from https://github.com/dotnet/coreclr/commit/
22e287956f84a0b666d6432968f9caddf1bbfd22
Aaron Robinson [Tue, 22 Oct 2019 21:54:12 +0000 (14:54 -0700)]
Add documentation for SuppressGCTransition (dotnet/coreclr#27368)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f661841ba0adced529faaf0c0e3b0f7505c50f39
Jeremy Koritzinsky [Tue, 22 Oct 2019 21:44:50 +0000 (14:44 -0700)]
Cleanup ILStub signature delta management (dotnet/coreclr#23572)
* Teach ILStubLinker to use the managed signature for the target stack delta when the stub is a reverse stub.
Make ILStubLinker understand changing calling conventions from instance to non-instance calling conventions.
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
373380052a54c6fb86ede3a65e9c6cefafa4e2c1
Brian Sullivan [Tue, 22 Oct 2019 21:04:41 +0000 (14:04 -0700)]
Ensure that all of the calculations for PerfScore are done using doubles (dotnet/coreclr#27342)
Ensure that all of the calculations for PerfScore are done using doubles
Commit migrated from https://github.com/dotnet/coreclr/commit/
020a8c44cc9606bf06b107597cd853533981bbd3
Sergey Andreenko [Tue, 22 Oct 2019 18:16:35 +0000 (11:16 -0700)]
Fix: Expression 'refType == RefTypeUpperVectorSave' is always false. (dotnet/coreclr#27352)
* Expression 'refType == RefTypeUpperVectorSave' is always false.
We have a fast return for this type several lines before that check.
* format fix after deleting a scope.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb4815e2b7f2481a7cb277c8128e691fe426d3e5
Sung Yoon Whang [Tue, 22 Oct 2019 17:35:59 +0000 (10:35 -0700)]
Refactor genEventing script to remove SELECTANY from provider context struct definitions (dotnet/coreclr#27354)
* Refactor genEventing script to remove SELECTANY initializations
* Fix windows build, remove newlines
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1d70d6a5ebed5872fd0e1b75deadbd0f9e6fe02
Sergey Andreenko [Tue, 22 Oct 2019 16:56:45 +0000 (09:56 -0700)]
Delete `fgArgInfo::ArgsComplete():hasStackArgs` local var. (dotnet/coreclr#27350)
`fgArgInfo` has a field with the same name and the same function. The duplication happened because the local var was added in 2011 and the struct field was added in 2014.
PVS warning: The 'hasStackArgs' local variable possesses the same name as one of the class members, which can result in a confusion. morph.cpp 1247
Commit migrated from https://github.com/dotnet/coreclr/commit/
c9b92bcf062c1b57d836fdcf2e0d45c275423c13
Andrew Au [Tue, 22 Oct 2019 16:20:34 +0000 (09:20 -0700)]
[crossgen2] Fixes the test failure when crossgen2smoke is ran with GCStress turned on (dotnet/coreclr#27263)
Commit migrated from https://github.com/dotnet/coreclr/commit/
80212b4d8202a0bdebf9feada8b759f99adb0842
Tanner Gooding [Tue, 22 Oct 2019 16:17:21 +0000 (09:17 -0700)]
Adding back more arm intrinsics that existing before refactoring (dotnet/coreclr#27153)
* Adding AdvSimd.And
* Adding AdvSimd.AndNot
* Adding AdvSimd.Or
* Adding AdvSimd.OrNot
* Adding AdvSimd.Xor
* Adding AdvSimd.Not
* Removing a trailing whitespace from AdvSimd.PlatformNotSupported.cs
* Adding AdvSimd.Subtract
Commit migrated from https://github.com/dotnet/coreclr/commit/
04d2a2292e51f85f8192998684fd0d44da73e28f
Filip Navara [Tue, 22 Oct 2019 15:52:23 +0000 (17:52 +0200)]
Fix nullability error in portable thread pool (dotnet/coreclr#27366)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ddb1cf6abdc2ca54b1b6b5b4fa34bb2cdcbc9c3e
Jan Kotas [Tue, 22 Oct 2019 06:59:58 +0000 (23:59 -0700)]
Delete Uap quirks from CoreLib (dotnet/coreclr#27356)
This matches cleanup done in CoreFX.
Commit migrated from https://github.com/dotnet/coreclr/commit/
111b71a65bce77e63d2463a972fe78aa042c5c0a
Adam Sitnik [Tue, 22 Oct 2019 05:03:40 +0000 (07:03 +0200)]
remove double bound check from StringBuilder.Append(char) (dotnet/coreclr#27340)
Commit migrated from https://github.com/dotnet/coreclr/commit/
46bffce7ee839a0d0d18801a6795e8d6d40ad728
Jeremy Koritzinsky [Tue, 22 Oct 2019 04:51:55 +0000 (21:51 -0700)]
Fix -gcc flag in bash build scripts. (dotnet/coreclr#27339)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6c745f69a32da3eb7d101d59dffeb675525e531
Dan Moseley [Sat, 19 Oct 2019 17:01:09 +0000 (10:01 -0700)]
Annotate System.Resources.ResourceWriter for nullable ref types (dotnet/coreclr#41880)
* Annotate System.Resources.ResourceWriter for nullable ref types
* ref
* Mark common as nullable enable explicitly
* _resourceList
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0a1ec681fd6aab0c072769616e95ff25a151591
Eriawan Kusumawardhono [Tue, 15 Oct 2019 17:11:40 +0000 (00:11 +0700)]
Replace tfm based constants with SDK ones (dotnet/corefxdotnet/coreclr#41601)
* replace DefineConstants with SDK ones
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
6909f63cce34a6112dbf34c2ae15c94c88173f33
Filip Navara [Sun, 20 Oct 2019 02:03:37 +0000 (04:03 +0200)]
Move portable thread pool to shared partition (dotnet/corertdotnet/coreclr#7828)
* Move portable thread pool to shared partition
* Rename ClrThreadPool to PortableThreadPool
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
34878b2305f0b42553b95cd22e257a1be961fefb
Sinan Kaya [Tue, 22 Oct 2019 01:06:04 +0000 (21:06 -0400)]
Remove declspec (dotnet/coreclr#27341)
* Remove declspec
* Forgotten conversions
Commit migrated from https://github.com/dotnet/coreclr/commit/
7a6bb220536af0dbc866aee65a7433e286bbe0f3
Elinor Fung [Tue, 22 Oct 2019 00:56:41 +0000 (17:56 -0700)]
Fix setting winrt assembly's fallback binder (dotnet/coreclr#27348)
Remove unused AssemblySpec::SetHostBinder
Commit migrated from https://github.com/dotnet/coreclr/commit/
69721cc27a115363e7c0f8b92210572bb67f8b93
mikedn [Tue, 22 Oct 2019 00:20:58 +0000 (03:20 +0300)]
Delete dead liveness code (dotnet/coreclr#27343)
Commit migrated from https://github.com/dotnet/coreclr/commit/
083af635ec76547e50114d9f50191d69d39b8636
Andy Ayers [Mon, 21 Oct 2019 21:49:51 +0000 (14:49 -0700)]
JIT: fix def tree for CSE locals going into SSA (dotnet/coreclr#27301)
When putting a new single-def CSE local into SSA, we need to set the def tree
to the LHS of the GT_ASG, not the GT_ASG.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90e59bed1cf8c513d42fc7c660953e7d46057a4e
Egor Chesakov [Mon, 21 Oct 2019 19:53:54 +0000 (12:53 -0700)]
F8 unwind code was incorrectly parsed as "F0-F4 code" in DumpUnwindInfo in src/jit/unwindarm.cpp (dotnet/coreclr#27298)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d05348c0b68162999c42621c1cca46c8a7d3aeac
Sinan Kaya [Mon, 21 Oct 2019 18:20:05 +0000 (14:20 -0400)]
find src/jit -type f -exec sed -i -e 's/gtFptrVal\./AsFptrVal()\./g' {} \; (dotnet/coreclr#27317)
Commit migrated from https://github.com/dotnet/coreclr/commit/
45b313967cc1d9e609938583cd9f68a35a6e2c4a
Jan Kotas [Mon, 21 Oct 2019 16:32:30 +0000 (09:32 -0700)]
Cleanup memory copy helpers (dotnet/coreclr#27307)
- Merge RuntimeImports that has just a few FCalls into Buffer.
- Delete assembly implementation of memcpy for ARM. The implementation was outdated and it was used only on Windows ARM and only for fraction of memcpy callsites.
- Delete unnecessary PInvoke into SysStringLen. We have a managed equivalent on System.Runtime.InteropServices.Marshal.
- Delete large amount of redundant code between SecureString.Windows.cs and SecureString.Unix.cs, and switch SecureString to use Spans
- Fold null check into IsWin32Atom
Commit migrated from https://github.com/dotnet/coreclr/commit/
17cbbeeac4c6e455d6fd34be22f38ef1f1f49834
Mikhail Kurinnoi [Mon, 21 Oct 2019 15:07:31 +0000 (18:07 +0300)]
Enabled FunctionEnter/FunctionLeave/ProfileTailcall hooks on Linux x86. (dotnet/coreclr#27201)
Based on ./src/vm/i386/asmhelpers.asm FunctionEnter/FunctionLeave/ProfileTailcall
code for Windows x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e062585dbe0989487e4b23fc6fe7eb8dc6f784bc
Sinan Kaya [Mon, 21 Oct 2019 08:30:05 +0000 (04:30 -0400)]
Forgotten gtIntCon (dotnet/coreclr#27330)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6de88d4f5d291269f82e3dd1aa39cee026725dfe
Sinan Kaya [Mon, 21 Oct 2019 08:29:12 +0000 (04:29 -0400)]
Replace gtILOffset, with AsILOffset()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
2f1d783cbaa806981c6640d85a28da8f5875b735
Sinan Kaya [Mon, 21 Oct 2019 05:22:29 +0000 (01:22 -0400)]
Fix multicharacter constant issues (dotnet/coreclr#27323)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b02b2f37c95f8550fa40234be9301afd175528b
Sinan Kaya [Mon, 21 Oct 2019 05:02:24 +0000 (01:02 -0400)]
Replace gtAllocObj. with AsAllocObj()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
12e115790cfd4f5a800442191c3115644522ec0e
Sinan Kaya [Mon, 21 Oct 2019 02:44:56 +0000 (22:44 -0400)]
Replace gtPhysReg. with AsPhysReg()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
857a3a6c1d629e5b75640369dd22a776f4f05092
Sinan Kaya [Mon, 21 Oct 2019 02:44:34 +0000 (22:44 -0400)]
Replace gtArrIndex. with AsArrIndex()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
08b4d4e28fec6e0d4eda01060aefe5821da7bb87
Sinan Kaya [Mon, 21 Oct 2019 01:40:05 +0000 (21:40 -0400)]
Replace gtRuntimeLookup. with AsRuntimeLookup()-> (dotnet/coreclr#27320)
* find src/jit -type f -exec sed -i -e 's/gtRuntimeLookup\./AsRuntimeLookup()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd8bfb126af1939f88f0a033e555f2e43599660c
Sinan Kaya [Mon, 21 Oct 2019 01:39:55 +0000 (21:39 -0400)]
Replace gtDynBlk. with AsDynBlk()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
29f74ef213510479378b51fb1b6aea477f65afb8
Sinan Kaya [Mon, 21 Oct 2019 01:39:44 +0000 (21:39 -0400)]
Replace gtBlk. with AsBlk()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
6102cd4072dab9d5a104a82d5608e33eacf79bb8
Sinan Kaya [Mon, 21 Oct 2019 00:58:02 +0000 (20:58 -0400)]
Replace gtObj. with AsObj()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
a77d11a0ce971c25fb9eb9823c2f57138860900e
mikedn [Mon, 21 Oct 2019 00:22:57 +0000 (03:22 +0300)]
Cleanup Lowering::TryCreateAddrMode (dotnet/coreclr#27284)
* Move TryCreateAddrMode to XARCH LowerBlockStore
This has no effect on ARM so it doesn't need to be shared between XARCH and ARM
* Cleanup TryCreateAddrMode
* Reuse the existing node when creating address modes
GenTreeAddrMode was unnecessarily marked as "large". Appart from the waste
of memory this casues, it also makes address mode creation more complicated
because one needs to provide the use of the node so it can be updated.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3a1c4d89862ee6b7ceb455b1efa896af5f63583
Sinan Kaya [Mon, 21 Oct 2019 00:05:32 +0000 (20:05 -0400)]
find src/jit -type f -exec sed -i -e 's/gtVal\./AsVal()\./g' {} \; (dotnet/coreclr#27312)
Commit migrated from https://github.com/dotnet/coreclr/commit/
03f2942c6bfc3aa651c3564e9b75584672cda3a5
Sinan Kaya [Mon, 21 Oct 2019 00:04:29 +0000 (20:04 -0400)]
Replace gtStrCon. with AsStrCon()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
c480413490dba81d2e7464b7d444f550420eb112
Sinan Kaya [Mon, 21 Oct 2019 00:01:28 +0000 (20:01 -0400)]
Replace gtBoundsChk. with AsBoundsChk()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
034c4c89d78c875bda8703c0c0b87c4c2973bacf
Sinan Kaya [Mon, 21 Oct 2019 00:00:30 +0000 (20:00 -0400)]
Replace gtLclVarCommon. with AsLclVarCommon()-> (dotnet/coreclr#27207)
* find src/jit -type f -exec sed -i -e 's/gtLclVarCommon\./AsLclVarCommon()\./g' {} \;
gtLclVarCommon
* Format patch
* Format patch
* Format patch dotnet/coreclr#3
* Remove redundant /
Commit migrated from https://github.com/dotnet/coreclr/commit/
5e231b5b5bced3e3548159fd79c4036fde4f135f
Sinan Kaya [Sun, 20 Oct 2019 23:57:57 +0000 (19:57 -0400)]
Replace gtHWIntrinsic. with AsHWIntrinsic()-> (dotnet/coreclr#27319)
* find src/jit -type f -exec sed -i -e 's/gtHWIntrinsic\./AsHWIntrinsic()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
0027c9736062a268f2ccc842295b504909c20d48
Steve MacLean [Sun, 20 Oct 2019 23:13:56 +0000 (19:13 -0400)]
Fix potential race with PerfMap::Destroy (dotnet/coreclr#27271)
* Fix potential race with PerfMap::Destroy
* Make PerfMap::s_enabled Volatile<bool>
Commit migrated from https://github.com/dotnet/coreclr/commit/
e5916d4ef0779ebf189fb1d4d7ba6afde2893bbd
Adeel Mujahid [Sun, 20 Oct 2019 18:21:02 +0000 (21:21 +0300)]
Avoid unintended cached var in CMake's find_program (dotnet/coreclr#27322)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2c22d9946b0f04c603a13cf7cc6196317e97442f
Ilya Shipitsin [Sun, 20 Oct 2019 13:24:13 +0000 (18:24 +0500)]
src/pal/src/cruntime/wchar.cpp: remove redundant condition (dotnet/coreclr#27308)
found by cppcheck
"while (*string)" already checks "string" against NULL
[src/pal/src/cruntime/wchar.cpp:641] -> [src/pal/src/cruntime/wchar.cpp:639]: (warning) Either the condition 'string?string:W16_NULLSTRING' is redundant or there is possible null pointer dereference: string.
[src/pal/src/cruntime/wchar.cpp:712] -> [src/pal/src/cruntime/wchar.cpp:710]: (warning) Either the condition 'string?string:W16_NULLSTRING' is redundant or there is possible null pointer dereference: string.
Commit migrated from https://github.com/dotnet/coreclr/commit/
89dedbec8df5c34732f5a248051b921a74da437a
Jan Vorlicek [Sun, 20 Oct 2019 02:10:15 +0000 (04:10 +0200)]
Mark GetTypeFromHandle as intrinsic (dotnet/coreclr#27306)
This change marks GetTypeFromHandle as intrinsic and add related
missing case CorInfoHelpFunc.CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE_MAYBENULL
to GetHelperFtnUncached.
This enables crossgen2 to eliminate call to GetTypeFromHandle.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9db8990bca7e0f44f60494d2608342a930d484ca
6opuc [Sat, 19 Oct 2019 20:09:20 +0000 (01:09 +0500)]
Changes in virtual.cpp to reduce coredump size(~20 times less) (dotnet/coreclr#27089)
* dotnet/coreclrdotnet/coreclr#10524 do not include reserved memory in coredump. MADV_DONTDUMP/MADV_DODUMP
* madvise(...MADV_DONTDUMP|MADV_DODUMP) only if MADV_DONTDUMP|MADV_DODUMP declared(for OSX)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2c6068c5986771f0650cb218d5a0afcb6fd4014
Michal Strehovský [Sat, 19 Oct 2019 01:33:27 +0000 (03:33 +0200)]
Extend test coverage for SafeHandle (dotnet/coreclr#27285)
* Extend test coverage for SafeHandle
Trigger unmarshaling failure using an array marshaller. This is something crossgen2 will be able to pregenerate. The existing test case with CustomMarshaller will always be jitted and never pregenerated.
* a
Commit migrated from https://github.com/dotnet/coreclr/commit/
605124c975c78a0aeb875c70f359737747bf55a8
Ilia [Sat, 19 Oct 2019 00:02:21 +0000 (03:02 +0300)]
Use a new COR_PRF_SUSPEND_FOR_PROFILER in ICorProfilerCallback::RuntimeThreadSuspended() when requested by profiler (dotnet/coreclr#27041)
Fixes https://github.com/dotnet/coreclr/issues/26576
Commit migrated from https://github.com/dotnet/coreclr/commit/
09f9c9c40e96496ac0762dc63b0626b1e3fe9a7c
Jeremy Koritzinsky [Fri, 18 Oct 2019 23:40:51 +0000 (16:40 -0700)]
Validate cmake version in build scripts. (dotnet/coreclr#27293)
* Validate cmake version in build scripts.
* Only check CMake version in build-test.cmd when building native test components.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b1dea7b4e4bfad9b845873f60ba0261e425e9f2
Sergey Andreenko [Fri, 18 Oct 2019 22:46:57 +0000 (15:46 -0700)]
Disable VectorMgdMgd_ro.csproj under stress modes. (dotnet/coreclr#27291)
* Disable VectorMgdMgd_ro.csproj under stress modes.
* disable only on arm64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a80153c544bbf6297c0079c6fad687582419b16d
Sergey Andreenko [Fri, 18 Oct 2019 22:11:41 +0000 (15:11 -0700)]
Fix `costEx/Sz/level` for `GT_STORE_DYN_BLK`. (dotnet/coreclr#27277)
* Fix `costEx/Sz/level` for `GT_STORE_DYN_BLK`.
* delete more extra lines.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc13d23a4d9351e85e90cb21faf758879ce7baf4
Austin Wise [Fri, 18 Oct 2019 20:52:05 +0000 (13:52 -0700)]
Fix assert when CORECLR_PROFILER is set but CORECLR_PROFILER_PATH is not (dotnet/coreclr#27138)
The null DLL name is eventually passed to FakeCoCallDllGetClassObject which
knowns how to look up the DLL name based on the CLSID specified by
CORECLR_PROFILER.
Commit migrated from https://github.com/dotnet/coreclr/commit/
55f39c6037ee66771599a7b912ea210e7e61eaf2
Simon Nattress [Fri, 18 Oct 2019 18:23:30 +0000 (11:23 -0700)]
Re-enable crossgen2 DGML log (dotnet/coreclr#27281)
The dependency graph can be dumped to disk as an XML-based DGML file. This functionality was severed when we moved over from the CoreRT repo.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3131a2490df1f97d1af4fa31763884a6bd895fe
Sinan Kaya [Fri, 18 Oct 2019 18:01:08 +0000 (11:01 -0700)]
Replace gtIndex. with AsIndex()-> (dotnet/coreclr#27257)
* find src/jit -type f -exec sed -i -e 's/gtIndex\./AsIndex()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2cbf9100e5ace69557eea679a9685e09a491bd6