Skip to content

Commit 2087c07

Browse files
authored
Remove COM from profiler messages (dotnet#67774)
* Remove COM from profiler messages * Remove COR_ mentions
1 parent c1f6fb8 commit 2087c07

File tree

6 files changed

+14
-24
lines changed

6 files changed

+14
-24
lines changed

docs/design/coreclr/profiling/davbr-blog-archive/Debugging - Activation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ C:\> set co
2121
```
2222

2323
```
24-
Cor_Enable_Profiling=0x1
25-
COR_PROFILER={C5F90153-B93E-4138-9DB7-EB7156B07C4C}
24+
CORECLR_ENABLE_PROFILING=0x1
25+
CORECLR_PROFILER={C5F90153-B93E-4138-9DB7-EB7156B07C4C}
2626
```
2727

2828
If your scenario doesn't allow you to just run the process from a command prompt, like say an asp.net scenario, you may want to attach a debugger to the process that's supposed to be profiled, or use IFEO (HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options) to force a debugger to start when the worker process starts. In the debugger, you can then use "!peb" to view the environment block, which will include the environment variables.
2929

30-
Once you verify Cor\_Enable\_Profiling and COR\_PROFILER are ok, it's time to search the registry for the very same GUID set in your COR\_PROFILER environment variable. You should find it at a path like this:
30+
Once you verify CORECLR\_ENABLE\_PROFILING and CORECLR\_PROFILER are ok, it's time to search the registry for the very same GUID set in your CORECLR\_PROFILER environment variable. You should find it at a path like this:
3131

3232
HKEY\_LOCAL\_MACHINE\SOFTWARE\Classes\CLSID\{C5F90153-B93E-4138-9DB7-EB7156B07C4C}
3333

src/coreclr/dlls/mscorrc/mscorrc.rc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -699,28 +699,28 @@ END
699699
// Profiler messages for event log
700700
STRINGTABLE DISCARDABLE
701701
BEGIN
702-
IDS_E_PROF_BAD_PATH "Loading profiler failed. COR_ENABLE_PROFILING and COR_PROFILER were set properly, but COR_PROFILER_PATH was not. COR_PROFILER_PATH must be set to the full path of the profiler DLL to load with no more than 260 charaters including the null terminator.\n"
703-
IDS_E_PROF_NO_CLSID "Loading profiler failed. COR_ENABLE_PROFILING was set properly, but COR_PROFILER was not. COR_PROFILER must be set to the CLSID of the profiler to load.\n"
702+
IDS_E_PROF_BAD_PATH "Loading profiler failed. CORECLR_ENABLE_PROFILING and CORECLR_PROFILER were set properly, but CORECLR_PROFILER_PATH was not. CORECLR_PROFILER_PATH must be set to the full path of the profiler DLL to load with no more than 260 characters including the null terminator.\n"
703+
IDS_E_PROF_NO_CLSID "Loading profiler failed. CORECLR_ENABLE_PROFILING was set properly, but CORECLR_PROFILER was not. CORECLR_PROFILER must be set to the CLSID of the profiler to load.\n"
704704
IDS_E_PROF_INTERNAL_INIT "Loading profiler failed due to an internal profiling services initialization failure. Profiler CLSID: '%s'. HRESULT: 0x%x.\n"
705-
IDS_E_PROF_BAD_CLSID "Loading profiler failed. COR_PROFILER is set to an invalid CLSID: '%s'. HRESULT: 0x%x.\n"
706-
IDS_E_PROF_NO_CALLBACK_IFACE "Loading profiler failed. COR_PROFILER is set to a CLSID of a COM object that does not implement the interface GUID (IID) requested by the CLR. This often indicates that the profiler does not support this version of the CLR. Profiler CLSID: '%s'. Requested IID: '%s'.\n"
707-
IDS_E_PROF_CCI_FAILED "Loading profiler failed during CoCreateInstance. Profiler CLSID: '%s'. HRESULT: 0x%x.\n"
708-
IDS_E_PROF_INIT_CALLBACK_FAILED "Loading profiler failed. The profiler COM object was instantiated, but the profiler failed during its initialization callback. Profiler CLSID: '%s'. HRESULT: 0x%x.\n"
705+
IDS_E_PROF_BAD_CLSID "Loading profiler failed. CORECLR_PROFILER is set to an invalid CLSID: '%s'. HRESULT: 0x%x.\n"
706+
IDS_E_PROF_NO_CALLBACK_IFACE "Loading profiler failed. CORECLR_PROFILER is set to a CLSID of a COM object that does not implement the interface GUID (IID) requested by the CLR. This often indicates that the profiler does not support this version of the CLR. Profiler CLSID: '%s'. Requested IID: '%s'.\n"
707+
IDS_E_PROF_CCI_FAILED "Loading profiler failed during instantiation. Profiler CLSID: '%s'. HRESULT: 0x%x.\n"
708+
IDS_E_PROF_INIT_CALLBACK_FAILED "Loading profiler failed. The profiler was instantiated, but the profiler failed during its initialization callback. Profiler CLSID: '%s'. HRESULT: 0x%x.\n"
709709
IDS_PROF_SUPPLEMENTARY_INFO "Process ID (decimal): %d. Message ID: [0x%x].\n"
710710
IDS_PROF_LOAD_COMPLETE "The profiler was loaded successfully. Profiler CLSID: '%s'.\n"
711-
IDS_E_PROF_NOT_ATTACHABLE "Loading profiler failed. The profiler COM object was instantiated, but the profiler does not support attaching to a live process. The profiler must be loaded at application startup by using a launcher program included with the profiler (if any) or by setting the COR_ENABLE_PROFILING and COR_PROFILER environment variables before launching the application to be profiled. Profiler CLSID: '%s'\n"
712-
IDS_E_PROF_UNHANDLED_EXCEPTION_ON_LOAD "Loading profiler failed. There was an unhandled exception while trying to instantiate the profiler COM object. Please ensure the CLSID is associated with a valid profiler designed to work with this version of the runtime. Profiler CLSID: '%s'.\n"
711+
IDS_E_PROF_NOT_ATTACHABLE "Loading profiler failed. The profiler was instantiated, but the profiler does not support attaching to a live process. The profiler must be loaded at application startup by using a launcher program included with the profiler (if any) or by setting the CORECLR_ENABLE_PROFILING and CORECLR_PROFILER environment variables before launching the application to be profiled. Profiler CLSID: '%s'\n"
712+
IDS_E_PROF_UNHANDLED_EXCEPTION_ON_LOAD "Loading profiler failed. There was an unhandled exception while trying to instantiate the profiler. Please ensure the CLSID is associated with a valid profiler designed to work with this version of the runtime. Profiler CLSID: '%s'.\n"
713713
IDS_PROF_ATTACH_REQUEST_RECEIVED "The CLR received a request to attach a profiler. Profiler CLSID: '%s'.\n"
714714
IDS_PROF_DETACH_INITIATED "The profiler currently in use has requested to be detached from the process. The CLR has disabled communication with the profiler and will unload the profiler when it is safe to do so.\n"
715715
IDS_PROF_DETACH_COMPLETE "The CLR has fully detached and unloaded the profiler.\n"
716716
IDS_PROF_DETACH_THREAD_ERROR "There was an internal failure in the profiling API detach infrastructure. The profiler will not be able to be detached. Error code: %d.\n"
717717
IDS_PROF_CANCEL_ACTIVATION "The profiler has requested that the CLR instance not load the profiler into this process. Profiler CLSID: '%s'.\n"
718-
IDS_PROF_V2PROFILER_DISABLED "Loading profiler failed. The profiler that was configured to load was designed for an older version of the CLR. You can use the COMPlus_ProfAPI_ProfilerCompatibilitySetting environment variable to allow older profilers to be loaded by the current version of the CLR. Please consult the documentation for information on how to use this environment variable, and the risks associated with it. Profiler CLSID: '%s'.\n"
718+
IDS_PROF_V2PROFILER_DISABLED "Loading profiler failed. The profiler that was configured to load was designed for an older version of the CLR. You can use the DOTNET_ProfAPI_ProfilerCompatibilitySetting environment variable to allow older profilers to be loaded by the current version of the CLR. Please consult the documentation for information on how to use this environment variable, and the risks associated with it. Profiler CLSID: '%s'.\n"
719719
IDS_PROF_V2PROFILER_ENABLED "A profiler designed for an older version of the CLR was loaded because of the environment variable setting below. Older profilers will continue to work in many cases, but if you encounter problems, please consider upgrading the profiler or changing the setting of the environment variable. Please consult the documentation for information on how to use this environment variable, and the risks associated with it. Environment variable setting: %s=%s. Profiler CLSID: '%s'.\n"
720720
IDS_PROF_PROFILER_DISABLED "Profilers will not be loaded by the current version of the CLR because of the environment variable setting below. Please consult the documentation for information on how to use this environment variable, and the risks associated with it. Environment variable setting: %s=%s. Profiler CLSID: '%s'.\n"
721721
IDS_E_PROF_NOTIFICATION_DISABLED "Profiler was prevented from loading notification profiler due to app settings.\n"
722722
IDS_E_PROF_NOTIFICATION_LIMIT_EXCEEDED "Notification profiler was prevented from loading because the limit of notification profilers was reached.\n"
723-
IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC "Profiler timed out on waiting for concurrent GC to finish after '%d' milliseconds. Please configure your profiler to increase its attaching time out value or consult the documentation for the COMPlus_ProfAPI_AttachProfilerMinTimeoutInMs environment variable and try again. Profiler CLSID: '%s'.\n"
723+
IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC "Profiler timed out on waiting for concurrent GC to finish after '%d' milliseconds. Please configure your profiler to increase its attaching time out value and try again. Profiler CLSID: '%s'.\n"
724724
IDS_PROF_ALREADY_LOADED "A request was made to load a profiler when a profiler was already loaded.\n"
725725
END
726726

src/coreclr/inc/clrconfigvalues.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,6 @@ CONFIG_DWORD_INFO(INTERNAL_SymDiffDump, W("SymDiffDump"), 0, "Used to create the
462462
///
463463
/// Profiling API / ETW
464464
///
465-
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_COR_ENABLE_PROFILING, W("COR_ENABLE_PROFILING"), 0, "Flag to indicate whether profiling should be enabled for the currently running process.", CLRConfig::LookupOptions::DontPrependPrefix)
466-
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_COR_PROFILER, W("COR_PROFILER"), "Specifies GUID of profiler to load into currently running process", CLRConfig::LookupOptions::DontPrependPrefix)
467-
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_COR_PROFILER_PATH, W("COR_PROFILER_PATH"), "Specifies the path to the DLL of profiler to load into currently running process", CLRConfig::LookupOptions::DontPrependPrefix)
468-
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_COR_PROFILER_PATH_32, W("COR_PROFILER_PATH_32"), "Specifies the path to the DLL of profiler to load into currently running 32 bits process", CLRConfig::LookupOptions::DontPrependPrefix)
469-
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_COR_PROFILER_PATH_64, W("COR_PROFILER_PATH_64"), "Specifies the path to the DLL of profiler to load into currently running 64 bits process", CLRConfig::LookupOptions::DontPrependPrefix)
470465
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_CORECLR_ENABLE_PROFILING, W("CORECLR_ENABLE_PROFILING"), 0, "CoreCLR only: Flag to indicate whether profiling should be enabled for the currently running process.", CLRConfig::LookupOptions::DontPrependPrefix)
471466
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_CORECLR_PROFILER, W("CORECLR_PROFILER"), "CoreCLR only: Specifies GUID of profiler to load into currently running process", CLRConfig::LookupOptions::DontPrependPrefix)
472467
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_CORECLR_PROFILER_PATH, W("CORECLR_PROFILER_PATH"), "CoreCLR only: Specifies the path to the DLL of profiler to load into currently running process", CLRConfig::LookupOptions::DontPrependPrefix)

src/coreclr/inc/corprof.idl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
#if !DEFINITIONS_FROM_NON_IMPORTABLE_PLACES
1515

16-
cpp_quote("#define CorDB_CONTROL_Profiling \"Cor_Enable_Profiling\"")
17-
cpp_quote("#define CorDB_CONTROL_ProfilingL L\"Cor_Enable_Profiling\"")
18-
1916
cpp_quote("#if 0")
2017

2118

src/coreclr/pal/prebuilt/inc/corprof.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ extern "C"{
271271
/* interface __MIDL_itf_corprof_0000_0000 */
272272
/* [local] */
273273

274-
#define CorDB_CONTROL_Profiling "Cor_Enable_Profiling"
275-
#define CorDB_CONTROL_ProfilingL L"Cor_Enable_Profiling"
276274
#if 0
277275
typedef LONG32 mdToken;
278276

src/coreclr/vm/profilinghelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ HRESULT ProfilingAPIUtility::AttemptLoadProfilerForStartup()
669669

670670
if ((wszProfilerDLL != NULL) && (wcslen(wszProfilerDLL) >= MAX_LONGPATH))
671671
{
672-
LOG((LF_CORPROF, LL_INFO10, "**PROF: Profiling flag set, but COR_PROFILER_PATH was not set properly.\n"));
672+
LOG((LF_CORPROF, LL_INFO10, "**PROF: Profiling flag set, but CORECLR_PROFILER_PATH was not set properly.\n"));
673673

674674
LogProfError(IDS_E_PROF_BAD_PATH);
675675

0 commit comments

Comments
 (0)