Age | Commit message (Collapse) | Author |
|
|
|
Merge master to nmirror
|
|
(#6197)
|
|
[tfs-changeset: 1709921]
|
|
Merge nmirror to master
|
|
The issue is that the RhpRethrow stubs do not initialize the values of m_kind for the ExInfo objects they allocate on stack. Depending on the kind of garbage that gets assigned to m_kind, the stack iterator either takes the code path of reporting the gcroots of the RhpRethrow callsite, or takes the code path with the RemapHardwareFaultToGCSafePoint (if m_kind ends up getting a HW exception flag).
The piece of code that initializes the m_kind field of the ExInfo object on rethrows is in ExceptionHandling.cs, and there’s a window of opportunity where GC collection can happen before m_kind gets initialized correctly.
The bug needs the following conditions to occur:
1) Garbage value in ExInfo.m_kind before initialization causes the stack iterator to take one code path, then after initialization take the other code path.
2) GC collection happens in the middle, before m_kind gets properly initialized
3) Gc roots reported in each of the 2 different code paths are different
4) The GC collection in step #2 causes a relocation of a reference object of interest.
The fix is to just initialize the field to something deterministic that makes sense (zero in that case). This would cause the stack iterator to use the gcroots reporting of the RhpRethrow callsite, until the field is initialized to a more meaningful value (ex: in case of a rethrow of a HW exception) where we would apply the correct algorithm to determine a more correct gcroots reporting point to use based on where execution is headed (ex: use the gcroots reporting point of a finally block if the rethrow is for a HW exception, and in a catch block)
[tfs-changeset: 1709684]
|
|
|
|
|
|
|
|
for the ALIGN macro (for some reason, the arm64 assembler warns that 16 bytes exceed the max alignment value, and will not guarantee any alignment).
We do not need that anyways because the thunks instructions are 16-bytes long, and all thunks will naturally be aligned at 16 bytes boundaries.
[tfs-changeset: 1708278]
|
|
I'm looking at size regressions between .NET Native 1.7 and the current mainline branch. A thing that stood out is universally bigger EETypes. A contributor to this was getting rid of GenericInstanceDescs between 1.7 and 2.0 and replacing them by direct references to generic composition details from the EEType. Size-wise, this was mostly a wash, but we can actually do better - these new fields are not critical to be pointer-sized.
This change turns them into relative pointers. This saves 33 kB on a hello world app. I expect around 100 kB savings on the UWP People app based on my back-of-the-envelope calculation.
Project N baggage:
1. Update pntestcl build configuration to compile it with a C# compiler that is not 8 years old
2. Disable metadata validation transform on class libraries. This is hitting what appears to be a CCI metadata validator bug (Validator.cs:796) where it thinks a modified type should have the same interned key as the unmodified version of it. The act of resolving a modified type strips off the modifier. This ticks off the validator.
3. Fix a Reducer bug where it wasn't marking non-interface constraints as necessary. The C# unmanaged constraint is expressed as [modreq UnmanagedType] ValueType. We were not marking UnmanagedType as necessary.
4. Update checked in binder because this is a file format change
[tfs-changeset: 1708263]
|
|
* Fix the TODO to inline `.cctor` check into the R2R helper. This avoids some method calls and stack frame setup.
* Remove array cast from the hot path. The runtime doesn't care what type the storage is, as long as it's a managed reference - in fact, it seems to be treated as an `Object` in `pCurrentThread->GetThreadStaticStorageForModule` anyway. I considered replacing the cast with an `Unsafe.As`, but just redeclaring the signatures as returning `object[]` seemed better (because now we actually guarantee the classlib won't pass anything but `object[]` to `RhSetThreadStaticStorageForModule`).
|
|
Runtime configuration (e.g. whether to use server GC) can currently be provided either through environment variables at runtime, or through a RhConfig.ini file placed next to the executable. This adds another channel where we burn a blob similar to RhConfig.ini format into the executable. The order of precedence is environment variable > RhConfig.ini > embedded config.
The `ServerGarbageCollection` project property that is used to determine whether to link with a runtime that supports server GC will be also used to control whether to generate a configuration that enables server GC at runtime by default.
Fixes #6100.
|
|
|
|
Merge master to nmirror
|
|
instruction for tail calls, instead of the RET instruction.
These changes should improve the overall performance on ARM64. An example of measured perf gains: 362% improvement for interface calls on cached cells. Here's the test output for 100000000 iterations:
BEFORE the changes:
=======================
"LowLevelPerf.exe" -name INTERFACE_INTERFACE_METHOD -iters 100000000
INTERFACE_INTERFACE_METHOD
Dynamic Timer = 425064.815690 Iters/Sec
Seconds = 235.258239 Seconds
Process Cycles = 565810805623.000000 Cycles
Process Cycles/Iter = 5658.108056 Cycles/Iters
AFTER the changes:
=======================
"LowLevelPerf.exe" -name INTERFACE_INTERFACE_METHOD -iters 100000000
INTERFACE_INTERFACE_METHOD
Dynamic Timer = 1531103.010283 Iters/Sec
Seconds = 65.312392 Seconds
Process Cycles = 156754061586.000000 Cycles
Process Cycles/Iter = 1567.540616 Cycles/Iters
[tfs-changeset: 1706580]
|
|
Signed-off-by: Petr Bred <bredpetr@gmail.com>
|
|
Merge nmirror to master
|
|
CR: SergeyK
• Disable for ARM CPUs the assertion checking that two methods of calculating the CPU cache size produce the same results.
• Replace "%zx" with "%Ix" in printf format strings. PalRedhawkMinWin.cpp is a part of mrt100.dll, which is built against the system CRT. The system CRT does not recognize the "z" size prefix added in https://github.com/dotnet/corert/commit/ef7be14256aed0bfeecda13f7687347d4d8ddbe9.
[tfs-changeset: 1706474]
|
|
|
|
|
|
|
|
Merge nmirror to master
|
|
[tfs-changeset: 1704209]
|
|
- change CU lang from C89 to C_plus_plus
- ungroup gc, non-gc and thread statics in debuginfo
|
|
Port https://github.com/dotnet/coreclr/pull/18289
|
|
Also unify the cross build related files with coreclr and
fix a bug in the build-native.sh
|
|
Signed-off-by: Petr Bred <bredpetr@gmail.com>
|
|
* Switch back to SC_NPROCESSORS_ONLN for WebAssembly because SC_NPROCESSORS_CONF isn't implemented in Emscripten. Fixes an assert on startup.
|
|
The code EPILOG_POP "{r4,pc}" arm/AllocFast.S:472 RhpNewFastMisalign()
returns from the RhpNewFastMisalign function without memory allocation,
the input parameter (EEType pointer) is returned as result of memory allocation.
It leads to using the EEType as object and application crashed with SIGSEGV.
|
|
Port https://github.com/dotnet/coreclr/pull/18053/
|
|
Signed-off-by: Petr Bred <bredpetr@gmail.com>
|
|
Merge nmirror to master
|
|
|
|
Merge master to nmirror
|
|
|
|
These are assembly helpers that support various thunk pools. WASM will have to do this in a different way. Should fix #5810.
|
|
And remove workaround that was trying to avoid dependency on `ConstrainedCallSupport_GetStubs`.
|
|
[tfs-changeset: 1699905]
|
|
Add comment
|
|
Fixes #5736
|
|
Signed-off-by: Petr Bred <bredpetr@gmail.com>
|
|
|
|
* Add upper bound calculation
* Comment Change
* Correct Stack Pointer calculation
* Fix data flag address adjustment and move reverse pinvoke check
* Move bound one pointer size up
|
|
dispatch
[tfs-changeset: 1696204]
|
|
|
|
- fix https://github.com/dotnet/corert/issues/5093
- cmake toolchain refactoring
- synchronization with CoreCLR/CoreFX
Signed-off-by: Petr Bred <bredpetr@gmail.com>
|
|
|
|
|
|
* Delete old ObjectWriter NuGet packaging scripts
* New ObjectWriter NuGet packaging scripts
|