Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Fix CoreRT build breaks
Browse files Browse the repository at this point in the history
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
  • Loading branch information
jkotas committed Jan 22, 2019
1 parent 5c9febf commit 61ff739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Expand Up @@ -606,7 +606,7 @@ void ActivityChanging(AsyncLocalValueChangedArgs<ActivityInfo> args)
#endregion
}

#if ES_BUILD_STANDALONE || ES_BUILD_PN
#if ES_BUILD_STANDALONE
/******************************** SUPPORT *****************************/
/// <summary>
/// This is supplied by the framework. It is has the semantics that the value is copied to any new Tasks that is created
Expand All @@ -615,11 +615,7 @@ void ActivityChanging(AsyncLocalValueChangedArgs<ActivityInfo> args)
/// only get your thread local copy which means that you never have races.
/// </summary>
///
#if ES_BUILD_STANDALONE
[EventSource(Name = "Microsoft.Tasks.Nuget")]
#else
[EventSource(Name = "System.Diagnostics.Tracing.TplEtwProvider")]
#endif
internal class TplEtwProvider : EventSource
{
public class Keywords
Expand Down
Expand Up @@ -469,23 +469,23 @@ public void TraceOperationBegin(int TaskID, string OperationName, long RelatedCo
public void TraceOperationRelation(int TaskID, CausalityRelation Relation)
{
if (IsEnabled() && IsEnabled(EventLevel.Informational, Keywords.AsyncCausalityRelation))
WriteEvent(TRACEOPERATIONRELATION_ID, TaskID, (int)Relation); // optmized overload for this exists
WriteEvent(TRACEOPERATIONRELATION_ID, TaskID, (int)Relation); // optimized overload for this exists
}

[Event(TRACEOPERATIONSTOP_ID, Version = 1,
Level = EventLevel.Informational, Keywords = Keywords.AsyncCausalityOperation)]
public void TraceOperationEnd(int TaskID, AsyncCausalityStatus Status)
{
if (IsEnabled() && IsEnabled(EventLevel.Informational, Keywords.AsyncCausalityOperation))
WriteEvent(TRACEOPERATIONSTOP_ID, TaskID, (int)Status); // optmized overload for this exists
WriteEvent(TRACEOPERATIONSTOP_ID, TaskID, (int)Status); // optimized overload for this exists
}

[Event(TRACESYNCHRONOUSWORKSTART_ID, Version = 1,
Level = EventLevel.Informational, Keywords = Keywords.AsyncCausalitySynchronousWork)]
public void TraceSynchronousWorkBegin(int TaskID, CausalitySynchronousWork Work)
{
if (IsEnabled() && IsEnabled(EventLevel.Informational, Keywords.AsyncCausalitySynchronousWork))
WriteEvent(TRACESYNCHRONOUSWORKSTART_ID, TaskID, (int)Work); // optmized overload for this exists
WriteEvent(TRACESYNCHRONOUSWORKSTART_ID, TaskID, (int)Work); // optimized overload for this exists
}

[Event(TRACESYNCHRONOUSWORKSTOP_ID, Version = 1,
Expand Down Expand Up @@ -573,7 +573,7 @@ internal static Guid CreateGuidForTaskID(int taskID)
// The thread pool generated a process wide unique GUID from a task GUID by
// using the taskGuid, the appdomain ID, and 8 bytes of 'randomization' chosen by
// using the last 8 bytes as the provider GUID for this provider.
// These were generated by CreateGuid, and are reasonably random (and thus unlikley to collide
// These were generated by CreateGuid, and are reasonably random (and thus unlikely to collide
uint pid = EventSource.s_currentPid;
return new Guid(taskID,
(short)DefaultAppDomainID, (short)(DefaultAppDomainID >> 16),
Expand Down

0 comments on commit 61ff739

Please sign in to comment.