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
23class EEToProfInterfaceImpl;
24class ProfToEEInterfaceImpl;
25class Thread;
26class Frame;
27class MethodDesc;
28class Object;
29class 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
44void __stdcall ProfilerObjectAllocatedCallback(OBJECTREF objref, ClassID classId);
45
46void __stdcall GarbageCollectionStartedCallback(int generation, BOOL induced);
47
48void __stdcall GarbageCollectionFinishedCallback();
49
50void __stdcall UpdateGenerationBounds();
51#include "eetoprofinterfaceimpl.h"
52
53
54enum PTR_TYPE
55{
56 PT_MODULE,
57 PT_ASSEMBLY,
58};
59
60void __stdcall ProfilerManagedToUnmanagedTransitionMD(MethodDesc * pMD,
61 COR_PRF_TRANSITION_REASON reason);
62
63void __stdcall ProfilerUnmanagedToManagedTransitionMD(MethodDesc * pMD,
64 COR_PRF_TRANSITION_REASON reason);
65
66#endif //_EEPROFINTERFACES_H_
67