summaryrefslogtreecommitdiff
path: root/src/vm
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26fix gc config - need to read from both runtime config and env var (#25890)Maoni Stephens1-5/+9
need to read hardlimit configs from env vars as well as runtimeconfig.json
2019-07-19Fixing Buffer::BlockCopy, JIT_MemCpy, and JIT_MemSet to just call the ↵Tanner Gooding3-300/+90
appropriate CRT functions for x64 Windows, as is already done for all other platforms/targets (#25763) * Fixing Buffer::BlockCopy to just call the CRT memmove for x64 Windows, as is already done for all other platforms/targets * Fixing up the x64 CrtHelpers.asm to just forward to the CRT implementations for JIT_MemSet and JIT_MemCpy * Keep unix using memcpy and clarify that Windows uses memmove for full framework compat.
2019-07-19Fix typo: `_TARGET_X86` -> `_TARGET_X86_` (#25788)Andy Hanson1-1/+1
This typo was in #24989 so would be a new regression in 3.0. In an x86 build, it causes us to not get the cache size correct, leading us to use a smaller default cache size and do more GCs. Tested with GCPerfSim and this PR reduces TotalNumberGCs by 33% using an x86 build.
2019-07-16Merge branch 'release/3.0' into merge/master-to-release/3.0William Godbe2-0/+16
2019-07-16Add missing Arm64 specific diagnostic code (#25695)Steve MacLean1-0/+15
* Arm64 ICorDebugRegisterSet float support * Arm64 ICorDebugRegisterSet2 implementation * Add arm64 VLT_REG_FP case * Arm64 add funceval GetRegister SetRegister support
2019-07-12Frkaya/gccfix07102019 (#25624)Sinan Kaya3-3/+3
* Remove duplicate definition * Fix conversion error * 1ui64 doesn't exist on GCC
2019-07-11PerfMap should output file offset instead of RVAs (#25638)Andrew Au2-8/+9
2019-07-11Fix GS cookie check on ARM in functions with stackalloc (#25628)Jan Vorlicek6-3/+22
* Fix GS cookie check on ARM in functions with stackalloc The GC cookie check was failing during GC stack walking on ARM for frames of functions using stackalloc and pinvoke. The InlinedCallFrame stores only the SP after the stackalloc adjustment and unwinder needs R9 that contains SP before the stackalloc to be able to unwind the frame to get caller SP. The caller SP is used as a base for getting the GS cookie address. We were incorrectly setting the R9 in the CONTEXT to the same value as SP and so the unwinding was getting an incorrect caller SP. The fix is to store R9 in the InlinedCallFrame for ARM.
2019-07-11System.GC.HeapHardLimit and .HeapHardLimitPercent in runtimeconfig.json (#25574)Andy Hanson3-0/+22
* System.GC.HeapHardLimit and .HeapHardLimitPercent in runtimeconfig.json This adds two new configuration options, "System.GC.HeapHardLimit" and "System.GC.HeapHardLimitPercent" to runtimeconfig.json. These behave the same as COMPlus_GCHeapHardLimit and COMPlus_GCHeapHardLimitPercent. * Add cast * Dummy change to trigger tests rerun
2019-07-11Fix handling of NullReferenceException in VSD on ARM (#25627)Jan Vorlicek6-40/+67
* Fix handling of NullReferenceException in VSD on ARM There was a problem with handling NullReferenceExceptionHandling stemming from virtual dispatch stub on ARM Linux. While the primary exception was handled correctly, if the exception was rethrown or another exception was thrown from the catch handler, it was reported as unhandled even though there was a proper handler. The issue was caused by exception unwinding that was unable to unwind past the frame of the virtual dispatch stub in this case. Such stub is generated at runtime and there is no unwind info for it. The fix is to explicitly check for the stub frame and skip it during first and second pass of exception handling.
2019-07-09Let EventPipe threads sleep when no events are available (#25601)David Mason9-16/+100
Don't spin forever in EventListener when listening for EventPipe data
2019-07-08Return HardLimitBytes from GCMemoryInfo.TotalAvailableMemoryBytes (#25437)Andy Hanson2-5/+5
* Add property HardLimitBytes to GCMemoryInfo This adds a new property HardLimitBytes. Unlike TotalAvailableMemoryBytes, this will reflect an explicitly set COMPLUS_GCHeapHardLimit. It will also reflect the fraction of a container's size that we use, where TotalAvailableMemoryBytes is the total container size. Normally, though, it is equal to TotalAvailableMemoryBytes. Fix #38821 * Remove HardLimitBytes; have TotalAvailableMemoryBytes take on its behavior * Fix typos * Separate total_physical_mem and heap_hard_limit so we can compute highMemoryLoadThresholdBytes and memoryLoadBytes * Do more work in gc.cpp instead of Gc.cs * Consistently end names in "Bytes"
2019-07-05many core (#25350)Maoni Stephens1-16/+78
2019-07-04Fix instantiation stub maker for case where no register is used by function ↵Fadi Hanna1-20/+29
parameters (#25558) * Fix instantiation stub maker for case where no register is used by function parameters
2019-07-03Fix getting rundown events during EventPipe::Shutdown (#25450)José Rivero2-32/+36
2019-07-03arm64singlestepper (#25512)Steve MacLean7-15/+841
Add single step emulation for arm64 Linux Add a copy and rework armsinglestepper to arm64singlestepper Add arm64 emulation of all armv8 user space instructions which read or write PC. - ADR, ADRP - Branch instructions: B, BL, B.cond, BR, BLR, RET - LDR (literal) * Add FEATURE_EMULATE_SINGLESTEP * Enable for ARM64 linux * Debugging fixes Fix IsSSFlagEnabled bug Fix opcode type Fix code buffer asserts Fix CBZ typo Fix BitExtract Fix m_targetPc Minimize written instructions Fix comments Fix Bypass address truncation Fix false assert Add additional logging Use %lx to log addresses Remove stray LOG Remove stray assert
2019-07-03Prevent EventPipe rundown from blocking on write (#25523)John Salem3-51/+32
* Write all rundown events to the buffer manager to prevent the write from blocking while holding the CodeManager lock * * Incorporate PR feedback * changed to one suspend rather than suspend->resume->suspend * added some comments * update comments
2019-07-03Add check to prevent attaching a profiler when one is already present (#25520)David Mason3-85/+148
* Don't load multiple profilers * add comment * Move check to LoadProfiler, and eliminate race condition between attach profiler and startup profiled
2019-07-03Fix GCStress modes that do code instrumentation to work with code versioning ↵Koundinya Veluri10-48/+182
(#25261) - SOS changes are in https://github.com/dotnet/diagnostics/pull/369 - Fixes https://github.com/dotnet/coreclr/issues/17646
2019-07-03Cleanup IL linker heuristic usage (#25547)Jan Kotas2-1/+10
Prep-work for using mainstream IL linker
2019-07-02Add a new CompilationDiagnostic ETW Keyword (#25544)Brian Robbins1-1/+4
2019-07-02Merge ReadyToRunInfo::GenericMethodIterator in to ↵David Mason4-126/+122
ReadyToRunInfo::MethodIterator (#25518)
2019-07-02Ensure YIELD_WHILE() in EventPipeBufferManager::SuspendWriteEvent() always ↵Andrew Au2-6/+7
terminates (#25491)
2019-07-02Add RundownRequested switch to EventPipe IPC protocol (#25495)Sung Yoon Whang7-18/+140
* Add RundownRequested switch to EventPipe IPC protocol * Fix linux build * make the rundownRequested field a bool * some renaming * Make a new command that has an option for disabling rundown instead of breaking change * code review feedback
2019-07-01Delete dead code (#25513)Jan Kotas2-10/+0
2019-06-29Fix GCStress issue on x86 and Arm (#25445)Brian Sullivan6-60/+112
* Fix GCStress issue on x86 and Arm32 When we write one of the new gc stress instruction, such as INTERRUPT_INSTR_PROTECT_FIRST_RET we might be writing it in the epilog region on x86 or ARM as a direct call can be the last instruction before an epilog. (This isn't allowed on x64) This fix expands the set of instructions we are allowed by IsMarkerInstr() toinclude these newly added gc stress instructions. added comment to GetGcMarkerExceptionCode Fix DAC build * Code review feedback * Additional code review chnages
2019-06-28Use regular static variable for EEConfig storage (#25479)Jan Kotas3-32/+9
Fixes #25475
2019-06-27Fix SIGSEGV in GC when dealing with large double[] on ARM32 (#25403)Vladimir Sadov1-22/+31
* Fix for #25252 * revert to special casing 8-alignement for double[] in GC helpers for x86
2019-06-26EventPipe events should only be sent to sessions that are listening to the ↵Andrew Au6-38/+61
event (#25401)
2019-06-26Merge branch 'release/3.0' into merge/master-to-release/3.0William Godbe2-0/+16
2019-06-26Delegate inspection API in the DBI (#25362)Juan Hoyos2-0/+11
* Add ICorDebugDelegateObjectValue interfaces * Expose appropriate HR (CORDBG_E_UNSUPPORTED_DELEGATE) * Partially DACize DelegateObject * Add DacDbi method for delegate inspection
2019-06-26Fix disabling wrong session on EventPipe::Shutdown (#25409)José Rivero1-2/+2
- It's safe to call EventPipe::Disable during shutdown (eventpipe being disabled)
2019-06-25Fix LTTng filtering for runtime providers (#25374)Sung Yoon Whang1-0/+4
* LTTng filtering * Fix Windows build, make IsInitialized check faster * Cleanup/change default to no keywords/level set * Keep the default to be the current policy - enable everything * more cleanup * No need to check for initialization * Fix Windows build
2019-06-25Fix ReJIT failures (#25377)David Mason4-2/+45
2019-06-25emit rundown event for generic methods in R2R images (#25371)David Mason4-3/+190
* emit rundown event for generic methods in R2R images * fix mac build * Code Review Feedback
2019-06-25Policheck comment adjustmentNoah Falk1-1/+1
2019-06-25Make sure EventPipeProvider::m_keywords is accurate after ↵Andrew Au9-32/+80
EventPipeConfiguration::Disable (#25358)
2019-06-25Remove outputPath parameter for EventPipe IPC protocol (#25363)John Salem2-3/+1
2019-06-25Fix StackFrameIterator::IsValid check race (#25359)Jan Vorlicek1-18/+22
* Fix StackFrameIterator::IsValid check race During GC stress >= 4, there could be a race when we would compute bRedirectedPinvoke as false, but before the condition of the following _ASSERTE is evaluated, the thread that is being walked pushes a ResumableFrame to the explicit frames stack of that thread in the GC marker handler. The fix to prevent this race is to evaluate all the conditions that formed the bRedirectedPinvoke after the conditions in the _ASSERTE.
2019-06-25Stop deallocating provider/events on shutdown (#25369)José Rivero1-6/+9
2019-06-24Make s_numberOfSessions Volatile as advertisement to other devs that the ↵José Rivero2-4/+4
data is being used across multiple threads and a portion of that usage is lock-free (#25366)
2019-06-24Events with keyword 0 needs to be fired (#25361)Sung Yoon Whang1-1/+1
2019-06-24Throw platform unsupported error for windows arm32 varargs (#25320)Jarret Shook1-2/+2
* Throw unsupported platform for native vcarargs on Arm32 Windows * Re-enable baseservices vararg test
2019-06-24Multiple bug fixes (#25308)José Rivero14-288/+196
- Fixes EventPipe does not properly dispose of itself on an active session error #25228 - On EventPipeSession::ThreadProc, if an error occurs on the IPC streaming, then EventPipe::Disable will be invoked. - Fixes Prevent EventPipe Sessions IDs from being reused on disconnect #25229
2019-06-22Fix ReturnKind classification for byref like types returned in registers ↵Andy Ayers1-1/+1
(#25333) These types contain byrefs, and so when returned in registers we may need to avoid GC stress at the return site. Addresses part of #24263.
2019-06-21Add EventPipe Processor Number support and make NetTrace the default … ↵Noah Falk12-23/+89
(#25276) * Add EventPipe Processor Number support and make NetTrace the default format The EventPipe header now has a Processor Number field. On windows we query the correct value, on other OSes we currently have a -1 placeholder, but the field is written to the format regardless. NetTrace is now the default format when using the environment variable, and the format must be explicitly configured when using the IPC channel or managed API. A parallel change in the diagnostics repo is changing dotnet-trace and dotnet-counter to specify nettrace format which means .NET devs should see nettrace almost exclusively from now on. If for whatever reason it is needed, NetPerf remains available if a scenario explicitly requests to use it. * PR feedback + attempting to fix broken tests
2019-06-21Mark the profiler attach thread during attach David Mason1-5/+16
2019-06-20ensure process-wide fence when updating GC write barrier on ARM64 (#25130)Vladimir Sadov3-43/+83
* ensure process-wide fences when updating GC write barrier on ARM64
2019-06-20Revert "ILMarshaler Refactor (#21227)" (#25292)Jeremy Koritzinsky6-900/+1005
This reverts commit 70febbad4bbe23326c26480b2848cdfe9fc8450c.
2019-06-20Fix eventpipe filtering (#25221)Sung Yoon Whang20-122/+179
* Add DOTNET_TRACE_CONTEXT and change macros to use DOTNET_TRACE_CONTEXT instead of MCGEN_TRACE_CONTEXT * Fixing macro definitions * eventing codegen scripts now generates EventPipe trace contexts * Fix macros to use the EVENTPIPE_TRACE_Context * Fix linux build * Fix windows build * Update Eventpipe provider context at EtwCallbackComon * break in switch * Update rundown provider context manually * PR feedback * Eventpipe->EventPipe * cleanup in codegen script