This documents the steps necessary to configure SeaLights to run alongside any other profilers currently configured in your environment.
This is done by utilizing the Microsoft CLR Instrumentation profiler, designed to allow hosting multiple profilers simultaneously.
Table of Contents
Configuring the Microsoft CLR Instrumentation Engine to run multiple profilers
...
- Ensure the following environment variables are aligned:
- COR_PROFILER={324F817A-7420-4E6D-B3C1-143FBED6D855}
- COR_PROFILER_PATH_64=C:\<path to where the file is>\MicrosoftInstrumentationEngine_x64.dll
Prepare an XML file to be used to link the two profilers, to be referenced in the next step. Please note the following:
- The first entry refers to the 3rd party profiler which should be running alongside SeaLights.
- The second entry refers to the SeaLights .NET profiler.
- The SeaLights Profiler DLL can be x64 or x86 architecture, depending on the architecture of the process from which coverage should be collected
- Important: The path to each profiler DLL is relative to the location of this XML config file!
- Placing all referenced binaries in the same folder as the XML configuration file will ensure they can be found.
Code Block title MSCLR XML Configuration <InstrumentationEngineConfiguration> <InstrumentationMethod> <Name>VS Profiler</Name> <Description>Visual Studio Profiler</Description> <Module>VSPerfCorProf.dll</Module> <ClassGuid>{33708259-ba1b-4add-9de4-d4f280ea1223}</ClassGuid> <Priority>60</Priority> </InstrumentationMethod> <InstrumentationMethod> <Name>SL Profiler</Name> <Description>Sealights .NET profiler</Description> <Module>SL.DotNet.ProfilerLib_x64.dll</Module> OR <Module>SL.DotNet.ProfilerLib_x86.dll</Module> <ClassGuid>{01CA2C22-DC03-4FF5-8350-59E32A3536BA}</ClassGuid> <Priority>50</Priority> </InstrumentationMethod> </InstrumentationEngineConfiguration>
Define 2 additional environment variables:
- MicrosoftInstrumentationEngine_ConfigPath64_=C:\<Path to MSCLR XML Configuration file.xml>
- MicrosoftInstrumentationEngine_DisableCodeSignatureValidation=1
- When the service is restarted, it will be running SeaLights along with the 3rd party profiler, which will both run under the Microsoft CLR Instrumentation Engine.
...