Age | Commit message (Collapse) | Author | Files | Lines |
|
- 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.
|
|
Fix SP check for x64/x86, remove for arm32/arm64
|
|
Add SyncBlk to xplat SOS.
|
|
|
|
Fix corefx folder for Tizen job
|
|
https://ci.dot.net/job/dotnet_coreclr/job/master/job/armel_cross_checked_tizen_innerloop_prtest/
|
|
* 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
|
|
|
|
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.
|
|
|
|
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.
|
|
* 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
|
|
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
|
|
* Improve/fix SerialStream.Dispose
* Review feedback
* remove unused using statement
* Use ToFileDescriptor
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Fix ValueNumber constant propagation with nested structs
|
|
* Fiber-friendly Vectored Exception Handling
Check during exception handling if the cached and the current stack-base match to detect Fibers.
|
|
Fixes #18672
Test case is here: JIT/Regression/JitBlue/GitHub_18672/GitHub_18672.cs
|
|
|
|
* 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.
|
|
|
|
https://github.com/dotnet/arcade (#20783)
* Updating version files
* Updating version files
|
|
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.
|
|
Related to dotnet/corefx#33233
|
|
PMI asm diffs changes
|
|
* added Append(ROM<char>)
* address feedback
* revert sln
|
|
preview-27103-01, master-20181103-0046, master-20181103-0042, respectively (#20785)
|
|
* Delete internal Array.UnsafeCreateInstance method
* Delete binary serialization specific type name formatting
* Use ValueStringBuilder to format method names in reflection
|
|
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
|
|
* Perf improvements to Span and Memory
- Improves perf of AsSpan, AsMemory, ctor, and Slice
* PR feedback - add comments
|
|
* 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
|
|
* Add remaining IAsyncDisposable implementations to CoreLib
* Address PR feedback
|
|
|
|
- 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
|
|
Need to archive and transfer the Product directory for Linux arm/arm64
|
|
Add base arcade scripts and versioning files
|
|
Do PMI diffs on frameworks and benchmarks
|
|
|
|
|
|
|
|
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).
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
* Display offset in TimeZoneInfo.DisplayInfo
* Display offset in TimeZoneInfo.DisplayInfo
* prefer +00.00
* Update TimeZoneInfo.Unix.cs
|
|
Enable triggers for Linux x64 PMI asm diffs
|
|
Fix PMI job triggers for x64 Linux
|
|
Fix expected Pri-1 test count
|
|
|