Jeremy Koritzinsky [Mon, 14 Jan 2019 23:49:45 +0000 (15:49 -0800)]
Custom Marshalers in custom-ALC-loaded assemblies results in types loaded from crossing ALCs (#21606)
* Create repro for dotnet/coreclr#19654
* Update ICustomMarshaler.csproj
* Update ICustomMarshaler.csproj
* Clean up repro per feedback.
* Add test case for different assemblies with the same CustomMarshaler name.
* Move EEMarshalingData cache from AppDomain to LoaderAllocator. This fixes the custom-marshaler conflict when using unloadable assembly contexts.
* Internalize the LoaderHeap* parameter.
* Add the pointer to the requesting assembly to the hashtable key.
* Fix linux-musl build break.
* Move Crst out of FEATURE_COMINTEROP block.
* Make sure to copy over the assembly pointer to the key that's actually stored in the hash table.
* Add comment for m_invokingAssembly.
* Move all usages of EEMarshallingData to hang off the correct loader allocator instead of always the global one.
* Change to m_InteropDataCrst since this EEMarshallingData can be used in preemptive GC mode.
* Always init m_InteropDataCrst (since it's used by EEMarshallingData as well as COM).
* PR Feedback.
* Remove extraneous inlines.
Tarek Mahmoud Sayed [Mon, 14 Jan 2019 22:49:00 +0000 (14:49 -0800)]
Fix TimeSpan parsing (#21968)
* Fix TimeSpan parsing
* Temporary disabling the failed CI tests
Stephen Toub [Mon, 14 Jan 2019 22:16:59 +0000 (17:16 -0500)]
Fix TaskCompletionSource to avoid capturing ExecutionContext (#21981)
When a TaskCompletionSource is constructed without any arguments, it simply creates a Task using a simple Task constructor that sets a few fields and is done. When it's constructed with options, though, those options are validated, and then it calls into a shared routine that configures based on those options. A previous set of changes resulted in erroneously doing the ExecutionContext.Capture for the task inside of that shared routine, rather than only doing it for tasks that actually have a delegate to be executed. The net effect of this is that, while TaskCompletionSources created with the parameterless constructor correctly did not capture ExecutionContext, TaskCompletionSources created with options erroneously did; this doesn't have a functional impact, because that ExecutionContext isn't used for anything, but it can have a performance impact, in particular for memory, if the resulting Task is cached, and if the captured ExecutionContext holds onto some expensive object from an AsyncLocal, such that the cached Task then does so, too.
The fix is simply to move the capture from the shared routine that's invoked in two places to instead be done only in the one caller that's for tasks with delegates.
Jarret Shook [Mon, 14 Jan 2019 18:11:37 +0000 (10:11 -0800)]
Remove tizen jobs as valid pr jobs (#21982)
Andrew Au [Mon, 14 Jan 2019 17:43:51 +0000 (09:43 -0800)]
Making sure the nativeCodeVersion flowing change works with Rejit and EnC (#21961)
Swaroop Sridhar [Sun, 13 Jan 2019 06:25:25 +0000 (22:25 -0800)]
Add NativeLibrary Resolve Event (#21929)
This change adds the Native library resolving event, to be raised as the last attempt to resolve a native DLL in an AssemblyLoadContext.
With this change, the DllImport resolution sequence is as follows (stopping at any step with successful resolution):
* If the invoking-assembly is not in the default load context, call AssemblyLoadContext.LoadUnmanagedDll()
* Run the default load logic, try loading from:
* AppDomain cache
* NATIVE_DLL_SEARCH_DIRECTORIES
* Invoking-assembly directory, System32, etc. based on DllImportSearchPaths
* Raise the ResolvingUnmanagedDll event
API Review: https://github.com/dotnet/corefx/issues/32850
The ResolveEventTests triggered a pre-existing bug in the exception handling code (#21964).
Disabling the test on ARM64 Windows until the issue is fixed.
Maryam Ariyan [Sun, 13 Jan 2019 01:44:06 +0000 (17:44 -0800)]
Add System.Reflection.Emit.DynamicILInfo (#21945)
* Making DynamicILInfo and its API impls public
* Remove DynamicScope input from ctor args
Andrey Kvochko [Sat, 12 Jan 2019 06:22:45 +0000 (09:22 +0300)]
Fix x64 CFI generation (#21955)
Koundinya Veluri [Sat, 12 Jan 2019 02:02:10 +0000 (18:02 -0800)]
Patch vtable slots and similar when tiering is enabled (#21292)
Patch vtable slots and similar when tiering is enabled
For a method eligible for code versioning and vtable slot backpatch:
- It does not have a precode (`HasPrecode()` returns false)
- It does not have a stable entry point (`HasStableEntryPoint()` returns false)
- A call to the method may be:
- An indirect call through the `MethodTable`'s backpatchable vtable slot
- A direct call to a backpatchable `FuncPtrStub`, perhaps through a `JumpStub`
- For interface methods, an indirect call through the virtual stub dispatch (VSD) indirection cell to a backpatchable `DispatchStub` or a `ResolveStub` that refers to a backpatchable `ResolveCacheEntry`
- The purpose is that typical calls to the method have no additional overhead when code versioning is enabled
Recording and backpatching slots:
- In order for all vtable slots for the method to be backpatchable:
- A vtable slot initially points to the `MethodDesc`'s temporary entry point, even when the method is inherited by a derived type (the slot's value is not copied from the parent)
- The temporary entry point always points to the prestub and is never backpatched, in order to be able to discover new vtable slots through which the method may be called
- The prestub, as part of `DoBackpatch()`, records any slots that are transitioned from the temporary entry point to the method's at-the-time current, non-prestub entry point
- Any further changes to the method's entry point cause recorded slots to be backpatched in `BackpatchEntryPointSlots()`
- In order for the `FuncPtrStub` to be backpatchable:
- After the `FuncPtrStub` is created and exposed, it is patched to point to the method's at-the-time current entry point if necessary
- Any further changes to the method's entry point cause the `FuncPtrStub` to be backpatched in `BackpatchEntryPointSlots()`
- In order for VSD entities to be backpatchable:
- A `DispatchStub`'s entry point target is aligned and recorded for backpatching in `BackpatchEntryPointSlots()`
- The `DispatchStub` was modified on x86 and x64 such that the entry point target is aligned to a pointer to make it backpatchable
- A `ResolveCacheEntry`'s entry point target is recorded for backpatching in `BackpatchEntryPointSlots()`
Slot lifetime and management of recorded slots:
- A slot is recorded in the `LoaderAllocator` in which the slot is allocated, see `RecordAndBackpatchEntryPointSlot()`
- An inherited slot that has a shorter lifetime than the `MethodDesc`, when recorded, needs to be accessible by the `MethodDesc` for backpatching, so the dependent `LoaderAllocator` with the slot to backpatch is also recorded in the `MethodDesc`'s `LoaderAllocator`, see `MethodDescBackpatchInfo::AddDependentLoaderAllocator_Locked()`
- At the end of a `LoaderAllocator`'s lifetime, the `LoaderAllocator` is unregistered from dependency `LoaderAllocators`, see `MethodDescBackpatchInfoTracker::ClearDependencyMethodDescEntryPointSlots()`
- When a `MethodDesc`'s entry point changes, backpatching also includes iterating over recorded dependent `LoaderAllocators` to backpatch the relevant slots recorded there, see `BackpatchEntryPointSlots()`
Synchronization between entry point changes and backpatching slots
- A global lock is used to ensure that all recorded backpatchable slots corresponding to a `MethodDesc` point to the same entry point, see `DoBackpatch()` and `BackpatchEntryPointSlots()` for examples
Due to startup time perf issues:
- `IsEligibleForTieredCompilation()` is called more frequently with this change and in hotter paths. I chose to use a `MethodDesc` flag to store that information for fast retreival. The flag is initialized by `DetermineAndSetIsEligibleForTieredCompilation()`.
- Initially, I experimented with allowing a method versionable with vtable slot backpatch to have a precode, and allocated a new precode that would also be the stable entry point when a direct call is necessary. That also allows recording a new slot to be optional - in the event of an OOM, the slot may just point to the stable entry point. There are a large number of such methods and the allocations were slowing down startup perf. So, I had to eliminate precodes for methods versionable with vtable slot backpatch and that in turn means that recording slots is necessary for versionability.
Carol Eidt [Sat, 12 Jan 2019 01:00:29 +0000 (17:00 -0800)]
Merge pull request #21795 from fiigii/fixGeneric
Remove unnecessary ThrowIfUnsupportedType calls and definitions
Eugene Rozenfeld [Thu, 10 Jan 2019 22:53:24 +0000 (14:53 -0800)]
Generate non-null assertion for byrefs if we can't find corresponding refs.
When we have a non-null fact about a byref, we try to find the corresponding
ref and generate an assertion about the ref. Then it can be used on byrefs if the offset is not too big.
We use both trees and value numbers to find the ref. When the ref wasn't found we bailed on generating
the assertion.
I found that we get a number of good diffs if we generate assertions for byrefs when refs can't be found
so this change enables that.
Sven Boemer [Fri, 11 Jan 2019 23:00:32 +0000 (15:00 -0800)]
Fix access token used for internal helix submissions (#21957)
Also specify the variable group using yaml syntax.
Jarret Shook [Fri, 11 Jan 2019 20:55:44 +0000 (12:55 -0800)]
Share arg validation runtest and run-pmi-diff (#20812)
* Share arg validation runtest and run-pmi-diff
Use the same arg validation in runtests.py and run-pmi-diffs.py
* Add valid arches to ci_arch
Stephen Toub [Fri, 11 Jan 2019 20:04:11 +0000 (15:04 -0500)]
Add missing overrides to SyncTextWriter (#21956)
Several recently added virtuals to TextWriter were missing overrides on SyncTextWriter.
We were missing overrides of the synchronous `Write(ReadOnlySpan<char>)` and `WriteLine(ReadOnlySpan<char>)` overloads. The impact here is primarily performance, though it'll still be an observable change in corner-case scenarios: rather than using the base implementation which would copy the span to an array and then invoke the properly overridden array-based Write{Line} methods, it'll now just delegate to the wrapped span methods. So it calls the correct overload now on the wrapped instance, and saves some cost in the process.
We were also missing overrides for the async `WriteLineAsync()`, `WriteAsync(ReadOnlyMemory<char>, CancellationToken)`, WriteLineAsync(ReadOnlyMemory<char>, CancellationToken)` overloads. Fixing these doesn't change the overload that's invoked on the wrapped writer, but it does cause the calls to become synchronous rather than queue a task that in turn calls the synchronized overload. Whether the new behavior is better is arguable, but it keeps it consistent with every other XxAsync method on SyncTextWriter, which in my opinion is more important... if we wanted to alter the behavior for all of the XxAsync methods, we should do it for all of them.
Also, in the StringBuilder-based overrides, we were ignoring cancellation. And in the recently added DisposeAsync, we should follow-suit with the rest of the async APIs and make it synchronous.
Jeremy Koritzinsky [Fri, 11 Jan 2019 19:12:01 +0000 (11:12 -0800)]
Enable returning more complex structures via PInvoke returns. (#21470)
* Add test verifying behavior in dotnet/coreclr#19676.
* Clean up test code.
* Test what happens if we enable returning structures by value.
* Use braced initializer.
* Update Decimal tests to expect that returning a decimal by LPStruct or Currency works.
* Change handle-in-struct marshalling to expect a NotSupportedException thrown at marshal time instead of expecting a MarshalDirectiveException at signature time.
* Update Decimal Reverse-PInvoke tests.
* Disable some previously disabled return marshalling types and add a nice comment block explaining why they're disabled.
* Enable marshalling DateTime return values and add a test.
* Rename IsUnuspportedValueTypeReturn
* Add return test for ArrayWithOffset
* Remove extraneous P/Invoke.
* Fix spelling.
* Add test for successfully returning a struct that has one field of a type that is return-type blocked.
* Add explicit struct return test.
* Clean up tests.
* Fix grammer.
* Add test for struct whose managed layout doesn't require a stdcall return buffer but whose native layout does.
* Add test verifying HandleRef behavior.
* Clean up IsUnsupportedTypedefReturn per PR feedback.
Jarret Shook [Fri, 11 Jan 2019 18:37:37 +0000 (10:37 -0800)]
Remove the Smarty lst files from CoreCLR (#21962)
Sven Boemer [Fri, 11 Jan 2019 16:39:50 +0000 (08:39 -0800)]
Use a blob feed specifically for coreclr (#21947)
This will reduce lock contention with other repos due to
https://github.com/dotnet/arcade/issues/1175.
Andrew Au [Fri, 11 Jan 2019 16:34:21 +0000 (08:34 -0800)]
Flowing the nativeCodeVersion to DebuggerJitInfo (#21925)
Jan Vorlicek [Fri, 11 Jan 2019 09:38:37 +0000 (10:38 +0100)]
Add cleanup of the TypeIDMap at unload time (#21943)
The TypeIDMap is stored in the AppDomain and contains two hash maps -
id to MethodTable and MethodTable to id. We were missing removing
entries for MethodTables that belong to a LoaderAllocator that's being
destroyed. Thus we were leaking some memory, but also causing potential
issue. When at some point after the LoaderAllocator destruction a
MethodTable gets the same address as one of the MethodTables that was
destroyed in the past and was also recorded in the TypeIDMap, we would
incorrectly reuse the id. That is problematic in case the old
MethodTable didn't require fat id and the new does or vice versa.
I've hit assert due to that while running System.Numerics.Vectors.Tests
inside an unloadable AssemblyLoadContext.
The implementation of the fix is very primitive. It is expected that we
will be able to get rid of the TypeIDMap in a near future and so it is
not worth optimizing.
Brian Sullivan [Fri, 11 Jan 2019 02:50:35 +0000 (18:50 -0800)]
Merge pull request #21804 from briansull/fix-unbox-opt
Fix issue with devirtualization and tailcalls
dotnet-maestro-bot [Fri, 11 Jan 2019 02:48:43 +0000 (18:48 -0800)]
Update CoreFx, PgoData to preview.19060.1, master-
20190110.3, respectively (#21927)
Stephen Toub [Fri, 11 Jan 2019 02:48:03 +0000 (21:48 -0500)]
Add WithCancellation for async enumerables (#21939)
Carol Eidt [Fri, 11 Jan 2019 02:35:56 +0000 (18:35 -0800)]
Merge pull request #21928 from fiigii/fixMulx
Don't optimize MultiplyNoFlags away
Andy Ayers [Fri, 11 Jan 2019 01:55:09 +0000 (17:55 -0800)]
JIT: fix byte range used by RangeCheck (#21915)
Range is -128 to 127, not -127 to 128.
Koundinya Veluri [Fri, 11 Jan 2019 01:51:53 +0000 (17:51 -0800)]
Normalize a few more spin-wait loops (#21586)
Normalize a few more spin-wait loops
- Fixed a few more spin-waits to normalize the spin-wait duration between processors
- These spin-waits have so far not needed to be retuned to avoid unreasonably long spin-wait durations. They can be retuned as necessary in the future.
- Added a version of YieldProcessorNormalized() that normalizes based on spin-wait counts tuned for pre-Skylake processors for spin-wait loops that have not been retuned.
- Moved some files around to make YieldProcessorNormalized() and the like available in more places. Initialization is still only done in the VM. Uses outside the VM will use the defaults, where there would be no significant change from before.
- Made YieldProcessor() private outside of the GC and added System_YieldProcessor() for when the system-defined implementation is intended to be used
Brian Sullivan [Fri, 11 Jan 2019 00:29:42 +0000 (16:29 -0800)]
Merge pull request #17733 from mikedn/cc-cond2
Expand GT_JCC/SETCC condition support
Bruce Forstall [Fri, 11 Jan 2019 00:29:25 +0000 (16:29 -0800)]
Merge pull request #21937 from BruceForstall/RemoveAltJitJobs
Remove altjit jobs in CI
Brian Sullivan [Fri, 11 Jan 2019 00:02:10 +0000 (16:02 -0800)]
Code Review feedback
Change test priority to 0
Fei Peng [Thu, 10 Jan 2019 23:36:37 +0000 (15:36 -0800)]
Don't optimize BMI2 MultiplyNoFlags away
Sung Yoon Whang [Thu, 10 Jan 2019 23:24:55 +0000 (15:24 -0800)]
disable dynamo test on arm32/64 (#21940)
Brian Sullivan [Thu, 10 Jan 2019 19:22:12 +0000 (11:22 -0800)]
New test for DevDiv_754566
Marek Safar [Thu, 10 Jan 2019 22:47:35 +0000 (23:47 +0100)]
Move public interface ISymDocumentWriter to shared location (#21931)
Marek Safar [Thu, 10 Jan 2019 19:01:43 +0000 (20:01 +0100)]
Move COMException to shared partition (dotnet/corert#6803)
* Move COMException to shared partition
* Review feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Carol Eidt [Thu, 10 Jan 2019 21:39:26 +0000 (13:39 -0800)]
Merge pull request #21864 from fiigii/fixscalarmem
Fix CRC32 instruction encoding on containment form
Sergey Andreenko [Thu, 10 Jan 2019 19:53:32 +0000 (11:53 -0800)]
Add an exclusion for hugeexpr1 on arm32 under `JitOptimizationSensitive` . (#21914)
Bruce Forstall [Thu, 10 Jan 2019 19:22:06 +0000 (11:22 -0800)]
Remove altjit jobs in CI
We have full native jobs for arm32 and arm64 for all scenarios, which
is a superset of everything we've run using altjit. So the altjit
jobs are no longer necessary. In addition, the altjit jobs,
especially the corefx jobs, have never run cleanly, for reasons
that have never been investigated or understood. Since we have
full native corefx runs, there is no reason to look into the altjit
failures.
Carol Eidt [Thu, 10 Jan 2019 19:01:48 +0000 (11:01 -0800)]
Merge pull request #21815 from CarolEidt/Fix752890
[x86] Make copies of odd-size struct arguments
Egor Chesakov [Thu, 10 Jan 2019 18:03:03 +0000 (10:03 -0800)]
Disable what fails and blocks transitioning to Azure DevOps (#21926)
* Run on Debian.9.Amd64.* instead of Debian.8.Amd64.* since it's the minimum supported version of Debian
* Temporary remove Windows.10.Nano.Amd64.Open and Windows.7.Amd64.Open blocked by #21693 #21796
* Don't need a non-portable RHEL7 build and continue using centos7_x64_build_image for building linux-x64 packages (the same way as buildpipeline does)
* Skip submission to Helix if there is are queues to submit to
* Use static string for Helix Сreator property
* Increase timeout for official build test jobs
Carol Eidt [Thu, 10 Jan 2019 17:41:46 +0000 (09:41 -0800)]
Merge pull request #21888 from fiigii/fixVzeropper
Fix VZEROUPPER for HW intrinsic
Marek Safar [Thu, 10 Jan 2019 17:31:18 +0000 (18:31 +0100)]
Moves EnvironmentVariableTarget enum to shared partition (#21930)
Sven Boemer [Thu, 10 Jan 2019 16:37:11 +0000 (08:37 -0800)]
Work around OSX native dependency install issue (#21913)
"brew update" before "brew install"
To work around https://github.com/dotnet/coreclr/issues/21910
Sven Boemer [Thu, 10 Jan 2019 16:29:39 +0000 (08:29 -0800)]
Re-enable publishing of transport packages (#21922)
Ben Adams [Thu, 10 Jan 2019 15:22:12 +0000 (16:22 +0100)]
Move restoring ExecutionContext out of generic methods (#21909)
* Move restoring ExecutionContext out of generic methods
* Move one back
Chuck Ries [Thu, 10 Jan 2019 06:43:10 +0000 (22:43 -0800)]
Prevent AsyncIteratororMethodBuilder.ObjectIdForDebugger from gettingg trimmed (#21920)
dotnet-maestro-bot [Thu, 10 Jan 2019 06:42:37 +0000 (22:42 -0800)]
Update CoreClr, CoreFx, PgoData to preview-27309-02, preview.19059.7, master-
20190109.7, respectively (#21905)
Carol Eidt [Thu, 10 Jan 2019 05:27:55 +0000 (21:27 -0800)]
PR Feedback
Andy Ayers [Thu, 10 Jan 2019 02:07:08 +0000 (18:07 -0800)]
Merge pull request #21893 from AndyAyersMS/ReconcileInlineBudgetUsingSizeOfImportedIL
JIT: modify inline budget update to use estimated imported IL size
Andy Ayers [Thu, 10 Jan 2019 01:41:39 +0000 (17:41 -0800)]
Merge pull request #21779 from mazong1123/fix-19166-checkproj-opt
Check the optimize settings of JIT test projects.
Brian Sullivan [Thu, 10 Jan 2019 00:37:44 +0000 (16:37 -0800)]
Added ifdef for FEATURE_TAILCALL_OPT
Brian Sullivan [Thu, 10 Jan 2019 00:05:45 +0000 (16:05 -0800)]
jit format
Jeremy Koritzinsky [Thu, 10 Jan 2019 00:02:36 +0000 (16:02 -0800)]
Implement AssemblyDependencyResolver (#21896)
* Implementation of ComponentDependencyResolver
PInvokes into hostpolicy.dll (which should live next to the runtime and thus always be reachable).
If the PInvoke fails (missing hostpolicy.dll) we will fail for now.
Adds tests for the API into CoreCLR repo. The main reason is that with corerun
we can easily mock the hostpolicy.dll since there's none to start with.
Writing the same tests in CoreFX or any other place which starts the runtime through
hostpolicy would require test-only functionality to exist in either the class itself
or in the hostpolicy.
* Fix test project file to work outside of VS
* Better test cleanup to not leave artifacts on disk.
* CDR native resolution tests
Add native resolution tests
* Implements detailed error reporting for ComponentDependencyResolver.
Registers error writer with the hostpolicy to receive detailed errors. Uses that in the exception.
Modifications to the mock and the tests to be able to verify the functionality.
* Revert overly eager cleanup
* Change public API surface naming to match the approved API surface.
* Fix nits.
* Fix renames.
Brian Sullivan [Fri, 4 Jan 2019 03:11:34 +0000 (19:11 -0800)]
When performing devirtualization we can not do both an unboxing optimization and a tail call optimization
Explicit tail calls are now checked for and blocked from performing an unboxing operation in impDevirtualizeCall
If late devirtualization calls impDevirtualizeCall with an IMPLICIT_TAILCALL we will clear this flag if we
decide to perform the unboxing operation.
Fei Peng [Wed, 9 Jan 2019 23:56:24 +0000 (15:56 -0800)]
Fix CRC32 instruction encoding on containment form
Egor Chesakov [Wed, 9 Jan 2019 23:18:47 +0000 (15:18 -0800)]
Specify the minimum supported version of macOS (#21816)
* Pass the minimum supported version of macOS option to both compile and link stages in configurecompiler.cmake
* Enable OSX.1012.Amd64.* open and internal queues and add OSX.1014.Amd64 queue in eng/platform-matrix.yml
Jeremy Koritzinsky [Wed, 9 Jan 2019 23:03:43 +0000 (15:03 -0800)]
Add tests for our layout-class marshalling (#20867)
* Add simple test for the LayoutClassMarshaler (most of the code is already covered by the struct marshalling tests).
* Add test for blittable layout class.
* Apparently layout classes are passed by value when passed as struct fields instead of byref.
Levi Broderick [Wed, 9 Jan 2019 21:58:59 +0000 (13:58 -0800)]
Move OperationStatus into shared source (#21912)
This is the first step to moving OperationStatus from corefx into coreclr. It'll be used by the transcoding APIs which live in System.Private.CoreLib.
José Rivero [Wed, 9 Jan 2019 21:48:30 +0000 (13:48 -0800)]
Addressing https://github.com/dotnet/coreclr/issues/21461 (#21771)
- Increase the polling interval to 20 seconds.
- Provide an opt-out option to the EventPipe file polling.
Jan Vorlicek [Wed, 9 Jan 2019 21:21:03 +0000 (22:21 +0100)]
Fix DynamicMethodDesc memory leak (#21891)
The DynamicMethodTable::AddMethodsToList was incorrectly allocating the
MethodDescChunk from the domain's LoaderAllocator instead of the context
specific one. Thus the allocated memory was leaking after a collectible
AssemblyLoadContext was collected.
There was also a problem with the DynamicMethodDesc::Destroy being
called twice for collectible classes - once by
RuntimeMethodHandle::Destroy() and once when the DomainFile destructor
was called. Due to the primary issue, this problem was not visible,
since the domain's LoaderAllocator is never unmapped. But it started to
cause AV after the primary issue was fixed.
Fadi Hanna [Wed, 9 Jan 2019 21:19:04 +0000 (13:19 -0800)]
Change CoreLib native image to be R2R by default on all platforms (#21497)
Michelle McDaniel [Wed, 9 Jan 2019 20:56:30 +0000 (12:56 -0800)]
Fix perf-prep to pass the branch name (#21911)
For the release branches, we need to specify the branch name when pulling down coreclr test artifacts, and not just pull down from master. This change modifies perf-prep.sh to allow us to specify the branch name, which we will then port to the release branches.
Bruce Forstall [Wed, 9 Jan 2019 19:07:20 +0000 (11:07 -0800)]
Merge pull request #20772 from mikedn/ir-cleanup
Some IR cleanup
Jeremy Koritzinsky [Wed, 9 Jan 2019 18:06:25 +0000 (10:06 -0800)]
Remove extraneous eightbytes check for native structures and add tests. (#21590)
* Remove extraneous eightbytes check and add tests.
* Interger -> Integer
* Missed Helper.cs
* Handle field sizes larger than 8 bytes in AssignClassifiedEightByteTypes
* Move CoreFX test case into CoreCLR. Fix the SystemV eightbyte classifier to correctly classify the second eightbyte when a single field crosses the eightbyte boundary (such as an in-place array of three 4-byte enums).
* Enable passing user defined structs in in-place arrays in a structure if SystemV ABI expects it.
* Correctly handle a field spanning two full eightbytes.
* Just directly assign 0 to accumulatedSizeForEightByte
* Change multi-eightbyte field handling to be a loop as per PR feedback.
* Remove extraneous whitespace.
Omair Majid [Wed, 9 Jan 2019 17:28:48 +0000 (12:28 -0500)]
Support building with python3 on unix (#19356)
The windows build scripts try finding python in order of python3,
python2 and then python. The unix build scripts dont. They just try
python2 variants and then fail. This change makes brings them closer
together by letting users build using only python3.
Jan Kotas [Wed, 9 Jan 2019 12:17:49 +0000 (04:17 -0800)]
More DispatchWrapper tweaks
Marek Safar [Wed, 9 Jan 2019 09:44:46 +0000 (10:44 +0100)]
Removes PNSE version of DispatchWrapper and keep only single version with ifdef
Jan Kotas [Wed, 9 Jan 2019 06:55:58 +0000 (22:55 -0800)]
Delete files moved to shared partition
Marek Safar [Wed, 9 Jan 2019 01:27:26 +0000 (02:27 +0100)]
Moves common COM type to shared corelib partition (dotnet/corert#6782)
* Moves common COM type to shared corelib partition
* Moves GetHRForException to PInvokeMarshal
* Add temporary CORECLR ifdef to ArrayWithOffset
* Apply cleanup from CoreCLR
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Tomas Weinfurt [Wed, 9 Jan 2019 10:53:35 +0000 (02:53 -0800)]
fix DateTime overflow on ARM32 (#21902)
Mike Danes [Wed, 9 Jan 2019 06:42:02 +0000 (08:42 +0200)]
Update gtLclILoffs related comments
Aditya Mandaleeka [Wed, 9 Jan 2019 03:43:18 +0000 (19:43 -0800)]
Merge pull request #21867 from adityamandaleeka/fix_writebarrier_bounds_check
Fix write barrier bounds checks for ARM64 Unix.
Andy Ayers [Wed, 9 Jan 2019 02:42:59 +0000 (18:42 -0800)]
Merge pull request #21857 from AndyAyersMS/RangeCheckSmallTypes
JIT: infer ranges from small int type operations
Jan Vorlicek [Wed, 9 Jan 2019 02:00:36 +0000 (03:00 +0100)]
Enable FinalizeQueue SOS command for Unix (#21876)
The command is very useful and there seems to be no reason for it to not to be enabled on Unix.
Carol Eidt [Wed, 9 Jan 2019 01:46:17 +0000 (17:46 -0800)]
Copy address-taken SIMD intrinsic (#21884)
* Copy address-taken SIMD intrinsic
This occurs, for example, when boxing the result of a SIMD intrinsic. This was being handled for the HW intrinsic case, but not the SIMD Vector intrinsics. Also, eliminate `OperIsSimdHWIntrisic` since it redundantly checks for the case of a SIMD result, even though it was always called in a context where the result is known to be a struct type.
Fix #21854
Stephen Toub [Wed, 9 Jan 2019 01:01:36 +0000 (20:01 -0500)]
Expose string.Concat(ReadOnlySpan, ...) (#21882)
* Expose string.Concat(ReadOnlySpan, ...)
* Add String.Empty fast path to string.Concat(ReadOnlySpan, ...)
Swaroop Sridhar [Wed, 9 Jan 2019 00:01:20 +0000 (16:01 -0800)]
Update Test exclusion for NativeLibraryTests in official builds. (#21858)
Update issues.targets, to reflect the change in location of
NativeLibray tests.
Fixes https://github.com/dotnet/coreclr/issues/21844
Sergey Andreenko [Tue, 8 Jan 2019 23:40:50 +0000 (15:40 -0800)]
Use `saveNext` unwind opcode on arm64. (#21683)
* Use `saveNext` opcode on arm64.
* Support using of `save_next` on int/float border.
* Delete the extra requirement that an epilog sequences can't start from `save_next`.
* response feedback
Fei Peng [Tue, 8 Jan 2019 23:22:52 +0000 (15:22 -0800)]
Fix VZERoUPPER for HW intrinsic
Andy Ayers [Tue, 8 Jan 2019 23:19:42 +0000 (15:19 -0800)]
check for valid IL offsets before computing block ILsize
Jeremy Koritzinsky [Tue, 8 Jan 2019 22:50:42 +0000 (14:50 -0800)]
Extract cleanup changes from #21793. (#21852)
* Cleanup changes from #21793.
* Emit the data pointer offset directly into the IL stream (and calculate it as needed instead of passing it through)
* Fix broken assumption that OverrideProcArgs::na::m_pMT is the array type instead of the element type (which it was).
Andy Ayers [Tue, 8 Jan 2019 19:27:32 +0000 (11:27 -0800)]
JIT: modify inline budget update to use estimated imported IL size
The inliner keeps a time budget to try and avoid pathological runaway inline
behavior (see #4375). The jit estimates the time impact of an inline using a
simple projection based on IL size. If an prospective inline would put the jit
over the time budget, the inline is blocked -- and note even aggressive inlines
can be blocked this way.
We now have a fair number of aggressive inline methods like
`Vector256<T>.IsSupported` where the IL is optimized early on by the jit and the
actual impact on the calling method is much less than the initial IL size would
suggest. For instance `IsSupported` is 286 bytes of IL, but the net contribution
of this method at jit time is either a constant 0 or 1, and so the effective size
is more like 2 bytes of IL.
This set of changes updates the jit to estimate the imported IL size of a method
when updating the budget.
Closes #21794.
Charles Milette [Tue, 8 Jan 2019 22:16:34 +0000 (17:16 -0500)]
Fix consistency between `-` and prefixless args in build.cmd (#20248)
* Fix consistency between `-` and prefixless args in build.com
* Remove -generatelayout
Already PR'd by someone else
Bruce Forstall [Tue, 8 Jan 2019 22:02:15 +0000 (14:02 -0800)]
Merge pull request #20409 from lol768/patch-1
Add a note to clarify debugging w/ dotnet is fine
Günther Foidl [Tue, 8 Jan 2019 21:15:48 +0000 (22:15 +0100)]
Updated "Viewing JIT Dumps" for .NET Core 3.0 (#21687)
* Updated "Viewing JIT Dumps" for .NET Core 3.0
plus some minor wording change
* Incorporated changes from https://github.com/dotnet/coreclr/pull/21859
dotnet-maestro-bot [Tue, 8 Jan 2019 21:00:27 +0000 (13:00 -0800)]
Update CoreClr, CoreFx to preview-27308-03, preview.19058.1, respectively (#21877)
Aditya Mandaleeka [Tue, 8 Jan 2019 02:52:10 +0000 (18:52 -0800)]
Fix write barrier bounds checks for ARM64 Unix
Bruce Forstall [Tue, 8 Jan 2019 19:36:43 +0000 (11:36 -0800)]
Merge pull request #21880 from BruceForstall/FixTestReportsArchiving
Update test reports archiving
Bruce Forstall [Tue, 8 Jan 2019 19:02:40 +0000 (11:02 -0800)]
Update test reports archiving
Two things:
1. Turn "echo" back on after runtests.cmd, so we see in the log file
the testReports.zip compression.
2. Change the archiving of testReports.zip to not occur even if the
test run fails (this is actually the most interesting case), and don't
fail if there is nothing to archive.
Mike McLaughlin [Tue, 8 Jan 2019 17:35:12 +0000 (09:35 -0800)]
Fix issue #20585 createdump explicitly uses /tmp. (#21866)
Changed to PAL's GetTempPathA to get the temp path.
Oded Hanson [Tue, 8 Jan 2019 17:34:25 +0000 (19:34 +0200)]
Fixed potential memory leak (#21872)
dotnet-maestro-bot [Tue, 8 Jan 2019 14:06:58 +0000 (06:06 -0800)]
Update CoreClr, CoreFx, PgoData to preview-27308-01, preview.19057.3, master-
20190108-0040, respectively (#21830)
Viktor Hofer [Tue, 8 Jan 2019 13:13:48 +0000 (14:13 +0100)]
Attempt to fix paths with spaces again (#21837)
Dan Moseley [Tue, 8 Jan 2019 06:25:27 +0000 (22:25 -0800)]
Fix path length 255 (#21838)
* Fix path length 255
* Fix assert
* Dead code
Will Cohen [Tue, 8 Jan 2019 06:19:28 +0000 (17:19 +1100)]
Update ceemain.cpp (#21869)
Jan Kotas [Tue, 8 Jan 2019 02:18:03 +0000 (18:18 -0800)]
CoreRT updates for files moved to shared partition
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Marek Safar [Tue, 8 Jan 2019 00:57:44 +0000 (01:57 +0100)]
Moves ComTypes to shared partition (#21861)
Tanner Gooding [Tue, 8 Jan 2019 00:57:34 +0000 (16:57 -0800)]
Fixing ContainCheckHWIntrinsic to ensure that scalar integer operands are the appropriate size (#21641)
* Fixing ContainCheckHWIntrinsic to ensure that scalar integer operands are the appropriate size
* Adding a regression test for issue 21625
* Fixing IsContainableHWIntrinsicOp to use the containing node type (rather than the simd base type) for Scalar intrinsics
* Fixing the containment check for `Sse41.Insert(V128<float>, V128<float>, byte)`
* Cleaning up the isContainableHWIntrinsicOp logic in lowerxarch.cpp
* Restrict containment to genActualType(baseType)
* Formatting
* Removing some comments and simplifying the supportsContainment checks for various HWIntrinsics that take a scalar operand
* Applying formatting patch
Stephen Toub [Tue, 8 Jan 2019 00:22:14 +0000 (19:22 -0500)]
Check GenerateGuidForType argument for null (#21851)
* Check GenerateGuidForType argument for null
* Also check for RuntimeType
Bruce Forstall [Mon, 7 Jan 2019 22:14:33 +0000 (14:14 -0800)]
Collect Windows test run logs into testReports.zip file (#21813)
* Collect Windows test run logs into testReports.zip file
And upload these to Jenkins, so we can see how the tests ran.
* Archive test Reports even if the test run fails
* Need to use "call" when invoking runtest.cmd batch file
Jeremy Koritzinsky [Mon, 7 Jan 2019 22:11:12 +0000 (14:11 -0800)]
Fix CharSet on StringBuilder hidden null terminator test (#21853)
Mike McLaughlin [Mon, 7 Jan 2019 21:33:29 +0000 (13:33 -0800)]
Actually fix issue #21484 reported by the customer. (#21850)
GC heap globals like ephemeral_heap_segment and finalize_queue are
null/invalid for a server GC. Add a check to skip the workstation GC
memory enumeration if server. The server memory enumeration already
skips if workstation GC.