Age | Commit message (Collapse) | Author | Files | Lines |
|
* Separate sections READONLY_VCHUNKS and READONLY_DICTIONARY
* Remove relocations for second-level indirection of Vtable in case FEATURE_NGEN_RELOCS_OPTIMIZATIONS is enabled.
Introduce FEATURE_NGEN_RELOCS_OPTIMIZATIONS, under which NGEN specific relocations optimizations are enabled
* Replace push/pop of R11 in stubs with
- str/ldr of R4 in space reserved in epilog for non-tail calls
- usage of R4 with hybrid-tail calls (same as for EmitShuffleThunk)
* Replace push/pop of R11 for function epilog with usage of LR as helper register right before its restore from stack
|
|
There were two problems:
* The illegal instruction 0xde01 used for INTERRUPT_INSTR_CALL doesn't
generate SIGILL, but SIGTRAP, since this is the code used for
breakpoints.
* The USE_REDIRECT_FOR_GCSTRESS was defined even for FEATURE_PAL for
ARM, which is incorrect and resulted in explicit redirect frame not
being created in DoGcStress and thus the GC stack walk was skipping
managed frames that it should walk.
|
|
The JIT write barrier helpers have a custom calling convention that
avoids killing most registers. The JIT was not taking advantage of
this, and thus was killing unnecessary registers when a write barrier
was necessary. In particular, some integer callee-trash registers
are unaffected by the write barriers, and no floating-point register
is affected.
Also, I got rid of the `FEATURE_WRITE_BARRIER` define, which is always
set. I also put some code under `LEGACY_BACKEND` for easier cleanup
later. I removed some unused defines in target.h for some platforms.
|
|
There was one more change needed to make the unwinding work properly.
Pushes in some prologs were missing the unwinder annotation.
The fix is to use PROLOG_PUSH for them.
To make things in this file consistent, I've also replaced pops in
epilogs with EPILOG_POP macro and vpush / vpop with PROLOG_VPUSH /
PROLOG_VPOP, although it is not functionally necessary.
With these changes, all the EH related issues are gone.
|
|
* Fix DelayLoad_MethodCall unwinding
Unwinding through DelayLoad_MethodCall was broken due to the overwriting
of R7 which is used as a frame pointer. That caused some managed
exceptions to cause abort with unhandled PAL_SEHException.
This change fixes the problem by using a different register.
* Fix one more spot with the same issue
|
|
|
|
|
|
GetLargestOnDieCacheSize into GetCacheSizePerLogicalCpu (#15975)
* refactor: combine GetLargestOnDieCacheSize and GetLogicalCpuCount in GetCacheSizePerLogicalCpu
* Perform PhysicalMemoryLimit check also for workstation GC
|
|
Enable tiered jitting for R2R methods
- Included R2R methods and generics over value types in CoreLib for tiered jitting. Tier 0 for R2R methods is the precompiled code if available, and tier 1 is selectively scheduled based on call counting.
- Added a delay before starting to count calls for tier 1 promotion. The delay is a short duration after frequent tier 0 jitting stops (current heuristic for identifying startup).
- Startup time and steady-state performance have improved on JitBench. There is a regression shortly following startup due to call counting and tier 1 jitting, for a short duration before steady-state performance stabilizes.
- Added two new config values, one for configuring the call count threshold for promoting to tier 1, and another for specifying the delay from the last tier 0 JIT invocation before starting to count calls
|
|
Removed all usages of AppDomainLeaks configuration option and
CHECK_APP_DOMAIN_LEAKS feature
Fix #12094
|
|
Improve UMEntryThunkCode::Poison to produce diagnostic message
when collected delegate was called.
|
|
|
|
* Added TailCall ELT hook for arm32 Linux
* fixed review
|
|
(#13933)
* Implement optimization case for CreateDictionaryLookupHelper
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
* Reenable mainv1/mainv2 tests
|
|
Linux and Windows arm64 are using the regular C/C++ thread local statics. This change unifies the remaining Windows architectures to be on the same plan.
|
|
* refactored arm, arm64, amd64 and x86 to signal about icache flush and ee restarts
* refactored gc init stage to stomp write barrier (hence flush icache) only once
* review fixes, care taken of icache invalidation during StompResize
* fixed heap boundaries initialization bug introduced after refactoring gc.cpp
* stylistic review fixe
* global variable rename
* global variable rename once more
|
|
* [RyuJIT/ARM32] Implement CreateDictionaryLookupHelper only via run-time helper
Implement CreateDictionaryLookupHelper only via run-time helper
* Add assertion for checking CORINFO_USEHELPER
|
|
* [Linux/ARM] Fix managed breakpoints
This commit introduces the following changes in order to enable
ICorDebug-based debuggers to use breakpoints on ARM Linux:
* Use 0xde01 as breakpoint instruction on ARM Linux.
ARM reference recommends to use 0xdefe as a breakpoint instruction,
but Linux kernel generates SIGILL for this instruction.
The 0xde01 instruction causes the kernel to generate SIGTRAP.
* Fix SIGTRAP handling on ARM Linux.
Unlike x86, when SIGTRAP happens on ARM Linux, the PC points
at the break instruction. But the rest of the code expects
that it points to an instruction after the break,
so we adjust the PC at the start of HandleHardwareException().
* Enable ARM single stepping for PAL.
Handle single stepping for PAL path the same way as for non-PAL path.
Also enable ArmSingleStepper executable buffer by allocating it
from system global loader executable heap.
* Hande ARM single step only when debugger is attached, fix comments and code style
* Pass existing Thread object to HandleArmSingleStep
|
|
|
|
|
|
* Add FEATURE_LOADER_HEAP_GUARD feature
* Invoke memset only for reclaimed regions
* Enable FEATURE_LOADER_HEAP_GUARD by default
* Insert trap inside UMEntryThunk::Terminate
* Make all exectuable heaps not to zero-initialize itself
Use fZeroInit (instead of fMakeRelazed)
* Add comment
* Revert unnecessary changes
* Add and use 'Poison' method to insert a trap
* Do NOT invoke FlushInstructionCache
* Update comment
* Add comment on ARM Poisoning instruction
* Use X86_INSTR_INT3 instead of 0xCC
|
|
helpers (#12369)
* Remove direct usage of type handle in JIT_NewArr1, with except of retrieving template method table.
* Assert that array type descriptor is loaded when array object's method table is set.
* Pass template method tables instead of array type descriptors to array allocation helpers.
|
|
|
|
Fixes #9321 and deletes CleanupToDoList.cs
Delete unmanaged security implementation
|
|
|
|
single-proc scenarios (#10065)
* Remove usage of the generation table from the EE by introducing an
EE-owned GC alloc context used for allocations on single-proc machines.
* Move the GC alloc lock to the EE side of the interface
* Repair the Windows ARM build
* Move the decision to use per-thread alloc contexts to the EE
* Rename the lock used by StartNoGCRegion and EndNoGCRegion to be more indicative of what it is protecting
* Address code review feedback 2 (enumerate the global alloc context as a part of GCToEEInterface)
* Code review feedback (3)
* Address code review feedback (move some GC-internal globals to gcimpl.h and gc.cpp)
* g_global_alloc_lock is a dword, not a qword - fixes a deadlock
* Move GlobalAllocLock to gchelpers.cpp and switch to preemptive mode when spinning
* Repair the Windows x86 build
|
|
* [x86/linux] Add IsIPinVirtualStub() on x86/linux #9691
To pass Loader.classloader.methodoverriding.regressions.549411.exploit
test failure on x86/linux. This patch is from #5542.
|
|
|
|
This change removes NakedThrowHelper function for Unix since it was not used.
It also ifdefs out its upstream callers.
|
|
|
|
|
|
|
|
|
|
* add clang 3.7 support
* Removing
__FakePrologName="DelayLoad_Helper\suffix\()_FakeProlog"
based on https://github.com/dotnet/coreclr/issues/4332#issuecomment-271990909
|
|
* Appends THUMB bit for RUNTIME_FIXUP_HELPER address
* Revise GetEEFuncEntryPoint (for ARM) and use it to set thumb bit
* Uses GetEEFuncEntryPoint instead of GFN_TADDR
|
|
Move the GC behind an interface and use that interface in the VM
|
|
modifying the VM to utilize this interface.
Introduce an interface separating the GC and the rest of the VM
Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM.
Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC.
Split each interface function into categories, document them, use consistent formatting across the interface
Undo some accidental find/replace collateral damage
Remove all ifdefs from the GC interface
Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build
Paper cut: false -> nullptr
Repair the ARM and x86 builds
Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback
Rebase against master
Rename gcholder.h/cpp -> gcheaputilities.h/cpp
Fix an uninitialized field on alloc_context causing test failures on clang
Rename the include guard for gcheaputilities.h
Un-breaks SOS by making the following changes:
1) Instructs the DAC to look for IGCHeap::gcHeapType by name,
instead of assuming that it exists near g_pGCHeap,
2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot
dispatch on an object in another process,
3) Because of 2, expose the number of generations past the GC interface
using a static variable on IGCHeap that the DAC can read directly.
repair the Windows build
|
|
Enable FunctionEnter/FunctionLeave callbacks on ARM
|
|
|
|
In ARM/Linux, UMThunkStub currently pushes r0-r3 and r12 without .pad,
which results in #6787.
This commit revises the prolog and epilog of UMThunkStub to fix 6787.
(In addition, personality routine is addes as ARM64/AMD64 already does.)
|
|
|
|
FCallMemcpy function in vm/arm/memcpy.S creates an stack frame that
libunwind cannot recognize, which leads to the issue in #6752.
This commit makes the stack frame of FCallMemcpy unwindable to fix
issue #6752.
|
|
PR #6522 changed from OnHijackScalarTripThread to OnHijackTripThread; however,
missed changing this definition for arm windows.
|
|
As discussed in #6525, PAL_VirtualUnwind sometimes fails during GC.
This GC failure leads to very unpredicatble behavior (which is very hard to
analyze).
This commit tries to stop the execution at the point where error
happens.
|
|
Ref #4379
This change implements GcInfo version 2 for all platforms that use the
GcInfo library (all architectures other than X86).
Changes are:
1) Defines ReturnKind enumeration for all platforms
2) Change the GcInfo encoder library to encode the ReturnKind and ReversePInvokeFrame slot
3) Change the CM's GcInfo decoder to encode the ReturnKind and ReversePInvokeFrame slot for GCINFO_VERSION 2
4) Some corrections to GCINFO_MEASUREments
5) Changes to RYU Jit to provide the correct information to the encoder
6) Changes to the VM to use the ReturnKind information while hijacking a thread
- If ReturnKind is available from GcInfo, new hijack routines are used
- Otherwise, fall back to old method (for compatibility)
7) Rework and simplify the thread hijack routines by scanning HijackFrames directly for gcroots
8) Supporting code to implement the above features.
Returning Structs in multiple registers
Hijacking for StructInRegs is currently only implemented for
Unix SystemV ABI Multi-reg struct returns. However, the hijack-workers that use
ReturnKind are ready to handle other platforms (ex: ARM/ARM64 Windows)
once the corresponding HijackTripThread() assembly routines are defined.
The New feature flag: FEATURE_MULTIREG_RETURN is set for platforms where a struct value
can be returned in multiple registers [ex: Windows/Unix ARM/ARM64, Unix-AMD64]
FEATURE_UNIX_AMD64_STRUCT_PASSING is a specific kind of FEATURE_MULTIREG_RETURN
specified by SystemV ABI for AMD64
Compatibility with other JITs
- All new GCInfo generated by RYU Jit is in GcInfo version 2
- All Ngen images must be regenerated with the new GcInfo version.
- Ready-to-run images with old GcInfo will continue to work.
- Jit64/X64 uses the GcInfo library, so it generates GcInfo version 2.
However, it doesn't (yet) provide the data to encode the correct ReturnKind
Similar is the case for ARM32 code running on JIT32, and any other JITs
that may be using GcInfo library but not yet modified to use the new API.
So, compatibility is achived using RT_Unset flag.
When ReturnKind is RT_Unset, it means that the JIT did not set
the ReturnKind in the GCInfo, and therefore the VM cannot rely on it,
and must use other mechanisms (similar to GcInfo ver 1) to determine
the Return type's GC information.
Implement GC root scanning for Hijack-frames
This change implements GCScanRoots() method for Hijacke-frames
based on the ReturnKind information available from the GcInfo.
If the exact ReturnKind is not available in the GcInfo, the
thread-suspension logic will compute the ReturnKind based on
the method-signature.
As a result of this change, several hijack-helpers in the VM
are cleaned up. There's only one implementation of HijackWorker()
to handle all returnKinds.
This change also simplifies the thread-hijack logic by using a
single assembly helper OnHijackTripThread() in most cases.
The only other helper used is for X86 floating point return values
for save/restoring the top of the FP stack.
ARM64
Only GcIndfo v2 is reliably supported for ARM64 platform.
The changes to thread-hijack mechanism fixes #6494 for ARM64.
No measurable change in JIT throughput, performance or native-image
size from this change.
|
|
On arm32, NullReference exception for interface call is not handled
properly. Especially, when callsite is a virtualstub(dispatch/resolve), AV exception
occurs on indirect cell. Since this stub is not a part of
managed or markedjithelper, exception handler considers this is a native
seg fault.
I added :
(1) FaultingExceptionFrame construction routine for virtualstub
(2) Checking and IP-adjusting routine for VirtualStub
|
|
Fix #5855
|
|
[tfs-changeset: 1614031]
|
|
This commit fixes #5848.
|
|
The _pc and _sp fields actually refer to the caller's PC and SP values.
So, remove read/writes of LR in captureX19_X29 array of ARM64 MachState.
This change fixes a buffer overflow problem.
|