Age | Commit message (Collapse) | Author |
|
* reinstate strict-prototype warning
* More fixes
* Need to keep the warning disabled for zlib
https://github.com/madler/zlib/issues/633
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
* Fix SuperPMI unit test error checking
We were ignoring test failures, and even ignoring if the test
we wanted to run under collection actually existed. This means
that at some point during recent test reconfigurations, we
stopped building 10w5d_cs_do.cmd/sh but we didn't notice. Because
Bytemark kept being built as before, we got at least some .mc
files.
Add more checking that the programs we want to run exist, and
that the tests we invoke pass.
* Adjust superpmi unit test collection tests
Add CscBench to get better C# coverage.
Disable 10w5d_cs_do.csproj due to https://github.com/dotnet/runtime/issues/76421
|
|
Division by zero in C++ is undefined behavior on some architecture and
should be avoided.
Co-authored-by: Andy Ayers <andya@microsoft.com>
|
|
Co-authored-by: Filip Navara <filip.navara@gmail.com>
|
|
There is often a single-def single use temp consuming a QMARK (which in
turn often comes from expansion of `isinst` and friends). This temp
assignment tends to stay around and can inhibit redundant branch opts
in a number of interesting cases. It may also serve as an attractive
nuisance for copy prop.
While it would be ideal to generalize RBO to handle assignment side
effects, doing so appears quite challenging, as we would need to rewrite
possibly large chunks of the SSA and VN graphs. Forward sub eliminates
the temp and so clears the way for the existing RBO to remove more branches.
Addresses aspects of the "side effect" enhancements for RBO (see #48115).
|
|
Pick up changes made to superpmi.py for more general finding of
`main` branch.
Make "list" choose a default git hash if not specified.
Change `list --all` to show all the JITs for a particular git hash.
Add new `list --global_all` to show all JITs for all git hashes
(this was previously `list --all`).
Fix obsoleted `logging.warn`; use `logging.warning` instead.
|
|
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
We can almost always avoid allocating an internal register, which may be
expensive if LR is picked since we cannot use thumb encoding for it.
The only case where we need an internal register is when we have a
source that is in a register, and we have a single taget register to
place that conflicts with that source register. The to-stack copies then
need an intermediate scratch register to avoid clobbering the source
register.
|
|
Recorded SPMI method contexts include configuration environment variables
such as `COMPlus_JITMinOpts` that are replayed. However, when doing
asmdiffs replays to compare a Release to a Checked compiler (non-DEBUG
to DEBUG), there may be codegen-altering configuration variables
such as JitStress that are only read and interpreted by the DEBUG
compiler. This leads to asm diffs.
Introduce a `-ignoreStoredConfig` argument to superpmi.exe, and use it
in superpmi.py when doing Checked/Release asm diffs, that pretends there
are no stored config variables. This assumes that the stored config variables
only alter JIT behavior but that they JIT will succeed with or without them.
This is also slightly more than necessary: if there is a config variable
that the Release compiler knows about, we won't use that, either. However,
we have no easy way (currently) to distinguish which variables are DEBUG
and which are both DEBUG and non-DEBUG available.
Contributes to https://github.com/dotnet/runtime/issues/76347
|
|
* Remove IDispatchImplAttribute API
This type has never been supported on .NET Core.
Removing all supporting code paths.
|
|
* SuperPMI collections: exclude more files/directories
Exclude a few more native code files and the 'runtimes' directory
that contains uninteresting files, including native code files,
to reduce the number of PMI exceptions during collections.
* Use python 'list' constructor to avoid modifying global lists
|
|
Windows CNG has two different libraries: bcrypt.dll (`BCrypt*` functions) for in-memory/ephemeral operations, and ncrypt.dll (`NCrypt*` functions) for persisted key operations. Since the NCrypt functions can also operate on ephemeral keys our cryptographic operations have generally been done in terms of NCrypt.
NCrypt's flexibility (to also work with persisted keys) comes at a cost. All key operations are done out-of-process (in lsass.exe), and that requires an (L)RPC call for every operation. It also means there are simply more moving parts, and thus more room for error.
With this change we will use BCrypt for RSA operations on Windows from `RSA.Create()` and `cert.GetRSAPublicKey()`. ECDSA/ECDH/DSA can any/all be changed to follow suit later.
For keys created from RSA.Create() a verification operation currently looks like
* Virtual invoke to RSAWrapper.VerifyHash
* Maybe-devirtualized invoke to RSACng.VerifyHash
* P/Invoke to NCryptVerifySignature
* "Virtual" invoke to MSKSPVerifySignature (or whatever it's really called)
* LRPC call
* Find key in the MRU ring
* Effectively a call to BCryptVerifySignature
After this change it is instead
* Virtual invoke to RSABCrypt.VerifyHash
* P/Invoke to BCryptVerifySignature
Removing all of those other indirections removes about 40us from a 50us operation (on my primary devbox).
As part of making some code be shared between RSACng and RSABCrypt, some allocating code changed to pooling code and some array code got spanified.
|
|
(#76323)
* Add test for covariant reabstraction
* [metadata] Skip null vtable entires when checking covariant overrides
When there are covariant return overrides, we check the vtable slot in every
parent class for signature compatability with the proposed override.
However if one of the ancestor classes is abstract, it could have an
abstract override for hte method:
class Base {
public virtual Base Method() => this;
}
public abstract Intermediate : Base {
public override abstract Base Method();
}
public Leaf : Intermediate {
public override Leaf Method() => this;
}
In this case when we're checking that Leaf.Method is compatible with
the vtable slot in Intermediate, we will see a null method (since
Intermediate is abstract). In such cases we can skip over the class
and continue with its parent.
Fixes
https://github.com/dotnet/runtime/issues/76312
|
|
* [NativeAOT] Enable CI for macOS x64/arm64
* Update CppCompilerAndLinker condition
* Enable NativeAOT osx-arm64 build in regular runtime pipeline
* Enable cross-compilation on macOS
* Fix HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP when cross-compiling
* Update OSVersion_ValidVersion_OSX test on NativeAOT
The test tries to validate Environment.OSVersion.Version which works correctly. RuntimeInformation.RuntimeIdentifier, however, doesn't use versioned RIDs when NativeAOT is used.
* Add hack to stop linker from corrupting DWARF CFI, bump darwin version in triple to get compact unwinding tables generated
* Bump ObjWriter packages
* Disable MessageSendTests on NativeAOT
Co-authored-by: Adeel <3840695+am11@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
Runtime_33972 was failing in ARM64 in JitStress because it turns off HWIntrinsic - so I force the test to enable it.
|
|
* fix probable type for conv_u4 to match conv_u8 regards unsigned conversion
* Fix conv_u as well
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
|
|
* Remove the special case
* Simplify code
* Add tests
|
|
* Avoiding the use of JIT phases shorName
* Removing shortName from JIT phases description
* Avoiding memory allocation
* Renaming variable
|
|
Up the tolerance a bit to get past some jit stress errors we're seeing.
Fixes the main case in #74169.
|
|
Before Xcode 14 the `objc_super` struct definition in the SDK headers looked like this:
```
#if !defined(__cplusplus) && !__OBJC2__
/* For compatibility with old objc-runtime.h header */
__unsafe_unretained _Nonnull Class class;
#else
__unsafe_unretained _Nonnull Class super_class;
#endif
```
With Xcode 14 however the iOS/tvOS SDK header was changed to only define `super_class`, but the MacOSX SDK stayed the same.
Added CMake detection of this case so we can compile both on older and newer Xcode SDKs across platforms.
|
|
|
|
Co-authored-by: Filip Navara <filip.navara@gmail.com>
|
|
|
|
* Import new MsQuic interop
* Detect the new QUIC status
* Use correct values for ALPN_IN_USE in interop shim
* Update alpine-3.14-helix-amd64 image to newer
|
|
* [wasm] Pass --web-server-use-cop for threading samples
* CI: Add wasm samples to wasm specific paths list
|
|
|
|
There is a subtle bug in hardware exception handling in the runtime
that causes the debugged process to crash when a user tries to use the
"unwind to this frame" on the frame where the exception happened.
This issue was introduced by the recent changes that modified hardware
exception handling.
The problem turned out to be in how we update the exception and context
records in the HandleManagedFaultFilter when we re-raise the exception
using RaiseException from the VEH. Updating the context is both not
necessary and wrong. All we need to update is the `ExceptionAddress` in
the `EXCEPTION_RECORD`, since the RaiseException puts the address of
itself there and we need the address of the original access violation to
be there.
The context should stay untouched as we are unwinding from the
RaiseException.
The context copying was originally made to mimick the code in the
`NakedThrowHelper` used before the exception handling change. That one
needed the context update, as it was used to fix unwinding over the
NakedThrowHelper that was a hijack helper. In the current state, nothing
like that is needed.
With this fix, the VS debugger works as expected.
|
|
* Retake lock when using a dependent transaction from a
TransactionScope (#76010).
* Reset TransactionTransmitter and Receiver before reusing them
(#76010).
* Increase MSDTC startup timeout from 2.5 to 30 seconds (#75822)
Fixes #76010
Fixes #75822
|
|
* Vector128 Negate intrinsics (two's complement)
* AMD64 OnesComplement intrinsics for Vector128/64
* Negate + OnesComplement operands,fix missing break
* Simplify OP_AMD64_NEGATION
* Conditional Select for amd64, refactor arm64 code
* Re-use Arm64 code for Negate and OnesComplement
* rename ones complement
* Update src/mono/mono/mini/mini-ops.h remove space
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
* remove space mini-ops.hs
* remove blank line
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
|
|
Remove unused asm constants.
Remove comments about context-bound objects and remoting.
Use common constants for VtblGap concept.
|
|
|
|
initialization. (#76335)
|
|
|
|
* Remove GT_ADDEX and replace with more generalized containment handling
* Handle small types for (extended register) instructions
* Remember to handle IsRegOptional
* Applying formatting patch
* Preference containing the CAST of `ADD(op1, CAST(op2))` rather than the op2 of CAST
* Update src/coreclr/jit/lowerarmarch.cpp
* Adding a test covering the caught fuzzlyn scenario
* Ensure the new test returns 100
* Skip a Fuzzlyn generated regression test on Mono wasm/llvmaot/llvmfullaot
|
|
implementation of GC behaves like .NET 6.0 did. (#76365)
|
|
* Disable Source generator tests on all mobile platforms
* Remove redundant source generator test suite exclusions
|
|
In some cases the value of a block's branch predicate is correlated with the
predecessor of the block. Often this correlation is hinted at by the presence
of phis in the predicate's tree and/or phi VNs in in the predicate's VN graph.
For each predecessor of a block, we evaluate the predicate value number using
the values brought to the block by that predecessor. If we find correlations,
we use them to drive the existing jump threading optimization.
Make sure that when we search local PHIs we also match the ssa def
number to ensure we're looking at the right PHI.
Also, if we end up partially disambiguating such that there is just one
remaining predecessor, update the value number of the predicate to reflect
the values that flow in from that predecessor.
Fixes #75944.
Contributes to #48115.
|
|
byte" (#76385)
|
|
This starts communicating more information about diffs back from
superpmi and starts using it in the driver. The current information is
the base size, diff size, base instructions, diff instructions and
context size.
The driver uses the base size/diff size to pick a small number of
interesting contexts and only creates disassembly for these contexts.
jit-analyze is then also invoked on only these contexts, but the
contexts are picked so that they overlap with what jit-analyze would
display. Additionally, we also pick the top 20 smallest contexts (in
terms of context size) -- I frequently use the smallest contexts with
diffs to investigate my change.
The new behavior is only enabled when no custom metrics are specified.
If custom metrics are specified we fall back to producing all
disassembly files and leave it up to jit-analyze to extract and analyze
the metrics specified.
Also, the retainTopFilesOnly option is no longer necessary since our CI
pipeline will at most produce 100 .dasm files now. Another benefit is that
this means that all contexts mentioned in the jit-analyze output will now be
part of the artifacts.
The net result is that we can now get SPMI diffs for changes with even
hundreds of thousands of diffs in the same time as it takes to get diffs
for a small change.
Fix #76178
|
|
* Return s_defaultResultTask from Task.FromResult in more cases
Today we return a cached task from Task.FromResult when the TResult is a primitive and its value is 0. But it needn't be constrained to only being a primitive; what matters is that we need to be able to efficiently compare its bit pattern to 0. And we can do that easily now by using Unsafe.SizeOf to check if the size is the same as a primitive, Unsafe casting to that primitive, and then comparing against 0.
* Update tests
|
|
* remove explicit LangVersion from a few projects
* feedback
* net7.0
* net7.0
Co-authored-by: kasperk81 <kasperk81 83082615+kasperk81@users.noreply.github.com>
Co-authored-by: kasperk81 <kasperk81 kasperk81 83082615+kasperk81@users.noreply.github.com>
|
|
Governance tooling (#76309)
|
|
* Remove some extra static arrays used in Split
* Remove const
|
|
The `readonly` addition was one of the 3600 diffs in #74825. `MarkStrategy` can have mutable state that was getting lost because Roslyn considers it valid to put `_marker` into a temporary before calling instance methods on it.
This resulted in DependencyGraphViewer hanging after seeing tens of thousands of new graphs being added.
|
|
* Allow static methods if checking type equivalence
* Add test for loading value type with static method
* Add test in which loading a value type with an instance method should throw a TypeLoadException
|
|
The dispatch maps are identical because canonically-equivalent types have the same vtable layouts.
|
|
|
|
|
|
* Issue #75070 - Add a DequeueEnqueue method to the System.Collections.Generic.PriorityQueue public api and unit test cases for the new method
* Issue #75070 - Remove unnecessary PriorityQueue DequeueEnqueue property test case and update DequeueEnqueue test assertion and xunit attribute
* Item #75070 - Revert the unnecessary name changes to the PriorityQueue.PropertyTests.cs test case method names
|
|
* Reduce Enum.GetEnumName overheads
This also helps Enum.ToString(), Enum.IsDefined, etc. Many enums are composed of sequential values starting at 0 (half of all enums in corelib, for example, meet this criteria). Today when looking up a value, we search the array of values, but if an enum is known to have such sequential values, we can instead just index into the array at the appropriate location.
* Address PR feedback
|