summaryrefslogtreecommitdiff
path: root/src/debug
AgeCommit message (Collapse)AuthorFilesLines
2019-06-06Use CMake's C# support to build DacTableGen instead of manually invoking ↵Jeremy Koritzinsky2-2/+2
csc.exe ourselves. (#24342) * Use CMake's C# support to build DacTableGen instead of manually invoking csc.exe ourselves. * Fix x86 failures. * Disable DAC generation when building with NMake Makefiles and issue an error since the CMake C# support is VS-only. We don't actually support building with NMake (only configure) so this is ok. * Clean up rest of the macro=1's PR Feedback. * Fix Visual Studio generator matching. * Explicitly specify anycpu32bitpreferred for DacTableGen so the ARM64 build doesn't accidentally make it 64-bit * Fix bad merge
2019-06-04signedness (#24878)Sinan Kaya1-1/+1
2019-05-29Use /proc/<pid>/mem to read memory in remote DBI data target. It makes the ↵Mike McLaughlin1-8/+27
test case run at (#24844) least 4 to 5 times faster than before. Fallback to old transport ReadMemory if /proc/<pid>/mem can't be opened. This happens on attach because of permissions/access, but works fine on the launch (the most important case).
2019-05-23Add some perf events/data for tiered compilation (#24607)Koundinya Veluri1-6/+30
Add some perf events/data for tiered compilation New events: - `Settings` - Sent when TC is enabled - `Flags` - Currently indicates whether QuickJit and QuickJitForLoops are enabled - `Pause` - Sent when TC is paused (due to a new method being called for the first time) - `Resume` - Sent when TC resumes - `NewMethodCount` - Number of methods called for the first time while tiering was paused - `BackgroundJitStart` - Sent when starting to JIT methods in the background - `PendingMethodCount` - Number of methods currently scheduled for background JIT - `BackgroundJitStop` - Sent when background jitting stops - `PendingMethodCount` - Same as above. When 0, background jitting has completed. - `JittedMethodCount` - Number of methods jitted in the background since the previous BackgroundJitStart event on the same thread Miscellaneous: - Updated method JIT events to include the optimization tier - Added a couple more cases where tiered compilation is disabled for methods that have JIT optimization disabled for some reason - Renamed `Duration` field of the new version of the `ContentionEnd` to `DurationNs` to indicate the units of time - Added `OptimizationTierOptimized` to `NativeCodeVersion::OptimizationTier` to distinguish it from `OptimizationTier1`. `OptimizationTierOptimized` is now used for methods that QuickJit is disabled for, and does not send the tier 1 flag. - For info about the code being generated by the JIT, added info to `PrepareCodeConfig` and stored a pointer to it on the thread object for the current JIT invocation. Info is updated in `PrepareCodeConfig` and used for updating the tier on the code version and for sending the ETL event. - If the JIT decides to use MinOpt when `MethodDesc::IsJitOptimizationDisabled()` is false, the info is not stored. The runtime method event will reflect the JIT's choice, the rundown event will not. - Updated to show optimization tiers in SOS similarly to PerfView
2019-05-22Delete FEATURE_WINDOWSPHONE (#24718)Jan Kotas3-38/+2
2019-05-22Track debug info for DynamicMethods for Profiler API (#24139)Mukul Sabharwal1-1/+51
2019-05-17Fix createdump on alpine (#24623)Mike McLaughlin1-2/+4
Issue # https://github.com/dotnet/coreclr/issues/24599
2019-05-15Remove concept of AppDomains from the GC (#24536)David Wrighton3-8/+3
* Remove concept of AppDomains from the GC - Leave constructs allowing for multiple handle tables, as scenarios for that have been proposed - Remove FEATURE_APPDOMAIN_RESOURCE_MONITORING
2019-05-14Fix issues reported by PREfast static analysis tool (#24577)Jan Kotas1-2/+2
2019-05-10Move EventProvider native layout to be driven by CMake configure (#24478)Jeremy Koritzinsky4-0/+6
* 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-08Fix ETL event rejit IDs and sending of the IL to native map event when code ↵Koundinya Veluri3-3/+16
versioning is in use (#24422) Fix ETL event rejit IDs and sending of the IL to native map event when code versioning is in use Fixes https://github.com/dotnet/coreclr/issues/22904 Fixes https://github.com/dotnet/coreclr/issues/22908 - Method events now always send the native code ID for the rejit ID, and the IL to native map event continues to send the IL code ID - Took code versioning into account when sending rundown events for a method including the IL to native map
2019-05-08Add generate crash dump command to diagnostics server (#24460)Mike McLaughlin1-5/+5
Add the DiagnosticProtocolHelper class to deserialize and dispatch the new GenerateCoreDump command. Refactor the PAL createdump launch on unhandled exception code to used by a new PAL_GenerateCoreDump method that doesn't depend on the complus dump environment variables. Changed the "full" createdump not to include the uncommitted pages and removed the "add module metadata" workaround for SOS clrstack !UNKNOWN problem now that is fixed in SOS (crashinfo.cpp).
2019-05-01Adjust some terms (#24351)Dan Moseley2-5/+5
2019-04-24More multi-appdomain support removal (#23921)David Wrighton5-48/+21
More multi-appdomain support removal - Remove DomainLocalBlock - Remove DomainModule - Remove FindDomain(File/Module/Assembly) - Remove GetDomainModule - Remove variants of GetDomain(File/Assembly) that take AppDomain parameter - Adjust contracts to be less strict - GetDomainFile/Assembly no longer need a complex contract as multi-domain support does not exist - Eliminiate uses of encoded ModuleID
2019-04-18Move R2R-specific code to be outside FEATURE_PREJIT (#24075)Jan Kotas2-18/+11
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-16[EventPipe] Minor bug fixes, and remove redundant/unused code. (#23956)José Rivero1-1/+1
- Update MicrosoftDiagnosticsTracingTraceEventPackageVersion - Delete connection if the request is unknown/unhandled - Adding missing error handling. - Provider names must be defined. - Some renaming, error handling, and build warnings. - Removing test code, and merge EventPipe::Enable functions. - Remove commented/non-used lines.
2019-04-16Use delete [] on array types (#24027)Omair Majid1-1/+1
Calling delete on types allocated with new[] leads to undefined behaviour.
2019-04-15Use NewArrayHolder for array types in src/debug (#24013)Omair Majid3-5/+5
Using a NewHolder with array types means that when the holder is ready to release the memory, it ends up invoking `delete` (instead of `delete[]`) on that array. This is an undefined behaviour. Use NewArrayHolder isntead to fix this.
2019-04-03Remove ADID and ADIndex from CoreCLR (#23588)David Wrighton9-101/+36
- Remove concept of AppDomain from object api in VM - Various infrastructure around entering/leaving appdomains is removed - Add small implementation of GetAppDomain for use by DAC (to match existing behavior) - Simplify finalizer thread operations - Eliminate AppDomain::Terminate - Remove use of ADID from stresslog - Remove thread enter/leave tracking from AppDomain - Remove unused asm constants across all architectures - Re-order header inclusion order to put gcenv.h before handletable - Remove retail only sync block code involving appdomain index
2019-04-02[EventPipe] Streaming events out-of-proc using IPC (#23448)José Rivero2-13/+9
- There was a race condition on EventPipe::Disable where we deallocated the s_pSession and set it to NULL, but there was still a thread waiting to write and dereference the null pointer. Now, we check that the session is not null. - Added a new attach event to be handled to the Diagnostic server: Add streaming functionality (Syncronus) #23299 - On Linux, IPC was failing when delete was invoked because we were using new (std::nothrow) instead of new (nothrow) when allocating the newly connected clients/streams. I have replaced the call with new. This fixed #23580 - Move multiFileTraceLengthInSeconds out of the EventPipeSession. - Unlink previously existing socket. - EventPipeBlock: _ASSERTE was updated not to fail when data is not aligned if an error has already occurred. - Update _ASSERTE in fastserializer.cpp to take into account the the write operation could have failed.
2019-03-21[EventPipe] Fix linker warning on Debug/Checked build and unlink Unix Domain ↵José Rivero4-13/+65
Socket #23334 (#23357) - Attempt to close-behind unix domain socket and repurpose LF_REMOTING facility. - On shutdown, attempt to unlink the bound socket so it can be removed from the file system when the last reference to it it closed. - Rename unused LF_REMOTING to LF_DIAGNOSTICS_PORT. This new flag will be used by the diagnostic server stress log calls. - libcmtd.lib(initializers.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library [S:\github.com\jorive\coreclr\bin\obj\Windows_NT.x64.Checked\src\dlls\mscoree\coreclr\coreclr.vcxproj] - Move some preprocessors and includes around.
2019-03-18Merge pull request #23307 from franksinankaya/gcc_cleanup_13Jan Vorlicek2-3/+3
Fix conversion, unknown pragmas and Visibility Issues for GCC
2019-03-18[EventPipe] Adding an IPC server to handle out of process communication. ↵José Rivero4-0/+354
(#23106) This is the first commit to enable a "diagnostic port" using IPC (Named Pipe on Windows and Unix Domain Socket on other platforms). This change currently enable EventPipe to be enabled/disabled without the use of a file drop. - Split the DiagnosticsIpc into (DiagnosticsIpc/IpcStream) - DiagnosticsIpc (IPC listener) is meant to be used by the Diagnostic server. - IpcStream (IPC channel) is meant to be use to communicate with the connected client. - Change the FastSerializer dependency from `CFileStream` to `StreamWriter` This abstraction is meant decouple the writing of objects in order to extend its usability. The main objective is to reuse FastSerializer to stream data through the open IPC channel. - Moved the EventPipeSessionProvider* classes to their own file. - Added a more streamlined parsing achievable by defining a simpler binary protocol (by noahfalk). 1. Only one allocation is needed for the EventPipeProviderConfiguration array, no allocations or copies are needed for strings because we can refer to them directly out of the incoming command buffer 2. No change to the EventPipe API for enable is required. EventPipeProviderConfiguration retains its current behavior of not deleting the string pointers it holds. 3. No leaks happen because the command buffer owns the string memory and ensures that it stays alive for the duration of the Enable() call.
2019-03-17Fix conversion issuesSinan Kaya2-3/+3
2019-03-16Fix typo (#23300)Nikita Potapenko1-1/+1
.Net -> .NET
2019-03-11Merge pull request #23093 from franksinankaya/gcc_warnings_9Jan Vorlicek9-17/+17
GCC Signed compare and Narrowing warnings
2019-03-07Fix signed compare warningsSinan Kaya9-17/+17
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-07Fix control C trap hang in the debugger (#23090)Juan Hoyos3-28/+33
2019-03-07Cleanup unused hosting interfaces (#23091)Jan Kotas2-26/+0
2019-03-06Fix missing includes in coreclr/src/debug/createdump/ (#23075)Mike McLaughlin1-0/+2
See issue 19722.
2019-03-05Remove dead AppDomain unload code (#23026)Steve MacLean1-2/+0
2019-03-05Remove dead ContainToAppDomain (#23021)Steve MacLean1-1/+0
* Remove dead ContainToAppDomain * Respond to feedback
2019-03-03Cleanup more GCC warnings (#22872)Sinan Kaya1-2/+2
* Add parenthesis src/vm/sha1.cpp: In function ‘void SHA1_block(SHA1_CTX*)’: src/vm/sha1.cpp:93:29: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] #define ROUND3(B, C, D) ((C & (B | D) | (B & D)) + sha1_round3) ^ src/vm/sha1.cpp:139:32: note: in expansion of macro ‘ROUND3’ e += ROTATE32L(a, 5) + ROUND3(b, c, d) + msg80[i]; * Move declaration into same file as one was defined Extern the other one was static * Remove hr=hr undefined assignment * Fix mutli-line comment warning * Convert multi-character literal * Remove null check for stack local variables rc/vm/invokeutil.cpp: In static member function ‘static void InvokeUtil::SetValidField(CorElementType, TypeHandle, FieldDesc*, OBJECTREF*, OBJECTREF*, TypeHandle, CLR_BOOL*)’: src/vm/invokeutil.cpp:978:29: warning: the address of ‘Throwable’ will never be NULL [-Waddress] EX_CATCH_THROWABLE(&Throwable); ^ src/inc/ex.h:1087:21: note: in definition of macro ‘EX_CATCH_THROWABLE’ if (NULL != ppThrowable) ^
2019-02-26Address janvorli's feedback commentsAdeel1-25/+25
2019-02-26Merge branch 'master' into fix/signed-compare-and-narrowingAdeel Mujahid4-8/+8
2019-02-26GCC compatibility fixes #7 (#22810)Sinan Kaya4-8/+8
* Use thread_local for thread local storage on non MSVC targets * Use local copy of visitor rather than function parameter * Remove extra class qualifier * Replace hex number representation in ASM files * Reorder STDAPI and DLLEXPORT * Suppress conversion Suppress warning during hash add casting * Remove anonymous struct src/vm/codeversion.h:112:16: warning: ‘struct NativeCodeVersion::<anonymous union>::SyntheticStorage’ invalid; an anonymous union can only have non-static data members [-fpermissive] struct SyntheticStorage * Remove class declaration Remove extra class declaration * Remove extern C * Add implicit paranthesis src/vm/amd64/virtualcallstubcpu.hpp:735:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF; ^ src/vm/amd64/virtualcallstubcpu.hpp:741:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF; Add parenthesis src/vm/dataimage.cpp:631:55: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size Add parenthesis src/debug/daccess/daccess.cpp:6871:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] _ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL); Add parenthesis src/vm/dataimage.cpp:631:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size) * Initialize member 1 src/ilasm/method.cpp:35:36: warning: operation on ‘((Method*)this)->Method::m_ulColumns[0]’ may be undefined [-Wsequence-point] m_ulColumns[0]=m_ulColumns[0]=0; * Remove unknown compiler option * Abstract DLLEXPORT
2019-02-25Address janvorli's feedback commentsAdeel1-2/+2
2019-02-24Fix comparison and narrowing errors reported by GCCAdeel3-10/+10
2019-02-22More GNUC Fixes (#22687)Sinan Kaya3-11/+12
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2019-02-19Fix CLRDataCreateInstance export. This was breaking SOS. (#22701)Mike McLaughlin3-3/+12
Fix CLRDataCreateInstance export. This was breaking SOS. Added the right cmake magic so the function is exported properly.
2019-02-16Fix visibility and signed comparison issues for GCC (#22586)Adeel Mujahid1-339/+336
* Fix visibility and signed comparison issues for GCC * Fix hidden _CLRDataCreateInstance warned by macOS * Fix indentation in vswprintf/test1 * Change void* to PVOID in implementation files
2019-02-15Disable arm64 contracts. (#22605)Sergey Andreenko2-42/+0
* Fix ifdef for `g_DbgSuppressAllocationAsserts`. It needs to be defined under `FEATURE_INTEROP_DEBUGGING`. * Unify contracts disabling for UNIX/ARM. It also disables some parts that were disabled for ARM, but not for UNIX. It fixes the difference that we see between ARM32 and ARM64 Unix Checked. * Disable contracts on arm64. FIxes the difference that we see between windows arm32 and arm64 in checked/debug builds. * Revert CoreFX arm64 timeout change. That is no longer necessary. * Reenable arm64 corefx jobs. They should not fail with timeouts anymore. * Don't allow `g_DbgSuppressAllocationAsserts` defnition in release builds. * delete AssertAllocationAllowed
2019-02-10Cleanup DLL exports (#22500)Jan Kotas1-3/+4
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid5-9/+11
2019-02-07Cleanup LLVM assumption (#22456)Sinan Kaya1-2/+2
We want to support GNU compilation for CoreCLR. Luckily both LLVM and GNU compilers define __GNUC__ and there are a lot of things they can share.
2019-02-06Implement ↵Marek Safar1-1/+0
ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute (#22372) * Implement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute in shared managed code * Remove native ::GetNeutralResourcesLanguage
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara10-187/+0
2019-01-14Making sure the nativeCodeVersion flowing change works with Rejit and EnC ↵Andrew Au1-1/+11
(#21961)
2019-01-11Flowing the nativeCodeVersion to DebuggerJitInfo (#21925)Andrew Au5-63/+67
2019-01-08Fix issue #20585 createdump explicitly uses /tmp. (#21866)Mike McLaughlin1-5/+19
Changed to PAL's GetTempPathA to get the temp path.