diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-11-07 15:19:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-07 15:19:30 -0800 |
commit | ed896bf25fa17e0015a0e274072bbb820410300b (patch) | |
tree | 4fbce61e26287ebaaede7af4014589cabe9f2d21 | |
parent | 1ed7aebdef6b38ee39e7a0db025fd49e37c53b83 (diff) | |
download | coreclr-ed896bf25fa17e0015a0e274072bbb820410300b.tar.gz coreclr-ed896bf25fa17e0015a0e274072bbb820410300b.tar.bz2 coreclr-ed896bf25fa17e0015a0e274072bbb820410300b.zip |
Delete dead code (#14901)
-rw-r--r-- | src/inc/clrconfig.h | 14 | ||||
-rw-r--r-- | src/utilcode/clrconfig.cpp | 57 | ||||
-rw-r--r-- | src/vm/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/vm/ceemain.cpp | 1 | ||||
-rw-r--r-- | src/vm/microsoft.comservices.h | 277 | ||||
-rw-r--r-- | src/vm/microsoft.comservices_i.c | 173 | ||||
-rw-r--r-- | src/vm/perfdefaults.cpp | 147 | ||||
-rw-r--r-- | src/vm/perfdefaults.h | 90 | ||||
-rw-r--r-- | src/vm/wks/CMakeLists.txt | 2 |
9 files changed, 0 insertions, 763 deletions
diff --git a/src/inc/clrconfig.h b/src/inc/clrconfig.h index c15e2eb2f5..bb49dde6a2 100644 --- a/src/inc/clrconfig.h +++ b/src/inc/clrconfig.h @@ -60,8 +60,6 @@ public: // Remove any whitespace at beginning and end of value. (Only applicable for // *string* configuration values.) TrimWhiteSpaceFromStringValue = 0x100, - // If set, check whether a PerformanceDefault is active for this value before using the built-in default - MayHavePerformanceDefault = 0x200, // Legacy REGUTIL-style lookup. REGUTIL_default = IgnoreConfigFiles, @@ -76,10 +74,6 @@ public: typedef HRESULT (* GetConfigValueFunction) (__in_z LPCWSTR /*pKey*/, __deref_out_opt LPCWSTR* /*value*/, BOOL /*systemOnly*/, BOOL /*applicationFirst*/); - // Function pointer definition used for calling PerformanceDefaults::LookupConfigValue - typedef BOOL (* GetPerformanceDefaultValueFunction) - (LPCWSTR /*name*/, DWORD* /*pValue*/); - // Struct used to store information about where/how to find a Config DWORD. // NOTE: Please do NOT create instances of this struct. Use the macros in file:CLRConfigValues.h instead. typedef struct ConfigDWORDInfo @@ -195,18 +189,10 @@ public: // Register EEConfig's GetConfigValueCallback function so CLRConfig can look in config files. static void RegisterGetConfigValueCallback(GetConfigValueFunction func); - // Register PerformanceDefaults' LookupConfigValue so CLRConfig can support 'MayHavePerformanceDefault' values - static void RegisterGetPerformanceDefaultValueCallback(GetPerformanceDefaultValueFunction func); - - - private: // Function pointer to EEConfig's GetConfigValueCallback function (can't static bind from utilcode to VM) static GetConfigValueFunction s_GetConfigValueCallback; - // Function pointer to PerformanceDefaults' LookupConfigValue function (can't static bind from utilcode to VM) - static GetPerformanceDefaultValueFunction s_GetPerformanceDefaultValueCallback; - // Helper method to translate LookupOptions to REGUTIL::CORConfigLevel static REGUTIL::CORConfigLevel GetConfigLevel(LookupOptions options); diff --git a/src/utilcode/clrconfig.cpp b/src/utilcode/clrconfig.cpp index 7bd404b5d4..3d1679150b 100644 --- a/src/utilcode/clrconfig.cpp +++ b/src/utilcode/clrconfig.cpp @@ -24,13 +24,6 @@ // CLRConfig::GetConfigValueFunction CLRConfig::s_GetConfigValueCallback = NULL; -// -// Initialize the PerformanceDefaults::LookupConfigValue function pointer to NULL. If not initialized, CLRConfig -// will ignore LookupOptions::MayHavePerformanceDefault. -// -CLRConfig::GetPerformanceDefaultValueFunction CLRConfig::s_GetPerformanceDefaultValueCallback = NULL; - - // // Creating structs using the macro table in CLRConfigValues.h // @@ -182,22 +175,6 @@ BOOL CLRConfig::IsConfigEnabled(const ConfigDWORDInfo & info) } } - // - // If we get here, the option was not listed in REGUTIL or EEConfig; check whether the option - // has a PerformanceDefault-specified value before falling back to the built-in default - // - DWORD performanceDefaultValue; - if (CheckLookupOption(info, MayHavePerformanceDefault) && - s_GetPerformanceDefaultValueCallback != NULL && - s_GetPerformanceDefaultValueCallback(info.name, &performanceDefaultValue)) - { - if (!SUCCEEDED(REGUTIL::GetConfigDWORD_DontUse_(info.name, info.defaultValue, &result, level, prependCOMPlus))) - { - if(performanceDefaultValue>0) - return TRUE; - } - } - if(info.defaultValue>0) return TRUE; else @@ -337,25 +314,6 @@ DWORD CLRConfig::GetConfigValue(const ConfigDWORDInfo & info, bool acceptExplici } } - // - // If we get here, the option was not listed in REGUTIL or EEConfig; check whether the option - // has a PerformanceDefault-specified value before falling back to the built-in default - // - DWORD performanceDefaultValue; - if (CheckLookupOption(info, MayHavePerformanceDefault) && - s_GetPerformanceDefaultValueCallback != NULL && - s_GetPerformanceDefaultValueCallback(info.name, &performanceDefaultValue)) - { - // TODO: We ignore explicitly defined default values above, but we do not want to let performance defaults override these. - // TODO: Ideally, the above would use hresult for success and this check would be removed. - DWORD resultMaybe; - if (!SUCCEEDED(REGUTIL::GetConfigDWORD_DontUse_(info.name, info.defaultValue, &resultMaybe, level, prependCOMPlus))) - { - *isDefault = true; - return performanceDefaultValue; - } - } - *isDefault = true; return info.defaultValue; } @@ -494,10 +452,6 @@ HRESULT CLRConfig::GetConfigValue(const ConfigStringInfo & info, __deref_out_z L } } - // If we ever want a PerformanceDefault for a string value, you can replace this assert - // with code that follows the pattern for DWORD values above. - _ASSERTE(!CheckLookupOption(info, MayHavePerformanceDefault)); - *outVal = result; RETURN S_OK; } @@ -648,17 +602,6 @@ void CLRConfig::RegisterGetConfigValueCallback(GetConfigValueFunction func) } // -// Register PerformanceDefaults' LookupConfigValue so CLRConfig can support 'MayHavePerformanceDefault' values -// -//static -void CLRConfig::RegisterGetPerformanceDefaultValueCallback(GetPerformanceDefaultValueFunction func) -{ - LIMITED_METHOD_CONTRACT; - s_GetPerformanceDefaultValueCallback = func; -} - - -// // Helper method to translate LookupOptions to REGUTIL::CORConfigLevel. // //static diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt index aefc77113c..f49d01bc91 100644 --- a/src/vm/CMakeLists.txt +++ b/src/vm/CMakeLists.txt @@ -223,7 +223,6 @@ set(VM_SOURCES_WKS olevariant.cpp pefingerprint.cpp pendingload.cpp - perfdefaults.cpp profattach.cpp profattachclient.cpp profattachserver.cpp @@ -312,7 +311,6 @@ list(APPEND VM_SOURCES_WKS dwreport.cpp eventreporter.cpp extensibleclassfactory.cpp - microsoft.comservices_i.c mngstdinterfaces.cpp notifyexternals.cpp olecontexthelpers.cpp diff --git a/src/vm/ceemain.cpp b/src/vm/ceemain.cpp index afd5a7dd52..8b44945845 100644 --- a/src/vm/ceemain.cpp +++ b/src/vm/ceemain.cpp @@ -182,7 +182,6 @@ #include "stringarraylist.h" #include "stubhelpers.h" -#include "perfdefaults.h" #ifdef FEATURE_STACK_SAMPLING #include "stacksampler.h" diff --git a/src/vm/microsoft.comservices.h b/src/vm/microsoft.comservices.h deleted file mode 100644 index e112392ecc..0000000000 --- a/src/vm/microsoft.comservices.h +++ /dev/null @@ -1,277 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Mon Jul 17 19:19:10 2000 - */ -/* Compiler settings for Z:\urt\inst\v1.x86chk\Microsoft.ComServices.idl: - Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - - -/* verify that the <rpcndr.h> version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 440 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __Microsoft2EComServices_h__ -#define __Microsoft2EComServices_h__ - -/* Forward Declarations */ - -#ifndef __IRegistrationHelper_FWD_DEFINED__ -#define __IRegistrationHelper_FWD_DEFINED__ -typedef interface IRegistrationHelper IRegistrationHelper; -#endif /* __IRegistrationHelper_FWD_DEFINED__ */ - - -#ifndef __RegistrationHelperTx_FWD_DEFINED__ -#define __RegistrationHelperTx_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class RegistrationHelperTx RegistrationHelperTx; -#else -typedef struct RegistrationHelperTx RegistrationHelperTx; -#endif /* __cplusplus */ - -#endif /* __RegistrationHelperTx_FWD_DEFINED__ */ - - -#ifdef __cplusplus -extern "C"{ -#endif - -void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); -void __RPC_USER MIDL_user_free( void __RPC_FAR * ); - - -#ifndef __Microsoft_ComServices_LIBRARY_DEFINED__ -#define __Microsoft_ComServices_LIBRARY_DEFINED__ - -/* library Microsoft_ComServices */ -/* [version][uuid] */ - - -typedef /* [public][public][uuid] */ DECLSPEC_UUID("9D667CBC-FE79-3B45-AEBB-6303106B137A") -enum __MIDL___MIDL_itf_Microsoft2EComServices_0000_0001 - { InstallationFlags_Default = 0, - InstallationFlags_ExpectExistingTypeLib = 1, - InstallationFlags_CreateTargetApplication = 2, - InstallationFlags_FindOrCreateTargetApplication = 4, - InstallationFlags_ReconfigureExistingApplication = 8, - InstallationFlags_Register = 256, - InstallationFlags_Install = 512, - InstallationFlags_Configure = 1024 - } InstallationFlags; - - -EXTERN_C const IID LIBID_Microsoft_ComServices; - -#ifndef __IRegistrationHelper_INTERFACE_DEFINED__ -#define __IRegistrationHelper_INTERFACE_DEFINED__ - -/* interface IRegistrationHelper */ -/* [object][custom][oleautomation][uuid] */ - - -EXTERN_C const IID IID_IRegistrationHelper; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("55E3EA25-55CB-4650-8887-18E8D30BB4BC") - IRegistrationHelper : public IUnknown - { - public: - virtual HRESULT __stdcall InstallAssembly( - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *application, - /* [out][in] */ BSTR __RPC_FAR *tlb, - /* [in] */ InstallationFlags installFlags) = 0; - - virtual HRESULT __stdcall RegisterAssembly( - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *tlb) = 0; - - virtual HRESULT __stdcall ConfigureAssembly( - /* [in] */ BSTR assembly, - /* [in] */ BSTR application) = 0; - - virtual HRESULT __stdcall UninstallAssembly( - /* [in] */ BSTR assembly, - /* [in] */ BSTR application) = 0; - - }; - -#else /* C style interface */ - - typedef struct IRegistrationHelperVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); - - ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( - IRegistrationHelper __RPC_FAR * This); - - ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( - IRegistrationHelper __RPC_FAR * This); - - HRESULT ( __stdcall __RPC_FAR *InstallAssembly )( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *application, - /* [out][in] */ BSTR __RPC_FAR *tlb, - /* [in] */ InstallationFlags installFlags); - - HRESULT ( __stdcall __RPC_FAR *RegisterAssembly )( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *tlb); - - HRESULT ( __stdcall __RPC_FAR *ConfigureAssembly )( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [in] */ BSTR application); - - HRESULT ( __stdcall __RPC_FAR *UninstallAssembly )( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [in] */ BSTR application); - - END_INTERFACE - } IRegistrationHelperVtbl; - - interface IRegistrationHelper - { - CONST_VTBL struct IRegistrationHelperVtbl __RPC_FAR *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IRegistrationHelper_QueryInterface(This,riid,ppvObject) \ - (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) - -#define IRegistrationHelper_AddRef(This) \ - (This)->lpVtbl -> AddRef(This) - -#define IRegistrationHelper_Release(This) \ - (This)->lpVtbl -> Release(This) - - -#define IRegistrationHelper_InstallAssembly(This,assembly,application,tlb,installFlags) \ - (This)->lpVtbl -> InstallAssembly(This,assembly,application,tlb,installFlags) - -#define IRegistrationHelper_RegisterAssembly(This,assembly,tlb) \ - (This)->lpVtbl -> RegisterAssembly(This,assembly,tlb) - -#define IRegistrationHelper_ConfigureAssembly(This,assembly,application) \ - (This)->lpVtbl -> ConfigureAssembly(This,assembly,application) - -#define IRegistrationHelper_UninstallAssembly(This,assembly,application) \ - (This)->lpVtbl -> UninstallAssembly(This,assembly,application) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - -HRESULT __stdcall IRegistrationHelper_InstallAssembly_Proxy( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *application, - /* [out][in] */ BSTR __RPC_FAR *tlb, - /* [in] */ InstallationFlags installFlags); - - -void __RPC_STUB IRegistrationHelper_InstallAssembly_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -HRESULT __stdcall IRegistrationHelper_RegisterAssembly_Proxy( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [out][in] */ BSTR __RPC_FAR *tlb); - - -void __RPC_STUB IRegistrationHelper_RegisterAssembly_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -HRESULT __stdcall IRegistrationHelper_ConfigureAssembly_Proxy( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [in] */ BSTR application); - - -void __RPC_STUB IRegistrationHelper_ConfigureAssembly_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -HRESULT __stdcall IRegistrationHelper_UninstallAssembly_Proxy( - IRegistrationHelper __RPC_FAR * This, - /* [in] */ BSTR assembly, - /* [in] */ BSTR application); - - -void __RPC_STUB IRegistrationHelper_UninstallAssembly_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - - -#endif /* __IRegistrationHelper_INTERFACE_DEFINED__ */ - - -EXTERN_C const CLSID CLSID_RegistrationHelperTx; - -#ifdef __cplusplus - -class DECLSPEC_UUID("89A86E7B-C229-4008-9BAA-2F5C8411D7E0") -RegistrationHelperTx; -#endif -#endif /* __Microsoft_ComServices_LIBRARY_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/src/vm/microsoft.comservices_i.c b/src/vm/microsoft.comservices_i.c deleted file mode 100644 index f31a92f53e..0000000000 --- a/src/vm/microsoft.comservices_i.c +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Mon Jul 17 19:19:10 2000 - */ -/* Compiler settings for Z:\urt\inst\v1.x86chk\Microsoft.ComServices.idl: - Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#if !defined(_M_IA64) && !defined(_M_AXP64) - -#include <rpc.h> -#include <rpcndr.h> - -#ifdef __cplusplus -extern "C"{ -#endif - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include <guiddef.h> -#undef INITGUID -#else -#include <guiddef.h> -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif // !_MIDL_USE_GUIDDEF_ - -MIDL_DEFINE_GUID(IID, LIBID_Microsoft_ComServices,0xD7F68C66,0x3833,0x3832,0xB6,0xD0,0xB7,0x96,0xBB,0x7D,0x2D,0xFF); - - -MIDL_DEFINE_GUID(IID, IID_IRegistrationHelper,0x55E3EA25,0x55CB,0x4650,0x88,0x87,0x18,0xE8,0xD3,0x0B,0xB4,0xBC); - - -MIDL_DEFINE_GUID(CLSID, CLSID_RegistrationHelperTx,0x89A86E7B,0xC229,0x4008,0x9B,0xAA,0x2F,0x5C,0x84,0x11,0xD7,0xE0); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - -#endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/ - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Mon Jul 17 19:19:10 2000 - */ -/* Compiler settings for Z:\urt\inst\v1.x86chk\Microsoft.ComServices.idl: - Oicf (OptLev=i2), W1, Zp8, env=Win64 (32b run,appending), ms_ext, c_ext, robust - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#if defined(_M_IA64) || defined(_M_AXP64) - -#include <rpc.h> -#include <rpcndr.h> - -#ifdef __cplusplus -extern "C"{ -#endif - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include <guiddef.h> -#undef INITGUID -#else -#include <guiddef.h> -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif // !_MIDL_USE_GUIDDEF_ - -MIDL_DEFINE_GUID(IID, LIBID_Microsoft_ComServices,0xD7F68C66,0x3833,0x3832,0xB6,0xD0,0xB7,0x96,0xBB,0x7D,0x2D,0xFF); - - -MIDL_DEFINE_GUID(IID, IID_IRegistrationHelper,0x55E3EA25,0x55CB,0x4650,0x88,0x87,0x18,0xE8,0xD3,0x0B,0xB4,0xBC); - - -MIDL_DEFINE_GUID(CLSID, CLSID_RegistrationHelperTx,0x89A86E7B,0xC229,0x4008,0x9B,0xAA,0x2F,0x5C,0x84,0x11,0xD7,0xE0); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - -#endif /* defined(_M_IA64) || defined(_M_AXP64)*/ - diff --git a/src/vm/perfdefaults.cpp b/src/vm/perfdefaults.cpp deleted file mode 100644 index f6352bcd53..0000000000 --- a/src/vm/perfdefaults.cpp +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -//************************************************************************************************* -// PerfDefaults.cpp -// - -// -// Implementation of the "PerformanceScenario" config option, which defines a workload-specific -// set of performance defaults. The key point of the code below is that it be clear exactly what -// gets enabled for each scenario -- see the switch statements -// -// for host STARTUP_FLAGS, in GetModifiedStartupFlags -// for environment, registry, or config CLRConfig values, in LookupConfigValue -// for other global initialization, in InitializeForScenario -// -//************************************************************************************************* - -#include "common.h" -#include "perfdefaults.h" - -// Useful to the readability of lists of settings below -#define MATCHES(a,b) (SString::_wcsicmp((a),(b)) == 0) - -// The scenario we have been asked to run under -PerformanceDefaults::PerformanceScenario PerformanceDefaults::s_Scenario = Uninitialized; - -// See use in code:PerformanceDefaults:InitializeForScenario -extern int32_t g_bLowMemoryFromHost; - - -// -// Initialize our system to provide performance defaults for a given scenario. -// If the scenario name is not recognized, intentionally ignore it and operate as if not specified. -// - void PerformanceDefaults::InitializeForScenario(__in_opt LPWSTR scenarioName) -{ - LIMITED_METHOD_CONTRACT; - - // First convert the scenario name to the corresponding enum value - s_Scenario = None; - if (scenarioName != NULL) - { - if (MATCHES(scenarioName, W("HighDensityWebHosting"))) s_Scenario = HighDensityWebHosting; - } - - // Next do any scenario-specific initialization - switch (s_Scenario) - { - case None: - break; - - case HighDensityWebHosting: - // Tell the hosting API that we want the GC to operate as if the machine is under memory pressure. - // This is a workaround because we do not want to expose "force low memory mode" as either a CLR - // config option or a host startup flag (the two types of knob that PerformanceDefaults can alter) and - // ASP.Net has not yet become a memory host. When they do, this can be removed and they can - // make an initial call to ICLRMemoryNotificationCallback:OnMemoryNotification(eMemoryAvailableLow). - // - // Note that in order for ASP.Net to become a memory host the CLR will need to support profiler attach - // in that condition. - g_bLowMemoryFromHost = 1; - break; - - case Uninitialized: - // Unreachable, but make GCC happy - break; - } - - // Finally register our lookup function with the CLRConfig system so we get called when a 'MayHavePerformanceDefault' - // config option is about to resolve to its runtime default - if (s_Scenario != None) - { - CLRConfig::RegisterGetPerformanceDefaultValueCallback(&LookupConfigValue); - } -} - - -// -// Called at runtime startup to allow host-specified STARTUP_FLAGS to be overridden when running -// under a scenario. -// -// Note that we are comfortable overriding the values the host has asked us to use (see -// file:PerfDefaults.h), but we never want to override a value specified by a user to CLRConfig. -// This comes up here because there are settings that are configurable through both systems. -// So where an option has both STARTUP_FLAG A and CLRConfig value B, first check whether B has -// been specified before altering the value of A. This way, we maintain complete compatibility -// with whatever the interaction of A and B has produced in the past. -// -STARTUP_FLAGS PerformanceDefaults::GetModifiedStartupFlags(STARTUP_FLAGS originalFlags) -{ - LIMITED_METHOD_CONTRACT; - - DWORD newFlags = (DWORD)originalFlags; - - switch (s_Scenario) - { - case None: - break; - - case HighDensityWebHosting: - if (!CLRConfig::IsConfigOptionSpecified(W("gcServer"))) newFlags &= ~STARTUP_SERVER_GC; - if (!CLRConfig::IsConfigOptionSpecified(W("gcConcurrent"))) newFlags &= ~STARTUP_CONCURRENT_GC; - if (!CLRConfig::IsConfigOptionSpecified(W("gcTrimCommitOnLowMemory"))) newFlags |= STARTUP_TRIM_GC_COMMIT; - - break; - - case Uninitialized: - // Check that no request for startup flags happens before our code has been initialized - // and given a chance to modify them. - _ASSERTE(!"PerformanceDefaults::InitializeForScenario should have already been called"); - break; - } - - return (STARTUP_FLAGS)newFlags; -} - - -// -// Called by the CLRConfig system whenever a 'MayHavePerformanceDefault' config option is about -// to resolve to its runtime default (i.e. none of the corresponding environment variable, registry, or -// config file values were specified). -// -BOOL PerformanceDefaults::LookupConfigValue(LPCWSTR name, DWORD *pValue) -{ - LIMITED_METHOD_CONTRACT; - _ASSERTE(pValue != NULL); - - switch (s_Scenario) - { - case None: - return FALSE; - - case HighDensityWebHosting: - if (MATCHES(name, W("shadowCopyVerifyByTimestamp"))) { *pValue = 1; return TRUE; } - return FALSE; - - case Uninitialized: - // Check that no request for a MayHavePerformanceDefault CLRConfig option happens - // before our code has been initialized and given a chance to provide a default value. - _ASSERTE(!"PerformanceDefaults::InitializeForScenario should have already been called"); - break; - } - - return FALSE; -} - diff --git a/src/vm/perfdefaults.h b/src/vm/perfdefaults.h deleted file mode 100644 index 1420995a98..0000000000 --- a/src/vm/perfdefaults.h +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// -// -------------------------------------------------------------------------------------------------- -// PerfDefaults.h -// - -// -// Implementation of the "PerformanceScenario" config option, which defines a workload-specific -// set of performance defaults. -// -// The motivation is that every release we work closely with a partner to understand the performance -// of their scenario and provide CLR behavior to improve it. Sometimes we are able to give them -// an entirely different build of the CLR (because it happens to be on a different architecture, or -// it needs to have a small size, etc), but not always. Sometimes we are able to change the -// runtime to have the new behavior by default, but not always. When neither applies, we fall to -// the ugly option of a set of one-off config values for the scenario (or machine administrators) -// to opt in. This then creates the problem of a huge number of generic knobs that any application -// can use in any combination. It also means that as we add additional improvements for the same -// scenario, we need to ask developers or machine administrators to keep up with the growing list. -// -// Our solution is to opt-in to a set of performance settings all at once and based on the workload. -// When a recognized 'PerformanceScenario' is specified in a config file, we want the runtime to -// operate with a defined set of performance settings. This set may evolve over time to -// automatically provide additional behavior to the same workload, just as we would for runtime -// defaults. Note however that a key design point is that in any conflict between these performance -// settings and one that is explicitly set by the user, the explicit user setting wins. Hence the -// name PerformanceDefaults -- it is as if we had created a separate build of the runtime for a -// particular scenario, changing only the default performance behavior, and continued to let people -// opt in or opt-out individually to those settings that are important and general-purpose enough -// to have an individual setting. -// -// To add a scenario, -// Update the PerformanceScenario enum and InitializeForScenario so that it is recognized -// -// To add an overridden host STARTUP_FLAG, -// Update the switch statement in GetModifiedStartupFlags; see note about IsConfigOptionSpecified -// -// To add an overridden CLRConfig default value, -// Mark it with LookupOption CLRConfig::MayHavePerformanceDefault in clrconfigvalues.h -// Update the switch statement in LookupConfigValue -// If a new CLRConfig option, decide if it needs to be a general-purpose switch (hopefully no) -// and if not create it as INTERNAL_ -// -// -------------------------------------------------------------------------------------------------- - - -#ifndef __PerfDefaults_h__ -#define __PerfDefaults_h__ - -class PerformanceDefaults -{ -public: - - static void InitializeForScenario(__in_opt LPWSTR scenarioName); - - // Called at runtime startup to allow host-specified STARTUP_FLAGS to be overridden when running - // under a scenario. - // - // Note that this does not follow the model of "only override if not specified." By the nature - // of the startup flags being bits, they are all specified (as on or off). We have no way of - // knowing which the host actually care about and which were left as the runtime default - // out of lack of concern. However we found that so far the specified startup flags are hard - // coded by the host (no way for the user to override at run time) and so we can build in - // to the set of defaults which the host allows us to override. - // - // In the future, if a host needs us to be able to override startup flags conditionally, the - // solution would be a new hosting API ICLRRuntimeInfo::SetOverridableStartupFlags. - static STARTUP_FLAGS GetModifiedStartupFlags(STARTUP_FLAGS originalFlags); - - // Called by the CLRConfig system whenever a 'MayHavePerformanceDefault' config option is about - // to resolve to its runtime default (i.e. none of the corresponding environment variable, - // registry, or config file values were specified). - static BOOL LookupConfigValue(LPCWSTR name, DWORD *pValue); - -private: - - enum PerformanceScenario - { - Uninitialized, - None, - HighDensityWebHosting, - }; - - static PerformanceScenario s_Scenario; - -}; - -#endif //__PerfDefaults_h__ diff --git a/src/vm/wks/CMakeLists.txt b/src/vm/wks/CMakeLists.txt index 1da2ab8477..3a796ae0ea 100644 --- a/src/vm/wks/CMakeLists.txt +++ b/src/vm/wks/CMakeLists.txt @@ -3,8 +3,6 @@ if (WIN32) add_precompiled_header(common.h ../common.cpp VM_SOURCES_WKS) # mscorlib.cpp does not compile with precompiled header file set_source_files_properties(../mscorlib.cpp PROPERTIES COMPILE_FLAGS "/Y-") - # .c file cannot use cpp precompiled header - set_source_files_properties(../microsoft.comservices_i.c PROPERTIES COMPILE_FLAGS "/Y-") # asm files require preprocessing using cl.exe on arm32 and arm64 if(CLR_CMAKE_PLATFORM_ARCH_ARM64) |