diff options
author | Maoni Stephens <Maoni0@users.noreply.github.com> | 2016-07-01 10:49:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 10:49:06 -0700 |
commit | fc8689e2486d09cd17f40538ac06ce5aafd2d87d (patch) | |
tree | 6d080983ee733b0030c4adaf881c5bcd97d12e94 /src/vm | |
parent | 01d4bb6e1898ffb4d52084fe2c81347cedac27a0 (diff) | |
parent | fa2ff58d3198122cbbc216e0fd664d9e09120669 (diff) | |
download | coreclr-fc8689e2486d09cd17f40538ac06ce5aafd2d87d.tar.gz coreclr-fc8689e2486d09cd17f40538ac06ce5aafd2d87d.tar.bz2 coreclr-fc8689e2486d09cd17f40538ac06ce5aafd2d87d.zip |
Merge pull request #6084 from Maoni0/gc_etw
GC ETW fixes
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/syncblk.cpp | 6 | ||||
-rw-r--r-- | src/vm/syncblk.h | 5 | ||||
-rw-r--r-- | src/vm/vars.cpp | 4 | ||||
-rw-r--r-- | src/vm/vars.hpp | 6 |
4 files changed, 15 insertions, 6 deletions
diff --git a/src/vm/syncblk.cpp b/src/vm/syncblk.cpp index 8fded72f30..3975542d98 100644 --- a/src/vm/syncblk.cpp +++ b/src/vm/syncblk.cpp @@ -1055,7 +1055,6 @@ SyncBlock *SyncBlockCache::GetNextFreeSyncBlock() SyncBlock *psb; SLink *plst = m_FreeBlockList; - COUNTER_ONLY(GetPerfCounters().m_GC.cSinkBlocks ++); m_ActiveCount++; if (plst) @@ -1311,8 +1310,6 @@ void SyncBlockCache::DeleteSyncBlockMemory(SyncBlock *psb) } CONTRACTL_END - COUNTER_ONLY(GetPerfCounters().m_GC.cSinkBlocks --); - m_ActiveCount--; m_FreeCount++; @@ -1337,9 +1334,6 @@ void SyncBlockCache::GCDeleteSyncBlock(SyncBlock *psb) // operator delete). delete psb; - COUNTER_ONLY(GetPerfCounters().m_GC.cSinkBlocks --); - - m_ActiveCount--; m_FreeCount++; diff --git a/src/vm/syncblk.h b/src/vm/syncblk.h index 82930dd636..6d32e3eafa 100644 --- a/src/vm/syncblk.h +++ b/src/vm/syncblk.h @@ -1028,6 +1028,11 @@ class SyncBlockCache return m_bSyncBlockCleanupInProgress; } + DWORD GetActiveCount() + { + return m_ActiveCount; + } + // Encapsulate a CrstHolder, so that clients of our lock don't have to know // the details of our implementation. class LockHolder : public CrstHolder diff --git a/src/vm/vars.cpp b/src/vm/vars.cpp index e4543bf3cf..b737e66cd5 100644 --- a/src/vm/vars.cpp +++ b/src/vm/vars.cpp @@ -110,6 +110,10 @@ GPTR_IMPL(Thread,g_pSuspensionThread); // Global SyncBlock cache GPTR_IMPL(SyncTableEntry,g_pSyncTable); +#if defined(ENABLE_PERF_COUNTERS) || defined(FEATURE_EVENT_TRACE) +DWORD g_dwHandles = 0; +#endif // ENABLE_PERF_COUNTERS || FEATURE_EVENT_TRACE + #ifdef STRESS_LOG GPTR_IMPL_INIT(StressLog, g_pStressLog, &StressLog::theLog); #endif diff --git a/src/vm/vars.hpp b/src/vm/vars.hpp index 576f0061db..d197e0559d 100644 --- a/src/vm/vars.hpp +++ b/src/vm/vars.hpp @@ -472,6 +472,12 @@ GPTR_DECL(Thread,g_pSuspensionThread); typedef DPTR(SyncTableEntry) PTR_SyncTableEntry; GPTR_DECL(SyncTableEntry, g_pSyncTable); +#if defined(ENABLE_PERF_COUNTERS) || defined(FEATURE_EVENT_TRACE) +// Note this is not updated in a thread safe way so the value may not be accurate. We get +// it accurately in full GCs if the handle count is requested. +extern DWORD g_dwHandles; +#endif // ENABLE_PERF_COUNTERS || FEATURE_EVENT_TRACE + #ifdef FEATURE_COMINTEROP // Global RCW cleanup list typedef DPTR(RCWCleanupList) PTR_RCWCleanupList; |