summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSung Yoon Whang <suwhang@microsoft.com>2019-10-14 18:29:38 -0700
committerGitHub <noreply@github.com>2019-10-14 18:29:38 -0700
commitc2bb3060555522bfb670ec2012578e8c77eae4da (patch)
treeefbd4b05884b9b7d7c31209fa01bfa6bb9680de2 /src
parent1a4112735fc9325fcbc816c4f3515290329d9e7c (diff)
downloadcoreclr-c2bb3060555522bfb670ec2012578e8c77eae4da.tar.gz
coreclr-c2bb3060555522bfb670ec2012578e8c77eae4da.tar.bz2
coreclr-c2bb3060555522bfb670ec2012578e8c77eae4da.zip
Do not create diagnostics server thread and pipe if EnableDiagnostics is set to 0 (#27137) (#27140)
* Do not create diagnostics server thread and pipe if EnableDiagnostics is set to 0 * Remove unnecessary check for config var in DiagnosticServer::Shutdown
Diffstat (limited to 'src')
-rw-r--r--src/inc/clrconfigvalues.h2
-rw-r--r--src/vm/diagnosticserver.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h
index c034f4f689..51723da6e2 100644
--- a/src/inc/clrconfigvalues.h
+++ b/src/inc/clrconfigvalues.h
@@ -159,7 +159,7 @@ CONFIG_DWORD_INFO_EX(INTERNAL_BreakOnUncaughtException, W("BreakOnUncaughtExcept
/// Debugger
///
-RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_EnableDiagnostics, W("EnableDiagnostics"), 1, "Allows the debugger and profiler diagnostics to be disabled", CLRConfig::REGUTIL_default)
+RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_EnableDiagnostics, W("EnableDiagnostics"), 1, "Allows the debugger, profiler, and EventPipe diagnostics to be disabled", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_D__FCE, W("D::FCE"), 0, "Allows an assert when crawling the managed stack for an exception handler", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_DbgBreakIfLocksUnavailable, W("DbgBreakIfLocksUnavailable"), 0, "Allows an assert when the debugger can't take a lock ", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_DbgBreakOnErr, W("DbgBreakOnErr"), 0, "Allows an assert when we get a failing hresult", CLRConfig::REGUTIL_default)
diff --git a/src/vm/diagnosticserver.cpp b/src/vm/diagnosticserver.cpp
index 9a1dce5336..925ad09624 100644
--- a/src/vm/diagnosticserver.cpp
+++ b/src/vm/diagnosticserver.cpp
@@ -116,6 +116,12 @@ bool DiagnosticServer::Initialize()
}
CONTRACTL_END;
+ // COMPlus_EnableDiagnostics==0 disables diagnostics so we don't create the diagnostics pipe/socket or diagnostics server thread
+ if (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_EnableDiagnostics) == 0)
+ {
+ return true;
+ }
+
bool fSuccess = false;
EX_TRY