set(CMAKE_INCLUDE_CURRENT_DIR ON)
-if(PerfCountersSupportedBuild)
- add_definitions(-DENABLE_PERF_COUNTERS)
-endif(PerfCountersSupportedBuild)
-
set(BCLTYPE_SOURCES
arraynative.cpp
arrayhelpers.cpp
// Performance logging
//
-#define COUNTER_ONLY(x)
-
//#include "etmdummy.h"
//#define ETW_EVENT_ENABLED(e,f) false
#ifndef DACCESS_COMPILE
-COUNTER_ONLY(PERF_COUNTER_TIMER_PRECISION g_TotalTimeInGC = 0);
-COUNTER_ONLY(PERF_COUNTER_TIMER_PRECISION g_TotalTimeSinceLastGCEnd = 0);
+#ifdef ENABLE_PERF_COUNTERS
+PERF_COUNTER_TIMER_PRECISION g_TotalTimeInGC = 0;
+PERF_COUNTER_TIMER_PRECISION g_TotalTimeSinceLastGCEnd = 0;
+#endif
#if defined(ENABLE_PERF_COUNTERS) || defined(FEATURE_EVENT_TRACE)
size_t g_GenerationSizes[NUMBERGENERATIONS];
// fetch the handle table pointer
HandleTable *pTable = Table(hTable);
+#ifdef ENABLE_PERF_COUNTERS
// decrement handle count by number of handles in this table
COUNTER_ONLY(GetPerfCounters().m_GC.cHandles -= HndCountHandles(hTable));
+#endif
// We are going to free the memory for this HandleTable.
// Let us reset the copy in g_pHandleTableArray to NULL.
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//-----------------------------------------------------------------------------
-// PerfCounterDefs.h
-//
-// Internal Interface for CLR to use Performance counters
-//-----------------------------------------------------------------------------
-
-
-#ifndef _PerfCounterDefs_h_
-#define _PerfCounterDefs_h_
-
-#include "contract.h"
-
-//-----------------------------------------------------------------------------
-// PerfCounters are only enabled if ENABLE_PERF_COUNTERS is defined.
-// If we know we want them (such as in the impl or perfmon, then define this
-// in before we include this header, else define this from the sources file.
-//
-// Note that some platforms don't use perfcounters, so to avoid a build
-// break, you must wrap PerfCounter code (such as instrumenting in either
-// #ifdef or use the COUNTER_ONLY(x) macro (defined below)
-//
-
-//-----------------------------------------------------------------------------
-// Name of global IPC block
-#define SHARED_PERF_IPC_NAME W("SharedPerfIPCBlock")
-
-
-//-----------------------------------------------------------------------------
-// Attributes for the IPC block
-//-----------------------------------------------------------------------------
-const int PERF_ATTR_ON = 0x0001; // Are we even updating any counters?
-const int PERF_ATTR_GLOBAL = 0x0002; // Is this a global or private block?
-
-
-
-
-
-//.............................................................................
-// Tri Counter. Support for the common trio of counters (Total, Current, and
-// Instantaneous). This compiles to the same thing if we had them all separate,
-// but it's a lot cleaner this way.
-//.............................................................................
-struct TRICOUNT
-{
- DWORD Cur; // Current, has +, -
- DWORD Total; // Total, has only +
- inline void operator++(int) {
- LIMITED_METHOD_CONTRACT;
- Cur ++; Total ++;
- }
- inline void operator--(int) {
- LIMITED_METHOD_CONTRACT;
- Cur --;
- }
- inline void operator+=(int delta) {
- LIMITED_METHOD_CONTRACT;
- Cur += delta; Total += delta;
- }
- inline void operator-=(int delta) {
- LIMITED_METHOD_CONTRACT;
- Cur -= delta;
- }
- inline void operator=(int delta) {
- LIMITED_METHOD_CONTRACT;
- Cur = delta;
- Total = delta;
- }
- inline void operator+=(TRICOUNT delta) {
- LIMITED_METHOD_CONTRACT;
- Cur += delta.Cur; Total += delta.Total;
- }
-
-};
-
-//.............................................................................
-// Interlocked Tri Counter. Support for the common trio of counters (Total, Current,
-// and Instantaneous). This compiles to the same thing if we had them all separate,
-// but it's a lot cleaner this way.
-//.............................................................................
-struct TRICOUNT_IL
-{
- DWORD Cur; // Current, has +, -
- DWORD Total; // Total, has only +
- inline void operator++(int) {
- LIMITED_METHOD_CONTRACT;
- InterlockedIncrement((LPLONG)&Cur); InterlockedIncrement((LPLONG)&Total);
- }
- inline void operator--(int) {
- LIMITED_METHOD_CONTRACT;
- InterlockedDecrement((LPLONG)&Cur);
- }
- inline void operator+=(int delta) {
- LIMITED_METHOD_CONTRACT;
- while (TRUE)
- {
- LONG old_Cur = Cur;
- if (InterlockedCompareExchange((LPLONG)&Cur, Cur+delta, old_Cur) == old_Cur)
- break;
- }
- while (TRUE)
- {
- LONG old_Total = Total;
- if (InterlockedCompareExchange((LPLONG)&Total, Total+delta, old_Total) == old_Total)
- break;
- }
- }
- inline void operator-=(int delta) {
- LIMITED_METHOD_CONTRACT;
- while (TRUE)
- {
- LONG old_Cur = Cur;
- if (InterlockedCompareExchange((LPLONG)&Cur, Cur-delta, old_Cur) == old_Cur)
- break;
- }
- }
- inline void operator=(int delta) {
- LIMITED_METHOD_CONTRACT;
- while (TRUE)
- {
- LONG old_Cur = Cur;
- if (InterlockedCompareExchange((LPLONG)&Cur, delta, old_Cur) == old_Cur)
- break;
- }
-
- while (TRUE)
- {
- LONG old_Total = Total;
- if (InterlockedCompareExchange((LPLONG)&Total, delta, old_Total) == old_Total)
- break;
- }
- }
- inline void operator+=(TRICOUNT_IL delta) {
- LIMITED_METHOD_CONTRACT;
- while (TRUE)
- {
- LONG old_Cur = Cur;
- if (InterlockedCompareExchange((LPLONG)&Cur, Cur+delta.Cur, old_Cur) == old_Cur)
- break;
- }
- while (TRUE)
- {
- LONG old_Total = Total;
- if (InterlockedCompareExchange((LPLONG)&Total, Total+delta.Total, old_Total) == old_Total)
- break;
- }
- }
-
-};
-
-
-//.............................................................................
-// Dual Counter. Support for the (Total and Instantaneous (rate)). Helpful in cases
-// where the current value is always same as the total value. ie. the counter is never
-// decremented.
-// This compiles to the same thing if we had them separate, but it's a lot cleaner
-// this way.
-//.............................................................................
-struct DUALCOUNT
-{
- DWORD Total;
- inline void operator++(int) {
- LIMITED_METHOD_CONTRACT;
- Total ++;
- }
-
- inline void operator+=(int delta) {
- LIMITED_METHOD_CONTRACT;
- Total += delta;
- }
-
- inline void operator+=(DUALCOUNT delta) {
- LIMITED_METHOD_CONTRACT;
- Total += delta.Total;
- }
-
-
-};
-
-//-----------------------------------------------------------------------------
-// Format for the Perf Counter IPC Block
-// IPC block is broken up into sections. This marks it easier to marshall
-// into different perfmon objects
-//
-//.............................................................................
-// Naming convention (by prefix):
-// c - Raw count of something.
-// cb- count of bytes
-// time - time value.
-// depth - stack depth
-//-----------------------------------------------------------------------------
-
-const int MAX_TRACKED_GENS = 3; // number of generations we track
-
-//
-// Perf_GC_Wow64 mimics in a 64 bit process, the layout of Perf_GC in a 32 bit process
-// It does this by replacing all size_t by DWORD
-//
-// *** Keep contents of Perf_GC_Wow64 and Perf_GC in sync ***
-
-struct Perf_GC_Wow64
-{
-public:
- DWORD cGenCollections[MAX_TRACKED_GENS];// count of collects per gen
- DWORD cbPromotedMem[MAX_TRACKED_GENS-1]; // count of promoted memory
- DWORD cbPromotedFinalizationMem; // count of memory promoted due to finalization
- DWORD cProcessID; // process ID
- DWORD cGenHeapSize[MAX_TRACKED_GENS]; // size of heaps per gen
- DWORD cTotalCommittedBytes; // total number of committed bytes.
- DWORD cTotalReservedBytes; // bytes reserved via VirtualAlloc
- DWORD cLrgObjSize; // size of Large Object Heap
- DWORD cSurviveFinalize; // count of instances surviving from finalizing
- DWORD cHandles; // count of GC handles
- DWORD cbAlloc; // bytes allocated
- DWORD cbLargeAlloc; // bytes allocated for Large Objects
- DWORD cInducedGCs; // number of explicit GCs
- DWORD timeInGC; // Time in GC
- DWORD timeInGCBase; // must follow time in GC counter
-
- DWORD cPinnedObj; // # of Pinned Objects
- DWORD cSinkBlocks; // # of sink blocks
-};
-
-// *** Keep contents of Perf_GC_Wow64 and Perf_GC in sync ***
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_GC
-{
-public:
- size_t cGenCollections[MAX_TRACKED_GENS];// count of collects per gen
- size_t cbPromotedMem[MAX_TRACKED_GENS-1]; // count of promoted memory
- size_t cbPromotedFinalizationMem; // count of memory promoted due to finalization
- size_t cProcessID; // process ID
- size_t cGenHeapSize[MAX_TRACKED_GENS]; // size of heaps per gen
- size_t cTotalCommittedBytes; // total number of committed bytes.
- size_t cTotalReservedBytes; // bytes reserved via VirtualAlloc
- size_t cLrgObjSize; // size of Large Object Heap
- size_t cSurviveFinalize; // count of instances surviving from finalizing
- size_t cHandles; // count of GC handles
- size_t cbAlloc; // bytes allocated
- size_t cbLargeAlloc; // bytes allocated for Large Objects
- size_t cInducedGCs; // number of explicit GCs
- DWORD timeInGC; // Time in GC
- DWORD timeInGCBase; // must follow time in GC counter
-
- size_t cPinnedObj; // # of Pinned Objects
- size_t cSinkBlocks; // # of sink blocks
-
- Perf_GC();
- Perf_GC(Perf_GC_Wow64& copyFrom);
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-//
-// Perf_Loading_Wow64 mimics in a 64 bit process, the layout of Perf_Loading
-// in a 32 bit process. It does this by replacing all size_t by DWORD
-//
-// *** Keep contents of Perf_Loading_Wow64 and Perf_Loading in sync ***
-struct Perf_Loading_Wow64
-{
-// Loading
-public:
- TRICOUNT cClassesLoaded;
- TRICOUNT_IL cAppDomains; // Current # of AppDomains
- TRICOUNT cAssemblies; // Current # of Assemblies.
- UNALIGNED LONGLONG timeLoading; // % time loading
- DWORD cAsmSearchLen; // Avg search length for assemblies
- DUALCOUNT cLoadFailures; // Classes Failed to load
- DWORD cbLoaderHeapSize; // Total size of heap used by the loader
- DUALCOUNT cAppDomainsUnloaded; // Rate at which app domains are unloaded
-};
-
-// *** Keep contents of Perf_Loading_Wow64 and Perf_Loading in sync ***
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Loading
-{
-// Loading
-public:
- TRICOUNT cClassesLoaded;
- TRICOUNT_IL cAppDomains; // Current # of AppDomains
- TRICOUNT cAssemblies; // Current # of Assemblies.
- UNALIGNED LONGLONG timeLoading; // % time loading
- DWORD cAsmSearchLen; // Avg search length for assemblies
- DUALCOUNT cLoadFailures; // Classes Failed to load
- size_t cbLoaderHeapSize; // Total size of heap used by the loader
- DUALCOUNT cAppDomainsUnloaded; // Rate at which app domains are unloaded
-
- Perf_Loading();
- Perf_Loading(Perf_Loading_Wow64& copyFrom);
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Jit
-{
-// Jitting
- DWORD cMethodsJitted; // number of methods jitted
- TRICOUNT cbILJitted; // IL jitted stats
-// DUALCOUNT cbPitched; // Total bytes pitched
- DWORD cJitFailures; // # of standard Jit failures
- DWORD timeInJit; // Time in JIT since last sample
- DWORD timeInJitBase; // Time in JIT base counter
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Excep
-{
-// Exceptions
- DUALCOUNT cThrown; // Number of Exceptions thrown
- DWORD cFiltersExecuted; // Number of Filters executed
- DWORD cFinallysExecuted; // Number of Finallys executed
- DWORD cThrowToCatchStackDepth; // Delta from throw to catch site on stack
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Interop
-{
-// Interop
- DWORD cCCW; // Number of CCWs
- DWORD cStubs; // Number of stubs
- DWORD cMarshalling; // # of time marshalling args and return values.
- DWORD cTLBImports; // Number of tlbs we import
- DWORD cTLBExports; // Number of tlbs we export
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_LocksAndThreads
-{
-// Locks
- DUALCOUNT cContention; // # of times in AwareLock::EnterEpilogue()
- TRICOUNT cQueueLength; // Lenght of queue
-// Threads
- DWORD cCurrentThreadsLogical; // Number (created - destroyed) of logical threads
- DWORD cCurrentThreadsPhysical; // Number (created - destroyed) of OS threads
- TRICOUNT cRecognizedThreads; // # of Threads execute in runtime's control
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-
-// IMPORTANT!!!!!!!: The first two fields in the struct have to be together
-// and be the first two fields in the struct. The managed code in ChannelServices.cs
-// depends on this.
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Contexts
-{
-// Contexts & Remoting
- DUALCOUNT cRemoteCalls; // # of remote calls
- DWORD cChannels; // Number of current channels
- DWORD cProxies; // Number of context proxies.
- DWORD cClasses; // # of Context-bound classes
- DWORD cObjAlloc; // # of context bound objects allocated
- DWORD cContexts; // The current number of contexts.
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-//
-// Perf_Security_Wow64 mimics in a 64 bit process, the layout of Perf_Security
-// in a 32 bit process. It does this by packing all members on 4 byte boundary
-// ("timeAuthorize" field which is 8 bytes in size, will get 8 byte aligned
-// on 64 bit by default)
-//
-// *** Keep contents of Perf_Security_Wow64 and Perf_Security in sync ***
-#include <pshpack4.h>
-struct Perf_Security_Wow64
-{
-// Security
-public:
- DWORD cTotalRTChecks; // Total runtime checks
- UNALIGNED LONGLONG timeAuthorize; // % time authenticating
- DWORD cLinkChecks; // link time checks
- DWORD timeRTchecks; // % time in Runtime checks
- DWORD timeRTchecksBase; // % time in Runtime checks base counter
- DWORD stackWalkDepth; // depth of stack for security checks
-};
-#include <poppack.h>
-
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct Perf_Security
-{
-// Security
-public:
- DWORD cTotalRTChecks; // Total runtime checks
- UNALIGNED LONGLONG timeAuthorize; // % time authenticating
- DWORD cLinkChecks; // link time checks
- DWORD timeRTchecks; // % time in Runtime checks
- DWORD timeRTchecksBase; // % time in Runtime checks base counter
- DWORD stackWalkDepth; // depth of stack for security checks
-
- Perf_Security();
- Perf_Security(Perf_Security_Wow64& copyFrom);
-};
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-
-//
-// PerfCounterWow64IPCControlBlock mimics in a 64 bit process, the layout of
-// PerfCounterIPCControlBlock in a 32 bit process.
-//
-// *** Keep contents of PerfCounterWow64IPCControlBlock and PerfCounterIPCControlBlock in sync ***
-#include <pshpack4.h>
-struct PerfCounterWow64IPCControlBlock
-{
-public:
-// Versioning info
- WORD m_cBytes; // size of this entire block
- WORD m_wAttrs; // attributes for this block
-
-// Counter Sections
- Perf_GC_Wow64 m_GC;
- Perf_Contexts m_Context;
- Perf_Interop m_Interop;
- Perf_Loading_Wow64 m_Loading;
- Perf_Excep m_Excep;
- Perf_LocksAndThreads m_LocksAndThreads;
- Perf_Jit m_Jit;
- Perf_Security_Wow64 m_Security;
-};
-#include <poppack.h>
-
-// Note: PerfMonDll marshalls data out of here by copying a continous block of memory.
-// We can still add new members to the subsections above, but if we change their
-// placement in the structure below, we may break PerfMon's marshalling
-
-// *** Keep contents of PerfCounterWow64IPCControlBlock and PerfCounterIPCControlBlock in sync ***
-#ifndef _WIN64
-#include <pshpack4.h>
-#endif //#ifndef _WIN64
-struct PerfCounterIPCControlBlock
-{
-public:
-// Versioning info
- WORD m_cBytes; // size of this entire block
- WORD m_wAttrs; // attributes for this block
-
-// Counter Sections
- Perf_GC m_GC;
- Perf_Contexts m_Context;
- Perf_Interop m_Interop;
- Perf_Loading m_Loading;
- Perf_Excep m_Excep;
- Perf_LocksAndThreads m_LocksAndThreads;
- Perf_Jit m_Jit;
- Perf_Security m_Security;
-
- PerfCounterIPCControlBlock();
- PerfCounterIPCControlBlock(PerfCounterWow64IPCControlBlock& copyFrom);
-};
-
-#ifndef _WIN64
-#include <poppack.h>
-#endif //#ifndef _WIN64
-
-//
-// Inline definitions
-//
-
-#include "perfcounterdefs.inl"
-
-#endif // _PerfCounterDefs_h_
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//-----------------------------------------------------------------------------
-// PerfCounterDefs.inl
-//
-// Internal Interface for CLR to use Performance counters
-//-----------------------------------------------------------------------------
-
-#ifndef _PerfCounterDefs_inl_
-#define _PerfCounterDefs_inl_
-
-#include "perfcounterdefs.h"
-
-inline Perf_GC::Perf_GC() {}
-
-inline Perf_GC::Perf_GC(Perf_GC_Wow64& copyFrom)
-{
- for (int index = 0; index < MAX_TRACKED_GENS; index++)
- {
- cGenCollections[index] = (size_t)copyFrom.cGenCollections[index];
- cGenHeapSize[index] = (size_t)copyFrom.cGenHeapSize[index];
- }
- for (int index = 0; index < MAX_TRACKED_GENS - 1; index++)
- {
- cbPromotedMem[index] = (size_t)copyFrom.cbPromotedMem[index];
- }
-
- cbPromotedFinalizationMem = (size_t) copyFrom.cbPromotedFinalizationMem;
- cProcessID = (size_t) copyFrom.cProcessID;
- cTotalCommittedBytes = (size_t) copyFrom.cTotalCommittedBytes;
- cTotalReservedBytes = (size_t) copyFrom.cTotalReservedBytes;
- cLrgObjSize = (size_t) copyFrom.cLrgObjSize;
- cSurviveFinalize = (size_t) copyFrom.cSurviveFinalize;
- cHandles = (size_t) copyFrom.cHandles;
- cbAlloc = (size_t) copyFrom.cbAlloc;
- cbLargeAlloc = (size_t) copyFrom.cbLargeAlloc;
- cInducedGCs = (size_t) copyFrom.cInducedGCs;
- timeInGC = copyFrom.timeInGC;
- timeInGCBase = copyFrom.timeInGCBase;
- cPinnedObj = (size_t) copyFrom.cPinnedObj;
- cSinkBlocks = (size_t) copyFrom.cSinkBlocks;
-}
-
-inline Perf_Loading::Perf_Loading() {}
-
-inline Perf_Loading::Perf_Loading(Perf_Loading_Wow64& copyFrom)
-: cClassesLoaded(copyFrom.cClassesLoaded),
- cAppDomains(copyFrom.cAppDomains),
- cAssemblies(copyFrom.cAssemblies),
- timeLoading(copyFrom.timeLoading),
- cAsmSearchLen(copyFrom.cAsmSearchLen),
- cLoadFailures (copyFrom.cLoadFailures),
- cbLoaderHeapSize ((size_t) copyFrom.cbLoaderHeapSize),
- cAppDomainsUnloaded (copyFrom.cAppDomainsUnloaded)
-{
-}
-
-inline Perf_Security::Perf_Security() {};
-
-inline Perf_Security::Perf_Security(Perf_Security_Wow64& copyFrom)
-: cTotalRTChecks(copyFrom.cTotalRTChecks),
- timeAuthorize(0), // Unused "reserved" field
- cLinkChecks(copyFrom.cLinkChecks),
- timeRTchecks(copyFrom.timeRTchecks),
- timeRTchecksBase(copyFrom.timeRTchecksBase),
- stackWalkDepth (copyFrom.stackWalkDepth)
-{
-}
-
-inline PerfCounterIPCControlBlock::PerfCounterIPCControlBlock() {}
-
-inline PerfCounterIPCControlBlock::PerfCounterIPCControlBlock(PerfCounterWow64IPCControlBlock& copyFrom)
-: m_cBytes (copyFrom.m_cBytes),
- m_wAttrs (copyFrom.m_wAttrs),
- m_GC (copyFrom.m_GC),
- m_Context (copyFrom.m_Context),
- m_Interop (copyFrom.m_Interop),
- m_Loading (copyFrom.m_Loading),
- m_Excep (copyFrom.m_Excep),
- m_LocksAndThreads (copyFrom.m_LocksAndThreads),
- m_Jit (copyFrom.m_Jit),
- m_Security (copyFrom.m_Security)
-{
- _ASSERTE((size_t)m_cBytes == sizeof(PerfCounterWow64IPCControlBlock));
-}
-
-#endif // _PerfCounterDefs_inl_
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//-----------------------------------------------------------------------------
-// PerfCounters.h
-//
-// Internal Interface for CLR to use Performance counters
-//-----------------------------------------------------------------------------
-
-
-#ifndef _PerfCounters_h_
-#define _PerfCounters_h_
-
-#include "perfcounterdefs.h"
-
-#ifdef ENABLE_PERF_COUNTERS
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// This code section active iff we're using Perf Counters
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// PerfCounter class serves as namespace with data protection.
-// Enforce this by making constructor private
-//-----------------------------------------------------------------------------
-class PerfCounters
-{
-private:
- PerfCounters();
-
-public:
- static HRESULT Init();
- static void Terminate();
-
- static PerfCounterIPCControlBlock * GetPrivatePerfCounterPtr();
-
-private:
- static HANDLE m_hPrivateMapPerf;
-
- static PerfCounterIPCControlBlock * m_pPrivatePerf;
-
- static BOOL m_fInit;
-
-// Set pointers to garbage so they're never null.
- static PerfCounterIPCControlBlock m_garbage;
-
- friend PerfCounterIPCControlBlock & GetPerfCounters();
-};
-
-//-----------------------------------------------------------------------------
-// Utility functions
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Get the perf counters specific to our process
-//-----------------------------------------------------------------------------
-inline PerfCounterIPCControlBlock & GetPerfCounters()
-{
- LIMITED_METHOD_CONTRACT;
-
- return *PerfCounters::m_pPrivatePerf;
-}
-
-inline PerfCounterIPCControlBlock *PerfCounters::GetPrivatePerfCounterPtr()
-{
- LIMITED_METHOD_CONTRACT;
-
- return m_pPrivatePerf;
-};
-
-#define COUNTER_ONLY(x) x
-
-#define PERF_COUNTER_NUM_OF_ITERATIONS 10
-
-#if defined(_X86_) && defined(_MSC_VER)
-
-inline UINT64 GetCycleCount_UINT64()
-{
- LIMITED_METHOD_CONTRACT;
- return __rdtsc();
-}
-
-#else // defined(_X86_) && defined(_MSC_VER)
-inline UINT64 GetCycleCount_UINT64()
-{
- LIMITED_METHOD_CONTRACT;
-
- LARGE_INTEGER qwTmp;
- QueryPerformanceCounter(&qwTmp);
- return qwTmp.QuadPart;
-}
-#endif // defined(_X86_) && defined(_MSC_VER)
-
-#define PERF_COUNTER_TIMER_PRECISION UINT64
-#define GET_CYCLE_COUNT GetCycleCount_UINT64
-
-#define PERF_COUNTER_TIMER_START() \
-PERF_COUNTER_TIMER_PRECISION _startPerfCounterTimer = GET_CYCLE_COUNT();
-
-#define PERF_COUNTER_TIMER_STOP(global) \
-global = (GET_CYCLE_COUNT() - _startPerfCounterTimer);
-
-
-
-
-#else // ENABLE_PERF_COUNTERS
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// This code section active iff we're NOT using Perf Counters
-// Note, not even a class definition, so all usages of PerfCounters in client
-// should be in #ifdef or COUNTER_ONLY().
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#define COUNTER_ONLY(x)
-
-
-#endif // ENABLE_PERF_COUNTERS
-
-
-#endif // _PerfCounters_h_
#endif
#include "typehandle.h"
-#include "perfcounters.h"
#include "methodtable.h"
#include "typectxt.h"
#include "stdafx.h" // Precompiled header key.
#include "loaderheap.h"
-#include "perfcounters.h"
#include "ex.h"
#include "pedecoder.h"
#define DONOT_DEFINE_ETW_CALLBACK
#include "siginfo.hpp"
#include "gcheaputilities.h"
#include "eedbginterfaceimpl.h" //so we can clearexception in COMPlusThrow
-#include "perfcounters.h"
#include "asmconstants.h"
#include "exceptionhandling.h"
#include "eeconfig.h"
#include "gcheaputilities.h"
#include "eventtrace.h"
-#include "perfcounters.h"
#include "assemblyname.hpp"
#include "eeprofinterfaces.h"
#include "dbginterface.h"
SetStage(STAGE_READYFORMANAGEDCODE);
#ifndef CROSSGEN_COMPILE
- COUNTER_ONLY(GetPerfCounters().m_Loading.cAppDomains++);
#ifdef FEATURE_TIERED_COMPILATION
m_tieredCompilationManager.Init(GetId());
#include "assembly.hpp"
#include "appdomain.hpp"
-#include "perfcounters.h"
#include "assemblyname.hpp"
m_pClassLoader = new ClassLoader(this);
m_pClassLoader->Init(pamTracker);
- COUNTER_ONLY(GetPerfCounters().m_Loading.cAssemblies++);
-
#ifndef CROSSGEN_COMPILE
if (GetManifestFile()->IsDynamic())
// manifest modules of dynamic assemblies are always transient
m_pClassLoader = NULL;
}
- COUNTER_ONLY(GetPerfCounters().m_Loading.cAssemblies--);
-
#ifdef PROFILING_SUPPORTED
if (CORProfilerTrackAssemblyLoads())
{
#include "dbginterface.h"
#include "dllimport.h"
#include "eeprofinterfaces.h"
-#include "perfcounters.h"
#include "encee.h"
#include "jitinterface.h"
#include "eeconfig.h"
// If we have any work to do...
if (cFunctions > 0 || cFields > 0)
{
- COUNTER_ONLY(size_t _HeapSize = 0);
-
TypeKey typeKey(this, COR_GLOBAL_PARENT_TOKEN);
TypeHandle typeHnd = GetClassLoader()->LoadTypeHandleForTypeKeyNoLock(&typeKey);
-
-#ifdef ENABLE_PERF_COUNTERS
-
- _HeapSize = GetLoaderAllocator()->GetHighFrequencyHeap()->GetSize();
-
- GetPerfCounters().m_Loading.cbLoaderHeapSize = _HeapSize;
-#endif // ENABLE_PERF_COUNTERS
-
}
}
size_t * pPrivatePCLBytes = NULL;
size_t * pGlobalPCLBytes = NULL;
- COUNTER_ONLY(pPrivatePCLBytes = &(GetPerfCounters().m_Loading.cbLoaderHeapSize));
-
LoaderHeap *pNewHeap = new LoaderHeap(VIRTUAL_ALLOC_RESERVE_GRANULARITY, // DWORD dwReserveBlockSize
0, // DWORD dwCommitBlockSize
pPrivatePCLBytes,
#include "cordbpriv.h"
#include "comdelegate.h"
#include "appdomain.hpp"
-#include "perfcounters.h"
#include "eventtrace.h"
#include "corhost.h"
#include "binder.h"
}
#endif // FEATURE_PREJIT
-#ifdef ENABLE_PERF_COUNTERS
- hr = PerfCounters::Init();
- _ASSERTE(SUCCEEDED(hr));
- IfFailGo(hr);
-#endif
-
#ifdef FEATURE_INTERPRETER
Interpreter::Initialize();
#endif // FEATURE_INTERPRETER
}
#endif /* SHOULD_WE_CLEANUP */
-#ifdef ENABLE_PERF_COUNTERS
- // Terminate Perf Counters as late as we can (to get the most data)
- PerfCounters::Terminate();
-#endif // ENABLE_PERF_COUNTERS
-
//@TODO: find the right place for this
VirtualCallStubManager::UninitStatic();
#include "slist.h"
#include "spinlock.h"
#include "typehandle.h"
-#include "perfcounters.h"
#include "methodtable.h"
#include "eeconfig.h"
#include "typectxt.h"
#include "slist.h"
#include "spinlock.h"
#include "typehandle.h"
-#include "perfcounters.h"
#include "methodtable.h"
#include "eeconfig.h"
#include "typectxt.h"
}
CONTRACTL_END;
- COUNTER_ONLY(GetPerfCounters().m_Loading.cLoadFailures++);
-
MethodTable *pMT = MscorlibBinder::GetException(kTypeLoadException);
struct _gc {
MODE_COOPERATIVE;
}
CONTRACTL_END;
-
- COUNTER_ONLY(GetPerfCounters().m_Loading.cLoadFailures++);
// Fetch any log info from the fusion log
SString logText;
#include "jitinterface.h"
#include "vars.hpp"
#include "assembly.hpp"
-#include "perfcounters.h"
#include "eeprofinterfaces.h"
#include "eehash.h"
#include "typehash.h"
#endif
#ifndef DACCESS_COMPILE
- COUNTER_ONLY(GetPerfCounters().m_Loading.cLoadFailures++);
-
m_pAssembly->ThrowTypeLoadException(pName, IDS_CLASSLOAD_GENERAL);
#else
DacNotImpl();
typeHnd.NotifyDebuggerLoad(NULL, FALSE);
}
#endif // DEBUGGING_SUPPORTED
-
-#if defined(ENABLE_PERF_COUNTERS)
- GetPerfCounters().m_Loading.cClassesLoaded ++;
-#endif
}
}
#include "eeconfig.h"
#include "interoputil.h"
#include "dispex.h"
-#include "perfcounters.h"
#include "guidfromname.h"
#include "comconnectionpoints.h"
#include <objsafe.h> // IID_IObjctSafe
}
CONTRACTL_END;
- COUNTER_ONLY(GetPerfCounters().m_Interop.cCCW++);
-
LONG i = FastInterlockIncrement(&m_cbRef);
LOG((LF_INTEROP, LL_INFO100, "ComCallWrapperCache::Addref %8.8x with %d in loader allocator [%d] %8.8x\n",
this, i, GetLoaderAllocator()?GetLoaderAllocator()->GetCreationNumber() : 0, GetLoaderAllocator()));
MODE_ANY;
}
CONTRACTL_END;
-
- COUNTER_ONLY(GetPerfCounters().m_Interop.cCCW--);
LONG i = FastInterlockDecrement(&m_cbRef);
_ASSERTE(i >= 0);
#endif
#include "typehandle.h"
-#include "perfcounters.h"
#include "methodtable.h"
#include "typectxt.h"
ENTRY_POINT;
}
CONTRACTL_END;
-
- HRESULT hr = S_OK;
- BEGIN_ENTRYPOINT_NOTHROW;
-
- #if defined(ENABLE_PERF_COUNTERS)
-
- Perf_GC *pgc = &GetPerfCounters().m_GC;
-
- if (!pStats)
- IfFailGo(E_INVALIDARG);
-
- if (pStats->Flags & COR_GC_COUNTS)
- {
- pStats->ExplicitGCCount = pgc->cInducedGCs;
-
- for (int idx=0; idx<3; idx++)
- pStats->GenCollectionsTaken[idx] = pgc->cGenCollections[idx];
- }
-
- if (pStats->Flags & COR_GC_MEMORYUSAGE)
- {
- pStats->CommittedKBytes = SizeInKBytes(pgc->cTotalCommittedBytes);
- pStats->ReservedKBytes = SizeInKBytes(pgc->cTotalReservedBytes);
- pStats->Gen0HeapSizeKBytes = SizeInKBytes(pgc->cGenHeapSize[0]);
- pStats->Gen1HeapSizeKBytes = SizeInKBytes(pgc->cGenHeapSize[1]);
- pStats->Gen2HeapSizeKBytes = SizeInKBytes(pgc->cGenHeapSize[2]);
- pStats->LargeObjectHeapSizeKBytes = SizeInKBytes(pgc->cLrgObjSize);
- pStats->KBytesPromotedFromGen0 = SizeInKBytes(pgc->cbPromotedMem[0]);
- pStats->KBytesPromotedFromGen1 = SizeInKBytes(pgc->cbPromotedMem[1]);
- }
- hr = S_OK;
-ErrExit:
- #else
- hr = E_NOTIMPL;
- #endif // ENABLE_PERF_COUNTERS
-
- END_ENTRYPOINT_NOTHROW;
- return hr;
+
+ return E_NOTIMPL;
}
virtual HRESULT STDMETHODCALLTYPE SetGCStartupLimits(
DWORD SegmentSize,
#include "siginfo.hpp"
#include "gcheaputilities.h"
#include "eedbginterfaceimpl.h" //so we can clearexception in RealCOMPlusThrow
-#include "perfcounters.h"
#include "dllimportcallback.h"
#include "stackwalk.h" //for CrawlFrame, in SetIPFromSrcToDst
#include "shimload.h"
++m_dFrameCount;
bRetVal = TRUE;
- COUNTER_ONLY(GetPerfCounters().m_Excep.cThrowToCatchStackDepth++);
}
#ifndef FEATURE_PAL // Watson is supported on Windows only
#include "asmconstants.h"
#include "eetoprofinterfacewrapper.inl"
#include "eedbginterfaceimpl.inl"
-#include "perfcounters.h"
#include "eventtrace.h"
#include "virtualcallstub.h"
#include "utilcode.h"
static inline void UpdatePerformanceMetrics(CrawlFrame *pcfThisFrame, BOOL bIsRethrownException, BOOL bIsNewException)
{
WRAPPER_NO_CONTRACT;
- COUNTER_ONLY(GetPerfCounters().m_Excep.cThrown++);
// Fire an exception thrown ETW event when an exception occurs
ETW::ExceptionLog::ExceptionThrown(pcfThisFrame, bIsRethrownException, bIsNewException);
EEToDebuggerExceptionInterfaceWrapper::ExceptionFilter(pMD, (TADDR) dwHandlerStartPC, pEHClause->FilterOffset, (BYTE*)sf.SP);
EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFilterEnter(pMD);
-
- COUNTER_ONLY(GetPerfCounters().m_Excep.cFiltersExecuted++);
}
else
{
{
m_EHClauseInfo.SetEHClauseType(COR_PRF_CLAUSE_FINALLY);
EEToProfilerExceptionInterfaceWrapper::ExceptionUnwindFinallyEnter(pMD);
- COUNTER_ONLY(GetPerfCounters().m_Excep.cFinallysExecuted++);
}
else
{
#include "method.hpp"
#include "field.h"
#include "eeconfig.h"
-#include "perfcounters.h"
#include "crst.h"
#include "generics.h"
#include "genericdict.h"
#include "siginfo.hpp"
#include "gcheaputilities.h"
#include "eedbginterfaceimpl.h" //so we can clearexception in COMPlusThrow
-#include "perfcounters.h"
#include "eventtrace.h"
#include "eetoprofinterfacewrapper.inl"
#include "eedbginterfaceimpl.inl"
-static inline void
-CPFH_UpdatePerformanceCounters() {
- WRAPPER_NO_CONTRACT;
- COUNTER_ONLY(GetPerfCounters().m_Excep.cThrown++);
-}
-
-
//******************************************************************************
EXCEPTION_DISPOSITION COMPlusAfterUnwind(
EXCEPTION_RECORD *pExceptionRecord,
EEToProfilerExceptionInterfaceWrapper::ExceptionThrown(pThread);
- CPFH_UpdatePerformanceCounters();
} // End of case-1-or-3
{
if (fGiveDebuggerAndProfilerNotification)
EEToProfilerExceptionInterfaceWrapper::ExceptionSearchFilterEnter(pFunc);
- COUNTER_ONLY(GetPerfCounters().m_Excep.cFiltersExecuted++);
-
STRESS_LOG3(LF_EH, LL_INFO10, "COMPlusThrowCallback: calling filter code, EHClausePtr:%08x, Start:%08x, End:%08x\n",
&EHClause, EHClause.HandlerStartPC, EHClause.HandlerEndPC);
if (IsFaultOrFinally(&EHClause))
{
- COUNTER_ONLY(GetPerfCounters().m_Excep.cFinallysExecuted++);
-
if (fGiveDebuggerAndProfilerNotification)
EEToDebuggerExceptionInterfaceWrapper::ExceptionHandle(pFunc, pMethodAddr, EHClause.HandlerStartPC, pHandlerEBP);
#include "process.h"
#endif // !FEATURE_PAL
-#include "perfcounters.h"
#ifdef PROFILING_SUPPORTED
#include "proftoeeinterfaceimpl.h"
#endif
#include "jitperf.h" // to track jit perf
#include "corprof.h"
#include "eeprofinterfaces.h"
-#include "perfcounters.h"
#ifdef PROFILING_SUPPORTED
#include "proftoeeinterfaceimpl.h"
#include "eetoprofinterfaceimpl.h"
/*********************************************************************/
-#if defined(ENABLE_PERF_COUNTERS)
-LARGE_INTEGER g_lastTimeInJitCompilation;
-#endif
-
-/*********************************************************************/
-
inline CORINFO_MODULE_HANDLE GetScopeHandle(MethodDesc* method)
{
LIMITED_METHOD_CONTRACT;
QueryPerformanceCounter (&methodJitTimeStart);
#endif
-#if defined(ENABLE_PERF_COUNTERS)
- START_JIT_PERF();
-#endif
-
-#if defined(ENABLE_PERF_COUNTERS)
- LARGE_INTEGER CycleStart;
- QueryPerformanceCounter (&CycleStart);
-#endif // defined(ENABLE_PERF_COUNTERS)
-
// Note on debuggerTrackInfo arg: if we're only importing (ie, verifying/
// checking to make sure we could JIT, but not actually generating code (
// eg, for inlining), then DON'T TELL THE DEBUGGER about this.
}
#endif
-#if defined(ENABLE_PERF_COUNTERS)
- LARGE_INTEGER CycleStop;
- QueryPerformanceCounter(&CycleStop);
- GetPerfCounters().m_Jit.timeInJitBase = GetPerfCounters().m_Jit.timeInJit;
- GetPerfCounters().m_Jit.timeInJit += static_cast<DWORD>(CycleStop.QuadPart - CycleStart.QuadPart);
- GetPerfCounters().m_Jit.cMethodsJitted++;
- GetPerfCounters().m_Jit.cbILJitted+=methodInfo.ILCodeSize;
-
-#endif // defined(ENABLE_PERF_COUNTERS)
-
-#if defined(ENABLE_PERF_COUNTERS)
- STOP_JIT_PERF();
-#endif
-
#ifdef PERF_TRACK_METHOD_JITTIMES
//store the time in the string buffer. Module name and token are unique enough. Also, do not
//capture importing time, just actual compilation time.
if (!SUCCEEDED(res))
{
- COUNTER_ONLY(GetPerfCounters().m_Jit.cJitFailures++);
-
#ifndef CROSSGEN_COMPILE
jitInfo.BackoutJitData(jitMgr);
#endif
size_t * pPrivatePCLBytes = NULL;
size_t * pGlobalPCLBytes = NULL;
- COUNTER_ONLY(pPrivatePCLBytes = &(GetPerfCounters().m_Loading.cbLoaderHeapSize));
-
LoaderHeap *pNewHeap = new LoaderHeap(VIRTUAL_ALLOC_RESERVE_GRANULARITY, // DWORD dwReserveBlockSize
0, // DWORD dwCommitBlockSize
pPrivatePCLBytes,
#include "threads.h"
#include "excep.h"
#include "stublink.h"
-#include "perfcounters.h"
#include "stubgen.h"
#include "stublink.inl"
}
CONTRACTL_END;
- COUNTER_ONLY(GetPerfCounters().m_Interop.cStubs--);
-
#ifdef STUBLINKER_GENERATES_UNWIND_INFO
if (HasUnwindInfo())
{
_ASSERTE(!nUnwindInfoSize || !pHeap || pHeap->m_fPermitStubsWithUnwindInfo);
#endif // STUBLINKER_GENERATES_UNWIND_INFO
- COUNTER_ONLY(GetPerfCounters().m_Interop.cStubs++);
-
S_SIZE_T size = S_SIZE_T(sizeof(Stub));
if (flags & NEWSTUB_FL_INTERCEPT)
#include "syncblk.h"
#include "interoputil.h"
#include "encee.h"
-#include "perfcounters.h"
#include "eventtrace.h"
#include "dllimportcallback.h"
#include "comcallablewrapper.h"
#endif
ret = WaitEventLinkForLink(pLink);
_ASSERTE(ret->m_WaitSB == psb);
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cQueueLength--);
}
return ret;
}
// it must be valid even if the lock is held. Be careful if you change the way the queue is updated.
SyncBlockCache::LockHolder lh(SyncBlockCache::GetSyncBlockCache());
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cQueueLength++);
-
SLink *pPrior = &psb->m_Link;
while (pPrior->m_pNext)
pLink->m_pNext = (SLink *)POISONC;
#endif
_ASSERTE(pWaitEventLink->m_WaitSB == psb);
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cQueueLength--);
res = TRUE;
break;
}
// the object associated with this lock.
_ASSERTE(pCurThread->PreemptiveGCDisabled());
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cContention++);
-
// Fire a contention start event for a managed contention
FireEtwContentionStart_V1(ETW::ContentionLog::ContentionStructs::ManagedContention, GetClrInstanceId());
#include "corprof.h" // profiling
#include "eeprofinterfaces.h"
#include "eeconfig.h"
-#include "perfcounters.h"
#include "corhost.h"
#include "win32threadpool.h"
#include "jitinterface.h"
_ASSERTE((((size_t) &m_State) & 3) == 0);
_ASSERTE((((size_t) &m_ThreadTasks) & 3) == 0);
- // Track perf counter for the logical thread object.
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cCurrentThreadsLogical++);
-
// On all callbacks, call the trap code, which we now have
// wired to cause a GC. Thus we will do a GC on all Transition Frame Transitions (and more).
if (GCStress<cfg_transition>::IsEnabled())
// log will not allocate memory at these critical times an avoid deadlock.
STRESS_LOG2(LF_ALWAYS, LL_ALWAYS, "SetupThread managed Thread %p Thread Id = %x\n", this, GetThreadId());
- if ((m_State & TS_WeOwn) == 0)
- {
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cRecognizedThreads++);
- }
- else
- {
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cCurrentThreadsPhysical++);
- }
-
#ifndef FEATURE_PAL
// workaround: Remove this when we flow impersonation token to host.
BOOL reverted = FALSE;
m_pFrame = (Frame *)POISONC;
#endif
- // Update Perfmon counters.
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cCurrentThreadsLogical--);
-
- // Current recognized threads are non-runtime threads that are alive and ran under the
- // runtime. Check whether this Thread was one of them.
- if ((m_State & TS_WeOwn) == 0)
- {
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cRecognizedThreads--);
- }
- else
- {
- COUNTER_ONLY(GetPerfCounters().m_LocksAndThreads.cCurrentThreadsPhysical--);
- }
-
// Normally we shouldn't get here with a valid thread handle; however if SetupThread
// failed (due to an OOM for example) then we need to CloseHandle the thread
// handle if we own it.
NewHolder<LoaderHeap> indcell_heap_holder(
new LoaderHeap(indcell_heap_reserve_size, indcell_heap_commit_size,
initReservedMem, indcell_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
- NULL,
-#endif
- NULL, FALSE));
+ NULL, NULL, FALSE));
initReservedMem += indcell_heap_reserve_size;
NewHolder<LoaderHeap> cache_entry_heap_holder(
new LoaderHeap(cache_entry_heap_reserve_size, cache_entry_heap_commit_size,
initReservedMem, cache_entry_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
NULL,
-#endif
&cache_entry_rangeList, FALSE));
initReservedMem += cache_entry_heap_reserve_size;
NewHolder<LoaderHeap> lookup_heap_holder(
new LoaderHeap(lookup_heap_reserve_size, lookup_heap_commit_size,
initReservedMem, lookup_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
NULL,
-#endif
&lookup_rangeList, TRUE));
initReservedMem += lookup_heap_reserve_size;
NewHolder<LoaderHeap> dispatch_heap_holder(
new LoaderHeap(dispatch_heap_reserve_size, dispatch_heap_commit_size,
initReservedMem, dispatch_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
NULL,
-#endif
&dispatch_rangeList, TRUE));
initReservedMem += dispatch_heap_reserve_size;
NewHolder<LoaderHeap> resolve_heap_holder(
new LoaderHeap(resolve_heap_reserve_size, resolve_heap_commit_size,
initReservedMem, resolve_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
NULL,
-#endif
&resolve_rangeList, TRUE));
initReservedMem += resolve_heap_reserve_size;
NewHolder<LoaderHeap> vtable_heap_holder(
new LoaderHeap(vtable_heap_reserve_size, vtable_heap_commit_size,
initReservedMem, vtable_heap_reserve_size,
-#ifdef ENABLE_PERF_COUNTERS
- &(GetPerfCounters().m_Loading.cbLoaderHeapSize),
-#else
NULL,
-#endif
&vtable_rangeList, TRUE));
initReservedMem += vtable_heap_reserve_size;