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

Commit

Permalink
Add missing #ifdef.
Browse files Browse the repository at this point in the history
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
  • Loading branch information
brianrob committed Jun 8, 2018
1 parent c4834d1 commit 58998ff
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,11 @@ protected unsafe void WriteEventWithRelatedActivityIdCore(int eventId, Guid* rel
}

#if FEATURE_MANAGED_ETW
if (m_eventData[eventId].EnabledForETW || m_eventData[eventId].EnabledForEventPipe)
if (m_eventData[eventId].EnabledForETW
#if FEATURE_PERFTRACING
|| m_eventData[eventId].EnabledForEventPipe
#endif // FEATURE_PERFTRACING
)
{
if (!SelfDescribingEvents)
{
Expand Down Expand Up @@ -1865,7 +1869,11 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object
}

#if FEATURE_MANAGED_ETW
if (m_eventData[eventId].EnabledForETW || m_eventData[eventId].EnabledForEventPipe)
if (m_eventData[eventId].EnabledForETW
#if FEATURE_PERFTRACING
|| m_eventData[eventId].EnabledForEventPipe
#endif // FEATURE_PERFTRACING
)
{
if (!SelfDescribingEvents)
{
Expand Down Expand Up @@ -2339,7 +2347,9 @@ partial struct EventMetadata
public EventTags Tags;
public bool EnabledForAnyListener; // true if any dispatcher has this event turned on
public bool EnabledForETW; // is this event on for ETW?
#if FEATURE_PERFTRACING
public bool EnabledForEventPipe; // is this event on for EventPipe?
#endif

public bool HasRelatedActivityID; // Set if the event method's first parameter is a Guid named 'relatedActivityId'
#pragma warning disable 0649
Expand Down Expand Up @@ -2625,7 +2635,11 @@ internal bool EnableEventForDispatcher(EventDispatcher dispatcher, EventProvider
private bool AnyEventEnabled()
{
for (int i = 0; i < m_eventData.Length; i++)
if (m_eventData[i].EnabledForETW || m_eventData[i].EnabledForEventPipe || m_eventData[i].EnabledForAnyListener)
if (m_eventData[i].EnabledForETW || m_eventData[i].EnabledForAnyListener
#if FEATURE_PERFTRACING
|| m_eventData[i].EnabledForEventPipe
#endif // FEATURE_PERFTRACING
)
return true;
return false;
}
Expand Down

0 comments on commit 58998ff

Please sign in to comment.