Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -294,6 +294,10 @@ namespace System.Diagnostics.Tracing
public System.Diagnostics.Tracing.EventTags Tags { get { throw null; } }
public System.Diagnostics.Tracing.EventTask Task { get { throw null; } }
public byte Version { get { throw null; } }
#if FEATURE_EVENTLISTENERCONTEXT
public long OSThreadId { get { throw null; } }
public DateTime TimeStamp { get { throw null; } }
#endif
}
[System.AttributeUsageAttribute((System.AttributeTargets)(64))]
public sealed partial class NonEventAttribute : System.Attribute

View File

@@ -5,7 +5,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectGuid>{0D8C8BAE-E5A5-4E9F-B101-3D18BD81D261}</ProjectGuid>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'netfx'">true</IsPartialFacadeAssembly>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_ETLEVENTS</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_ETLEVENTS;FEATURE_EVENTLISTENERCONTEXT</DefineConstants>
<!-- CS0067: unused event, reference assembly does not care -->
<NoWarn>$(NoWarn);0067</NoWarn>
</PropertyGroup>

View File

@@ -1 +1 @@
d149194d014719351966086d13bc2f8dcd7b84a7
8ebec77f071d8bf7825b81c605540623bc1ce9c9

View File

@@ -36,7 +36,8 @@ namespace BasicEventSourceTests
eventSource.Name != "System.Buffers.ArrayPoolEventSource" &&
eventSource.Name != "System.Threading.SynchronizationEventSource" &&
eventSource.Name != "System.Runtime.InteropServices.InteropEventProvider" &&
eventSource.Name != "System.Reflection.Runtime.Tracing"
eventSource.Name != "System.Reflection.Runtime.Tracing" &&
eventSource.Name != "Microsoft-Windows-DotNETRuntime"
)
{
eventSourceNames += eventSource.Name + " ";

View File

@@ -50,6 +50,10 @@ namespace BasicEventSourceTests
using (var es = new LifetimeTestEventSource())
{
FieldInfo field = es.GetType().GetTypeInfo().BaseType.GetField("m_provider", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
if(field == null)
{
field = es.GetType().GetTypeInfo().BaseType.GetField("m_etwProvider", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
}
object provider = field.GetValue(es);
wrProvider.Target = provider;
wrEventSource.Target = es;

View File

@@ -70,7 +70,7 @@ namespace BasicEventSourceTests
/// <summary>
/// Test the
/// </summary>
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29754
[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")]
public void Test_BadEventSource_MismatchedIds()
{

View File

@@ -36,6 +36,8 @@ namespace BasicEventSourceTests
// Specifies whether the process is elevated or not.
private static readonly Lazy<bool> s_isElevated = new Lazy<bool>(() => AdminHelpers.IsProcessElevated());
private static bool IsProcessElevated => s_isElevated.Value;
private static bool IsProcessElevatedAndNotWindowsNanoServer =>
IsProcessElevated && PlatformDetection.IsNotWindowsNanoServer; // ActiveIssue: https://github.com/dotnet/corefx/issues/29754
#endif // USE_ETW
[EventData]
@@ -74,7 +76,7 @@ namespace BasicEventSourceTests
/// Tests the EventSource.Write[T] method (can only use the self-describing mechanism).
/// Tests the ETW code path
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_Write_T_ETW()
{
using (var listener = new EtwListener())

View File

@@ -28,12 +28,14 @@ namespace BasicEventSourceTests
// Specifies whether the process is elevated or not.
private static readonly Lazy<bool> s_isElevated = new Lazy<bool>(() => AdminHelpers.IsProcessElevated());
private static bool IsProcessElevated => s_isElevated.Value;
private static bool IsProcessElevatedAndNotWindowsNanoServer =>
IsProcessElevated && PlatformDetection.IsNotWindowsNanoServer; // ActiveIssue: https://github.com/dotnet/corefx/issues/29754
/// <summary>
/// Tests WriteEvent using the manifest based mechanism.
/// Tests the ETW path.
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_WriteEvent_Manifest_ETW()
{
using (var listener = new EtwListener())
@@ -71,7 +73,7 @@ namespace BasicEventSourceTests
/// Tests WriteEvent using the self-describing mechanism.
/// Tests both the ETW and TraceListener paths.
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_WriteEvent_SelfDescribing_ETW()
{
using (var listener = new EtwListener())
@@ -450,7 +452,7 @@ namespace BasicEventSourceTests
/// Tests sending complex data (class, arrays etc) from WriteEvent
/// Tests the EventListener case
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_WriteEvent_ComplexData_SelfDescribing_ETW()
{
using (var listener = new EtwListener())
@@ -540,7 +542,7 @@ namespace BasicEventSourceTests
/// Uses Manifest format
/// Tests the EventListener case
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_WriteEvent_ByteArray_Manifest_ETW()
{
using (var listener = new EtwListener())
@@ -570,7 +572,7 @@ namespace BasicEventSourceTests
/// Uses Self-Describing format
/// Tests the EventListener case
/// </summary>
[ConditionalFact(nameof(IsProcessElevated))]
[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]
public void Test_WriteEvent_ByteArray_SelfDescribing_ETW()
{
using (var listener = new EtwListener())