Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2017-05-16 17:35:21 +0300
committerJan Kotas <jkotas@microsoft.com>2017-05-16 18:35:42 +0300
commitc78fd42d4a2025bda10093e636833c178266d121 (patch)
treed48abb9abab78756ec0ae891768186916c4afb86 /src/System.Private.CoreLib/shared
parentc99a7ee88c1b746adf8601e87cc83d7073f57e8f (diff)
Merge pull request dotnet/coreclr#11639 from brianrob/fix_corefx
Fix EventSource Test Breaks in CoreFX Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src/System.Private.CoreLib/shared')
-rwxr-xr-x[-rw-r--r--]src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
index df3ea163c..3349c069c 100644..100755
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -1422,6 +1422,7 @@ namespace System.Diagnostics.Tracing
if (disposing)
{
#if FEATURE_MANAGED_ETW
+#if !FEATURE_PERFTRACING
// Send the manifest one more time to ensure circular buffers have a chance to get to this information
// even in scenarios with a high volume of ETW events.
if (m_eventSourceEnabled)
@@ -1434,6 +1435,7 @@ namespace System.Diagnostics.Tracing
{ } // If it fails, simply give up.
m_eventSourceEnabled = false;
}
+#endif
if (m_provider != null)
{
m_provider.Dispose();
@@ -2289,7 +2291,7 @@ namespace System.Diagnostics.Tracing
[SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")]
private unsafe void WriteEventString(EventLevel level, long keywords, string msgString)
{
-#if FEATURE_MANAGED_ETW
+#if FEATURE_MANAGED_ETW && !FEATURE_PERFTRACING
if (m_provider != null)
{
string eventName = "EventSourceMessage";
@@ -2325,7 +2327,7 @@ namespace System.Diagnostics.Tracing
data.Ptr = (ulong)msgStringPtr;
data.Size = (uint)(2 * (msgString.Length + 1));
data.Reserved = 0;
- m_provider.WriteEvent(ref descr, m_eventData[0].EventHandle, null, null, 1, (IntPtr)((void*)&data));
+ m_provider.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data));
}
}
}
@@ -2773,11 +2775,13 @@ namespace System.Diagnostics.Tracing
{
// eventSourceDispatcher == null means this is the ETW manifest
+#if !FEATURE_PERFTRACING
// Note that we unconditionally send the manifest whenever we are enabled, even if
// we were already enabled. This is because there may be multiple sessions active
// and we can't know that all the sessions have seen the manifest.
if (!SelfDescribingEvents)
SendManifest(m_rawManifest);
+#endif
}
#if FEATURE_ACTIVITYSAMPLING
@@ -2901,12 +2905,14 @@ namespace System.Diagnostics.Tracing
}
else
{
+#if !FEATURE_PERFTRACING
if (commandArgs.Command == EventCommand.SendManifest)
{
// TODO: should we generate the manifest here if we hadn't already?
if (m_rawManifest != null)
SendManifest(m_rawManifest);
}
+#endif
// These are not used for non-update commands and thus should always be 'default' values
// Debug.Assert(enable == true);
@@ -3126,6 +3132,7 @@ namespace System.Diagnostics.Tracing
{
// GetMetadata failed, so we have to set it via reflection.
Debug.Assert(m_rawManifest == null);
+
m_rawManifest = CreateManifestAndDescriptors(this.GetType(), Name, this);
Debug.Assert(m_eventData != null);
@@ -3162,7 +3169,7 @@ namespace System.Diagnostics.Tracing
#if FEATURE_PERFTRACING
// Initialize the EventPipe event handles.
DefineEventPipeEvents();
-#endif
+#endif
}
if (s_currentPid == 0)
{
@@ -3695,11 +3702,7 @@ namespace System.Diagnostics.Tracing
throw new ArgumentException(msg, exception);
}
-#if FEATURE_PERFTRACING
- return null;
-#else
return bNeedsManifest ? res : null;
-#endif
}
private static bool RemoveFirstArgIfRelatedActivityId(ref ParameterInfo[] args)