| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | // |
| 5 | // EEProfInterfaces.h |
| 6 | // |
| 7 | |
| 8 | // |
| 9 | // Common types used internally in the EE to support issuing profiling API callbacks |
| 10 | // |
| 11 | |
| 12 | // ====================================================================================== |
| 13 | |
| 14 | #ifndef _EEPROFINTERFACES_H_ |
| 15 | #define _EEPROFINTERFACES_H_ |
| 16 | |
| 17 | #include <stddef.h> |
| 18 | #include "corprof.h" |
| 19 | #include "profilepriv.h" |
| 20 | |
| 21 | #define PROF_USER_MASK 0xFFFFFFFF |
| 22 | |
| 23 | class EEToProfInterfaceImpl; |
| 24 | class ProfToEEInterfaceImpl; |
| 25 | class Thread; |
| 26 | class Frame; |
| 27 | class MethodDesc; |
| 28 | class Object; |
| 29 | class Module; |
| 30 | |
| 31 | // This file defines the _internal_ interface between the EE and the |
| 32 | // implementation of the COM profiling API. The _external_ API is defined |
| 33 | // in inc/corprof.idl. |
| 34 | // |
| 35 | // Most IDs used by the _external_ API are just the pointer values |
| 36 | // of the corresponding CLR data structure. |
| 37 | // |
| 38 | |
| 39 | /* |
| 40 | * The following methods dispatch allocations tracking to the profiler as |
| 41 | * well as the method table reordering codes (as appropriate). |
| 42 | */ |
| 43 | |
| 44 | void __stdcall ProfilerObjectAllocatedCallback(OBJECTREF objref, ClassID classId); |
| 45 | |
| 46 | void __stdcall GarbageCollectionStartedCallback(int generation, BOOL induced); |
| 47 | |
| 48 | void __stdcall GarbageCollectionFinishedCallback(); |
| 49 | |
| 50 | void __stdcall UpdateGenerationBounds(); |
| 51 | #include "eetoprofinterfaceimpl.h" |
| 52 | |
| 53 | |
| 54 | enum PTR_TYPE |
| 55 | { |
| 56 | PT_MODULE, |
| 57 | PT_ASSEMBLY, |
| 58 | }; |
| 59 | |
| 60 | void __stdcall ProfilerManagedToUnmanagedTransitionMD(MethodDesc * pMD, |
| 61 | COR_PRF_TRANSITION_REASON reason); |
| 62 | |
| 63 | void __stdcall ProfilerUnmanagedToManagedTransitionMD(MethodDesc * pMD, |
| 64 | COR_PRF_TRANSITION_REASON reason); |
| 65 | |
| 66 | #endif //_EEPROFINTERFACES_H_ |
| 67 | |