summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor "Nate" Graf <nategraf1@gmail.com>2017-12-21 11:48:14 -0800
committerGitHub <noreply@github.com>2017-12-21 11:48:14 -0800
commit302005ca8ae14eade37ddf4ac6e900617c1c166a (patch)
treedf32e188ca3c3c2bec14d61b477e54dd4b2fe0c8 /tests
parent0e4662c8911e3cf80eaaa446f280d7694ac09733 (diff)
downloadcoreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.tar.gz
coreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.tar.bz2
coreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.zip
Revert "Enable EventPipe across Unix and Windows (#14772)" (#15609)
This reverts commit 7524d72d4f0f634fe5407280b83c25181dc8c556.
Diffstat (limited to 'tests')
-rw-r--r--tests/runtest.proj3
-rw-r--r--tests/src/JIT/config/benchmark+roslyn/benchmark+roslyn.csproj3
-rw-r--r--tests/src/JIT/config/benchmark/benchmark.csproj3
-rw-r--r--tests/src/dirs.proj1
-rw-r--r--tests/src/performance/performance.csproj3
-rw-r--r--tests/src/tracing/common/common.csproj2
-rw-r--r--tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs2
-rw-r--r--tests/src/tracing/eventpipesmoke/eventpipesmoke.csproj2
-rw-r--r--tests/src/tracing/eventpipetrace/EventPipeTrace.cs110
-rw-r--r--tests/src/tracing/eventpipetrace/eventpipetrace.csproj30
-rw-r--r--tests/src/tracing/eventsourcesmoke/EventSourceSmoke.cs2
-rw-r--r--tests/src/tracing/eventsourcetrace/EventSourceTrace.cs131
-rw-r--r--tests/src/tracing/eventsourcetrace/eventsourcetrace.csproj30
13 files changed, 8 insertions, 314 deletions
diff --git a/tests/runtest.proj b/tests/runtest.proj
index 3ab7b9f708..9c12e275d7 100644
--- a/tests/runtest.proj
+++ b/tests/runtest.proj
@@ -12,6 +12,7 @@
<ItemGroup>
<DisabledTestDir Include="Common" />
+ <DisabledTestDir Include="tracing" />
<_SkipTestDir Include="@(DisabledTestDir)" />
</ItemGroup>
@@ -403,4 +404,4 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
<Target Name="Clean">
<RemoveDir Condition=" '$(BuildWrappers)'=='true'" Directories="$(XunitWrapperGeneratedCSDirBase);$(XunitWrapperOutputIntermediatedDirBase)" ContinueOnError="WarnAndContinue" />
</Target>
-</Project>
+</Project> \ No newline at end of file
diff --git a/tests/src/JIT/config/benchmark+roslyn/benchmark+roslyn.csproj b/tests/src/JIT/config/benchmark+roslyn/benchmark+roslyn.csproj
index 563a9a7087..77cba12414 100644
--- a/tests/src/JIT/config/benchmark+roslyn/benchmark+roslyn.csproj
+++ b/tests/src/JIT/config/benchmark+roslyn/benchmark+roslyn.csproj
@@ -67,9 +67,6 @@
<PackageReference Include="System.Threading">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
- <PackageReference Include="System.Threading.Thread">
- <Version>4.4.0-beta-24913-02</Version>
- </PackageReference>
<PackageReference Include="System.Threading.Tasks">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
diff --git a/tests/src/JIT/config/benchmark/benchmark.csproj b/tests/src/JIT/config/benchmark/benchmark.csproj
index 4d49fdee3e..5ade686330 100644
--- a/tests/src/JIT/config/benchmark/benchmark.csproj
+++ b/tests/src/JIT/config/benchmark/benchmark.csproj
@@ -76,9 +76,6 @@
<PackageReference Include="System.Threading">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
- <PackageReference Include="System.Threading.Thread">
- <Version>4.4.0-beta-24913-02</Version>
- </PackageReference>
<PackageReference Include="System.Threading.Tasks">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
diff --git a/tests/src/dirs.proj b/tests/src/dirs.proj
index 543935f752..471598d82d 100644
--- a/tests/src/dirs.proj
+++ b/tests/src/dirs.proj
@@ -30,7 +30,6 @@
<DisabledProjects Include="Performance\performance.csproj" />
<DisabledProjects Include="Loader\classloader\generics\regressions\DD117522\Test.csproj" />
<DisabledProjects Include="Loader\classloader\generics\GenericMethods\VSW491668.csproj" /> <!-- issue 5501 -->
- <DisabledProjects Include="tracing\eventsource*" />
</ItemGroup>
<ItemGroup>
diff --git a/tests/src/performance/performance.csproj b/tests/src/performance/performance.csproj
index 94caf35ac2..8c2cd3c7de 100644
--- a/tests/src/performance/performance.csproj
+++ b/tests/src/performance/performance.csproj
@@ -70,9 +70,6 @@
<PackageReference Include="System.Threading">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
- <PackageReference Include="System.Threading.Thread">
- <Version>4.4.0-beta-24913-02</Version>
- </PackageReference>
<PackageReference Include="System.Threading.Tasks">
<Version>4.4.0-beta-24913-02</Version>
</PackageReference>
diff --git a/tests/src/tracing/common/common.csproj b/tests/src/tracing/common/common.csproj
index ca10e7ffe2..ca34349b16 100644
--- a/tests/src/tracing/common/common.csproj
+++ b/tests/src/tracing/common/common.csproj
@@ -12,7 +12,7 @@
<CLRTestKind>BuildOnly</CLRTestKind>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CLRTestPriority>0</CLRTestPriority>
+ <CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
diff --git a/tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs b/tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs
index 2fa8786fd2..c12893d38a 100644
--- a/tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs
+++ b/tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs
@@ -1,5 +1,7 @@
using System;
+using System.Threading.Tasks;
using System.IO;
+
using Tracing.Tests.Common;
namespace Tracing.Tests
diff --git a/tests/src/tracing/eventpipesmoke/eventpipesmoke.csproj b/tests/src/tracing/eventpipesmoke/eventpipesmoke.csproj
index 4a1cd0c0ce..8ba6eb5c4a 100644
--- a/tests/src/tracing/eventpipesmoke/eventpipesmoke.csproj
+++ b/tests/src/tracing/eventpipesmoke/eventpipesmoke.csproj
@@ -12,7 +12,7 @@
<CLRTestKind>BuildAndRun</CLRTestKind>
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CLRTestPriority>0</CLRTestPriority>
+ <CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"></PropertyGroup>
diff --git a/tests/src/tracing/eventpipetrace/EventPipeTrace.cs b/tests/src/tracing/eventpipetrace/EventPipeTrace.cs
deleted file mode 100644
index af0c619ef9..0000000000
--- a/tests/src/tracing/eventpipetrace/EventPipeTrace.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System;
-using System.IO;
-using Tracing.Tests.Common;
-using Microsoft.Diagnostics.Tracing;
-using Microsoft.Diagnostics.Tracing.Parsers;
-using Microsoft.Diagnostics.Tracing.Parsers.Clr;
-
-namespace Tracing.Tests
-{
- class EventPipeTrace
- {
- private static int allocIterations = 10000;
- private static int gcIterations = 10;
-
- static void AssertEqual<T>(T left, T right) where T : IEquatable<T>
- {
- if (left.Equals(right) == false)
- {
- throw new Exception(string.Format("Values were not equal! {0} and {1}", left, right));
- }
- }
-
- static int Main(string[] args)
- {
- bool pass = true;
- bool keepOutput = false;
-
- // Use the first arg as an output filename if there is one
- string outputFilename = null;
- if (args.Length >= 1) {
- outputFilename = args[0];
- keepOutput = true;
- }
- else {
- outputFilename = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".netperf";
- }
-
- try
- {
- Console.WriteLine("\tStart: Enable tracing.");
- TraceControl.EnableDefault(outputFilename);
- Console.WriteLine("\tEnd: Enable tracing.\n");
-
- Console.WriteLine("\tStart: Generating CLR events");
- // Allocate for allocIterations iterations.
- for(int i=0; i<allocIterations; i++)
- {
- GC.KeepAlive(new object());
- }
- // GC gcIternation times
- for(int i=0; i<gcIterations; i++)
- {
- GC.Collect();
- }
- Console.WriteLine("\tEnd: Generating CLR Events\n");
-
- Console.WriteLine("\tStart: Disable tracing.");
- TraceControl.Disable();
- Console.WriteLine("\tEnd: Disable tracing.\n");
-
- Console.WriteLine("\tStart: Processing events from file.");
- int allocTickCount = 0;
- int gcTriggerCount = 0;
- using (var trace = TraceEventDispatcher.GetDispatcherFromFileName(outputFilename))
- {
- trace.Clr.GCAllocationTick += delegate(GCAllocationTickTraceData data)
- {
- allocTickCount += 1;
-
- // Some basic integrity checks
- // AssertEqual(data.TypeName, "System.Object"); https://github.com/Microsoft/perfview/issues/470
- AssertEqual(data.AllocationKind.ToString(), GCAllocationKind.Small.ToString());
- AssertEqual(data.ProviderName, "Microsoft-Windows-DotNETRuntime");
- AssertEqual(data.EventName, "GC/AllocationTick");
- };
- trace.Clr.GCTriggered += delegate(GCTriggeredTraceData data)
- {
- gcTriggerCount += 1;
-
- // Some basic integrity checks
- AssertEqual(data.Reason.ToString(), GCReason.Induced.ToString());
- AssertEqual(data.ProviderName, "Microsoft-Windows-DotNETRuntime");
- AssertEqual(data.EventName, "GC/Triggered");
- };
-
- trace.Process();
- }
- Console.WriteLine("\tEnd: Processing events from file.\n");
-
- Console.WriteLine("\tProcessed {0} GCAllocationTick events", allocTickCount);
- Console.WriteLine("\tProcessed {0} GCTriggered events", gcTriggerCount);
-
- pass &= allocTickCount > 0;
- pass &= gcTriggerCount == gcIterations;
- }
- finally {
- if (keepOutput)
- {
- Console.WriteLine("\n\tOutput file: {0}", outputFilename);
- }
- else
- {
- System.IO.File.Delete(outputFilename);
- }
- }
-
- return pass ? 100 : 0;
- }
- }
-}
diff --git a/tests/src/tracing/eventpipetrace/eventpipetrace.csproj b/tests/src/tracing/eventpipetrace/eventpipetrace.csproj
deleted file mode 100644
index ec7305abe9..0000000000
--- a/tests/src/tracing/eventpipetrace/eventpipetrace.csproj
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{8E3244CB-407F-4142-BAAB-E7A55901A5FA}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CLRTestPriority>0</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"></PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"></PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="EventPipeTrace.cs" />
- <ProjectReference Include="../common/common.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project> \ No newline at end of file
diff --git a/tests/src/tracing/eventsourcesmoke/EventSourceSmoke.cs b/tests/src/tracing/eventsourcesmoke/EventSourceSmoke.cs
index ddd5192e18..b7d321dde6 100644
--- a/tests/src/tracing/eventsourcesmoke/EventSourceSmoke.cs
+++ b/tests/src/tracing/eventsourcesmoke/EventSourceSmoke.cs
@@ -1,6 +1,8 @@
using System;
+using System.Threading.Tasks;
using System.IO;
using System.Diagnostics.Tracing;
+
using Tracing.Tests.Common;
namespace Tracing.Tests
diff --git a/tests/src/tracing/eventsourcetrace/EventSourceTrace.cs b/tests/src/tracing/eventsourcetrace/EventSourceTrace.cs
deleted file mode 100644
index 57a53183ed..0000000000
--- a/tests/src/tracing/eventsourcetrace/EventSourceTrace.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-using Tracing.Tests.Common;
-using System.Diagnostics.Tracing;
-using Microsoft.Diagnostics.Tracing;
-using Microsoft.Diagnostics.Tracing.Parsers;
-using Microsoft.Diagnostics.Tracing.Parsers.Clr;
-
-namespace Tracing.Tests
-{
- [EventSource(Name = "SimpleEventSource")]
- class SimpleEventSource : EventSource
- {
- public SimpleEventSource() : base(true) { }
-
- [Event(1)]
- internal void MathResult(int x, int y, int z, string formula) { this.WriteEvent(1, x, y, z, formula); }
- }
-
- class EventSourceTrace
- {
- private static int messageIterations = 10000;
-
- public static TraceConfiguration GetConfig(EventSource eventSource, string outputFile="default.netperf")
- {
- // Setup the configuration values.
- uint circularBufferMB = 1024; // 1 GB
- uint level = 5;//(uint)EventLevel.Informational;
- TimeSpan profSampleDelay = TimeSpan.FromMilliseconds(1);
-
- // Create a new instance of EventPipeConfiguration.
- TraceConfiguration config = new TraceConfiguration(outputFile, circularBufferMB);
- // Setup the provider values.
- // Public provider.
- string providerName = eventSource.Name;
- UInt64 keywords = 0xffffffffffffffff;
-
- // Enable the provider.
- config.EnableProvider(providerName, keywords, level);
-
- // Set the sampling rate.
- config.SetSamplingRate(profSampleDelay);
-
- return config;
- }
-
- static int Main(string[] args)
- {
- bool pass = true;
- bool keepOutput = false;
-
- // Use the first arg as an output filename if there is one
- string outputFilename = null;
- if (args.Length >= 1) {
- outputFilename = args[0];
- keepOutput = true;
- }
- else {
- outputFilename = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".netperf";
- }
-
- SimpleEventSource eventSource = new SimpleEventSource();
-
- try
- {
- Console.WriteLine("\tStart: Enable tracing.");
- TraceControl.Enable(GetConfig(eventSource, outputFilename));
- Console.WriteLine("\tEnd: Enable tracing.\n");
-
- Console.WriteLine("\tStart: Messaging.");
- // Send messages
- // Use random numbers and addition as a simple, human readble checksum
- Random generator = new Random();
- for(int i=0; i<messageIterations; i++)
- {
- int x = generator.Next(1,1000);
- int y = generator.Next(1,1000);
- string formula = String.Format("{0} + {1} = {2}", x, y, x+y);
-
- eventSource.MathResult(x, y, x+y, formula);
- }
- Console.WriteLine("\tEnd: Messaging.\n");
-
- Console.WriteLine("\tStart: Disable tracing.");
- TraceControl.Disable();
- Console.WriteLine("\tEnd: Disable tracing.\n");
-
- Console.WriteLine("\tStart: Processing events from file.");
- int msgCount = 0;
- using (var trace = TraceEventDispatcher.GetDispatcherFromFileName(outputFilename))
- {
- var names = new HashSet<string>();
-
- trace.Dynamic.All += delegate(TraceEvent data)
- {
- if (!names.Contains(data.ProviderName))
- {
- Console.WriteLine("\t{0}", data.ProviderName);
- names.Add(data.ProviderName);
- }
-
- if (data.ProviderName == "SimpleEventSource")
- {
- msgCount += 1;
- }
- };
-
- trace.Process();
- }
- Console.WriteLine("\tEnd: Processing events from file.\n");
-
- Console.WriteLine("\tProcessed {0} events from EventSource", msgCount);
-
- pass &= msgCount == messageIterations;
- }
- finally {
- if (keepOutput)
- {
- Console.WriteLine("\n\tOutput file: {0}", outputFilename);
- }
- else
- {
- System.IO.File.Delete(outputFilename);
- }
- }
-
- return pass ? 100 : 0;
- }
- }
-}
diff --git a/tests/src/tracing/eventsourcetrace/eventsourcetrace.csproj b/tests/src/tracing/eventsourcetrace/eventsourcetrace.csproj
deleted file mode 100644
index 833146ec64..0000000000
--- a/tests/src/tracing/eventsourcetrace/eventsourcetrace.csproj
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{8E3244CB-407F-4142-BAAB-E7A55901A5FA}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"></PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"></PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="EventSourceTrace.cs" />
- <ProjectReference Include="../common/common.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project> \ No newline at end of file