summaryrefslogtreecommitdiff
path: root/src/gc
diff options
context:
space:
mode:
authorSung Yoon Whang <suwhang@microsoft.com>2019-02-21 14:19:27 -0800
committerGitHub <noreply@github.com>2019-02-21 14:19:27 -0800
commit2dfd1779ae9eebe89b223cff6fd77825301971dd (patch)
treecc1694ef83deb63b2f178d3f4b195d2bb679d1e0 /src/gc
parenta006c44d06d56829a230bbbce17b74b21a0b8842 (diff)
downloadcoreclr-2dfd1779ae9eebe89b223cff6fd77825301971dd.tar.gz
coreclr-2dfd1779ae9eebe89b223cff6fd77825301971dd.tar.bz2
coreclr-2dfd1779ae9eebe89b223cff6fd77825301971dd.zip
Remove unused perfcounter code (#22742)
* removing references to COUNTER_ONLY, ENABLE_PERF_COUNTERS in src/vm directory * removing perfcounters* files * Fix build * Remove PerfCounterSupportedBuild * Some more cleanup on the GC side
Diffstat (limited to 'src/gc')
-rw-r--r--src/gc/env/gcenv.base.h2
-rw-r--r--src/gc/gcee.cpp6
-rw-r--r--src/gc/handletable.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h
index d982cae4fe..351f4f300a 100644
--- a/src/gc/env/gcenv.base.h
+++ b/src/gc/env/gcenv.base.h
@@ -498,8 +498,6 @@ inline bool dbgOnly_IsSpecialEEThread()
// Performance logging
//
-#define COUNTER_ONLY(x)
-
//#include "etmdummy.h"
//#define ETW_EVENT_ENABLED(e,f) false
diff --git a/src/gc/gcee.cpp b/src/gc/gcee.cpp
index 52c4fb6afb..8706ae7654 100644
--- a/src/gc/gcee.cpp
+++ b/src/gc/gcee.cpp
@@ -12,8 +12,10 @@
#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];
diff --git a/src/gc/handletable.cpp b/src/gc/handletable.cpp
index 2232c455f5..2480a5618d 100644
--- a/src/gc/handletable.cpp
+++ b/src/gc/handletable.cpp
@@ -184,8 +184,10 @@ void HndDestroyHandleTable(HHANDLETABLE hTable)
// 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.