From 201c70cc49ff2027fb8ed0ba5e25f56534b04a96 Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Wed, 29 Mar 2017 15:31:29 -0700 Subject: 1. Remove disable of C4996 2. delete some dead code 3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0 4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier) 5. remove GetVersionEx from PAL --- src/vm/eventtrace.cpp | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/vm/eventtrace.cpp') diff --git a/src/vm/eventtrace.cpp b/src/vm/eventtrace.cpp index b708f17e34..1eb89385a6 100644 --- a/src/vm/eventtrace.cpp +++ b/src/vm/eventtrace.cpp @@ -4310,27 +4310,6 @@ HRESULT ETW::CEtwTracer::Register() { WRAPPER_NO_CONTRACT; -#ifndef FEATURE_CORESYSTEM - OSVERSIONINFO osVer; - osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - - if (GetOSVersion(&osVer) == FALSE) { - return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); - } - else if (osVer.dwMajorVersion < ETW_SUPPORTED_MAJORVER) { - return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); - } - - // if running on OS < Longhorn, skip registration unless reg key is set - // since ETW reg is expensive (in both time and working set) on older OSes - if (osVer.dwMajorVersion < ETW_ENABLED_MAJORVER && !g_fEnableETW && !CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_PreVistaETWEnabled)) - return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); - - // If running on OS >= Longhorn, skip registration if ETW is not enabled - if (osVer.dwMajorVersion >= ETW_ENABLED_MAJORVER && !g_fEnableETW && !CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_VistaAndAboveETWEnabled)) - return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); -#endif - EventRegisterMicrosoft_Windows_DotNETRuntime(); EventRegisterMicrosoft_Windows_DotNETRuntimePrivate(); EventRegisterMicrosoft_Windows_DotNETRuntimeRundown(); -- cgit v1.2.3