Handle new DOTNET_ in complement to old COMPlus_ envvar prefix on Mono. (#56098)
authorJohan Lorensson <lateralusx.github@gmail.com>
Thu, 22 Jul 2021 08:04:11 +0000 (10:04 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Jul 2021 08:04:11 +0000 (10:04 +0200)
commitd38202ee306533ac89a7515a206e312e7b71b6c1
tree586cec586406f5d57501c0cc6f00ace0f308eaed
parent14d6532f388903f425f0a3b9dea697c5a28293d3
Handle new DOTNET_ in complement to old COMPlus_ envvar prefix on Mono. (#56098)

https://github.com/dotnet/runtime/pull/50507 added support for DOTNET_
prefix for env variables previously using COMPlus_. That change was
however not implemented on Mono, still using COMPlus for some EventPipe,
DiagnosticServer env variables. This fix adds similar support on Mono,
first looking for a DOTNET_ version of the environment variable and if
not found, fallback to old COMPlus_ as fallback.

Documentation for .net6 have been updated to use new names:
https://docs.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe#trace-using-environment-variables
src/mono/mono/eventpipe/ds-rt-mono.h
src/mono/mono/eventpipe/ep-rt-mono.h