summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-01-19 08:24:57 (GMT)
committerJan Kotas <jkotas@microsoft.com>2019-01-20 00:58:53 (GMT)
commit80416dc50cce9fae908e59e83a699af0c0ee9531 (patch)
tree32bdb276aa95bede3f5eede8db691e24bbdf71f6
parent1f3a1ebd25bce4eefa93e9d37d3f4feb29707b3e (diff)
downloadcoreclr-80416dc50cce9fae908e59e83a699af0c0ee9531.zip
coreclr-80416dc50cce9fae908e59e83a699af0c0ee9531.tar.gz
coreclr-80416dc50cce9fae908e59e83a699af0c0ee9531.tar.bz2
Fix build for ProjectN/WinRTInterop Delete superfluous AsyncCausalityTracer arguments
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r--src/System.Private.CoreLib/shared/Internal/Threading/Tasks/AsyncCausalitySupport.cs6
-rw-r--r--src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems1
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs22
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs41
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracerConstants.cs30
5 files changed, 49 insertions, 51 deletions
diff --git a/src/System.Private.CoreLib/shared/Internal/Threading/Tasks/AsyncCausalitySupport.cs b/src/System.Private.CoreLib/shared/Internal/Threading/Tasks/AsyncCausalitySupport.cs
index ab3e52f..dcea41d 100644
--- a/src/System.Private.CoreLib/shared/Internal/Threading/Tasks/AsyncCausalitySupport.cs
+++ b/src/System.Private.CoreLib/shared/Internal/Threading/Tasks/AsyncCausalitySupport.cs
@@ -38,19 +38,19 @@ namespace Internal.Threading.Tasks
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TraceOperationCreation(Task task, string operationName)
{
- AsyncCausalityTracer.TraceOperationCreation(CausalityTraceLevel.Required, task.Id, operationName, 0);
+ AsyncCausalityTracer.TraceOperationCreation(task, operationName);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TraceOperationCompletedSuccess(Task task)
{
- AsyncCausalityTracer.TraceOperationCompletion(CausalityTraceLevel.Required, task.Id, AsyncCausalityStatus.Completed);
+ AsyncCausalityTracer.TraceOperationCompletion(task, AsyncCausalityStatus.Completed);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TraceOperationCompletedError(Task task)
{
- AsyncCausalityTracer.TraceOperationCompletion(CausalityTraceLevel.Required, task.Id, AsyncCausalityStatus.Error);
+ AsyncCausalityTracer.TraceOperationCompletion(task, AsyncCausalityStatus.Error);
}
}
}
diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
index 9a94bdf..944cf62 100644
--- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
+++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems
@@ -774,6 +774,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\SpinWait.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\SynchronizationLockException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadLocal.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\AsyncCausalityTracerConstants.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\Future.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\ProducerConsumerQueues.cs" />
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
index 5a78653..f861998 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
@@ -11,7 +11,6 @@
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
using System.Diagnostics;
-using System.Diagnostics.Tracing;
using System.Reflection;
using System.Runtime.ExceptionServices;
#if FEATURE_COMINTEROP
@@ -22,7 +21,6 @@ using System.Threading.Tasks;
using System.Text;
using Internal.Runtime.CompilerServices;
using Internal.Runtime.Augments;
-using Internal.Threading.Tasks;
#if CORERT
using Thread = Internal.Runtime.Augments.RuntimeThread;
@@ -95,9 +93,9 @@ namespace System.Runtime.CompilerServices
/// <summary>Completes the method builder successfully.</summary>
public void SetResult()
{
- if (AsyncCausalitySupport.LoggingOn)
+ if (AsyncCausalityTracer.LoggingOn)
{
- AsyncCausalitySupport.TraceOperationCompletedSuccess(this.Task);
+ AsyncCausalityTracer.TraceOperationCompletion(this.Task, AsyncCausalityStatus.Completed);
}
// Mark the builder as completed. As this is a void-returning method, this mostly
@@ -121,9 +119,9 @@ namespace System.Runtime.CompilerServices
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
}
- if (AsyncCausalitySupport.LoggingOn)
+ if (AsyncCausalityTracer.LoggingOn)
{
- AsyncCausalitySupport.TraceOperationCompletedError(this.Task);
+ AsyncCausalityTracer.TraceOperationCompletion(this.Task, AsyncCausalityStatus.Error);
}
if (_synchronizationContext != null)
@@ -575,10 +573,10 @@ namespace System.Runtime.CompilerServices
{
Debug.Assert(!IsCompleted);
- bool loggingOn = AsyncCausalitySupport.LoggingOn;
+ bool loggingOn = AsyncCausalityTracer.LoggingOn;
if (loggingOn)
{
- AsyncCausalityTracer.TraceSynchronousWorkStart(CausalityTraceLevel.Required, this.Id, CausalitySynchronousWork.Execution);
+ AsyncCausalityTracer.TraceSynchronousWorkStart(this, CausalitySynchronousWork.Execution);
}
ExecutionContext context = Context;
@@ -619,7 +617,7 @@ namespace System.Runtime.CompilerServices
if (loggingOn)
{
- AsyncCausalityTracer.TraceSynchronousWorkCompletion(CausalityTraceLevel.Required, CausalitySynchronousWork.Execution);
+ AsyncCausalityTracer.TraceSynchronousWorkCompletion(CausalitySynchronousWork.Execution);
}
}
@@ -698,7 +696,7 @@ namespace System.Runtime.CompilerServices
{
Debug.Assert(m_task != null, "Expected non-null task");
- if (AsyncCausalitySupport.LoggingOn || System.Threading.Tasks.Task.s_asyncDebuggingEnabled)
+ if (AsyncCausalityTracer.LoggingOn || System.Threading.Tasks.Task.s_asyncDebuggingEnabled)
{
LogExistingTaskCompletion();
}
@@ -714,9 +712,9 @@ namespace System.Runtime.CompilerServices
{
Debug.Assert(m_task != null);
- if (AsyncCausalitySupport.LoggingOn)
+ if (AsyncCausalityTracer.LoggingOn)
{
- AsyncCausalitySupport.TraceOperationCompletedSuccess(m_task);
+ AsyncCausalityTracer.TraceOperationCompletion(m_task, AsyncCausalityStatus.Completed);
}
// only log if we have a real task that was previously created
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs
index c3f787b..b00d5d6 100644
--- a/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs
+++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs
@@ -6,37 +6,6 @@ using System.Diagnostics;
namespace System.Threading.Tasks
{
- internal enum CausalityTraceLevel
- {
- Required = 0,
- Important = 1,
- Verbose = 2,
- }
-
- internal enum AsyncCausalityStatus
- {
- Started = 0,
- Completed = 1,
- Canceled = 2,
- Error = 3,
- }
-
- internal enum CausalityRelation
- {
- AssignDelegate = 0,
- Join = 1,
- Choice = 2,
- Cancel = 3,
- Error = 4,
- }
-
- internal enum CausalitySynchronousWork
- {
- CompletionNotification = 0,
- ProgressNotification = 1,
- Execution = 2,
- }
-
//
// Empty implementation of AsyncCausality events
//
@@ -50,27 +19,27 @@ namespace System.Threading.Tasks
}
[Conditional("NOOP_ASYNCCASUALITYTRACER")]
- public static void TraceOperationCreation(CausalityTraceLevel traceLevel, int taskId, string operationName, ulong relatedContext)
+ public static void TraceOperationCreation(Task task, string operationName)
{
}
[Conditional("NOOP_ASYNCCASUALITYTRACER")]
- public static void TraceOperationCompletion(CausalityTraceLevel traceLevel, int taskId, AsyncCausalityStatus status)
+ public static void TraceOperationCompletion(Task task, AsyncCausalityStatus status)
{
}
[Conditional("NOOP_ASYNCCASUALITYTRACER")]
- public static void TraceOperationRelation(CausalityTraceLevel traceLevel, int taskId, CausalityRelation relation)
+ public static void TraceOperationRelation(Task task, CausalityRelation relation)
{
}
[Conditional("NOOP_ASYNCCASUALITYTRACER")]
- public static void TraceSynchronousWorkStart(CausalityTraceLevel traceLevel, int taskId, CausalitySynchronousWork work)
+ public static void TraceSynchronousWorkStart(Task task, CausalitySynchronousWork work)
{
}
[Conditional("NOOP_ASYNCCASUALITYTRACER")]
- public static void TraceSynchronousWorkCompletion(CausalityTraceLevel traceLevel, CausalitySynchronousWork work)
+ public static void TraceSynchronousWorkCompletion(CausalitySynchronousWork work)
{
}
}
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracerConstants.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracerConstants.cs
new file mode 100644
index 0000000..3677051
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/AsyncCausalityTracerConstants.cs
@@ -0,0 +1,30 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace System.Threading.Tasks
+{
+ internal enum AsyncCausalityStatus
+ {
+ Started = 0,
+ Completed = 1,
+ Canceled = 2,
+ Error = 3,
+ }
+
+ internal enum CausalityRelation
+ {
+ AssignDelegate = 0,
+ Join = 1,
+ Choice = 2,
+ Cancel = 3,
+ Error = 4,
+ }
+
+ internal enum CausalitySynchronousWork
+ {
+ CompletionNotification = 0,
+ ProgressNotification = 1,
+ Execution = 2,
+ }
+}