summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-17Remove a few stale resource strings for ConcurrentStack (#22037)Stephen Toub1-9/+0
2019-01-17Avoid allocations in Utf8Formatter.TryFormat(float/double, ...) (#22011)Stephen Toub2-41/+81
* Avoid allocations in Utf8Formatter.TryFormat(float/double, ...) Currently every call to Utf8Formatter.TryFormat for a float or a double allocates two strings, one for the format string and one for the resulting number. This avoids those in the common case where we can use float/double.TryFormat and format directly into a stack buffer. Also removes some unsafe code; the performance of StandardFormat.ToString isn't currently worth the extra nanoseconds gained by using unsafe code. * Delete assert There's a test that uses unsafe code to cause this to fail and validate that no exception is thrown.
2019-01-17Merge pull request #22022 from fiigii/reenabletestCarol Eidt11-0/+1664
Re-enable Avx.PermuteVar tests
2019-01-17Fix AsyncMethodBuilder build on Mono (#22034)Marek Safar1-1/+1
2019-01-17Fix CoreCLR build of AsyncMethodBuilder.Filip Navara1-5/+9
2019-01-17Add new members to AsyncCausalitySupport.Filip Navara3-1089/+13
Remove file moved to shared partition. Fix builds without FeatureCominterop.
2019-01-17Move AsyncMethodBuilder to shared. (dotnet/corert#6832)Filip Navara3-0/+1140
* Move AsyncMethodBuilder to shared. * Bring back PROJECTN. * #if-out TrackAsyncMethodCompletion for CoreRT. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-16Re-enable Avx.PermuteVar testsFei Peng11-0/+1664
2019-01-16Update dependencies from https://github.com/dotnet/arcade build 20190115.6 ↵dotnet-maestro[bot]9-37/+64
(#22007) This change updates the following dependencies - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19065.6 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19065.6
2019-01-16Merge pull request #21997 from BruceForstall/FixFpRelativeInstructionsBruce Forstall3-7/+640
Fix two cases of FP-relative immediate offsets possibly not encodable
2019-01-16Reduce steps for string.Contains(string value) (#22008)Ben Adams1-3/+8
2019-01-16Update linux/OSX build instructions (#21679)Jarret Shook2-176/+87
* Update linux/OSX build instructions * Update based on feedback * Address PR feedback * Update to address feedback
2019-01-16 Fix imm-operand encoding for SSE/AVX instructions (#21999)Fei Peng55-2565/+7743
* Move more SSE2 tests to the template * Improve Insert test template to involve more codegen situations * Fix imm-operand encoding for SSE/AVX instructions
2019-01-16Fix generate_layout_only (#21996)Jarret Shook1-17/+138
* Fix generate_layout_only * Correctly add all opons * Clean run for cross built device
2019-01-16Enable BenchmarksGame when BuildTestsAgainstPackages (see #21554) in ↵Egor Chesakov1-18/+0
tests/issues.targets
2019-01-16Make JIT\superpmi\superpmicollect compatible with HelixEgor Chesakov4-38/+46
Related issue: https://github.com/dotnet/coreclr/issues/21698
2019-01-15String -> stringJan Kotas8-16/+16
2019-01-15Delete files moved to shared partitionJan Kotas6-224/+0
2019-01-15Move more COM exceptions to shared partition (dotnet/corert#6829)Marek Safar6-0/+212
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-15WIP: Re-enable ObjectStackAllocationTests for arm32Eugene Rozenfeld1-3/+0
2019-01-15Use MSBuild to generate __TestEnv files (#21966)Egor Chesakov4-136/+200
2019-01-15Fix two cases of FP-relative immediate offsets not being checked for ↵Bruce Forstall3-7/+640
encodability For ARM32/ARM64, the immediate offsets in addressing modes have limited range that varies by instruction. A couple cases were not checking for that range, leading to generating potentially un-encodable instruction. In particular, the test case shows a case where a very large frame in a function with a stored generic context would fail on ARM64. There are no code diffs from this change for ARM64, except we sometimes get better assembly comments where the local variable referenced is annotated on the store instruction. For ARM32, the "secret stub param" is now stored using SP-relative addressing, not FP-relative, if possible (which we generally prefer in main function bodies).
2019-01-15On SIGTERM default to a non-zero exit code (#21300)Tom Deseyn6-91/+130
* On SIGTERM default to a non-zero exit code * Fix Windows builds * Improve SIG_DFL/SIG_IGN handling * Remove PAL_GetTerminationExitCode * Use sa_handler/sa_sigaction based on SA_SIGINFO; remove HAVE_SIGINFO_T. * configure.cmake: remove siginfo_t check * Move restore_signal_and_resend so OSX can use it; add function documentation * Fix OSX build: include pal/process.h for gPID * Check SIG_IGN and SIG_DFL against sa_handler * Don't use sa_handler when SA_SIGINFO is set * Fix equality check * Swap order of checking SA_SIGINFO and SIG_IGN/SIG_DFL
2019-01-15Merge pull request #21963 from BrianBohe/masterJuan Hoyos1-8/+1
Remove unreachable code
2019-01-15Add freebsd official build (#21988)Sven Boemer5-8/+53
* Enable freebsd build Two different environment variables are used to tell either buildtools or arcade to use an existing SDK instead of trying to restore one. The package build project is pure msbuild (it doesn't do platform detection in any wrapper .sh files), and we don't have FreeBSD detected in msbuild, so pass the __BuildOS in from the caller.
2019-01-15allocate the right number of slots for the handle table when number of ↵David Mason1-1/+1
processors > 64 (#21992)
2019-01-15Update CoreClr, CoreFx, PgoData to preview-27312-01, preview.19063.1, ↵dotnet-maestro-bot3-8/+12
master-20190111.1, respectively (master) (#21954) * Update CoreClr, CoreFx, PgoData to preview-27312-01, preview.19063.1, master-20190111.1, respectively * Disable invalid test
2019-01-14fix the help message for runtest.sh so the gcstress instructions aren't ↵David Mason1-2/+2
split across multiple lines (#21989)
2019-01-14Large version bubble Support (#21727)Andon Andonov28-74/+341
* Preliminary Changes * Module Index Resolution * Change infoModule encoding * Change referencing module in R2R * Pre-condition Check * Virtual Method Module Resolution * Remove Workarounds and add conditional import loading * Add signature kind module override * Add ELEMENT_TYPE_MODULE_ZAPSIG * Add switch to enable large version bubble * Cleanup * Change Native header check * Add large version bubble test * Add Large Version Bubble Checks * Cleanup * Revert unnecessary check * Change EncodeMethod Version Bubble Condition * Add Large Version Bubble asserts * Cleanup * Add default argument to runtests.py * Change test PreCommands * Revert whitespace changes * Change breaking conditional check * Streamline Version Bubble test * Address PR Feedback * Address PR Feedback #2 * Remove dead code * Add crossgen-time ifdef
2019-01-14Finding Standalone GC and CoreDisTools in non-standard host testing (#21983)Aaron Robinson2-57/+24
* Use GetInternalSystemDirectory() as the directory for standalone GC * Use GetInternalSystemDirectory() as the directory for coredistools
2019-01-14Improvements for object stack allocation.Eugene Rozenfeld11-97/+400
This change enables object stack allocation for more cases. 1. Objects with gc fields can now be stack-allocated. 2. Object stack allocation is enabled for x86. ObjectAllocator updates the types of trees containing references to possibly-stack-allocated objects to TYP_BYREF or TYP_I_IMPL as appropriate. That allows us to remove the hacks in gcencode.cpp and refine reporting of pointers: the pointer is not reported when we can prove that it always points to a stack-allocated object or is null (typed as TYP_I_IMPL); the pointer is reported as an interior pointer when it may point to either a stack-allocated object or a heap-allocated object (typed as TYP_BYREF); the pointer is reported as a normal pointer when it points to a heap-allocated object (typed as TYP_REF). ObjectAllocator also adds flags to indirections: GTF_IND_TGTANYWHERE when the indirection may be the heap or the stack (that results in checked write barriers used for writes) or the new GTF_IND_TGT_NOT_HEAP when the indirection is null or stack memory (that results in no barrier used for writes).
2019-01-14Add test calling a NativeCallable via an unmanaged calli. (#21984)Jeremy Koritzinsky1-0/+49
2019-01-14Removing noisy R2R compilation outputs, and putting them under the /verbose ↵Fadi Hanna2-17/+34
switch (#21987)
2019-01-14Custom Marshalers in custom-ALC-loaded assemblies results in types loaded ↵Jeremy Koritzinsky27-146/+463
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.
2019-01-14Fix TimeSpan parsing (#21968)Tarek Mahmoud Sayed2-39/+62
* Fix TimeSpan parsing * Temporary disabling the failed CI tests
2019-01-14Fix TaskCompletionSource to avoid capturing ExecutionContext (#21981)Stephen Toub1-4/+4
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.
2019-01-14Remove tizen jobs as valid pr jobs (#21982)Jarret Shook1-5/+0
2019-01-14Making sure the nativeCodeVersion flowing change works with Rejit and EnC ↵Andrew Au1-1/+11
(#21961)
2019-01-12Add NativeLibrary Resolve Event (#21929)Swaroop Sridhar14-29/+391
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.
2019-01-12Add System.Reflection.Emit.DynamicILInfo (#21945)Maryam Ariyan2-1/+108
* Making DynamicILInfo and its API impls public * Remove DynamicScope input from ctor args
2019-01-11Fix x64 CFI generation (#21955)Andrey Kvochko1-0/+3
2019-01-11Patch vtable slots and similar when tiering is enabled (#21292)Koundinya Veluri44-532/+2299
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.
2019-01-11Merge pull request #21795 from fiigii/fixGenericCarol Eidt4-87/+54
Remove unnecessary ThrowIfUnsupportedType calls and definitions
2019-01-11Generate non-null assertion for byrefs if we can't find corresponding refs.Eugene Rozenfeld1-2/+3
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.
2019-01-11Fix access token used for internal helix submissions (#21957)Sven Boemer1-2/+4
Also specify the variable group using yaml syntax.
2019-01-11Share arg validation runtest and run-pmi-diff (#20812)Jarret Shook3-218/+424
* 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
2019-01-11Add missing overrides to SyncTextWriter (#21956)Stephen Toub1-6/+54
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.
2019-01-11Remove unreachable codeBrian Bohe1-8/+1
2019-01-11Enable returning more complex structures via PInvoke returns. (#21470)Jeremy Koritzinsky23-70/+304
* 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.
2019-01-11Remove the Smarty lst files from CoreCLR (#21962)Jarret Shook2-155842/+0