summaryrefslogtreecommitdiff
path: root/src/pal
AgeCommit message (Collapse)AuthorFilesLines
2017-04-05Merge pull request #10615 from brianrob/profilerBrian Robbins2-0/+38
Cross-Platform Sample-Based Profiler
2017-04-05Fix ThrowExceptionFromContextInternal for x86 Linux (#10728)Jan Vorlicek1-5/+9
The function was missing restoring of some callee saved registers which caused crashes in Checked build and hang in Release build.
2017-04-05Update module not found error message (#10692)Jan Vorlicek1-1/+1
This message can be misleading, since it says "The specified module could not be found", but it would also report case when the module was found, but one of the module's dependencies were not found. Multiple people in the past were hit by that when their module was not loaded, they were thinking that there is some problem with the path coreclr is loading modules from or something like that and spent non-trivial amount of time trying to figure that out. The fact that the module could have missing dependencies is really not obvious. So I am updating the message to reflect that fact.
2017-04-04Merge pull request #10699 from adityamandaleeka/fix_env_empty_var_handlingAditya Mandaleeka1-1/+7
Fix handling of empty environment variables in PAL
2017-04-04Fix handling of empty environment variables in PAL.Aditya Mandaleeka1-1/+7
2017-04-04Pass crossbuild and linux-id to CMakeLists.txt using CMake arguments (#10686)Hyeongseok Oh1-0/+11
Remove in CMakeLists.txt 1) read cross-build from environment variable 2) read linux-id from file system Instead, pass cross-build and linux-id from gen-buildsys-clang.sh using cmake arguments
2017-04-04Merge pull request #10601 from rahku/c4996Rahul Kumar13-385/+0
1. Remove disable of C4996
2017-04-03Basic EventPipe functionality that supports writing sample profile events to ↵Brian Robbins2-0/+38
JSON. SampleProfiler that globally suspends the runtime every 1ms to walk stacks and write them to the EventPipe.
2017-04-02Fix Double.ToString performance on Linux and OSX (#10572)Tarek Mahmoud Sayed1-205/+103
* Fix Double.ToString performance on Linux and OSX * some feedback fixes * Remove the implementation depending on ecvt_r
2017-03-311. Remove disable of C4996Rahul Kumar13-385/+0
2. delete some dead code 3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0 4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier) 5. remove GetVersionEx from PAL
2017-03-30Fix magic number explanation in filetime.cpp (#10582)Andrey Akinshin1-2/+2
89 * 366 + 280 * 365 equals to 134774 (not 134744)
2017-03-23[PAL] Do NOT check execute bit in INIT_FindEXEPath (#10342)Jonghyun Park1-285/+17
* Do NOT check execute bit in INIT_FindEXEPath * Do NOT lookup path during PAL_Initialize This commmit removes path lookup inside INIT_FindEXEPath, and renames INIT_FindEXEPath as INIT_EXEPath.
2017-03-23Merge pull request #10064 from rahku/cgroupRahul Kumar8-1/+433
memory limit in containers on linux
2017-03-22memory limit in containers on linuxrahul8-1/+433
2017-03-22Add handling of multiple CMake installations in probe-win (#9980)Luis G1-2/+6
* Add handling of multiple CMake installations in probe-win Check if multiple CMake versions are installed, and use by default the first path available Fixes #8221 * Fix typo in value accessor * Restore previous null check in probe_win * Remove redundant assignment
2017-03-22Removing the special handling in classlibnative for atan2(±∞, ±∞) and ↵Tanner Gooding4-43/+23
pow(-1.0, ±∞). (#10295) * Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞). * Fixing up the logic for HAVE_COMPATIBLE_POW in the PAL layer.
2017-03-21Temporarily disable frequently failing Sleep PAL tests (#10313)Koundinya Veluri2-2/+2
See #8321
2017-03-20'root' as a special case in UTIL_IsExecuteBitsSet (#10246)Jonghyun Park1-1/+6
2017-03-16Removed check for the maximum quantity of arguments (#10232)Buyduck1-1/+1
2017-03-15Temporarily disable flaky sleep test (#10221)Matt Mitchell2-1/+1
2017-03-15Change CoreCLR to use Sierra (#10173)Matt Mitchell2-1/+1
* Switch to full 10.12 * Disable query performance counter test
2017-03-10Fix debugging on OS X Sierra (#10078)Mike McLaughlin1-2/+7
Issue #9730 The output of the vmmap changed between OS X versions. Changed the sscanf formatting to deal with both old/new formats.
2017-03-09Improve span copy of pointers and structs containing pointers (#9999)Koundinya Veluri2-12/+112
Improve span copy of pointers and structs containing pointers Fixes #9161 PR #9786 fixes perf of span copy of types that don't contain references
2017-03-08Merge pull request #9956 from tannergooding/vs2017Tanner Gooding1-1/+2
Updating the build scripts to support VS2017.
2017-03-07Add scripts for building for arm Android (#9961)Frederik Carlier1-0/+3
* Add scripts for building for arm Android * Use arm soft float for bringup * Use NDK r14 * Set HAVE_PT_REGS to false, as they are not available on Android * _aligned_alloc is not available on clang * Detect Visual C++ instead of clang * Detect Android instead of clang
2017-03-07[x86/Linux] CDECL as default P/Invoke Calling Convetion (#9977)Jonghyun Park18-33/+36
* [x86/Linux] CDECL as default P/Invoke Calling Convetion
2017-03-06Updating the build scripts to support VS2017.Tanner Gooding1-1/+2
2017-03-03Support local stack unwinding on Android (#9940)Frederik Carlier1-8/+13
2017-03-02[x86/Linux] Fix clang 3.9 build error (#9900)Jonghyun Park2-6/+4
2017-03-02[x86/Linux] Initial filter support (#9820)Jonghyun Park2-0/+10
* [x86/Linux] Initial Filter Support
2017-03-01[x86/Linux] Clean up EXCEPTION_REGISTRATION_RECORD (#9895)Jonghyun Park1-5/+0
2017-03-01[Arm64/Unix] Fix stack unwinding (#9877)Steve MacLean2-35/+3
This restore the functionality lost by #9866 w/o functional loss
2017-03-01Merge pull request #9770 from adityamandaleeka/card_bundles_unix_2Aditya Mandaleeka1-0/+9
Implement second-level card tables for non-Windows platforms
2017-03-01[Arm64/Unix] Revert fix stack unwinding in CallDescrWorkerInternal (#9866)Steve MacLean2-3/+1
2017-02-28Add 6 byte NOP instruction.Aditya Mandaleeka1-0/+9
2017-02-28Fix cross component builderror - CMakeLists.txt for PAL (#9819)Hyeongseok Oh1-6/+10
define & use PAL_ARCH_SOURCES_DIR in PAL CMakeLists.txt to build assembly based on platform architecture. root/CMakeLists.txt defines ARCH_SOURCES_DIR based on target architecture.
2017-02-27[x86/Linux] 16-byte aligned Funclet Helpers (#9810)Jonghyun Park1-0/+19
2017-02-26[x86/Linux] Use _X86_ instead of _TARGET_X86_ (#9816)Jonghyun Park1-3/+3
2017-02-25Use clock_gettime(CLOCK_REALTIME) in DateTime.UtcNow (#9772)Stephen Toub1-9/+15
gettimeofday() is currently used in DateTime.UtcNow. Depending on the system, it may have accuracy and precision in line with either clock_gettime(CLOCK_REALTIME) or clock_gettime(CLOCK_REALTIME_COARSE), but in returning its data it's necessarily limited by struct timeval's tv_usec field (microseconds), whereas clock_gettime uses struct timespec which has tv_nsec (nanoseconds). This commit switches to use clock_gettime(CLOCK_REALTIME) to gain the additional precision (though the FILETIME through which the data is returned only supports 100-nsec precision). On my machine, there was no measurable impact to throughput.
2017-02-24Remove optimizedtls.cpp (#9777)Aditya Mandaleeka1-237/+0
2017-02-24Remove getcontext and setcontext usage (#9759)Jan Vorlicek8-80/+47
It turns out that the getcontext and setcontext that I have used in my stack oveflow reporting change are not present e.g. on Alpine Linux or on Android. So I am replacing their usage with RtlCaptureContext and RtlRestoreContext instead. I have also found that the addition of the .cfi_adjust_cfa_offset to the PROLOG_SAVE_REG_PAIR has broken unwinding of all helpers that use PROLOG_WITH_TRANSITION_BLOCK, because the PROLOG_STACK_ALLOC macro updates the CFA offset. So I am fixing that by removing the CFA offset updating from the PROLOG_STACK_ALLOC and adding explicit one to the ARM64 CallSignalHandlerWrapper.
2017-02-23[x86/Linux] Initial patch for EH funclet (#9601)Hanjoung Lee3-5/+18
- Generate a simple EH funclet frame and support SP-based stack unwinding for funclets. - Introduce assembly helpers : CallEHFunclet and CallEHFilterFunclet
2017-02-23Android: workaround absence of getcontext/setcontext (#9725)Frederik Carlier2-0/+33
* Android: workaround absence of getcontext/setcontext use RtlCaptureContext and RtlRestoreContext
2017-02-22Improve stack overflow reporting (#9650)Jan Vorlicek18-90/+810
* Improve stack overflow reporting This change modifies the SIGSEGV handling to use an alternate stack so that we can safely detect and report stack overflow even in case when we are really out of stack. Before, we were able to detect stack overflow and report it only when JIT inserted stack probes (for functions with frames larger than 4kB) and so there was still space on the stack to run the sigsegv handler. It brings in some additional complexity, since we need to switch to the original stack of the thread once we figure out the sigsegv is not a stack overflow and if we return from the hardware exception handler, we need to switch back to the alternate stack before returning from the sigsegv handler. Also, the alternate stack is created per thread and so we need to correctly destroy it when a thread terminates and also install it on foreign threads that enter PAL. This also requires creating fake stack frames to enable the libunwind to walk the stack from the exception handler to the sigsegv location. * Fix stack unwinding in CallDescrWorkerInternal While testing the change to enable stack overflow handling, I've noticed that the PROLOG_SAVE_REG_PAIR and PROLOG_SAVE_REG_PAIR_INDEXED macros are missing .cfi_def_cfa_register fp. That resulted in inability to unwind through the CallDescrWorkerInternal, since this function dynamically allocates stack slots and so the default sp based frame doesn't work.
2017-02-21Fix compilation on macOS with case sensitive FS (#9693)Mikhail Filippov1-1/+1
2017-02-17[ARM64/Unix] (#9500)Steve MacLean7-156/+235
* [Arm64/Unix] Update arm64 *.S files to match *.asm * [Arm64/Unix] Fix CONTEXTToNativeContext() * [Arm64/Unix] ThrowExceptionFromContextInternal * [Arm64/Unix] Preserve x8 argument register * [ARM64/Unix] Add CFI directives Add native unwind info * [Arm64/Unix] Fix RtlRestoreContext * [Arm64/Unix] Restore FP from CurrentContextPointers * [Arm64/Unix] fix pointer math * [Arm64/Unix] Fix CallDescrWorkerInternal personality * [Arm64/Unix] More Fp fixups * [Arm64/Unix] CallEHFunclet machine state Restore non-volatile machine state in CallEHFunclet * [Arm64/Unix] CallDescrWorkerInternal Use empty stack slot to save argument * [Arm64/Unix] RtlVirtualUnwind update pointers * [Arm64] LazyMachState fixes * [Arm64/Unix] disable USE_REDIRECT_FOR_GCSTRESS When FEATURE_PAL is enableds USE_REDIRECT_FOR_GCSTRESS is not supported * [Arm64] ClearRegDisplayArgumentAndScratchRegisters() * [Arm64] Remove unnecesary copy in TransitionFrame * [Arm64/Unix] Fix comment per review * [Arm64/Unix] move constants per review * [Arm64/Unix] Use ldp per review Also fix indentation * [Arm64/Unix] Fix indentation per review * [Arm64/Unix] Remove m_Unwound per review comments * [Arm64/Unix] Use PREPARE_EXTERNAL_VAR to access globals * [Arm64/Unix] Fix more whitespace per earlier review comments
2017-02-17[x86/Linux] Fix GetCallerSp (#9384)Jonghyun Park6-3/+10
* [x86/Linux] Fix GetCallerSp * Do NOT pop stack argument for TransitionFrame * Add ResumeEsp to CONTEXT
2017-02-14Remove never defined FEATURE_INCLUDE_ALL_INTERFACESdanmosemsft1-1/+1
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft1-2919/+0
2017-02-11Inadvertent inline redundant define in paldanmosemsft1-0/+25