summaryrefslogtreecommitdiff
path: root/src/utilcode
AgeCommit message (Collapse)AuthorFilesLines
2019-07-06fix merge error (#25573)Maoni Stephens1-2/+3
2019-07-05many core (#25350)Maoni Stephens1-0/+50
2019-06-17Allow PEImageLayout to be loadable for R2R images loaded from streams. (#25159)Fadi Hanna1-1/+7
* Allow PEImageLayout to be loadable for R2R images loaded from streams. * Add regression test coverage * Change CheckILOnly to return true for R2R images (similar to the ILOnly API) * Early out for R2R images * Remove R2R check
2019-06-10Fix field offset computation for large version bubble (#25029)Jan Vorlicek1-1/+15
There was a discrepancy in field offset calculations at crossgen time and at runtime in some rare cases due to the alignment of a derived class offset. The issue happened due to MethodTableBuilder::NeedsAlignedBaseOffset not taking into account the fact that the module of the parent and child class can both be in large version bubble. We also had a bug in the PEDecoder::GetNativeManifestMetadata. When it was called for regular crossgened image without large version bubble, it left the pDir uninitialized due to the fact that there was no READYTORUN_SECTION_MANIFEST_METADATA. And then it tried to dereference that.
2019-06-07Reduce indirect function calls (#24980)David Wrighton1-49/+0
* Reduce indirect dispatch in hot paths in metadata * Remove allocation indirections in utilcode for coreclr - we no longer have a multi-dll distribution of code that needs to share heaps * Remove unused code in GetCLRFunction * Remove virtual dispatch around impl/decl methodtable access in MethodData
2019-05-24Delete FEATURE_USE_LCID (#24767)Jan Kotas4-94/+1
Never defined and obsolete
2019-05-22Stop compiling fragile NGen support into the runtime (#24625)Jan Kotas1-4/+0
2019-05-21Delete Unsafe redefinitions of Windows APIs (#24688)Jan Kotas3-19/+16
Leftover from SQL hosting infrastructure
2019-05-17Delete unnecessary locale arguments (#24624)Jan Kotas2-245/+36
Everything in the runtime should use Invariant culture. It is not necessary to pass the locale arguments around.
2019-05-16Add support for invariant casing in PAL (#24597)Michal Strehovský1-2/+12
unicodedata.cpp based on UnicodeData.txt v11.0.
2019-05-13RemoveThrowMessage (#24563)Steve MacLean1-20/+0
2019-05-10Move EventProvider native layout to be driven by CMake configure (#24478)Jeremy Koritzinsky5-0/+10
* Generate eventpipe implementation as part of CMake configure. * Generate Etw provider as part of CMake configure. * First pass porting over lttng provider to cmake. * Fix up CMake Lttng provider generation. * Move Lttng provider into CMake tree. * Move dummy event provider to CMake * Move genEventing into the CMake tree. * Remove extraneous logging and unused python locator. * Clean up build.sh * Clean up genEventingTests.py * Add dependencies to enable more incremental builds (providers not fully incremental). * Convert to custom command and targets instead of at configure time. * Get each eventing target to incrementally build. * Fix incremental builds * Add missing dependencies on eventing headers. * PR Feedback. Mark all generated files as generated * Clean up eventprovider test CMakeLists
2019-05-08Remove more MDA support code (#24457)Steve MacLean1-13/+0
* Remove more MDA support code * PR Feedback
2019-05-04Minor tweaks for gcc (#24391)Adeel Mujahid1-1/+1
* Fix a consistency check condition Following error is reported by gcc 8 with debug configuration: > error: enum constant in boolean context [-Werror=int-in-bool-context] * Apply -Wno-register only to CXX flags gcc 8 errors out like this: ``` [ 96%] Building C object src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o cc1: error: command line option -Wno-register is valid for C++/ObjC++ but not for C [-Werror] cc1: all warnings being treated as errors src/ilasm/CMakeFiles/ilasm.dir/build.make:254: recipe for target 'src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o' failed make[2]: *** [src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o] Error 1 CMakeFiles/Makefile2:5710: recipe for target 'src/ilasm/CMakeFiles/ilasm.dir/all' failed make[1]: *** [src/ilasm/CMakeFiles/ilasm.dir/all] Error 2 ``` * Remove extra parantheses from variable declaration gcc 8 reports: > error: unnecessary parentheses in declaration of m_HashedModules [-Werror=parentheses] * Use macro instead of const in C gcc throws: > error: variably modified collatorsPerOption at file scope UCollator* collatorsPerOption[CompareOptionsMask + 1]; * Cast to uintptr_t before (32-bit) DWORD gcc error was: > error: cast from LPCWSTR {aka const char16_t*} to DWORD {aka unsigned int} loses precision [-fpermissive]
2019-05-01Copy all win32 resources (#24308)David Wrighton1-28/+298
- Add crossgen test to verify file version is preserved - Add support for general win32 resource copying to ReadyToRun - Copy all resources
2019-04-18Move R2R-specific code to be outside FEATURE_PREJIT (#24075)Jan Kotas1-6/+10
This refactoring is preparation for disabling fragile NGen support in the runtime. It keeps fragile-NGen specific code under FEATURE_PREJIT and moves the code required to support R2R to be outside FEATURE_PREJIT. The eventual goal is to compile the runtime without FEATURE_PREJIT defined to avoid fragile-NGen specific overhead.
2019-04-13Delete COMPlus_FinalizeOnShutdown (#23595)Jan Kotas1-10/+0
This compat quirk is increasingly more broken since the framework is generally not compatible with, and we have not heard anybody actually using it. Changed Environment.HasShutdownStarted to unconditionally return false. It does not make sense for it to ever return true with shutdown finalization disabled.
2019-04-12Fix OSX debugging (#23924)Jan Vorlicek1-3/+0
A recent change has incorrectly added dependency on libcoreclrpal.a to libutilcodenohost.a. This in turn, due to the transitive propagation of dependencies, caused the libmscordbi to be linked with libcoreclrpal.a. So libmscordbi contained its own PAL after that change, which is wrong. libmscordbi should depend on PAL APIs through libmscordaccore that exports the symbols it needs for it in order to keep just one PAL in the process. The fix is to remove the libcoreclrpal.a dependency and export few new symbols from libmscordaccore instead.
2019-04-09Remove Unix CPU groups emulationJan Vorlicek1-13/+19
This change removes CPU groups emulation from Unix PAL and modifies the GC and thread pool code accordingly.
2019-04-08Merge pull request #23605 from franksinankaya/gcc_cleanup_17Jan Vorlicek1-1/+1
Fix conversion warning
2019-04-06Normalize directory separators before calling LoadLibrary (#23776)Jeremy Koritzinsky1-0/+16
* Normalize directory separators when loading native library via ALC.LoadUnmanagedDllFromPath
2019-04-05Fix conversion warningSinan Kaya1-1/+1
2019-04-05Merge pull request #23537 from janvorli/remove-gc-cpu-group-knowledgeJan Vorlicek1-0/+14
Remove CPU groups notion from the gc.cpp
2019-04-04Modify affinity range config format for WindowsJan Vorlicek1-0/+14
Each entry has to be prefixed by group number followed by comma. There is nothing like global CPU index on Windows, all the APIs that support more than 64 processors use group, in-group index pair. So specifying the affinity this way matches what users are used to.
2019-04-03Fix resource loading (#23714)David Wrighton1-6/+0
- Some resources are generated without setting a Major/Minor version in the resource directory - This is legal, and we shouldn't skip parsing the resource
2019-03-25Replace Win32 resource reading logic with cross platform implementation (#23363)David Wrighton1-15/+130
* FindResource direct implementation in PEDecoder * Fixup bugs identified in resource reading
2019-03-16Fix typo (#23300)Nikita Potapenko1-2/+2
.Net -> .NET
2019-03-15Use HKLM for CLSID lookup (#23258)Elinor Fung1-154/+200
* Use HKLM for CLSID lookup * Delete unused functions
2019-03-11Merge pull request #23093 from franksinankaya/gcc_warnings_9Jan Vorlicek1-1/+1
GCC Signed compare and Narrowing warnings
2019-03-07Fix signed compare warningsSinan Kaya1-1/+1
warning: comparison between signed and unsigned integer expressions [-Wsign-compare] conversions Update src/ToolBox/superpmi/mcs/verbdumptoc.cpp Co-Authored-By: franksinankaya <41809318+franksinankaya@users.noreply.github.com>
2019-03-07Cleanup unused hosting interfaces (#23091)Jan Kotas1-15/+0
2019-03-01Revert heapcount and enable CPU Groups to fix Ubuntu FPE (#22861)Varun Venkatesan2-80/+18
2019-02-22Remove 'from HRESULT' (#22782)Dan Moseley1-6/+0
2019-02-21Remove unused perfcounter code (#22742)Sung Yoon Whang1-1/+0
* removing references to COUNTER_ONLY, ENABLE_PERF_COUNTERS in src/vm directory * removing perfcounters* files * Fix build * Remove PerfCounterSupportedBuild * Some more cleanup on the GC side
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid1-1/+1
2019-01-26Cleanup stackoverflow handling leftovers (#22228)Jan Kotas2-8/+1
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara22-774/+10
2019-01-14Large version bubble Support (#21727)Andon Andonov1-2/+22
* Preliminary Changes * Module Index Resolution * Change infoModule encoding * Change referencing module in R2R * Pre-condition Check * Virtual Method Module Resolution * Remove Workarounds and add conditional import loading * Add signature kind module override * Add ELEMENT_TYPE_MODULE_ZAPSIG * Add switch to enable large version bubble * Cleanup * Change Native header check * Add large version bubble test * Add Large Version Bubble Checks * Cleanup * Revert unnecessary check * Change EncodeMethod Version Bubble Condition * Add Large Version Bubble asserts * Cleanup * Add default argument to runtests.py * Change test PreCommands * Revert whitespace changes * Change breaking conditional check * Streamline Version Bubble test * Address PR Feedback * Address PR Feedback #2 * Remove dead code * Add crossgen-time ifdef
2019-01-10Normalize a few more spin-wait loops (#21586)Koundinya Veluri3-38/+15
Normalize a few more spin-wait loops - Fixed a few more spin-waits to normalize the spin-wait duration between processors - These spin-waits have so far not needed to be retuned to avoid unreasonably long spin-wait durations. They can be retuned as necessary in the future. - Added a version of YieldProcessorNormalized() that normalizes based on spin-wait counts tuned for pre-Skylake processors for spin-wait loops that have not been retuned. - Moved some files around to make YieldProcessorNormalized() and the like available in more places. Initialization is still only done in the VM. Uses outside the VM will use the defaults, where there would be no significant change from before. - Made YieldProcessor() private outside of the GC and added System_YieldProcessor() for when the system-defined implementation is intended to be used
2019-01-02Delete lstrlen from Unix PAL (#21745)Jan Kotas1-1/+1
strlen/wcslen works just fine.
2018-12-26desktop port (#21523)Maoni Stephens1-0/+11
+alloc lock split into SOH and LOH +provisional mode to fix too many gen2 GCs triggered in low mem situation when the heap has heavy pinning fragmentation +better free list usage +premature OOM fixes +3 new configs: GCHeapAffinitizeMask, GCHighMemPercent, GCLOHThreshold (will be documented) YieldProcessor scaling factor is different on core due to the different implementation on core.
2018-11-20Delete CORCOMPILE_IMPORT_TABLE_ENTRY (#21109)Jan Kotas1-50/+0
2018-11-15Fixed signatures of ref readonly methods in JIT ETW events (#20981)szehetner1-42/+81
* fixed ETW method signature of ref readonly methods * added type token * extract method for printing classes * fixed optional_modifier, use CorSigUncompressToken_EndPtr
2018-11-06Code review feedbackAndrew Au1-60/+59
2018-11-06Removing unnecessary hacksAndrew Au1-60/+60
2018-11-06Initial data breakpoint changesCagri (Charlie) Aslan1-1/+2
temporary changes towards multiple data breakpoints add multiple hardware bp support Remove Complus.log revert log.cpp changes
2018-10-31Clean up string literal implicit const casting and some two-phase lookup ↵Jeremy Koritzinsky2-2/+2
nits on Windows (#20730) * Remove implicit c-string const casting and clean up some C++ standards conformance bugs. * Fix const string conversion in FCSigCheck.
2018-10-08Remove mentions of Rotor from codebase (#20298)Austin Wise1-90/+0
* Moving parsing from TypeNameParser ctor to a separate method. It seems a bit odd to have the constructor parsing and then use a dummy method (MakeRotorHappy) to make it look more normal. * Remove CorMarkThreadInThreadPool. It is neither referenced nor exported. * Remove reference to rotor from securitywrapper.h * Remove reference to rotor from Strike/vm.cpp. This file is only built for Windows. * Remove reference to rotor from debugreturn.h This is the only file the defines these macros, so there is no need to undef them first. * Remove unused code refering to rotor from PAL. * Remove references to Rotor from PAL. * Remove references to deleted tests from DisabledTests.txt I can't find any evidence that this file is actually used. * Remove unneeded casts. * Remove dead and misleading code from profilinghelper.cpp. FEATURE_PROFAPI_EVENT_LOGGING is always defined when PROFILING_SUPPORTED is defined. And the entire contents of profilinghelper.cpp is surrounded with "ifdef PROFILING_SUPPORTED". So all sections in "ifndef FEATURE_PROFAPI_EVENT_LOGGING" are dead. Furthermore, in coreclr this does not use the eventlog, so the macro name is misleading. * Remove dead code in excep.cpp. This entire function is surrounded with "ifndef FEATURE_PAL". * Remove refererences to rotor from safemath.h This does not appear to cause any compile problems, so nobody was using safemath.h without _ASSERTE defined. Also S_SIZE_T_WP64BUG is not used anywhere. * Remove dead code from palclr.h. I don't know why these check to see if the macro is undefined immediately after defining them. Also the comment appears to reference some unions that are no longer in this file. * Expose ISymUnmanagedWriter2 from SymWriter as required by COM. The comment talks about the C# compiler using this, however I cannot see a way for the C# compiler to get an instance of this. It is only used internally by AssemblyBuilder and not exposed otherwise. * Restore check for _ASSERTE in safemath.h. On Windows sometimes that this file is included without _ASSERTE being defined. As the existing comment suggests, it appears that SOS explicitly does not want _ASSERTE to do anything.
2018-08-28Break into debugger on assertion failures (#19702)Jan Kotas1-9/+6
* Break into debugger on assertion failures Assertion failures terminated the process by default that made them hard to debug. Changed them to break into debugger or trigger fail fast when the debugger is not attached. This should make the day-to-day CoreCLR developer experience better and it is simular to what we had on .NET Framework in the past. * Fix Unix build break Add RaiseFailFastException to Unix PAL
2018-08-25Remove NumaNodeInfo, CPUGroupInfo, AppDomain, SystemDomain, and EEConfig ↵David Mason1-2/+2
stubs from local gc (#19500) * Switch NumaNodeInfo and CPUGroupInfo to the interface * Remove AppDomain/SystemDomain stubs * remove EEConfig methods * Port numa code to the coreclr side * add numa back to PAL and standalone builds * enable numa for PAL/Standalone builds, and fix BOOL warnings * remove unused defines, and fix linux build errors * building on windows * about to delete numa work from unix and want a backup * add stubs for unix numa/cpugroup * Code review feedback * Code review feedback