Move printf in PauseOnStart (#39095)
authorJohn Salem <josalem@microsoft.com>
Sat, 11 Jul 2020 01:14:32 +0000 (18:14 -0700)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 01:14:32 +0000 (01:14 +0000)
* Only print to the console from the runtime when PauseOnStart has waited long enough

* Fix typo

src/coreclr/src/vm/diagnosticserver.cpp

index 3cf9b57..a843cf3 100644 (file)
@@ -270,13 +270,13 @@ void DiagnosticServer::PauseForDiagnosticsMonitor()
         if (dwDotnetDiagnosticsMonitorPauseOnStart != 0)
         {
             _ASSERTE(s_ResumeRuntimeStartupEvent != nullptr && s_ResumeRuntimeStartupEvent->IsValid());
-            wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress);
-            fflush(stdout);
             STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command.");
             const DWORD dwFiveSecondWait = s_ResumeRuntimeStartupEvent->Wait(5000, false);
             if (dwFiveSecondWait == WAIT_TIMEOUT)
             {
-                STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waitied 5 seconds.");
+                wprintf(W("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a server at '%s'.\n"), (LPWSTR)pDotnetDiagnosticsMonitorAddress);
+                fflush(stdout);
+                STRESS_LOG0(LF_DIAGNOSTICS_PORT, LL_ALWAYS, "The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command and has waited 5 seconds.");
                 const DWORD dwWait = s_ResumeRuntimeStartupEvent->Wait(INFINITE, false);
             }
         }