Out-of-process COM servers are implemented in executable files (.exe modules) and they are run in a separate address space. If you need to profile these types of programs, you need to load them in AQTime as a project, not as an additional module in another project. You can profile out-of-process servers either in Normal or in COM Server mode. To decide which profiling mode to choose, see Profiling COM Applications - Overview.
Profiling in Normal Mode
To profile your application in Normal mode, follow these steps:
-
Compile your out-of-process COM server with debug information. See How AQTime Profilers Use Metadata and Debug Information for detailed information on how to do this.
-
Be sure the “debug” version of your COM server is registered in the system. If the server was compiled on your machine, it was registered during compilation. In any case, you can use the regsvr32 utility located in the <Windows>\System folder to register the server, for example:
regsvr32.exe “C:\COM Servers\MyServer.exe” -
Open the out-of-process COM server in AQTime as a project and specify areas, triggers and actions (see Controlling What to Profile).
-
Select Normal from the Profiling Mode dropdown list box that is displayed on AQTime’s Standard toolbar.Select Normal from the Profiling Mode dropdown list box that is displayed on Visual Studio’s AQTime toolbar.Click the Normal button on RAD Studio’s AQTime Profiling Modes toolbar.
-
Start profiling. Make sure that the profiled application (that is, the server) can find all additional modules it requires.
-
Launch the COM client. This is your “user” for the profiled application (the server).
-
Work with the COM client and COM server application as needed.
-
Close the client and server applications. We recommended that you first close the COM client and then the COM server.
Note that since you start the COM server from AQTime, the latter always profiles the initialization and finalization code. If you need to profile this code when your COM server is launched by the operating system, use the COM Server mode (see below).
Profiling in COM Server Mode
To profile your application in COM Server mode, follow these steps:
-
Compile your out-of-process COM server with debug information. See How AQTime Profilers Use Metadata and Debug Information for detailed information on how to do this.
-
Be sure the “debug” version of your COM server is registered in the system.
-
Open the out-of-process COM server in AQTime as a project and specify areas and triggers (see Controlling What to Profile).
-
Select COM Server from the Profiling Mode dropdown list box that is displayed on AQTime’s Standard toolbar.Select COM Server from the Profiling Mode dropdown list box that is displayed on Visual Studio’s AQTime toolbar.Click the COM Server button on RAD Studio’s AQTime Profiling Modes toolbar.
-
Select Run > Parameters from AQTime’s main menu.Select AQTime > Parameters from Visual Studio’s menu.Select AQTime > Parameters from RAD Studio’s main menu. This will open the Run Parameters Dialog (for COM Server Mode). In the dialog:
-
In the Client Application box, specify the full path to your COM client application’s executable.
-
Press OK to close the dialog.
-
-
Press Run to start profiling. Select AQTime > Run (or select Debug > Run while one of AQTime panels is active) to start profiling.Select AQTime > Run With Profiling to start profiling. AQTime will display a message informing that you should run the client application.
-
Launch the COM client.
-
Work with the COM client and COM server application as needed.
-
Close the client and server applications.
See Also
Profiling COM Applications
Profiling COM Applications - Overview
Profiling In-Process COM Servers