summaryrefslogtreecommitdiff
path: root/src/vm/proftoeeinterfaceimpl.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-03-19Reintroduce PR #22617 (Update added types and methoddefs on ApplyMetadata) ↵David Mason1-2/+2
(#23202) * Add ApplyMetadata changes back This reverts commit f9c10f995fe65c0e7c30aa1734f7bb22c519983d. * Fix race condition in loading available class hash for R2R with old R2R images or profiler modified R2R images
2019-02-28Revert "Update added types and methoddefs on ApplyMetadata (#22617)" (#22923)Jan Kotas1-2/+2
This reverts commit ee755e322dabc2fc280e2561b0fbaf6e90aedf54.
2019-02-27added a lightweight GC profiling option (#22866)Maoni Stephens1-3/+3
added a profiling event mask in the high 32-bit, COR_PRF_HIGH_BASIC_GC, for basic GC monitoring. it can be set via `ICorProfilerInfo5::SetEventMask2`. all this gives you is * GC start callback * GC end callback * update generational bounds note that one different behavior between this and the existing COR_PRF_MONITOR_GC is, aside from the obvious that it doesn't give you any info beyond the above, is that the GC end callback + update generational bounds are enabled for _all_ GCs, not just non concurrent GCs. I kept the behavior the same for COR_PRF_MONITOR_GC because I don't want to risk breaking existing profiling tools that do not anticipate these for concurrent GCs.
2019-02-26Update added types and methoddefs on ApplyMetadata (#22617)David Mason1-2/+2
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara1-118/+1
2018-12-10Delete vm/context.* (#21459)Jan Kotas1-1/+1
* Delete vm/context.* Leftover from remoting
2018-11-28Delete code related to LoaderOptimization and SharedDomain (#21031)Jan Kotas1-2/+0
2018-11-16Fix unloadability races (#21024)Jan Vorlicek1-1/+1
* Fix LoaderAllocator::AllocateHandle When another thread wins the race in growing the handle table, the code was not refreshing the slotsUsed local to the new up to date value. This was leading to overwriting / reusing a live handle. This change fixes it. * Embed ThreadLocalBlock in Thread Instead of allocating ThreadLocalBlock dynamically, embed it in the Thread. That solves race issue between thread destruction and LoaderAllocator destruction. The ThreadLocalBlock could have been deleted during Thread shutdown while the LoaderAllocator's destruction would be working with it.
2018-11-09Delete dead/unreachable code related to remoting (#20880)Jan Kotas1-1/+1
2018-10-07Remove mention of rotor from comments (#20297)Austin Wise1-1/+1
* Remove old reference to Rotor in documentation. All remaining references relate to rotor's role in CoreCLR history. * Remove rotor comment from enummem.cpp. I can find no evidence that the presence of g_pStressLog is conditional on FEATURE_PAL being defined. * Remove old todo, DbgDllMain looks for thread detach. * Update nativepipeline.h comment refernce to rotor. All unix-like systems except android have FEATURE_DBGIPC_TRANSPORT_DI defined, hence "most unix-like platforms". * Update some comments to not refer to Rotor. * Remove some more references to Rotor from comments. * Remove old comment. Though maybe this macro should be removed and everywhere use the & operator. It appears there are only two places that use this macro.
2018-10-07Remove some dead remoting and context static things (#20277)Austin Wise1-3/+1
* Remove IsRemotingIntercepted methods that always return false. * Remove GetOptionalMembersAllocationSize parameters that are always false. * Remove references to context static. Remove references in comments and methodnames. * Remove RemotingVtsInfo.
2018-10-05Remove context statics stuff (#20256)Jan Vorlicek1-11/+3
* Remove context statics stuff part 1 This change removes all context statics stuff from the runtime since context statics are not supported and this code was obsolete. * Remove context statics stuff from the debugger code
2018-08-01Allow rejit on attach (#19054)David Mason1-14/+19
* change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * rename value to enable/disable rejit on attach, and cache values of profiler rejit and config value * Change places where the jit checks for rejit being enabled to actually check for what it wants, which is whether jump stamps are enabled * get rid of old value that was readded by merge somehow * disallow detach after setting rejit event mask, and prevent it from being set if rejit on attach is turned off * fix incorrect assert * Take the codemanager lock in SetIP
2018-04-05Rename conflicting definitions VER_MAJOR/MINORVERSION macros (#17364)Jan Kotas1-4/+4
* Rename conflicting definitions of VER_MAJOR/MINORVERSION These macros are defined by Windows SDK. They were overload to mean CLR version that was causing interesting redefinition issues. * Delete workaround for redefined Windows SDK macros * Delete ProjectN version * Delete dead code
2018-02-22Remove relocations for MethodTable::m_pParentMethodTable for Linux ARM (#15915)gbalykov1-1/+1
2018-01-13Revert "Remove relocations for MethodTable::m_pParentMethodTable for Linux ARM"Jan Kotas1-1/+1
This reverts commit cf1fb9e17fc8b6ee849edab5a696d0ec5c6eadd2.
2017-10-23profiler changes for tiered compilation (#14612)David Mason1-40/+288
Add new apis for profiler to use with tiered jitting.
2017-08-22[Local GC] Enable building the GC as a shared library (#13137)Sean Gillespie1-1/+1
* [Local GC] Build the GC using system headers * Disable features to get the GC to build * Get rid of the separate 'GC PAL' build * Remove unused stuff * Don't build gcenv.os.cpp when linking in a standalone gc * Stub out CPUGroupInfo and NumaNodeInfo * Stub out IsGCThread and friends * Build the GC as a shared library :tada: * Build, link, and run! :tada: * Fix standalone GC build break * Fixes where the GC's MethodTable and VM's MethodTable classes disagree * Integrate a standalone GC into the CoreCLR build system (so it gets copied to the output folder). Re-enable some ifdef-ed out includes that are required for a non-standalone build of the GC. * Bring changes to Unix and fix the Unix build. Implement some compiler intrinsic wrappers and alignment functions expected by the GC. * Fix the Windows build * 1. Code review feedback: use standard types for BitScanForward and BitScanForward64 2. Delete FEATURE_COM stuff from the build system, not needed for this PR 3. Fix the Unix build * Fix the Windows x86 build - the _BitScanForward64 intrinsic is not available when targeting 32-bit platforms * Remove a number of things from gcenv.base.h that are not used * Remove a linker workaround now that we are not linking a standalone GC into the runtime * Remove dead code, make the lack of GC_PROFILING for standalone gc not break profiling on the non-standalone build * Code review feedback - use add_library_clr and other cmake-related fixes * Fix include indentation * Remove some extraneous parameters to cmake functions (cmake is remarkably lenient...)
2017-08-08Merge pull request #12168 from gbalykov/remove-relocations-readonlyBruce Forstall1-1/+1
Partially remove relocations from SECTION_Readonly
2017-07-24Add the runtime code versioning featurenoahfalk1-10/+21
This makes tiered compilation work properly with profiler ReJIT, and positions the runtime to integrate other versioning related features together in the future. See the newly added code-versioning design-doc in this commit for more information. Breaking changes for profilers: See code-versioning-profiler-breaking-changes.md for more details.
2017-07-10Remove relocations for MethodTable::m_pParentMethodTable for Linux ARMGleb Balykov1-1/+1
2017-03-28[Local GC] Use standard C++ types (bool) and consistent types (void*) on the ↵Sean Gillespie1-6/+6
interface (#10463) * [Local GC] BOOL -> bool on IGCHeap * [Local GC] size_t -> void* on IGCHeap * [Local GC] Silence warnings by being explicit about BOOl -> bool conversions * Address code review feedback: FinalizeAppDomain BOOL -> bool * Fix warnings * Address code review feedback: 1) Fix a missed default parameter (FALSE) on a parameter of type bool, 2) Fix invocations of the diagnostic callbacks to use boolean literals instead of TRUE and FALSE, 3) Fix various invocations of GC interface methods in the VM to use boolean literals instead of TRUE and FALSE * Address code review feedback: fix inconsistency
2017-02-14Remove never defined FEATURE_REMOTINGdanmosemsft1-83/+0
2017-02-13Rejit support for R2R imagesnoahfalk1-4/+3
Two changes: a) R2R code wasn't being reported to the Rejit Manager when it was used, this is a simple fix in prestub.cpp. This makes the ReJit API work. b) The bulk of the changes handle adding support for an inlining table to R2R so that ICorProfilerInfo6::EnumNgenMethodsInliningThisMethod can supply that information to profilers. This was only tested on Windows thus far, but there is no apparent reason this change would be OS specific.
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-16/+0
2017-02-02[x86/Linux] Do NOT use pXXX fields (#9121)Jonghyun Park1-2/+2
* [x86/Linux] Do NOT use pXXX fields * Fix x86/Windows build error * Fix another x86/Windows build error * Fix typo * Do NOT trash EBP * Reflect the original semantics of EHContext::UpdateFrame * Unify ReadXXX/LocateXXX into GetXXXLocation, and RestoreXXX/TrashXXX into SetXXXLocation * Revert the order of pXXX fields * Revise cgenx86.cpp * Revert unnecessary changes * Remove direct accesses to CALLEE_SAVED_REGISTERS_TAG * Do NOT update pCurrentContext inside SetXXXLocation * Update RegPtr via offset * Unify REG_METHODS (and revise UpdateRegDisplay methods accordingly) * Revise per feedback * Fix x86/Windows build error
2017-01-23Rename Esp in x86 REGDISPLAY as SP (#9070)Jonghyun Park1-2/+2
* Rename Esp in x86 REGDISPLAY as SP * Fix x86/Windows build error
2016-11-22This is to separate the diagnostics code out from gc.cpp (exceptMaoni01-6/+6
GC's own logging), gcee.cpp and objecthandle.cpp. The rule is GC will call the diagnostics functions at various points to communicate info and these diagnostics functions might call back into the GC if they require initimate knowledge of the GC in order to get certain info. This way gc.cpp does not need to know about details of the diagnostics components, eg, the profiling context; and the diagnostics components do not need to know details about the GC. So got rid of ProfilingScanContext in gcinterface.h and passed scanning functions to GC and handle table. Got rid of where it goes through things per heap as this is not something that diagnostics should care about, including going through stack roots per heap (which is only done in GC for scalability purposes but profiling is doing this on a single thread). This also makes it faster. Got rid of the checks for gc_low/high in ProfScanRootsHelper as this is knowledge profiling shouldn't have. And it was also incorrectly not including all interior pointer stack roots.
2016-10-21Add LCG JIT Compilation Profiler CallbacksMukul Sabharwal1-7/+302
Methods that contain no metadata (e.g. of sources are IL Stubs, DynamicMethod, Expression Trees, etc.) also known as LCG methods are not reported to profilers via the Profiling API. LCG, introduced in .NET 2.0 timeframe is unique in that it doesn't require the method to be hosted in an assembly > module > type heirarchy and is GCable in of itself. This change adds new APIs that notify the profiler of such methods but since there is no metadata to go lookup, it provides some useful pieces of information that the profiler author may want to expose to the profiler user. In the compilation start method we provide a className (always dynamicClass), a methodName that can be a set of few predetermined names like (ILStub_COMToCLR, etc.) or if the user has set the name for the LCG method that can show up here. For example, when using the Expression Trees API, the user can specify a friendly name which would be returned here. In the jit completed callback we provide information for the native code start address and size. This is particularly useful to get more accurate accounting of what the (previously unidentified) code is. At least the user would know it is JITTed if nothing more (but most likely more information like what kind of stub). Furthermore, since this is going to be a profiler callback, the profiler can initiate a stackwalk and give more contextual information to its users beyond the pieces of information we can provide here that could identify what they're encountering. Finally, there is also the case that today the profiling APIs underreport JITTed code in the process. Considerable amount of LCG code can now be present in the program and in security-sensitive environments where tracking JITTed code for security reasons is important the profiling apis fall short. In such environments there is also often restrictions on running with elevated privileges, so procuring this data through other means (like ETW) may pose a challenge.
2016-10-14Enable DoStackSnapshot API on ARM to walk the current thread (#6933)kvochko1-15/+23
2016-09-14Implement GcInfo v2 for X86Swaroop Sridhar1-2/+3
This commit includes the following changes: 1) Thread GcInfo version through X86 specific APIs 2) Add ReturnKind and ReversePinvokeOffset fields to InfoHdr structure GcInfo v1 and v2 use the same InfoHdr structures, because: InfoHdrSmall: ReturnKind is encoded within previously unused bits. InfoHdr: revPInvokeOffset will never be written to the image, since ReversePinvokeOffset==INVALID_REV_PINVOKE_OFFSET for V1. 3) Update the Pre-computed header table to include bits for the above [The default setting of ReturnKind=RT_Scalar is used for all entries in the table. Optimizing this table based in most frequent usage scenarios is to be done separately] 4) Change the GC encoder/decoder to handle the above two fields 5) Use the ReturnKind in the GCInfo from thread-suspension code. GcInfo version is changed for CoreCLR X86 only, not for Desktop JIT Fixes #4379
2016-09-08Introduce an interface separating the GC and the VM,Sean Gillespie1-7/+7
modifying the VM to utilize this interface. Introduce an interface separating the GC and the rest of the VM Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM. Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC. Split each interface function into categories, document them, use consistent formatting across the interface Undo some accidental find/replace collateral damage Remove all ifdefs from the GC interface Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build Paper cut: false -> nullptr Repair the ARM and x86 builds Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback Rebase against master Rename gcholder.h/cpp -> gcheaputilities.h/cpp Fix an uninitialized field on alloc_context causing test failures on clang Rename the include guard for gcheaputilities.h Un-breaks SOS by making the following changes: 1) Instructs the DAC to look for IGCHeap::gcHeapType by name, instead of assuming that it exists near g_pGCHeap, 2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot dispatch on an object in another process, 3) Because of 2, expose the number of generations past the GC interface using a static variable on IGCHeap that the DAC can read directly. repair the Windows build
2016-05-17Treat R2R images as NI for profilingKshama Pawar1-2/+10
2016-03-16Update code to use COMPlus_ instead of COMPLUS_ when referencing knobsManu1-4/+4
2016-02-24Fixes for GC updateJan Kotas1-4/+5
2016-01-31Merge pull request #2520 from sperling/profilerJan Kotas1-9/+15
Enabling profiling on Unix/OS X
2016-01-31Enabling profiling on Unix/OS X.Andreas Strid1-9/+15
2016-01-27Update license headersdotnet-bot1-4/+3
2016-01-21Untangle FEATURE_EVENT_TRACE and GC_PROFILING to enable one to be enabledSean Gillespie1-11/+23
without the other Fix the Ubuntu build by ensuring that HeapWalkHelper is defined when the rest of the heap walking mechanisms are defined +feedback from jkotas and address missing symbols on Ubuntu
2015-11-18Replace most windows style types by c++ typesJan Vorlicek1-1/+1
This change replaces DWORD, LONGLONG, ULONGLONG, SIZE_T, BYTE, LONG32 and few more by standard c++ types. The DWORD still remains present in signatures of Windows APIs used by the GC. There are few issues with those that need to get fixed.
2015-10-29Port .NET Framework 4.6.1 changesJan Kotas1-0/+185
Core runtime and GC changes from https://github.com/Microsoft/dotnet/blob/master/docs/releases/net461/dotnet461-changes.md that are not in CoreCLR yet [tfs-changeset: 1543382]
2015-08-14Fix typo "retrive" and "retrieved" to "retrieve" and "retrieved"Jon Hanna1-1/+1
Mostly just in comments, test case and trace text, but the exception thrown if you try to GetInterfaceMap on an array type has it in the description.
2015-07-15Update documentation linkssergey-raevskiy1-1/+1
2015-04-08Update code files to point to profiler docRichard Lander1-1/+1
2015-02-13Simplify platform ifdefsJan Kotas1-58/+0
Simplify platform ifdefs like #if defined(_WIN64) || defined(_TARGET_ARM_) to #if !defined(_TARGET_X86_) based on @BruceForstall suggestion
2015-02-04Fixed typosPascal Borreli1-3/+3
2015-02-03Remove non ASCII characters from source filesMatt Ellis1-3/+3
Our native files were more or less encoded in Windows-1252, which causes problems when we try to compile them on machines where the current codepage can't represent everything that Windows-1252 can. With this conversion I just moved characters to their ASCII counterparts (e.g. no smart quotes, the section marker glyph is now "Section"). There were two places where I couldn't do the straight forward thing, in object.h we wanted to insert the Per Mille symbol in a comment so instead I just spelled out the Unicode codepoint. In morph.cpp, there was a comment pointing to a paper by Torbjörn Granlund (note the diaeresis above the second o). In this case, unfortuntely I had to just drop the diaeresis. However, searching for "Torbjorn Granlund" will lead you to the right person. Fixes #49
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+9888
[tfs-changeset: 1407945]