[release/6.0-rc1] Add event to RuntimeEventSource for AppContext switches (#57847)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 25 Aug 2021 15:45:46 +0000 (08:45 -0700)
committerGitHub <noreply@github.com>
Wed, 25 Aug 2021 15:45:46 +0000 (08:45 -0700)
commit75e6a7fc45b809ea08bf0ff58ec51fcdad391a89
tree177c450dd407b48143b9e2ceed5bea4c326b0013
parenta6ccd532aae7598588f900676d6db61a4fa09ca7
[release/6.0-rc1] Add event to RuntimeEventSource for AppContext switches (#57847)

* Add event to RuntimeEventSource for AppContext switches

Fixes https://github.com/dotnet/runtime/issues/56142

* Respond to PR comments

* Add preliminary tests

* Respond to PR comments

* Add keyword

* Fix tests

* Remove AppContext EventSource support on browser

* forgot using

* Fix error reporting, add comments

* Respond to PR comments

* Refactor tests

* Fix case where s_switches is null

* Fix bug

* Print more info for test failure

* Typo

* Fix lab failure

* Respond to PR comments

* Respond to PR comments

* Typo

* Respond to PR comments

* Skip RuntimeEventSource tests on wasm and android (#57890)

* Skip RuntimeEventSource tests on wasm and android

* Skip tests without using issues.targets

* Disable test for mono

(cherry picked from commit 454ac571fe489ab818c7727f11eee71d521c4366)

Co-authored-by: Andy Gocke <angocke@microsoft.com>
src/libraries/System.Private.CoreLib/src/System/AppContext.AnyOS.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs
src/tests/tracing/eventcounter/runtimecounters.cs
src/tests/tracing/runtimeeventsource/NativeRuntimeEventSourceTest.cs [new file with mode: 0644]
src/tests/tracing/runtimeeventsource/RuntimeEventSourceTest.cs
src/tests/tracing/runtimeeventsource/nativeruntimeeventsource.csproj [new file with mode: 0644]
src/tests/tracing/runtimeeventsource/runtimeeventsource.csproj