summaryrefslogtreecommitdiff
path: root/src/utilcode
AgeCommit message (Collapse)AuthorFilesLines
2016-10-10Fix buffer length usage in UTF-8 to Unicode conversion (#7540)John Chen1-3/+9
These changes are ported from desktop CLR.
2016-09-05Allow mapping LCID and culture names mapping for neutral culture (#7049)Tarek Mahmoud Sayed1-4/+4
This change is to pass the flag LOCALE_ALLOW_NEUTRAL_NAMES to the OS API to allow mapping LCID to/from culture names.
2016-07-28Fxing the paths that are resolved relative to a network shareRama Krishnan Raghupathy1-7/+22
2016-05-26Add noexcept to some non-throwing new overloads.Aditya Mandaleeka1-2/+2
2016-05-20Load XRT DLL from System32, and only on Win8+.Aditya Mandaleeka1-1/+6
2016-05-11Fix the optimization check to call ordinalTarekm Mahmoud Sayed1-0/+8
we have some optimization to check if we can perform the string search as ordinal operation instead of lingustic operation. we used to check if the string is Ascii which check if all chars in the string are in range 0~7F. This check was not enough because in Linux, ICU do some special handling for some characters in the Ascii range. so we need to avoid calling the ordinal operation when encountering such chracters. The fix is to take the advantage of String.IsFastSort which do exactly what we need
2016-05-06enable affinity and numa for GC and some bug fixesMaoni01-35/+9
double the threshold for balancing onto a remote NUMA node - this was proven to be best with the asp.net benchmark. enable cpu group
2016-04-29ARM64: Enabling Crossgen End-to-End MscorlibKyungwoo Lee1-0/+81
Fixes https://github.com/dotnet/coreclr/issues/4350 Fixes https://github.com/dotnet/coreclr/issues/4615 This is a bit large change across VM/Zap/JIT to properly support crossgen scenario. 1. Fix incorrect `ldr` encoding with size. 2. Enforce JIT data following JIT code per method by allocating them together. This guarantees correct PC-relative encoding for such constant data access without fix-up. 3. For the general fix-up data acceess, use `adrp/add` instruction pairs with fix-ups. Two more relocations types are implemented in all sides. 4. Interface dispatch stub is now implemented which is needed for interface call for crossgen. I've verified hello world runs with mscorlib.ni.dll.
2016-04-21Remove GOLDEN macro. (#4484)Aditya Mandaleeka1-2/+1
2016-04-12Clean up StructArrayList for GC info.Pat Gavlin1-84/+0
- Move the code into the GC info encoder, as that is its only consumer. - Remove contracts - Delete dead code - Reformat and refactor to current coding standards
2016-03-25Add new configuration mechanism for CoreCLR.Aditya Mandaleeka6-32/+227
2016-03-16Update code to use COMPlus_ instead of COMPLUS_ when referencing knobsManu4-22/+22
2016-03-07Merge pull request #3441 from ramarag/pal_longfileRama krishnan Raghupathy1-5/+8
Enabling LongFile Support in PAL
2016-03-07Enabling LongFile Support in PALDDCloud1-5/+8
2016-03-07Reapply change 1578859: Add a new set of APIs for JIT configuration.Pat Gavlin1-2/+2
SuperPMI has been udpated to accommodate this change, and should no longer crash when run using a JIT built with these changes. [tfs-changeset: 1582144]
2016-03-04Fixup CRT linkages for uCRTGaurav Khanna1-50/+0
2016-03-03Add two files that should have been part of changeset #1581242.Pat Gavlin1-0/+8
[tfs-changeset: 1581263]
2016-03-03Refactor Utilcode's IAllocators.Pat Gavlin1-5/+1
- `DefaultAllocator` has been replaced with `HostAllocator` in RyuJIT, which uses the JIT hosting interface to allocate and free memory. - The definition of `DefaultAllocator` has been moved into its own file, as it remains in use by the interpreter and the binder. - `ProcessHeapAllocator` has been moved into JIT32, as that was its only remaining user. - `AllowZeroAllocator`'s static field has been changed to an instance field to avoid the need to define storage for the static field in Utilcode. [tfs-changeset: 1581242]
2016-02-29Support long paths in CoreCLR runtime on WindowsJohn Chen (JOCHEN7)4-50/+199
The CoreCLR runtime is updated to support long file paths on Windows. Pending updates to mscorlib.dll, the following scenarios are supported: * Run managed apps from a long path. * Load CoreCLR runtime and framework from a long path. * Load user assemblies from a long path. * Run CrossGen from a long path, with its input/output from a long path. * Generate debug log file at a long path. The following scenarios are not yet supported, and will be fixed in future commits: * Mscorlib.dll and framework assemblies are not yet long path compatible. Note that until mscorlib.dll is fixed, most of the runtime changes can't actually be used. * Support on non-Windows platforms. * Support for debugging and error reporting. * Tools such as ilasm or ildasm.
2016-02-25Roll back change 1578859 on behalf of pagavlin. Change broke SuperPMI.dotnet-bot1-2/+2
[tfs-changeset: 1578925]
2016-02-25Add a new set of APIs for JIT configuration.Pat Gavlin1-2/+2
These APIs accommodate the retrieval of config values using the JIT interface rather than the utilcode library. All configuration options are now initialized upon the first call to compileMethod. The values of configuration options are available off of an ambient JitConfig object. This also changed `JitHost::get*ConfigValue` to use the `EEConfig_default` policy instead of `REGUTIL_default` in order to avoid breaking a small set of JIT config options available in release builds that were using the former. This change is exceedingly unlikely to adversely affect the behavior of other JIT config options that were originally fetched using `REGUTIL_default`, since values for these options should not be present any locations searched by `EEConfig_default` that are not searched by `REGUTIL_default` (namely config files). [tfs-changeset: 1578859]
2016-02-24Fix build break - add precompiled headerJan Kotas1-0/+2
2016-02-23Expose a hosting interface for the JIT.Pat Gavlin5-0/+83
This is the first significant step towards removing the JIT's dependence on utilcode. This change introduces a new interface, `ICorJitHost`, that allows functionality that would usually be provided by the OS to be overridden by the program that is hosting the JIT. At the moment, this is limited to memory allocation and configuration value (e.g. environment variable) access. If the JIT exports a function named `jitStartup`, an instance of the `ICorJitHost` must be provided via that function before the first call to `getJit`. The VM and other implementors of the JIT interface have been updated accordingly. Most implementors should use the common implementation of `ICorJitHost` (cleverly named `JitHost`) in utilcode which respects the CLR's hosting policy. Note that this change does not update RyuJIT (or any other JITs) to use any of the functionality exposed by `ICorJitHost`; that work is left for future changes. [tfs-changeset: 1578176]
2016-02-19This Change Adds initial Support for LongFiles in the VM,Rama Krishnan Raghupathy16-263/+1719
They are: 1. Wrappers for OS APIs which take or return PATHS 2. Fixing the usage of following Api's: GetEnvironmentVariableW SearchPathW GetShortPathNameW GetLongPathNameW GetModuleFileName Work remaining: Remove fixed size buffers in the VM
2016-02-10Fix SOS managed breakpoints when coreclr symbols are stripped.Mike McLaughlin1-19/+0
Added a SOS DAC interface (ISOSDacInterface4::GetClrNotification) to get the exception notification arguments instead of using the GetLastExceptionInformation function from the lldb sosplugin that depends on coreclr symbols being present. On the coreclr side, the clr notification arguments are saved in a global variable that is DAC accessible. A critical section was added to protect this global variable while the special exception is raised. Setting the internal COMPlus_DebugBreakOnAssert environment variable causes 3 or 4 breaks in the debugger with no reason. It was breaking in the function that was determining whether it should break. I was using COMPlus_BreakOnEELoad=2 to break after coreclr was loaded and initialized to set managed breakpoints and on a debug build it generates an assert (on release just a DebugBreak).
2016-02-03Fix build on NetBSD: cast ptr to function to ptr to dataKamil Rytarowski1-2/+1
2016-01-27Update license headersdotnet-bot78-315/+237
2016-01-25Clang sanitizer fixes to remove incorrect function type 'void *(*)()'Steve Harter2-6/+6
2016-01-21FIx the incremental build for WindowsJan Vorlicek4-6/+6
Conflicts: build.cmd src/dlls/clretwrc/CMakeLists.txt Cleanup
2016-01-11Make CORCOMPILE_HEADER backward compatibleJohn Chen (CLR)1-1/+4
Resolve issue #2348 by reordering fields in CORCOMPILE_HEADER, so that PEKind and Machines fields are in the same location as in older versions of this struct.
2016-01-04Improve crossgen error when mscorlib is missing (issue 1889)John Chen (JOCHEN7)2-1/+5
When mscorlib is missing, crossgen reports a "file not found" error, without indicating which file is missing. This makes it hard to discover the actual error. This commit improves error reporting in such cases.
2015-12-18Fix infinite recursion in hostimpl.cppMatt Ellis1-1/+1
WaitForSingleObject was calling itself instead of delegating to WaitForSingleObjectEx.
2015-12-17Revert 29ce4f6Matt Ellis1-18/+0
29ce4f6 worked around an issue where we were exporting C++ operators which caused some problems on OSX in some interop cases (see dotnet/coreclr#946 and dotnet/coreclr#943 for more details). With dotnet/coreclr#1065 we no longer export all symbols from libcoreclr so these additional attributes are redudent and they cause issues when trying to build with clang 3.7. This commit removes them. I verified that the sample AppKit app continues to work even with these changes.
2015-12-16Make JitDump work in ilc.exeJan Kotas1-4/+51
The JIT is not expected to make assumption about format of raw signatures to parse them. Instead, it should depend on JIT-EE interface for parsing. This invariant was violates in couple of places related to debug COMPlus_ method filters that caused them to crash under CoreRT. Fixed the filters to use the proper abstraction instead.
2015-12-15Build arm64 using private toolsetRahul Kumar1-4/+12
Successfully builds all binaries except sos.dll & x64 binaries
2015-12-13Remove unnecessary files from build and disable LNK4221Mike Danes4-26/+45
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.
2015-12-11Port of all JIT changes for .NET Framework 4.6.1 changesBrian Sullivan1-4/+5
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]
2015-12-03Refactoring resource stringKyungwoo Lee5-52/+19
This pulls out resource string handling out of mscorrc into top level. The scripts (awk) are now parameterized to generate a unique string table for the given name. Added resourcestring.cpp to create an API "LoadResourceString". Added a few macros into resourcestring.h, which are used for definition/uses of the string table.
2015-12-02Implement an allocator for executable (JIT) memory in PALSergiy Kuryata1-0/+7
This change improves performance of CoreCLR with Server GC enabled by about 30% according to ASP.NET benchmarks on Linux. The table below shows number of requests per second that an ASP.NET benchmark could handle on my machine before and after the change. Pipeline Before After Improvement 16 230K Req/sec 305K Req/sec 33% 256 240K Req/sec 340K Req/sec 42% The problem was that with Server GC enabled, the GC initialization code was reserving a large chunck (about 18GB on my machine) of virtual address space during runtime initialization. Unfortunately, due to implementation details of MM on Linux, GC memory was located next to the location of libcoreclr. As a result, the runtime could not allocate memory for JIT'ed code close to the coreclr library. Because of that the JIT'ed code had to use jump stubs to call functions from the runtime (which can become very expensive, for example, for write barriers). This change fixes this issue by implementing a simple allocator that tries to reserve (during process startup) a chuck of virtual memory that is located near the coreclr library (within 2GB range) that can be later used for JIT'ed code.
2015-11-23Delete code under !NO_CRT defineJan Kotas4-83/+2
It is always defined - even in internal builds
2015-11-17Enable CLANG sanitizers for native debug buildsSteve Harter1-2/+35
2015-11-11Use volatile store for g_hrFatalErrorJan Kotas1-1/+2
2015-10-29Merge pull request #1875 from adityamandaleeka/remove_suspensionAditya Mandaleeka1-0/+3
Initial removal of thread suspension code from PAL
2015-10-26Disable apithreadstress when STRESS_THREAD is not enabledAditya Mandaleeka1-0/+3
2015-10-26Fix a CrossGen assert on LinuxJohn Chen1-1/+1
Resource string loading during CrossGen doesn't work on Linux. Disable it for now. In many cases the loaded string isn't even used.
2015-10-20Correct attribution for UUIDs and GUIDsRichard Lander1-38/+65
2015-10-07correct word spellingあまみや ゆうこ2-3/+3
2015-09-28Merge pull request #1628 from kouvel/CppCheckFixesKoundinya Veluri1-0/+3
Fix a few issues reported by cppcheck
2015-09-25Fix for 134453: fix prefast warningsRahul Kumar10-6/+14
[tfs-changeset: 1529946]
2015-09-25Fix a few issues reported by cppcheckKoundinya Veluri1-0/+3