feat: make ETW configurable, doesn't actually do anything yet because we're stuck on .NET 5

This commit is contained in:
goaaats 2022-06-22 16:58:53 +02:00
parent e7b0da9f7a
commit 8744e82979
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
8 changed files with 18 additions and 5 deletions

View file

@ -29,6 +29,7 @@ std::optional<CoreCLR> g_clr;
int InitializeClrAndGetEntryPoint(
void* calling_module,
bool enableEtw,
std::wstring runtimeconfig_path,
std::wstring module_path,
std::wstring entrypoint_assembly_name,
@ -49,10 +50,7 @@ int InitializeClrAndGetEntryPoint(
SetEnvironmentVariable(L"DOTNET_TC_QuickJitForLoops", L"1");
SetEnvironmentVariable(L"DOTNET_ReadyToRun", L"1");
#if NDEBUG
// This might fix extremely bad performance in some algorithms on insider builds
SetEnvironmentVariable(L"COMPlus_ETWEnabled", L"0");
#endif
SetEnvironmentVariable(L"COMPlus_ETWEnabled", enableEtw ? L"1" : L"0");
wchar_t* dotnet_path;
wchar_t* _appdata;

View file

@ -3,6 +3,7 @@ void ConsoleTeardown();
int InitializeClrAndGetEntryPoint(
void* calling_module,
bool enableEtw,
std::wstring runtimeconfig_path,
std::wstring module_path,
std::wstring entrypoint_assembly_name,