Update FEATURE_MANAGED_ETW and disable it on Unix
authorStephen Toub <stoub@microsoft.com>
Tue, 10 Feb 2015 22:29:51 +0000 (17:29 -0500)
committerStephen Toub <stoub@microsoft.com>
Tue, 10 Feb 2015 22:29:51 +0000 (17:29 -0500)
commitf243903923b0624312317a8132c6246e56ff2356
treedb6475425172bc10176d96e06698601d40f9bb6e
parentd92129870bcdeb1ed04cb73cce14874a905848d8
Update FEATURE_MANAGED_ETW and disable it on Unix

EventSource is used throughout mscorlib for tracing.  Most of EventSource's connection to Windows ETW APIs is already behind a FEATURE_MANAGED_ETW feature flag, but not all.  As a result, code that touches certain aspects of an EventSource can end up crashing as it tries to call into Windows APIs.

This commit updates places protected by the FEATURE_MANAGED_ETW flag, and then disables the flag when building mscorlib for Unix.  Eventually we're aiming to have a different implementation of EventSource on Unix that implicitly connects it to another tracing mechanism, but this change at least allows code paths that touch EventSource to function on Unix.
clr.coreclr.props
src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs