summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-06Improve performance of Memory<T>.Span property getter (#20386)Levi Broderick5-178/+345
- We can use our knowledge of object representation in the runtime to speed up type checks. - We leave the ref T and the length deconstructed until the very end, optimizing register usage. - The Length property getter is once again just a simple field accessor with no bitwise logic.
2018-11-06Merge pull request #20633 from BruceForstall/FixSPCheckBruce Forstall12-105/+170
Fix SP check for x64/x86, remove for arm32/arm64
2018-11-06Enable SyncBlk for xplat SOS (#20830)Mike McLaughlin4-3/+89
Add SyncBlk to xplat SOS.
2018-11-06fix corefx folder (#20828)Sergey Andreenko1-0/+1
2018-11-06Merge pull request #20834 from BruceForstall/FixArmElJobBruce Forstall1-4/+4
Fix corefx folder for Tizen job
2018-11-06Fix corefx folder for Tizen jobBruce Forstall1-4/+4
https://ci.dot.net/job/dotnet_coreclr/job/master/job/armel_cross_checked_tizen_innerloop_prtest/
2018-11-06Added support for running in a sandbox on Mac (#20735)Oded Hanson10-143/+337
* Added support for running in a sandbox on Mac When running in a sandbox, the Mac operating system will limit access to resources, esp. the file system. Right now both Mutex and SharedMemory in the PAL are accessing the /tmp folder for which Mac does not provide the application permissions to access. Instead, the sandbox provides the ability to share information between applications by using a shared container folder. This is done by registering the application with an Application Group ID. Using this ID, we can access the shared folder and read/write from it. Since the .Net runtime can be loaded in multiple ways, we decided that the easiest way to let the runtime know what the application group ID is via an environment variable. Thus, if the NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID environment variable is set (on Mac), the runtime will assume we are sandboxed, and will use the value provided as the application group ID. Note that due to limitations on semaphore file lengths, we will not allow application group IDs longer than 13 characters. This gives us 10 characters for the developer ID, and 3 extra characters for the group name. When sandbox is disabled (the environment variable is empty) then the folder for Mutex and SharedMemory will continue to be rooted in /tmp. However when the sandbox is enabled, these files will be created under /user/{loginname}/Library/Group Containers/{AppGroupId}/. Fixes #20473 * Made gApplicationContainerPath a pointer so it does not get automatically deleted by the c runtime * Made s_runtimeTempDirectoryPath and s_sharedMemoryDirectoryPath pointers so they are not automatically deleted by the c runtime * Renamed gApplicationContainerPath to gSharedFilesPath * Renamed NETCOREAPP_SANDBOX_APPLICATION_GROUP_ID to DOTNET_SANDBOX_APPLICATION_GROUP_ID * Fixed usage of VerifyStringOperation * Replaced new with InternalNew * Wrapped Apple specific code with #ifdef * Added exception handling during close * Moved VerifyStringOperation macro into SharedMemoryManager * Moved PathCharString variable declarations before AutoCleanup is declared. * Fixed initialization functions not to throw * Renamed CopyPath to BuildSharedFilesPath * Fixed misc nits * Fixed implicit conversions from BOOL to bool * Moved MAX_APPLICATION_GROUP_ID_LENGTH inside ifdef APPLE * Removed PAL_IsApplicationSandboxed
2018-11-05Fix calling convention for 3 p/invoke test casesBruce Forstall3-4/+4
2018-11-05Fix SP check for x64/x86, remove for arm32/arm64Bruce Forstall9-101/+166
The actual checking had gotten lost between JIT32 and RyuJIT. I fixed the "on return from function" case for x86/x64, and the "around every call site" case for x86. I removed the arm64 case because it's not easy to store SP to a stack local or directly compare SP against a stack local without a temporary. Also, for the fixed outgoing arg space ABIs (all but x86), these checks don't seem too useful anyway, so I also removed the arm case.
2018-11-05Exclude FreeBSD symbol packages from symbol uploader (Part 3) (#20824)Mike McLaughlin1-1/+1
2018-11-05Add support for BSWAP intrinsic (#18398)Levi Broderick15-10/+373
With this change, the JIT will recognize a call to BinaryPrimitives.ReverseEndianness and will emit a bswap instruction. This logic is currently only hooked up for x86 and x64; ARM still uses fallback logic. If the JIT can't emit a bswap instruction (for example, trying to emit a 64-bit bswap in a 32-bit process), it will fall back to a software implementation, so the APIs will work across all architectures.
2018-11-05Adding some new functions to System.Math and System.MathF (#20788)Tanner Gooding47-50/+1814
* Adding BitIncrement, BitDecrement, CopySign, MaxMagnitude, and MinMagnitude to Math and MathF * Adding FusedMultiplyAdd, IlogB, Log2, and ScaleB to Math and MathF * Adding some basic PAL tests for fma, ilogb, log2, and scalbn * Fixing a couple typos and adding clarifying comments * Fixing the MSVC _VVV FCALL declarations
2018-11-05Updating the importer to throw a NotImplementedException if it finds a ↵Tanner Gooding5-11/+36
mustExpand intrinsic that it can't expand (#20792) * Updating the importer to throw a NotImplementedException if it finds a mustExpand hwintrinsic that it can't expand * Updating the JITEEVersionIdentifier
2018-11-05Improve/fix SerialStream.Dispose (dotnet/corefx#33221)Krzysztof Wicher2-2/+2
* Improve/fix SerialStream.Dispose * Review feedback * remove unused using statement * Use ToFileDescriptor Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2018-11-05Merge pull request #20736 from briansull/issue_18672Brian Sullivan3-21/+126
Fix ValueNumber constant propagation with nested structs
2018-11-05 Fiber-friendly Vectored Exception Handling (#20746)Tobias Loew1-0/+18
* Fiber-friendly Vectored Exception Handling Check during exception handling if the cached and the current stack-base match to detect Fibers.
2018-11-05Fix constant propagation with nested structsBrian Sullivan3-21/+126
Fixes #18672 Test case is here: JIT/Regression/JitBlue/GitHub_18672/GitHub_18672.cs
2018-11-05Bump FreeBSD AzDO build timeout to 90 minutesMatt Galbraith1-1/+1
2018-11-05Fix perf regression in master. (#20762)Sergey Andreenko1-10/+34
* Fix comments. We count implict byref argument occurrences for all lclVars not only for promoted. * Fix the regression. Return the old behaiour where both parent and promoted lclVar have updated ref counters. * rename `UpdateImplicitByRefCounter` to `UpdateEarlyRefCountForImplicitByRef` * Fix comment.
2018-11-04System.Decimal code style and comments clean-up (#20793)Pent Ploompuu3-495/+508
2018-11-04[Darc-Update] Update dependencies from build 20181102.21 of ↵dotnet-maestro[bot]10-14/+21
https://github.com/dotnet/arcade (#20783) * Updating version files * Updating version files
2018-11-04Optimization: Reduce many array allocations in GetCustomAtttributes()'s ↵Nick Craver2-25/+49
inherited path (#20779) * Optimization: avoid 2 array allocations in inherited attribute misses This is a follow-up to many allocations recognized in #20448. A lot of methods ultimately call through CustomAttributes.GetCustomAttributes(). In the inherited search path (default for most searches above), the inheritance path of a class is traversed, resulting in an array allocation per crawled type, a copy to the overall List<object> and then after that - in current code - an array allocation from that list and a typed array allocation it's copied to. However, in the common miss case as simple as: typeof(T).GetCustomAttributes(typeof(TAttr), true); ...and many other overloads, all the same path underneath... We can avoid the last 2 arrays in the miss case. We have the List<object> to go off of. If that's a zero-entry list, we can return an Array.Empty<TAttr>(). That's effectively what this change does. While converting the entire attribute pipeline to generics is problematic and has issue since some object[] return abstracts aren't sealed, we can at least somewhat trivially cache an array per attribute type (only one static, ultimately from Array.Empty<T> underneath) and return that for the miss case. There are far more wins to be had here, but they require more changes. * Move RuntimeType empty array cache generation to Attribute.CreateAttributeArrayHelper This exposes Attribute.CreateAttributeArrayHelper to internal and uses it directly on the RuntimeType caching for empty arrays. Though this allocated 1 additional array overall, it's simpler, faster to init, and still is an infinite win over the per-call allocations before this overall changesets. * CustomAttributes: remove needless array copy in the inherited hit case This removes a .ToArray() for the sake of Array.Copy() where a simple for loop suffices and removes the allocation. Reversing the "empty" result checks is also just a bit cleaner here. This also expands the same fix to the MemberInfo path. Note: should DRY these up too (longstanding issue) - but let's do that in a separate commit for clarity. * GetCusomAttributes: use ListBuilder<object> for inheritance crawls This exposes RuntimeType.ListBuilder<T> for internal usage and replaces the List<T> allocation in GetCustomAttributes() paths to reduce allocations and increase performance in the inherited crawl paths (which is the default for many optional-parameter methods in layers above). Note: there is a subtle behavior depending on previous-null (not possible with a struct now) in AttributeUsageCheck() that I believe still behaves correctly, but could use another set of eyes and a full test suite run to confirm. object[] attributes was removed there simply because it wasn't used before - only cleaning up. * Attribute caching: use Array.CreateInstance() directly on RuntimeType This also reverts the CreateAttributeArrayHelper => internal change, since it's no longer needed. * Ref passing for RuntimeType.ListBuilder<object> & CustomAttribute simplification This fixes the struct passing duplication and tweaks how we're creating arrays a bit, centralizing the zero-element checks to cover all cases as well as simplify the per-method code to rely on the fact this is happening underneath.
2018-11-03Improve error messages for byref-like type loading errors (#20789)Jan Kotas7-31/+16
Related to dotnet/corefx#33233
2018-11-03Merge pull request #20780 from dotnet/dev/unix_test_workflowBruce Forstall2-3/+8
PMI asm diffs changes
2018-11-03Add StringBuilder.Append(ROM<char>) (#20773)Wraith21-0/+2
* added Append(ROM<char>) * address feedback * revert sln
2018-11-03Update CoreFx, CoreSetup, IbcData, PgoData to preview.18553.3, ↵dotnet-maestro-bot1-9/+9
preview-27103-01, master-20181103-0046, master-20181103-0042, respectively (#20785)
2018-11-03Cleanup and improve name formatting in reflection (#20781)Jan Kotas10-131/+80
* Delete internal Array.UnsafeCreateInstance method * Delete binary serialization specific type name formatting * Use ValueStringBuilder to format method names in reflection
2018-11-03Update BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to ↵dotnet-maestro-bot4-15/+29
preview1-03402-01, preview-27102-02, preview.18552.1, preview-27102-03, master-20181102-0044, master-20181102-0041, respectively (master) (#20745) * Update BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-03402-01, preview-27102-02, preview.18552.1, preview-27102-03, master-20181102-0044, master-20181102-0041, respectively * Disabled outdated test
2018-11-02Perf improvements to Span and Memory (#20771)Levi Broderick5-4/+65
* Perf improvements to Span and Memory - Improves perf of AsSpan, AsMemory, ctor, and Slice * PR feedback - add comments
2018-11-02Use C# compiler's static data support in Encoding.Preamble (#20768)Stephen Toub3-17/+13
* Use C# compiler's static data support in Encoding.Preamble Also avoid Array.Empty and just use default span for an empty preamble. * Address PR feedback
2018-11-02Add remaining IAsyncDisposable implementations to CoreLib (#20676)Stephen Toub6-44/+180
* Add remaining IAsyncDisposable implementations to CoreLib * Address PR feedback
2018-11-02Fix logging so that we can see the full 64 bit integer in the log file (#20741)Andrew Au1-2/+2
2018-11-02Improve performance of String.Equals(..., OrdinalIgnoreCase) (#20734)Levi Broderick3-34/+244
- Tries to consume multiple chars in parallel when possible - Didn't vectorize because inputs to this function are generally fairly small - Moved static GlobalizationMode lookup out of hot path - Removed indirection so that StringComparer now calls directly into workhorse routine
2018-11-02Merge pull request #20769 from BruceForstall/FixArmBruce Forstall1-1/+7
Need to archive and transfer the Product directory for Linux arm/arm64
2018-11-02Merge pull request #20760 from hoyosjs/arcadeJuan Hoyos61-1/+3766
Add base arcade scripts and versioning files
2018-11-02Merge pull request #20770 from BruceForstall/EnableMoreDiffsBruce Forstall1-2/+1
Do PMI diffs on frameworks and benchmarks
2018-11-02Do PMI diffs on frameworks and benchmarksBruce Forstall1-2/+1
2018-11-02Allows Debug.Fail to go through Trace Listeners (#20764)Maryam Ariyan4-29/+47
2018-11-02Need to archive and transfer the Product directory for Linux arm/arm64 PMI diffsBruce Forstall1-1/+7
2018-11-02Avoid unnecessary interlocked in ManualResetValueTaskSourceCore (#20742)Stephen Toub1-7/+12
When a ManualResetValueTaskSourceCore is used as the implementation for a ValueTask, it's set up for the operation, and then two things happen: a callback is hooked up at some point, and the operation completes at some point. The former generally occurs before the latter, however there is a race condition, and so both paths currently use an Interlocked.CompareExchange to coordinate. But that means that we always end up with two CompareExchange operations. In the common path, there's no contention between these, and so we can avoid one of the CompareExchanges by first doing a normal read of the target field (we were already doing that read in one of the two cases, but we weren't taking advantage of it).
2018-11-01Fix the test. (#20701)Sergey Andreenko1-1/+0
As https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.gchandle.free?view=netframework-4.7.2 says "The caller must ensure that for a given handle, Free is called only once.". So delete the second call to `Free()`. I believe it changes the desired behaviour for this test but it was added before 2010 (via source depo) and there are no comments about the regression that it was able to repro, so it is not worth to investigate that.
2018-11-01Remove redundant zero-initializations for long-lifetime structs. (#20753)Eugene Rozenfeld1-3/+4
When compInitMem is true long-lifetime structs (i.e., the ones with lvIsTemp set to false) are zero-initialized in the prolog: https://github.com/dotnet/coreclr/blob/c8a63947382b0db428db602238199ca81badbe8e/src/jit/codegencommon.cpp#L4765 Therefore, these structs don't need an explicit zero-initialization in blocks that are not in a loop.
2018-11-01Add base arcade scripts and versioning filesJuan Sebastian Hoyos Ayala61-1/+3766
2018-11-01Fix freebsd symbol upload failure. (#20759)Mike McLaughlin1-1/+1
2018-11-01one more place to add case for freebsd (#20756)Tomas Weinfurt1-0/+1
2018-11-01Display offset in TimeZoneInfo.DisplayName (#20728)Egor Bogatov1-0/+8
* Display offset in TimeZoneInfo.DisplayInfo * Display offset in TimeZoneInfo.DisplayInfo * prefer +00.00 * Update TimeZoneInfo.Unix.cs
2018-11-01Merge pull request #20755 from dotnet/dev/unix_test_workflowBruce Forstall1-5/+10
Enable triggers for Linux x64 PMI asm diffs
2018-11-01Merge pull request #20752 from BruceForstall/EnableLinuxX64PmiDiffsBruce Forstall1-5/+10
Fix PMI job triggers for x64 Linux
2018-11-01Merge pull request #20750 from BruceForstall/ReduceExpectedTestCountBruce Forstall1-4/+4
Fix expected Pri-1 test count
2018-11-01Disable outdated CoreFX tests (#20749)Jan Kotas1-0/+57