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 | // PerfCounterDefs.inl |
6 | // |
7 | // Internal Interface for CLR to use Performance counters |
8 | //----------------------------------------------------------------------------- |
9 | |
10 | #ifndef _PerfCounterDefs_inl_ |
11 | #define _PerfCounterDefs_inl_ |
12 | |
13 | #include "perfcounterdefs.h" |
14 | |
15 | inline Perf_GC::Perf_GC() {} |
16 | |
17 | inline Perf_GC::Perf_GC(Perf_GC_Wow64& copyFrom) |
18 | { |
19 | for (int index = 0; index < MAX_TRACKED_GENS; index++) |
20 | { |
21 | cGenCollections[index] = (size_t)copyFrom.cGenCollections[index]; |
22 | cGenHeapSize[index] = (size_t)copyFrom.cGenHeapSize[index]; |
23 | } |
24 | for (int index = 0; index < MAX_TRACKED_GENS - 1; index++) |
25 | { |
26 | cbPromotedMem[index] = (size_t)copyFrom.cbPromotedMem[index]; |
27 | } |
28 | |
29 | cbPromotedFinalizationMem = (size_t) copyFrom.cbPromotedFinalizationMem; |
30 | cProcessID = (size_t) copyFrom.cProcessID; |
31 | cTotalCommittedBytes = (size_t) copyFrom.cTotalCommittedBytes; |
32 | cTotalReservedBytes = (size_t) copyFrom.cTotalReservedBytes; |
33 | cLrgObjSize = (size_t) copyFrom.cLrgObjSize; |
34 | cSurviveFinalize = (size_t) copyFrom.cSurviveFinalize; |
35 | cHandles = (size_t) copyFrom.cHandles; |
36 | cbAlloc = (size_t) copyFrom.cbAlloc; |
37 | cbLargeAlloc = (size_t) copyFrom.cbLargeAlloc; |
38 | cInducedGCs = (size_t) copyFrom.cInducedGCs; |
39 | timeInGC = copyFrom.timeInGC; |
40 | timeInGCBase = copyFrom.timeInGCBase; |
41 | cPinnedObj = (size_t) copyFrom.cPinnedObj; |
42 | cSinkBlocks = (size_t) copyFrom.cSinkBlocks; |
43 | } |
44 | |
45 | inline Perf_Loading::Perf_Loading() {} |
46 | |
47 | inline Perf_Loading::Perf_Loading(Perf_Loading_Wow64& copyFrom) |
48 | : cClassesLoaded(copyFrom.cClassesLoaded), |
49 | cAppDomains(copyFrom.cAppDomains), |
50 | cAssemblies(copyFrom.cAssemblies), |
51 | timeLoading(copyFrom.timeLoading), |
52 | cAsmSearchLen(copyFrom.cAsmSearchLen), |
53 | cLoadFailures (copyFrom.cLoadFailures), |
54 | cbLoaderHeapSize ((size_t) copyFrom.cbLoaderHeapSize), |
55 | cAppDomainsUnloaded (copyFrom.cAppDomainsUnloaded) |
56 | { |
57 | } |
58 | |
59 | inline Perf_Security::Perf_Security() {}; |
60 | |
61 | inline Perf_Security::Perf_Security(Perf_Security_Wow64& copyFrom) |
62 | : cTotalRTChecks(copyFrom.cTotalRTChecks), |
63 | timeAuthorize(0), // Unused "reserved" field |
64 | cLinkChecks(copyFrom.cLinkChecks), |
65 | timeRTchecks(copyFrom.timeRTchecks), |
66 | timeRTchecksBase(copyFrom.timeRTchecksBase), |
67 | stackWalkDepth (copyFrom.stackWalkDepth) |
68 | { |
69 | } |
70 | |
71 | inline PerfCounterIPCControlBlock::PerfCounterIPCControlBlock() {} |
72 | |
73 | inline PerfCounterIPCControlBlock::PerfCounterIPCControlBlock(PerfCounterWow64IPCControlBlock& copyFrom) |
74 | : m_cBytes (copyFrom.m_cBytes), |
75 | m_wAttrs (copyFrom.m_wAttrs), |
76 | m_GC (copyFrom.m_GC), |
77 | m_Context (copyFrom.m_Context), |
78 | m_Interop (copyFrom.m_Interop), |
79 | m_Loading (copyFrom.m_Loading), |
80 | m_Excep (copyFrom.m_Excep), |
81 | m_LocksAndThreads (copyFrom.m_LocksAndThreads), |
82 | m_Jit (copyFrom.m_Jit), |
83 | m_Security (copyFrom.m_Security) |
84 | { |
85 | _ASSERTE((size_t)m_cBytes == sizeof(PerfCounterWow64IPCControlBlock)); |
86 | } |
87 | |
88 | #endif // _PerfCounterDefs_inl_ |
89 | |
90 | |