Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-13Update spin-wait pause/yield normalization (#55295)Koundinya Veluri
Update spin-wait pause/yield normalization - Modified the measurement to use much less time and to remeasure periodically to reduce CPU usage during startup - Each measurement does a low-microsecond-level measurement of pause/yield times - Some small amount of history of recent measurements is retained and used to for now take the lowest measurement for normalization - Measurements are done lazily, and at most every few seconds another measurement is taken - Added a profiling event that includes info about a measurement and the established value from recent measurements that is used for normalization
2021-07-11W^X support (#54954)Jan Vorlicek
* W^X support This change is the last part of enabling the W^X support. It adds the actual executable allocator that handles all double mapped memory allocations and creating the writeable mappings. The platform specific functionality is placed in a new minipal that is going to be a basis for future removal of Windows APIs usage from the native runtime. The last state of the change was tested on all the platforms that we support using coreclr pri 1 tests with both the W^X enabled and disabled using the COMPlus_EnableWriteXorExecute variable. The debugger changes were tested using the managed debugger testing suite on Windows x64, x86 and on Apple Silicon so far. Further testing on other platforms is in progress. * Replace LeafLock in UMEntryThunkFreeList by a new lock * Also allocate LoaderHeapFreeBlock from regular heap. * Set the W^X default to disabled
2021-06-22removing more crossgen code from being built. (#54458)Manish Godse
Should improve build times further.
2021-06-18Enable loading composite r2r images from a singlefile bundle (#53739)Vladimir Sadov
* Enable loading composite r2r images from a singlefile bundle
2021-06-10Add writeable holders for executable memory (#53934)Jan Vorlicek
* Add writeable holders for executable memory This change adds holders for writeable mappings for executable memory. It is the largest part of the W^X support. The ExecutableWriterHolder implementation is dummy in this change, but it was fully tested with coreclr / libraries tests on Windows arm, arm64, x64 and x86 with the real double memory mapping. There are few concepts / conventions used: * When the writeable pointer isn't known at a place where it is needed and also not at the caller, the ExecutableWriterHolder instance is created. * When a callee needs writeable pointer to executable memory and caller knows RW and RX, the argument is doubled with RX and RW suffixes. For constructors and member methods when "this" is the RW one, we pass just extra RX argument. * Locals holding RW pointer use RW suffix. * Locals holding RX pointer usually have no suffix to minimize number of changes, but in some cases they have a RX suffix where I felt like it was better to make things clear.
2021-05-25Parse `DOTNET_PROCESSOR_COUNT` with a 10 radix not 16 (#53208)Aaron Robinson
* Parse DOTNET_PROCESSOR_COUNT with a 10 radix not 16 * Update test for DOTNET_PROCESSOR_COUNT
2021-05-20Move metadata off the executable heaps (#52912)Jan Vorlicek
* Move metadata off the executable heaps This change moves metadata structures that manage blocks of heap memory out of the heaps in preparation for the W^X changes that will make the heap memory read-execute only and modifying the metadata would require unnecessary mappings and unmappings of the memory as read-write. The structures moved in this change are the following: * LoaderHeapBlock * FreeBlock * HeapList * Remove unnecessary m_pCurBlock from the UnlockedLoaderHeap
2021-05-20Add basic natvis visualizations for some VM types (#52853)Jeremy Koritzinsky
2021-05-17SingleFile diagnostic support - Add export table and DotNetRuntimeInfo to ↵Juan Hoyos
dumps (#52731) * DACize PEDecoder::GetExport * Ensure export table and runtimeinfo export are always present in a minidump
2021-05-14Respect Windows job object's CPU quota (#52690)Anton Lapounov
2021-05-13Low level API support for Objective-C interop. (#52146)Aaron Robinson
* Add Objective-C interop support. * Include handling of HNDTYPE_REFCOUNTED when FEATURE_OBJCMARSHAL is defined (#47534) * Allow overriding of Objective-C message send P/Invokes (#47721) * Add new flag to MethodTable for types with ObjectiveCTrackedTypeAttribute. Discover attribute during type load and set bit. Update EagerFinalizer callout to query bit. * Add testing for API * Bridge API for propagating managed exception to native. * Update GCEE interface to support GCServer scenario for Objective-C. The new callbacks now fire when before the GC scans handles and is non-concurrent. * Comment added for ExceptionTracker non-NULL condition. Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com> Co-authored-by: Elinor Fung <elfung@microsoft.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-05-13Stresslog fixes (#52601)Peter Sollich
- Make regular (non-memory-mapped file based) stresslog work for clrgc.dll - Fix interaction issue between GC and thread filters in StressLogAnalyzer - Interpret small numbers for COMPlus_StressLogSize and COMPlus_TotalStressLogSize as GB rather than bytes - Increment SOS_BREAKING_CHANGE_VERSION
2021-05-12Allow overriding processor count via configuration setting (#52492)Anton Lapounov
2021-04-15Singlefile: enabling compression for managed assemblies. (#50817)Vladimir Sadov
* enable compression of assemblies * fix Unix build * map should use converted layout for compressed * enable execution for R2R * fixes for OSX * PR feedback (comments) * more PR feedback * shorter include path to pal_zlib.h * Apply suggestions from code review Co-authored-by: Vitek Karas <vitek.karas@microsoft.com> Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>
2021-04-07Remove IAssemblyName (and various fusion remnants) (#50755)Elinor Fung
2021-04-01Support DOTNET_ prefix (#50507)Aaron Robinson
* Support and prefer DOTNET_ prefix. Add support for EnableDOTNETPrefix to disable respecting the DOTNET_ prefix. Enable environment variable caching on non-Windows platforms.
2021-03-31Merge REGUTIL logic for environment variables into CLRConfig (#50393)Aaron Robinson
* Merge REGUTIL logic for environment variables into CLRConfig Remove REGUTIL Remove unused CLR configuration options
2021-03-29Clean up REGUTIL/CLRConfig system (#50314)Aaron Robinson
* Convert all configuration options from REGUTIL to CLRConfig. * Remove uses of REGUTIL outside of CLRConfig impl.
2021-03-12[mono][debugger] Implementing mscordbi to support iCorDebug on mono runtime ↵Thays Grazia
(#47639) * Implementing mscordbi on mono to support icordebug * Fix eval, fix step and cancel step, remove suspend status on mscordbi * Using log from coreclr as mscordbi does * Missing files * Removing eglib from implementation * Compiling on Mac * Compiling and Working on windows. Changing what @lambdageek suggested about mono_atomic_inc_i32 * Generating libmscordbi on mac * Fix socket on mac * Counting references, deleting objects, removing unecessary properties, formating with cland-format, renaming properties to follow the used pattern. * Checking error when get reply from debugger * Fix format, reuse regmeta from coreclr and try to fix compilation on windows * Dont build when target is android or ios or wasm * Fix error unused variable * Fixing error: 'CFUserNotificationDisplayAlert' is unavailable: not available on macCatalyst * Fix compilation error on Linux * Fix function not found in maccatalyst Fix warning as error of macro redefinition * Dont compile mscordbi on maccatalyst * Fix compilation on linux * Fix compilation on android, ios and browser * Fix compilation on linux * Fix cross compiling * Fix compilation x86 windows * Fix x86 compilation * Fix compilation on windows * Fix cmake error * Fix cmake * Fix arm64 mac * Fix windows compilation * Fix memory leak * Returning E_NOTIMPL where it was possible and it's not implemented as suggested by @cshung * Fix what @cshung * Use only one ref count * Adding ex_try everywhere that we could have an allocation failure. * Implementing get class * Apply suggestions from code review Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com> * Fix what @noahfalk suggested in his review. * Fixing what was suggested by @viniciusjarina * Fix what was suggested by @viniciusjarina * Changing what @noahfalk suggested * Accept more than 1 stepper per thread * Changing what was suggested by @noahfalk * Using CORDB_ADDRESS to return addresses from debugged process * Fix eval * Update src/mono/mono/mini/debugger-agent.c Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com> * Using 1:1 with runtime for cordbtype and cordbclass * Rnaming methods as suggested by @lambdageek * Update src/mono/dbi/cordb-process.h Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com> * Update CMakeLists.txt * Fix arm64 compilation * Fix arm64 compilation * Fix error cmake * fix arm64 compilation * Fix arm64 compilation * Fix arm64 compilation * Fix arm64 compilation * Revert "Fix arm64 compilation" This reverts commit 25f24bc7ac66966fe59805e54e4009c909608b2c. * Revert "Fix arm64 compilation" This reverts commit a8f0318881d7b3e6b5a69b1b56c17478a71fdb4f. * Revert "fix arm64 compilation" This reverts commit b5de06dcf00bf296f2c8f4b47aa2492afbd73acd. * Revert "Fix error cmake" This reverts commit 2aae4636499d073ca5aa6fb9319d84875be6e08e. * Revert "Fix arm64 compilation" This reverts commit ae5f701589c3bd8ca04b9d9369af2b285a5d9bd0. * Revert "Fix arm64 compilation" This reverts commit 94d957c7416a900c9e90dec53900a104572ea6a1. * Removing arm64 compilation * Remove arm64 compilation Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com> Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
2021-02-25Dprintf optimization (#47046)Peter Sollich
This is support for putting the stress log into a memory mapped file and piping the dprintf calls in the GC codebase to the stress log. It's much faster than the dprintf implementation we used before and doesn't take a lock for each dprintf call - only when it needs to get a new buffer. It also works for clrgc.dll, which accounts for some complications, because now calls can come from either coreclr.dll or clrgc.dll. There is logic inside src/coreclr/util/StressLog.cpp to switch to the memory mapped file when the new environment variable COMPLUS_StressLogFilename is set. Here's a set of environment variables I've used: COMPLUS_StressLogFilename=GCPerfSimStresslog.log COMPLUS_gcServer=1 COMPLUS_LogLevel=9 COMPlus_StressLog=1 COMPlus_StressLogSize=10000000 COMPlus_TotalStressLogSize=1000000000 So this creates a max of 64 GB of stress log. There is an analyzer tool to go with this under src/coreclr/tools/StressLogAnalyzer that is also part of this checkin. The tool is expected to become more sophisticated over time. The tool is itself multithreaded and uses a plugin dll for the actual analysis which makes it possible to change the plugin, rebuild and re-run the analysis on the in-memory log datastructure without reloading the log file. The stresslog mechanism had a limit of 7 arguments so far, which seemed too small, so I've increased that to 12 currently. It can easily be increased up to 63, which is the limit in the format. The higher number of arguments is only supported when putting the stress log into a file, it is not yet supported when building the stress log in memory the traditional way. Supporting it would call for changes in SOS that I haven't done yet. However, stress logs containing no calls of more than 7 arguments would be dumped correctly by the current SOS - SOS would crash though with stress logs containing calls with more arguments. To catch this early, the logic in StressLog.cpp does a debug break when a call with more than 7 arguments is attempted without the memory-mapped file. Note that for the purposes of GC logging, the logging level specified in the dprintf call is also persisted in the stress log. This makes it possible to selectively dump messages from specific subsystems.
2021-02-18Adjust logic in cor.h, corhdr.h, corinfo.h, corjit.h and such so that they ↵David Wrighton
may be included without the PAL (#46055) This was done via simple substitution of the standard sized integer types, and dealing with the fallout. It is tested by using the ICorJitInfo interface directly within the crossgen2 jitinterface thunk library. Effort was made to use a minimum number of casts, as casts in such a large change are likely to be wrong somewhere. - Exceptions are the use of casting to handle some calls to the existing internal metadata api and around use of char16_t. In addition, a small amount of logic from the PAL headers were pulled into the proper header to allow compilation in the presence of some SAL annotation, and other small details.
2021-01-27Delete fallback to load mscorrc.dll from current directory (#47464)Jan Kotas
2021-01-25Update Environment.ProcessorCount on Windows to take into account the ↵Koundinya Veluri
processor affinity mask (#45943) - Similarly to cases on Unixes where sched_getaffinity is available - If `GCCpuGroup` and `Thread_UseAllCpuGroups` are both enabled, I'm not sure if the `CPUGroupInfo` count of active processors takes affinity into account as the docs are not clear, for now I'm not modifying that path until I can verify it - Otherwise, a process that is started with a specific processor affinity mask still shows full CPU count - This is one of the differences in the portable managed thread pool implementation, which relies on Environment.ProcessorCount, as opposed to the native thread pool, which uses the affinity mask - After this change, in affinitized cases on Windows the behavior is consistent perf-wise with Linux in similar situations: - The portable thread pool uses the same worker thread count as the native thread pool - `Environment.ProcessorCount` returns the number of processors the the process is affinitized to, which may be less than it would have returned before
2020-12-08December infra rollout - remove duplicated 'src' from coreclr subrepo ↵Tomáš Rylek
(src/coreclr/src becomes src/coreclr) (#44973) * Move src/coreclr/src/Directory.Build.targets to src/coreclr Merge src/coreclr/src/CMakeLists.txt into src/coreclr/CMakeLists.txt * Mechanical move of src/coreclr/src to src/coreclr * Scripts adjustments to reflect the changed paths