Undo a change where we ignore the specified EventPipe sessionType.
authorJosé Rivero <jorive@microsoft.com>
Fri, 26 Apr 2019 00:37:59 +0000 (17:37 -0700)
committerAndrew Au <cshung@gmail.com>
Fri, 26 Apr 2019 19:55:09 +0000 (12:55 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/c3e404425f9f03088f0e7106914190634baef619

src/coreclr/src/vm/eventpipe.cpp

index 361fe83..0490756 100644 (file)
@@ -250,9 +250,9 @@ EventPipeSessionID EventPipe::Enable(
         [&](EventPipeProviderCallbackDataQueue* pEventPipeProviderCallbackDataQueue)
         {
             // Create a new session.
-            SampleProfiler::SetSamplingRate((unsigned long)profilerSamplingRateInNanoseconds);
+            SampleProfiler::SetSamplingRate(static_cast<unsigned long>(profilerSamplingRateInNanoseconds));
             EventPipeSession *pSession = s_pConfig->CreateSession(
-                (strOutputPath != NULL) ? EventPipeSessionType::File : EventPipeSessionType::Streaming,
+                sessionType,
                 circularBufferSizeInMB,
                 pProviders,
                 numProviders);
@@ -591,7 +591,7 @@ EventPipeProvider *EventPipe::CreateProvider(const SString &providerName, EventP
         PRECONDITION(!GetLock()->OwnedByCurrentThread());
     }
     CONTRACTL_END;
-    
+
     EventPipeProvider *pProvider = NULL;
     EventPipe::RunWithCallbackPostponed(
         [&](EventPipeProviderCallbackDataQueue* pEventPipeProviderCallbackDataQueue)
@@ -613,7 +613,7 @@ EventPipeProvider *EventPipe::CreateProvider(const SString &providerName, EventP
         PRECONDITION(GetLock()->OwnedByCurrentThread());
     }
     CONTRACTL_END;
-    
+
     EventPipeProvider *pProvider = NULL;
     if (s_pConfig != NULL)
     {