Age | Commit message (Collapse) | Author | Files | Lines |
|
- Low memory perf fixes in GC
- Update EnC-capable logic to depend on assembly manifest
[tfs-changeset: 1558202]
|
|
Debugger transport pipe file cleanup - Part 2
|
|
Clean up the pipe files in /tmp for unhandled managed exception termination.
Added a simple PAL shutdown API to set (one) shutdown callback handler which is used
by the debugger code to cleanup the transport thus removing the pipe files from /tmp.
This callback is executed PAL_Shutdown, ExitProcess and TerminateProcess, the later used
to terminate the process for an unhandled managed exception.
Add the __attribute__((destructor)) to the ShutdownTransport function to cover the case if
the if a third party host, the managed runtime or third party pinvoked code calls exit().
|
|
Successfully builds all binaries except sos.dll & x64 binaries
|
|
|
|
Added a PAL_Shutdown function that cleans/shutdowns the PAL without exiting/terminating
the process doing exactly what ExitProcess/TerminateProcess before exiting the process.
Removed the PAL_InitializeCoreCLR export. The new coreclr_* hosting apis should be used.
Moved the "is module manager initialized" check (exe_module.prev != NULL) inside the module
lock to prevent races during shutdown in LOADCallDllMain.
Removed LOADFreeModules so we never try to call the DLL_PROCESS_DETACH handlers. Most of this
cleanup happened because I was trying to getting the DLL_PROCESS_DETACH notifications working,
but there were too many opportunities for deadlock. Emulating Windows behavior isn't that
important and in this case will cause more problems that it fixes.
Removed PAL_RegisterLibrary*/PAL_UnregisterLibrary. They were only used in one place to load modules
that don't exist anymore (rotor_palrt and sscoree).
Renamed LOAD_SEH_CallDllMain to LoadCallDllMainSafe (we don't usually use _ in names) and use this
function in all the places we call the DllMain handler. This combines some code in a common place
and protects all DllMain calls from exceptions.
Source code formatting cleanup and moved internal functions around to be next to the rest of the
internal functions.
Initialize pDllMain to NULL in LOADAllocModule.
Get the DllMain function address into LOADAddModule so that it is initialized in the PAL_RegisterModule path.
Changed PAL_UnregisterModule not to call the DllMain function.
|
|
Some files have their contents ifdefed out because some CLR features
(remoting, CAS, fusion etc.) are not present (and they'll probably never
be) in CoreCLR. A few others are DAC, CrossGen or arch specific so they
have been moved to the appropiate file lists.
|
|
Merge changes from TFS
|
|
http://blogs.msdn.com/b/dotnet/archive/2015/11/30/net-framework-4-6-1-is-now-available.aspx
.NET Framework list of changes in 4.6.1
https://github.com/Microsoft/dotnet/blob/master/releases/net461/dotnet461-changes.md
Additional changes including
- Working ARM64 JIT compiler
- Additional JIT Optimizations
o Tail call recursion optimization
o Array length tracking optimization
o CSE for widening casts
o Smaller encoding for RIP relative and absolute addresses in addressing modes
o Tracked Local Variable increased to 512
o Improved handling of Intrinsics System.GetType()
o Improved handling of Math intrinsics
- Work for the X86 Ryu-JIT compiler
[tfs-changeset: 1557101]
|
|
The debugger/transport shutdown was not being called because we don't emulate
coreclr's DllMain DLL_PROCESS_DETACH callbacks. Adding the DLL_PROCESS_DETACH
DllMain callbacks will potentially crash deadlocks and other problems. Added the
debugger terminate/shutdown call to EEShutDown's first phase.
|
|
Revert "Disable suspend on shutdown during shutdown finalization"
|
|
Reverting commit b18d2a7e30a0d7066d2c09711de07488a7dec475 (PR #2207) due to issue dotnet/corefx#4899, while investigating the issue, to unblock the CI.
|
|
|
|
The main thread does not time out waiting for the finalizer thread to complete during shutdown. Cases examined had the main thread blocked waiting for the finalizer thread to complete its work. The finalizer thread was blocked on either the "waiting for GC completion" event or one of the the GC spinlocks. Another thread was blocked for shutdown after entering the spinlock while allocating, or during GC. Allowing other threads to suspend for shutdown could cause the finalizer thread to block indefinitely, leading to a deadlock.
|
|
|
|
[tfs-changeset: 1553409]
|
|
[tfs-changeset: 1552157]
|
|
This change makes the CoreCLR behavior the same as the desktop CLR
w.r.t. the app shutdown and secondary threads. Now the application
waits for secondary threads to exit before exiting.
|
|
|
|
[tfs-changeset: 1550852]
|
|
Merge changes from TFS
|
|
Small cleanups in SysV classification.
|
|
[tfs-changeset: 1550765]
|
|
Update GC from CoreRT
|
|
Do not preserve volatile registers in JIT_ByRefWriteBarrier
|
|
|
|
RyuJIT assumes that all volatile registers can be trashed by the CORINFO_HELP_ASSIGN_BYREF helper (i.e. JIT_ByRefWriteBarrier).
So we don't need to save and restore them and can reduce the size of the barrier by a couple of instructions.
|
|
Refactor gc types
|
|
Code formatting (alignment) needs to be fixed at few places.
|
|
Merge changes from TFS
|
|
- Clean up/clarify the logic in CEEInfo::getSystemVAmd64PassStructInRegisterDescriptor
- Move a static helper function off of MethodTable
|
|
LPARAM, SSIZE_T
|
|
Fix struct padding issues with SysV struct classification.
|
|
|
|
[tfs-changeset: 1550309]
|
|
Fix issue with threadpool and wait for multiple objects on Linux
|
|
There is a method ThreadpoolMgr::ShiftWaitArray which uses memcpy to do
a move a segment of the waitPointer and waitHandle arrays one position
down, so the source and destination ranges overlap. However, it uses
memcpy, which on Linux copies items starting from the last one. So
the arrays get corrupted after the memcpy, containing multiple copies
of the last element and not containig some elements that were expected
to move.
The fix is to use memmove which should be used when the source and
destination memory regions overlap.
|
|
|
|
This change revises the handling of padding bytes between struct fields
and bytes that trail the last field in a struct. These changes address
problems with structs that contain > 8 bytes between fields as well as
C# fixed arrays (which are emitted as a struct with a single field of
the fixed array element type and an explicit size derived from the
number of elements and the size of the element type).
The classification given to a particular byte that is not part of a
formal field depends on whether that byte is between fields or
trails the final field in a struct. Bytes in the former category--
padding bytes--are classified as NO_CLASS as per the SysV ABI spec.
Bytes in the latter category--"leftover" bytes after the final
field of a struct--are assigned the classification of the final
field in the struct. This allows C# fixed-size arrays to work
properly, as their representative structs are logically (but
unfortunately not physically) structs with element-count fields of
the element type. Were they explicit, each of these fields would
have the same classification.
|
|
This change replaces DWORD, LONGLONG, ULONGLONG, SIZE_T, BYTE, LONG32 and few more by
standard c++ types. The DWORD still remains present in signatures of Windows APIs used
by the GC. There are few issues with those that need to get fixed.
|
|
|
|
Enable Clang sanitizers for debug builds (address sanitizer, undefined behavior sanitizer and leak sanitizer)
|
|
|
|
Sometime ago when the SystemVStructs branch was PRed into master a bad
merge has occured.
Some struct classification cleanup for native vs. managed struct layout
representation.
When classifying a native layout of the struct use the following
algorithm.
1. If the struct has special marshaling it has a native layout.
In such cases the classifier needs to use the native layout.
2. For structs with no native layout, the managed layout should be used
even if classified for the purposes of marshaling/PInvoke passing.
|
|
Enable Offline Generation of Text-Based Symbol Tables for NGEN Images
|
|
Fix Thread.Start while debugging bug on OSX.
|
|
Fix processing of unhandled exception in exception filter
|
|
The OSX exception logic is running on a separate thread from the one that the exception happened. The CatchHardwareExceptionHolder::IsEnabled used to check for h/w exception holders assumed it was running on the thread the exception/holders happened not the exception notification thread. Moved the h/w exception holder count to the CPalThread object instead of a TLS thread variable so the OSX exception code can check it given a CPalThread instance.
The main problem was that the stubmgr when creating a thread (for the start notification) put a breakpoint in ThePreStubPatch which is in the coreclr text section and because the h/w exception holder check was broken, it thought the breakpoint wasn't the debugger's and aborted the coreclr process. The other part of this fix is to put a h/w exception holder around the called to ThePreStubPatch in prestub.cpp.
The stubmgr's delegate invoke subclass used the wrong registers for Linux/OSX to read the "this" and parameter registers. Added the proper ifdefs and registers (ecx -> rdi, rdx -> rsi) for the Unix platforms.
On both Linux and OSX, the h/w exception holder check in the exception routing logic needed to check if the int3/trap is in DBG_DebugBreak so asserts always abort/core dump. Move DBG_DebugBreak to an assembly worker so the start/end address can be used for this check.
|
|
This is needed in order to profile applications on Linux using perf_event.
This change also modifies the runtime to emit a perfmap entry when a native image is loaded so that offline trace processing tools can identify when a perfmap file for a native image is needed and generate it.
|
|
Improve FEATURE_NATIVE_IMAGE_GENERATION ifdefs
|